/* ============================================================================
   SYSTÈME DE NOTATION INTELLIGENT - STYLES COMPLETS
   Version: 2.1 - Décembre 2025
   ============================================================================ */

/* ============================================================================
   VARIABLES CSS - PALETTE DE COULEURS MODERNE
   ============================================================================ */
:root {
    /* Couleurs Primaires */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    
    /* Couleurs Secondaires */
    --secondary: #64748b;
    --secondary-dark: #475569;
    
    /* Couleurs de Status */
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --info: #06b6d4;
    --info-dark: #0891b2;
    
    /* Couleurs de Fond */
    --background: #f1f5f9;
    --surface: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Bordures */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   AUTH SCREENS (LOGIN & REGISTER)
   ============================================================================ */
.auth-screen,
#login-screen,
#register-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
    position: relative;
}

.auth-screen::before,
#login-screen::before,
#register-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.auth-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 48px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-lg);
}

.auth-logo i {
    font-size: 36px;
    color: white;
}

.auth-container h2,
.auth-header h1 {
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header p {
    color: var(--text-light);
    font-size: 15px;
}

.auth-form .form-group,
.auth-container .form-group {
    margin-bottom: 20px;
}

.auth-form label,
.auth-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.auth-form label i,
.auth-container label i {
    margin-right: 6px;
    color: var(--primary);
}

.auth-form input,
.auth-container input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
    background: var(--surface);
    font-family: inherit;
}

.auth-form input:hover,
.auth-container input:hover {
    border-color: var(--primary-light);
}

.auth-form input:focus,
.auth-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-light);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.auth-container .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

/* ============================================================================
   APP HEADER
   ============================================================================ */
.app-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    font-size: 28px;
    color: var(--primary);
}

.header-content h1,
.app-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--background);
    border-radius: var(--radius);
    text-align: right;
}

.user-info strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.user-name {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.user-badge,
.user-info .user-role {
    background: var(--primary-light);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-top: 2px;
    display: inline-block;
}

#theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-light);
    transition: var(--transition);
    padding: 8px;
}

#theme-toggle:hover {
    color: var(--primary);
}

/* ============================================================================
   NAVIGATION TABS
   ============================================================================ */
.main-nav {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 65px;
    z-index: 99;
}

.nav-tabs {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 4px;
    padding: 16px 24px;
    background: white;
    border-bottom: none;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-light);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-tab i {
    margin-right: 6px;
    font-size: 16px;
}

.nav-tab:hover {
    color: var(--primary);
    background: var(--background);
}

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

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */
.main-content,
#main-content {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    color: var(--text);
    font-size: 28px;
    margin: 0 0 8px 0;
}

.page-header p {
    color: var(--text-light);
    margin: 0;
}

/* ============================================================================
   GRILLE
   ============================================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* ============================================================================
   CARDS
   ============================================================================ */
.card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
}

.card-header h4 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
}

.card > p,
.card > div:not(.card-header) {
    padding: 20px 24px;
}

/* ============================================================================
   STAT CARDS
   ============================================================================ */
.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border-top: 3px solid;
    border-image: linear-gradient(135deg, var(--primary), var(--primary-dark)) 1;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-label {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-label i {
    margin-right: 6px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

/* ============================================================================
   FORMS
   ============================================================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    margin-right: 6px;
    color: var(--primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: var(--primary);
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-row.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

/* ============================================================================
   BOUTONS - AVEC VRAIS STYLES PROFESSIONNELS
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn i {
    font-size: 16px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-secondary:hover {
    background: #475569;
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-warning:hover {
    background: #d97706;
}

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

.btn-info:hover {
    background: #0891b2;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    justify-content: center;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================================================
   BOUTONS D'ACTION POUR LES TABLEAUX (MODIFIER / SUPPRIMER)
   ============================================================================ */
.btn-icon-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-icon-sm:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-icon-sm i {
    font-size: 14px;
}

/* Style spécifique pour le bouton Modifier (Warning/Jaune) */
.btn-icon-sm.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-icon-sm.btn-warning:hover {
    background: var(--warning-dark);
}

/* Style spécifique pour le bouton Supprimer (Danger/Rouge) */
.btn-icon-sm.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-icon-sm.btn-danger:hover {
    background: var(--danger-dark);
}

/* ============================================================================
   TABLEAUX
   ============================================================================ */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--background);
    position: sticky;
    top: 0;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    border-bottom: 2px solid var(--border);
}

