:root {
    --primary-color: #8b5cf6; /* Violet */
    --secondary-color: #6d28d9; /* Violet foncé */
    --accent-color: #a78bfa; /* Violet clair */
    --bg-dark: #1a1a2e;
    --bg-light: #16213e;
    --text-light: #ffffff;
    --text-gray: #d1d5db;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%);
    color: var(--text-light);
    min-height: 100vh;
}

/* Header */
.header {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-color);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-section img {
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

.logo-section h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: rgba(22, 33, 62, 0.8);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.3);
}

.card-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.8rem;
    color: var(--text-light);
}

.card-header p {
    color: var(--text-gray);
    margin-top: 0.5rem;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 92, 246, 0.6);
}

.btn-discord {
    background: #5865F2;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-secondary {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-light);
    border: 1px solid var(--primary-color);
}

/* Formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.form-group label.required::after {
    content: " *";
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(26, 26, 46, 0.6);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

/* Login page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-card {
    background: rgba(22, 33, 62, 0.9);
    border-radius: 16px;
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.login-card img {
    height: 120px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6));
}

.login-card h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.status-approved {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.table th {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-light);
    font-weight: 600;
}

.table tr:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-info {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid var(--primary-color);
    color: var(--accent-color);
}

/* Navigation */
.nav-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

.nav-tab {
    padding: 1rem 1.5rem;
    background: transparent;
    color: var(--text-gray);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.nav-tab:hover,
.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Details/Summary */
details {
    border-radius: 8px;
    overflow: hidden;
}

details summary {
    padding: 0.75rem;
    user-select: none;
}

details[open] summary {
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .card {
        padding: 1.75rem;
    }
    
    /* Grilles adaptatives */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    /* Header */
    .header {
        padding: 0.75rem 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo-section img {
        height: 40px;
    }
    
    .logo-section h1 {
        font-size: 1.25rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .user-info span {
        font-size: 0.9rem;
    }
    
    /* Container */
    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    /* Cards */
    .card {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .card-header p {
        font-size: 0.9rem;
    }
    
    /* Boutons */
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .btn-discord {
        max-width: 100% !important;
    }
    
    /* Login page */
    .login-card {
        padding: 2rem;
    }
    
    .login-card h1 {
        font-size: 1.75rem;
    }
    
    .login-card img {
        height: 80px;
    }
    
    /* Tables */
    .table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .table thead {
        display: none;
    }
    
    .table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid rgba(139, 92, 246, 0.2);
        border-radius: 8px;
        padding: 0.75rem;
    }
    
    .table td {
        display: block;
        text-align: right;
        padding: 0.5rem;
        border: none;
        position: relative;
        padding-left: 50%;
    }
    
    .table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        font-weight: 600;
        text-align: left;
        color: var(--primary-color);
    }
    
    /* Navigation tabs */
    .nav-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        flex: 1;
        text-align: center;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    .form-control {
        font-size: 0.95rem;
    }
    
    /* Status badges */
    .status-badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
    
    /* Grilles */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Boutons dans actions */
    td[data-label="Actions"] {
        padding-left: 0.5rem !important;
    }
    
    td[data-label="Actions"] > div {
        flex-direction: column !important;
    }
    
    td[data-label="Actions"] .btn {
        width: 100%;
        margin: 0 !important;
    }
    
    /* Headers de formulaires */
    .form-header-responsive {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .form-actions-responsive {
        width: 100%;
        flex-direction: column !important;
    }
    
    .form-actions-responsive .btn {
        width: 100%;
    }
    
    /* Boutons de formulaires */
    .form-buttons-responsive {
        flex-direction: column !important;
    }
    
    .form-buttons-responsive .btn,
    .form-buttons-responsive a {
        width: 100% !important;
        flex: none !important;
    }
    
    /* Info utilisateur avec avatar */
    .user-info-responsive {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }
    
    .user-info-responsive h2 {
        font-size: 1.25rem !important;
    }
    
    .user-info-responsive p {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    .header {
        padding: 0.5rem;
    }
    
    .logo-section h1 {
        font-size: 1.1rem !important;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .card {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .card-header h2 {
        font-size: 1.25rem;
    }
    
    .card-header p {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .login-card h1 {
        font-size: 1.5rem;
    }
    
    .login-card p {
        font-size: 0.85rem;
    }
    
    .login-card img {
        height: 60px;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .status-badge {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }
    
    /* Réduire les paddings */
    div[style*="padding: 1.5rem"] {
        padding: 1rem !important;
    }
    
    div[style*="padding: 1rem"] {
        padding: 0.75rem !important;
    }
    
    /* Réponses/champs */
    h3 {
        font-size: 1.1rem !important;
    }
    
    h4 {
        font-size: 1rem !important;
    }
    
    /* Input et textarea plus petits */
    .form-control {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    textarea.form-control {
        min-height: 100px;
    }
}

/* Styles supplémentaires pour ultra-petits écrans */
@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .card {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .card-header h2 {
        font-size: 1.1rem;
    }
}