/* Styles de base pour la version 2.0 */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header du profil amélioré */
.profile-header-v2 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.profile-header-v2::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.profile-header-v2 > * {
    position: relative;
    z-index: 1;
}

.profile-avatar-v2 {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-md);
}

.profile-info-v2 {
    flex: 1;
    min-width: 0;
}

.profile-name-v2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
}

.profile-status-v2 {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-details-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.profile-detail-item-v2 {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Cartes statistiques améliorées */
.stats-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card-v2 {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stat-card-v2:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon-v2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.stat-value-v2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label-v2 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Cartes de contenu améliorées */
.content-card-v2 {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.content-card-v2:hover {
    box-shadow: var(--shadow-lg);
}

.card-header-v2 {
    background: var(--light-bg);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: between;
    align-items: center;
}

.card-title-v2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body-v2 {
    padding: 1.25rem;
}

/* Boutons améliorés */
.btn-v2 {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-primary-v2 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary-v2:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success-v2 {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success-v2:hover {
    background: linear-gradient(135deg, #059669, var(--success-color));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
    text-decoration: none;
}

.btn-outline-v2 {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-v2:hover {
    background: var(--primary-color);
    color: white;
}

/* Tableaux améliorés */
.table-v2 {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table-v2 th {
    background: var(--light-bg);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.table-v2 td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-v2 tbody tr:hover {
    background: var(--light-bg);
}

/* Badges améliorés */
.badge-v2 {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success-v2 {
    background: #dcfce7;
    color: #166534;
}

.badge-warning-v2 {
    background: #fef3c7;
    color: #92400e;
}

.badge-info-v2 {
    background: #cffafe;
    color: #155e75;
}

.badge-danger-v2 {
    background: #fee2e2;
    color: #991b1b;
}

/* Alertes améliorées */
.alert-v2 {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--light-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.alert-info-v2 {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Progress bar améliorée */
.progress-v2 {
    background: var(--border-color);
    border-radius: var(--radius-sm);
    height: 0.5rem;
    overflow: hidden;
}

.progress-bar-v2 {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--info-color));
    transition: width 0.3s ease;
}

/* Styles pour les tests de niveau */
.test-item-v2 {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.test-item-v2:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.test-item-v2 .badge-v2 {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.test-item-v2 .text-primary {
    color: var(--primary-color) !important;
}

.test-item-v2 .text-success {
    color: var(--success-color) !important;
}

.test-item-v2 .text-danger {
    color: var(--danger-color) !important;
}

.test-item-v2 .text-warning {
    color: var(--warning-color) !important;
}

.test-item-v2 .text-muted {
    color: var(--text-secondary) !important;
}

/* Animation pour les badges de statut */
.test-item-v2 .badge-v2 {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

.score-niveau-large {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    display: inline-block;
    margin-top: 0.25rem;
}
.score-niveau-large .badge-v2 {
    font-size: 1.1rem;
    padding: 0.4rem 0.8rem;
    margin-right: 0.5rem;
}

/* En-tête très visible pour sections importantes */
.highlight-header {
    background: linear-gradient(90deg, #f97316, #ef4444); /* orange -> red pour bonne visibilité */
    color: #ffffff !important;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 10px rgba(239,68,68,0.15);
}

.highlight-header h4, .highlight-header h5 {
    margin: 0;
    color: #ffffff !important;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid-v2 {
        grid-template-columns: 1fr;
    }
    
    .profile-header-v2 {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar-v2 {
        margin-bottom: 1rem;
    }
    
    .profile-details-v2 {
        justify-content: center;
    }
    
    .test-item-v2 .row {
        flex-direction: column;
    }
    
    .test-item-v2 .col-md-6 {
        margin-bottom: 0.5rem;
    }

    /* Actualités responsive */
    .news-card {
        margin-bottom: 1rem;
    }

    .news-image {
        height: 150px !important;
    }
}

/* ===== STYLES POUR LES ACTUALITÉS (LISTE) ===== */

/* Liste d'actualités épurée */
.list-group-item {
    transition: all 0.2s ease;
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
}

.list-group-item:hover {
    background-color: var(--light-bg);
    transform: translateX(5px);
}

/* Liens des titres d'actualités */
.list-group-item h6 a {
    transition: color 0.2s ease;
}

.list-group-item h6 a:hover {
    color: var(--primary-color) !important;
}

/* Boutons d'action dans la liste */
.list-group-item .btn {
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-group-item .btn:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

/* Icônes de date */
.list-group-item .fas.fa-calendar-alt {
    color: var(--primary-color);
    opacity: 0.7;
}

/* Animation d'apparition pour les éléments de liste */
.list-group-item {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.list-group-item:nth-child(1) { animation-delay: 0.1s; }
.list-group-item:nth-child(2) { animation-delay: 0.2s; }
.list-group-item:nth-child(3) { animation-delay: 0.3s; }
.list-group-item:nth-child(4) { animation-delay: 0.4s; }
.list-group-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Séparateur subtil entre les éléments */
.list-group-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

/* Responsive pour la liste */
@media (max-width: 768px) {
    .list-group-item {
        padding: 1rem 0.5rem;
    }

    .list-group-item h6 {
        font-size: 0.95rem;
    }

    .list-group-item small {
        font-size: 0.8rem;
    }
}

/* Styles pour l'état vide */
.empty-news-state {
    padding: 3rem 1rem;
    text-align: center;
}

.empty-news-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-news-state h5 {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.empty-news-state p {
    color: #adb5bd;
    font-size: 0.9rem;
}


        /* Overrides to replace primary blue with light gray and dark text on this page */
        :root {
            --primary-50: #f7f7f7 !important;
            --primary-100: #f3f3f3 !important;
            --primary-200: #eee !important;
            --primary-300: #e9e9e9 !important;
            --primary-400: #e3e3e3 !important;
            --primary-500: #dddddd !important;
            --primary-600: #f1f1f1 !important;
            --primary-700: #e0e0e0 !important;
            --primary-800: #d0d0d0 !important;
            --primary-900: #c0c0c0 !important;
        }

        /* Utility overrides */
        .text-primary, .text-primary * { color: #111 !important; }
        .bg-primary, .bg-primary * { background-color: #f1f1f1 !important; color: #111 !important; }
        .border-primary { border-color: #111 !important; }
        .badge.bg-primary { background-color: #f1f1f1 !important; color: #111 !important; }

        /* Buttons fallback to ensure any primary button is gray */
        .btn-primary, .btn-primary-v2, .btn-outline-primary, .btn-outline-v2 {
            background-color: #f1f1f1 !important;
            color: #111 !important;
            border: 1.5px solid #111 !important;
        }

        .btn-primary:hover, .btn-primary:focus,
        .btn-primary-v2:hover, .btn-primary-v2:focus,
        .btn-outline-primary:hover, .btn-outline-primary:focus,
        .btn-outline-v2:hover, .btn-outline-v2:focus {
            background-color: #e0e0e0 !important;
            color: #111 !important;
            border-color: #111 !important;
        }

        /* Specific: make header/profile banner area neutral if present */
        .profile-banner, .profile-banner * { background: #f1f1f1 !important; color: #222 !important; }

        /* ========================================
           CSS MODERNE POUR DASHBOARD UTILISATEUR
           Version 3.0 - Design System Moderne
           ======================================== */

        /* ========================================
           VARIABLES CSS MODERNES
           ======================================== */
        :root {
            /* ========================================
               PALETTE DE COULEURS MODERNE
               ======================================== */
            --primary-50: #eff6ff;
            --primary-100: #dbeafe;
            --primary-200: #bfdbfe;
            --primary-300: #93c5fd;
            --primary-400: #60a5fa;
            --primary-500: #3b82f6;
            --primary-600: #2563eb;
            --primary-700: #1d4ed8;
            --primary-800: #1e40af;
            --primary-900: #1e3a8a;

            --gray-50: #f9fafb;
            --gray-100: #f3f4f6;
            --gray-200: #e5e7eb;
            --gray-300: #d1d5db;
            --gray-400: #9ca3af;
            --gray-500: #6b7280;
            --gray-600: #4b5563;
            --gray-700: #374151;
            --gray-800: #1f2937;
            --gray-900: #111827;

            --success-50: #ecfdf5;
            --success-500: #10b981;
            --success-600: #059669;

            --warning-50: #fffbeb;
            --warning-500: #f59e0b;
            --warning-600: #d97706;

            --danger-50: #fef2f2;
            --danger-500: #ef4444;
            --danger-600: #dc2626;

            --info-50: #f0f9ff;
            --info-500: #06b6d4;
            --info-600: #0891b2;

            /* ========================================
               TYPOGRAPHIE MODERNE
               ======================================== */
            --font-family-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            --font-family-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;

            --text-xs: 0.75rem; /* 12px */
            --text-sm: 0.875rem; /* 14px */
            --text-base: 1rem; /* 16px */
            --text-lg: 1.125rem; /* 18px */
            --text-xl: 1.25rem; /* 20px */
            --text-2xl: 1.5rem; /* 24px */
            --text-3xl: 1.875rem; /* 30px */
            --text-4xl: 2.25rem; /* 36px */

            --font-thin: 100;
            --font-light: 300;
            --font-normal: 400;
            --font-medium: 500;
            --font-semibold: 600;
            --font-bold: 700;
            --font-extrabold: 800;

            --leading-tight: 1.25;
            --leading-snug: 1.375;
            --leading-normal: 1.5;
            --leading-relaxed: 1.625;

            /* ========================================
               ESPACEMENTS HARMONIEUX
               ======================================== */
            --space-0: 0;
            --space-px: 1px;
            --space-0-5: 0.125rem; /* 2px */
            --space-1: 0.25rem; /* 4px */
            --space-1-5: 0.375rem; /* 6px */
            --space-2: 0.5rem; /* 8px */
            --space-2-5: 0.625rem; /* 10px */
            --space-3: 0.75rem; /* 12px */
            --space-3-5: 0.875rem; /* 14px */
            --space-4: 1rem; /* 16px */
            --space-5: 1.25rem; /* 20px */
            --space-6: 1.5rem; /* 24px */
            --space-7: 1.75rem; /* 28px */
            --space-8: 2rem; /* 32px */
            --space-9: 2.25rem; /* 36px */
            --space-10: 2.5rem; /* 40px */
            --space-11: 2.75rem; /* 44px */
            --space-12: 3rem; /* 48px */
            --space-14: 3.5rem; /* 56px */
            --space-16: 4rem; /* 64px */
            --space-20: 5rem; /* 80px */
            --space-24: 6rem; /* 96px */

            /* ========================================
               BORDURES ET RAYONS
               ======================================== */
            --rounded-none: 0;
            --rounded-sm: 0.125rem; /* 2px */
            --rounded: 0.25rem; /* 4px */
            --rounded-md: 0.375rem; /* 6px */
            --rounded-lg: 0.5rem; /* 8px */
            --rounded-xl: 0.75rem; /* 12px */
            --rounded-2xl: 1rem; /* 16px */
            --rounded-3xl: 1.5rem; /* 24px */
            --rounded-full: 9999px;

            --border-width: 1px;
            --border-width-2: 2px;
            --border-width-4: 4px;
            --border-width-8: 8px;

            /* ========================================
               OMBRES MODERNES
               ======================================== */
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
            --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
            --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

            /* ========================================
               TRANSITIONS ET ANIMATIONS
               ======================================== */
            --duration-75: 75ms;
            --duration-100: 100ms;
            --duration-150: 150ms;
            --duration-200: 200ms;
            --duration-300: 300ms;
            --duration-500: 500ms;
            --duration-700: 700ms;
            --duration-1000: 1000ms;

            --ease-linear: linear;
            --ease-in: cubic-bezier(0.4, 0, 1, 1);
            --ease-out: cubic-bezier(0, 0, 0.2, 1);
            --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

            /* ========================================
               Z-INDEX SYSTÈME
               ======================================== */
            --z-0: 0;
            --z-10: 10;
            --z-20: 20;
            --z-30: 30;
            --z-40: 40;
            --z-50: 50;
            --z-auto: auto;
        }

        /* ========================================
           RESET ET BASE
           ======================================== */
        * {
            box-sizing: border-box;
        }

        body {
            font-family: var(--font-family-sans);
            font-size: var(--text-base);
            line-height: var(--leading-normal);
            color: var(--gray-900);
            background-color: var(--gray-50);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* ========================================
           LAYOUT PRINCIPAL
           ======================================== */
        .wrapper {
            display: flex;
            width: 100%;
            min-height: 100vh;
            position: relative;
        }

        #content {
            width: 100%;
            padding: var(--space-6);
            margin-left: 300px; /* Aligné sur la largeur du menu */
            transition: margin-left var(--duration-300) var(--ease-out);
            min-height: 100vh;
            position: relative;
        }

        .container-fluid {
            max-width: 1400px;
            margin: 0 auto;
            padding: var(--space-4);
        }

        /* ========================================
           CARTES MODERNES V2
           ======================================== */
        .content-card-v2 {
            background: white;
            border-radius: var(--rounded-xl);
            box-shadow: var(--shadow-md);
            border: var(--border-width) solid var(--gray-200);
            overflow: hidden;
            transition: all var(--duration-300) var(--ease-out);
            margin-bottom: var(--space-6);
            width: 100%;
            max-width: none;
        }

        .content-card-v2:hover {
            box-shadow: var(--shadow-lg);
            transform: translateY(-2px);
            border-color: var(--primary-300);
        }

        .card-header-v2 {
            background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
            padding: var(--space-6);
            border-bottom: var(--border-width) solid var(--gray-200);
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: var(--space-4);
        }

        .card-title-v2 {
            font-size: var(--text-xl);
            font-weight: var(--font-bold);
            color: var(--gray-900) !important;
            margin: 0;
            display: flex;
            align-items: center;
            gap: var(--space-3);
        }

        .card-title-v2 i {
            color: var(--primary-600) !important;
            font-size: var(--text-lg);
        }

        .card-body-v2 {
            padding: var(--space-6);
            color: var(--gray-900) !important;
        }

        .card-body-v2 p,
        .card-body-v2 div,
        .card-body-v2 span {
            color: var(--gray-900) !important;
        }

        /* ========================================
           ALERTES MODERNES V2
           ======================================== */
        .alert-v2 {
            border-radius: var(--rounded-lg);
            border: var(--border-width) solid;
            padding: var(--space-4);
            margin-bottom: var(--space-4);
            display: flex;
            align-items: flex-start;
            gap: var(--space-3);
            font-weight: var(--font-medium);
            color: var(--gray-900) !important;
        }

        .alert-info-v2 {
            background: linear-gradient(135deg, var(--info-50) 0%, var(--info-100) 100%);
            border-color: var(--info-500);
            color: var(--gray-900) !important;
        }

        .alert-success-v2 {
            background: linear-gradient(135deg, var(--success-50) 0%, var(--success-100) 100%);
            border-color: var(--success-500);
            color: var(--gray-900) !important;
        }

        .alert-warning-v2 {
            background: linear-gradient(135deg, var(--warning-50) 0%, var(--warning-100) 100%);
            border-color: var(--warning-500);
            color: var(--gray-900) !important;
        }

        .alert-danger-v2 {
            background: linear-gradient(135deg, var(--danger-50) 0%, var(--danger-100) 100%);
            border-color: var(--danger-500);
            color: var(--gray-900) !important;
        }

        /* ========================================
           BOUTONS MODERNES V2
           ======================================== */
        .btn-v2 {
            display: inline-flex;
            align-items: center;
            gap: var(--space-2);
            padding: var(--space-2-5) var(--space-4);
            font-size: var(--text-sm);
            font-weight: var(--font-medium);
            border-radius: var(--rounded-lg);
            border: var(--border-width) solid transparent;
            text-decoration: none;
            cursor: pointer;
            transition: all var(--duration-200) var(--ease-out);
            box-shadow: var(--shadow-sm);
        }

        .btn-v2:hover {
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
            text-decoration: none;
        }

        .btn-primary-v2 {
            background-color: #f1f1f1 !important;
            color: #111 !important;
            border-color: #111 !important;
        }

        .btn-primary-v2:hover {
            background-color: #e0e0e0 !important;
            border-color: #111 !important;
            color: #111 !important;
        }

        .btn-outline-v2 {
            background-color: #f1f1f1 !important;
            color: #111 !important;
            border-color: #111 !important;
        }

        .btn-outline-v2:hover {
            background-color: #e0e0e0 !important;
            color: #111 !important;
            border-color: #111 !important;
        }

        .btn-success-v2 {
            background-color: var(--success-500);
            color: white;
            border-color: var(--success-500);
        }

        .btn-success-v2:hover {
            background-color: var(--success-600);
            border-color: var(--success-600);
            color: white;
        }

        /* ========================================
           BADGES MODERNES V2
           ======================================== */
        .badge-success-v2 {
            background-color: var(--success-500) !important;
            color: white !important;
            font-size: var(--text-xs);
            font-weight: var(--font-medium);
            padding: var(--space-1) var(--space-2);
            border-radius: var(--rounded-full);
            text-transform: uppercase;
            letter-spacing: 0.025em;
            display: inline-flex;
            align-items: center;
            gap: var(--space-1);
        }

        .badge-warning-v2 {
            background-color: var(--warning-500) !important;
            color: white !important;
            font-size: var(--text-xs);
            font-weight: var(--font-medium);
            padding: var(--space-1) var(--space-2);
            border-radius: var(--rounded-full);
            text-transform: uppercase;
            letter-spacing: 0.025em;
            display: inline-flex;
            align-items: center;
            gap: var(--space-1);
        }

        .badge-info-v2 {
            background-color: var(--info-500) !important;
            color: white !important;
            font-size: var(--text-xs);
            font-weight: var(--font-medium);
            padding: var(--space-1) var(--space-2);
            border-radius: var(--rounded-full);
            text-transform: uppercase;
            letter-spacing: 0.025em;
            display: inline-flex;
            align-items: center;
            gap: var(--space-1);
        }

        .badge-danger-v2 {
            background-color: var(--danger-500) !important;
            color: white !important;
            font-size: var(--text-xs);
            font-weight: var(--font-medium);
            padding: var(--space-1) var(--space-2);
            border-radius: var(--rounded-full);
            text-transform: uppercase;
            letter-spacing: 0.025em;
            display: inline-flex;
            align-items: center;
            gap: var(--space-1);
        }

        .badge-primary-v2 {
            background-color: var(--primary-600) !important;
            color: white !important;
            font-size: var(--text-xs);
            font-weight: var(--font-medium);
            padding: var(--space-1) var(--space-2);
            border-radius: var(--rounded-full);
            text-transform: uppercase;
            letter-spacing: 0.025em;
            display: inline-flex;
            align-items: center;
            gap: var(--space-1);
        }

        /* ========================================
           CORRECTIONS DE VISIBILITÉ COMPLÈTES
           ======================================== */
        h1, h2, h3, h4, h5, h6 {
            color: var(--gray-900) !important;
            font-weight: var(--font-bold);
        }

        .content-card-v2 h1,
        .content-card-v2 h2,
        .content-card-v2 h3,
        .content-card-v2 h4,
        .content-card-v2 h5,
        .content-card-v2 h6 {
            color: var(--gray-900) !important;
        }

        .content-card-v2 * {
            color: var(--gray-900) !important;
        }

        .card-header-v2 * {
            color: var(--gray-900) !important;
        }

        .text-muted {
            color: var(--gray-600) !important;
        }

        .text-primary {
            color: var(--primary-600) !important;
        }

        .text-success {
            color: var(--success-600) !important;
        }

        .text-warning {
            color: var(--warning-600) !important;
        }

        .text-danger {
            color: var(--danger-600) !important;
        }

        .text-info {
            color: var(--info-600) !important;
        }

        .small {
            font-size: var(--text-sm);
            color: var(--gray-600) !important;
        }

        .lead {
            font-size: var(--text-lg);
            color: var(--gray-700) !important;
        }

        /* Force la visibilité dans tous les contextes */
        .content-card-v2 .text-muted {
            color: var(--gray-600) !important;
        }

        .content-card-v2 .text-primary {
            color: var(--primary-600) !important;
        }

        .content-card-v2 .text-success {
            color: var(--success-600) !important;
        }

        .content-card-v2 .text-warning {
            color: var(--warning-600) !important;
        }

        .content-card-v2 .text-danger {
            color: var(--danger-600) !important;
        }

        .content-card-v2 .text-info {
            color: var(--info-600) !important;
        }

        /* ========================================
           EXCEPTION POUR LE MENU SIDEBAR
           ======================================== */
        .sidebar-improved a,
        .sidebar-improved .nav-link,
        #sidebar a,
        #sidebar .nav-link {
            color: rgba(255, 255, 255, 0.8) !important;
        }

        .sidebar-improved a:hover,
        .sidebar-improved .nav-link:hover,
        #sidebar a:hover,
        #sidebar .nav-link:hover {
            color: rgba(255, 255, 255, 1) !important;
        }

        .sidebar-improved .nav-link.active,
        #sidebar .nav-link.active {
            color: rgba(255, 255, 255, 1) !important;
        }

        .sidebar-improved i,
        #sidebar i {
            color: inherit !important;
        }

        .sidebar-improved .sidebar-header,
        .sidebar-improved .sidebar-header *,
        #sidebar .sidebar-header,
        #sidebar .sidebar-header * {
            color: rgba(255, 255, 255, 0.9) !important;
        }

        .sidebar-improved .sidebar-footer,
        .sidebar-improved .sidebar-footer *,
        #sidebar .sidebar-footer,
        #sidebar .sidebar-footer * {
            color: rgba(255, 255, 255, 0.8) !important;
        }

        /* ========================================
           RESPONSIVE DESIGN
           ======================================== */
        @media (min-width: 1200px) {
            #content {
                margin-left: 300px;
                padding: var(--space-8) var(--space-6);
            }
        }

        @media (min-width: 769px) and (max-width: 1199px) {
            #content {
                margin-left: 300px;
                padding: var(--space-6) var(--space-4);
            }
        }

        @media (max-width: 768px) {
            #content {
                margin-left: 0;
                padding: var(--space-4);
                padding-top: 80px;
            }

            .content-card-v2 {
                margin-bottom: var(--space-4);
            }

            .card-header-v2 {
                padding: var(--space-4);
                flex-direction: column;
                align-items: flex-start;
                gap: var(--space-3);
            }

            .card-body-v2 {
                padding: var(--space-4);
            }

            .card-title-v2 {
                font-size: var(--text-lg);
            }

            .container-fluid {
                padding: var(--space-3);
            }

            .btn-v2 {
                padding: var(--space-2) var(--space-3);
                font-size: var(--text-sm);
            }

            .row .col-lg-8,
            .row .col-lg-4 {
                margin-bottom: var(--space-4);
            }
        }

        @media (max-width: 480px) {
            #content {
                padding: var(--space-3);
                padding-top: 70px;
            }

            .card-header-v2,
            .card-body-v2 {
                padding: var(--space-3);
            }

            .card-title-v2 {
                font-size: var(--text-base);
            }

            .container-fluid {
                padding: var(--space-2);
            }

            .btn-v2 {
                padding: var(--space-1-5) var(--space-2-5);
                font-size: var(--text-xs);
            }
        }

        /* ========================================
           ANIMATIONS
           ======================================== */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .content-card-v2 {
            animation: fadeInUp var(--duration-300) var(--ease-out);
        }

        /* Délai d'animation pour chaque carte */
        .content-card-v2:nth-child(1) { animation-delay: 0.1s; }
        .content-card-v2:nth-child(2) { animation-delay: 0.2s; }
        .content-card-v2:nth-child(3) { animation-delay: 0.3s; }
        .content-card-v2:nth-child(4) { animation-delay: 0.4s; }
        .content-card-v2:nth-child(5) { animation-delay: 0.5s; }

        /* ========================================
           ACCESSIBILITÉ
           ======================================== */
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }

        .btn-v2:focus-visible {
            outline: 2px solid var(--primary-600);
            outline-offset: 2px;
        }

        /* Collapsible content for dashboard sections */
        .collapsible-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border-radius: 8px;
            border: var(--border-width) solid var(--gray-200);
            background: transparent;
            color: var(--primary-600);
            cursor: pointer;
        }

        .collapsible-toggle:focus {
            outline: 2px solid var(--primary-600);
            outline-offset: 2px;
        }

        .collapsible-content-hidden {
            display: none !important;
        }

        /* ========================================
           UTILITAIRES
           ======================================== */
        .text-center {
            color: inherit !important;
        }

        .mb-0, .mb-1, .mb-2, .mb-3, .mb-4, .mb-5 {
            color: inherit !important;
        }

        /* Corrections pour les liens */
        a {
            color: var(--primary-600) !important;
            text-decoration: none;
            transition: all var(--duration-200) var(--ease-out);
        }

        a:hover {
            color: var(--primary-700) !important;
        }

        /* Corrections pour les icônes colorées */
        .text-success i,
        .text-warning i,
        .text-danger i,
        .text-info i {
            color: inherit !important;
        }
    