th i {
    margin-right: 6px;
    color: var(--primary);
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
}

tr:hover {
    background: var(--background);
}

tbody tr:last-child td {
    border-bottom: none;
}

.user-table {
    width: 100%;
}

/* ============================================================================
   BADGES DE STATUT
   ============================================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge i {
    font-size: 12px;
}

.status-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.secondary {
    background: #e2e8f0;
    color: #475569;
}

.status-badge.info {
    background: #cffafe;
    color: #155e75;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================================
   ALERTES
   ============================================================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
}

.alert i {
    font-size: 20px;
    flex-shrink: 0;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================================
   LOADER
   ============================================================================ */
#loader,
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

#loader p,
.loader p {
    color: white;
    margin-top: 16px;
    font-weight: 600;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   MODAL
   ============================================================================ */
#modal,
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 32px;
    border-radius: var(--radius-lg);
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease-out;
    position: relative;
}

.modal-content h2 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 24px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================================================
   UTILITAIRES
   ============================================================================ */
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.gap-2 { gap: 12px; }

.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-style: italic;
}

.empty-message i {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ============================================================================
   RÉCLAMATIONS
   ============================================================================ */
.reclamation-item {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    border-left: 4px solid var(--warning);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.reclamation-item.pending {
    border-left-color: var(--warning);
}

.reclamation-item.resolved {
    border-left-color: var(--success);
}

.reclamation-item.rejected {
    border-left-color: var(--danger);
}

.reclamation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.reclamation-item p {
    margin: 8px 0;
    color: var(--text);
}

/* ============================================================================
   MAQUETTE PÉDAGOGIQUE
   ============================================================================ */
.formations-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.formation-card {
    background: white;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.formation-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.formation-header h4 {
    margin: 0;
    font-size: 20px;
}

.formation-actions {
    display: flex;
    gap: 8px;
}

.semesters-container {
    padding: 20px;
}

.semester-card {
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.semester-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ues-container {
    margin-top: 12px;
    padding-left: 20px;
}

.ue-card {
    background: white;
    border-left: 4px solid var(--success);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.ue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ecs-list {
    margin-top: 12px;
    padding-left: 20px;
}

.ec-item {
    background: #fef3c7;
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================================
   GESTION DES UTILISATEURS
   ============================================================================ */
.user-management {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.user-stats {
    display: flex;
    gap: 12px;
}

.user-stats span {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-stats span i {
    font-size: 16px;
}

.create-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.user-section {
    margin-bottom: 40px;
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.user-section h3 {
    color: var(--text);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-section h3 i {
    color: var(--primary);
    font-size: 20px;
}

/* ============================================================================
   STATISTIQUES
   ============================================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .app-header,
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-tabs {
        overflow-x: auto;
        padding: 0 12px;
    }
    
    .nav-tab {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .formation-header,
    .semester-header,
    .ue-header,
    .ec-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .reclamation-header {
        flex-direction: column;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .modal-content {
        margin: 10% 5%;
        padding: 20px;
    }
    
    .user-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-stats {
        margin-top: 12px;
        flex-wrap: wrap;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header h2 {
        font-size: 24px;
    }
    
    .card {
        padding: 16px;
    }
    
    .auth-container {
        padding: 32px 24px;
    }
    
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 10px 8px;
    }

    .formation-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
/* Notifications badge */
#notif-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Incidents severity colors */
.incident-high {
    color: #ef4444;
    font-weight: bold;
}

.incident-medium {
    color: #f59e0b;
}

.incident-low {
    color: #10b981;
}

/* ============================================================================
   THÈME SOMBRE
   ============================================================================ */

.theme-dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #475569;
}

.theme-dark body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.theme-dark .card,
.theme-dark .modal-content {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.theme-dark .nav-tab {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.theme-dark .nav-tab:hover,
.theme-dark .nav-tab.active {
    background: #2563eb;
    color: white;
}

.theme-dark table {
    background: var(--bg-secondary);
}

.theme-dark thead {
    background: var(--bg-tertiary);
}

.theme-dark tbody tr {
    border-color: var(--border-color);
}

.theme-dark tbody tr:hover {
    background: var(--bg-tertiary);
}

.theme-dark input,
.theme-dark select,
.theme-dark textarea {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.theme-dark .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.theme-dark .stat-card {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.theme-dark .alert {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}