@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

    /* body {
        font-family: 'Poppins', sans-serif;
    } */
    /* =======================================================
    🎯 1. VARIABLES GLOBALES (DESIGN SYSTEM)
    ======================================================= */

    :root {
        --primary: #4361ee;

        /* LIGHT THEME */
        --bg: #ffffff;
        --bg-secondary: #f8f9fa;
        --text: #212529;
        --text-muted: #6c757d;
        --border: #dee2e6;
        --hover: rgba(0,0,0,0.05);
    }

    [data-theme="dark"] {
        /* DARK THEME */
        --bg: #121212;
        --bg-secondary: #1f1f1f;
        --text: #e0e0e0;
        --text-muted: #adb5bd;
        --border: #333;
        --hover: rgba(255,255,255,0.08);
    }

    /* =======================================================
    VARIABLES AVANCÉES UI
    ======================================================= */

    :root {
        /* TABLE */
        --table-bg: #ffffff;
        --table-text: #212529;
        --table-border: #dee2e6;
        --table-head: #f8f9fa;
        --table-row-alt: #f2f2f2;
        --table-hover: #e9ecef;

        /* CARD */
        --card-bg: #ffffff;
        --card-text: #212529;
        --card-border: #dee2e6;

        /* FORM */
        --input-bg: #ffffff;
        --input-text: #212529;
        --input-border: #ced4da;
        --input-placeholder: #6c757d;

        /* MODAL */
        --modal-bg: #ffffff;
        --modal-text: #212529;

        /* SELECT2 */
        --select-bg: #ffffff;
        --select-text: #212529;
    }

    /* DARK MODE */
    [data-theme="dark"] {
        --table-bg: #1e1e1e;
        --table-text: #e0e0e0;
        --table-border: #444;
        --table-head: #2c2c2c;
        --table-row-alt: #2a2a2a;
        --table-hover: #333;

        --card-bg: #2c2c2c;
        --card-text: #ffffff;
        --card-border: #444;

        --input-bg: #2e2e3e;
        --input-text: #f0f0f0;
        --input-border: #444;
        --input-placeholder: #aaa;

        --modal-bg: #1e1e2f;
        --modal-text: #f0f0f0;

        --select-bg: #2e2e3e;
        --select-text: #f0f0f0;
    }
    /* =======================================================
    🌍 2. GLOBAL (BODY & TYPOGRAPHIE)
    ======================================================= */

    body {
        background: var(--bg);
        color: var(--text);
        font-family: 'Segoe UI', sans-serif;
        transition: all 0.3s ease;
    }

    .img-thumbnail {
        object-fit: cover; /* Ajuste l'image pour éviter la déformation */
        border-radius: 5px; /* Coins arrondis */
    }
    .text-muted {
        font-size: 0.9em; /* Texte plus petit pour "Aucune image" */
    }
    /* =======================================================
    🧭 3. NAVBAR PROFESSIONNELLE
    ======================================================= */

    .navbar {
        background: var(--bg);
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        transition: all 0.3s ease;
    }

    /* LOGO */
    .navbar-brand {
        font-weight: 600;
        font-size: 18px;
        color: var(--primary) !important;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* LIENS */
    .nav-link {
        color: var(--text) !important;
        margin-right: 1rem;
        position: relative;
        transition: 0.3s;
    }

    /* HOVER */
    .nav-link:hover {
        color: var(--primary) !important;
    }

    /* ANIMATION SOULIGNEMENT */
    .nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 0%;
        height: 2px;
        background: var(--primary);
        transition: 0.3s;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

    /* ACTIVE */
    .nav-link.active {
        font-weight: 600;
        color: var(--primary) !important;
    }

    /* =======================================================
    📂 4. DROPDOWN
    ======================================================= */

    .dropdown-menu {
        background: var(--bg-secondary);
        border-radius: 10px;
        border: 1px solid var(--border);
        padding: 10px;
        animation: fadeIn 0.3s ease;
    }

    /* ITEMS */
    .dropdown-item {
        color: var(--text);
        border-radius: 6px;
        transition: 0.2s;
    }

    .dropdown-item:hover {
        background: var(--primary);
        color: white;
        transform: translateX(5px);
    }

    
    /* =======================================================
    🍔 HAMBURGER PRO (LIGHT + DARK)
    ======================================================= */

    /* bouton */
    .navbar-toggler {
        border: 1px solid var(--border);
        padding: 6px;
        border-radius: 6px;
    }

    /* ligne centrale */
    .navbar-toggler-icon {
        background: none;
        width: 25px;
        height: 2px;
        background-color: var(--text);
        position: relative;
        display: inline-block;
    }

    /* lignes haut/bas */
    .navbar-toggler-icon::before,
    .navbar-toggler-icon::after {
        content: "";
        position: absolute;
        left: 0;
        width: 25px;
        height: 2px;
        background-color: var(--text);
        transition: 0.3s ease;
    }

    .navbar-toggler-icon::before {
        top: -8px;
    }

    .navbar-toggler-icon::after {
        top: 8px;
    }

    /* animation en X */
    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
        background-color: transparent;
    }

    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
        transform: rotate(45deg);
        top: 0;
    }

    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
        transform: rotate(-45deg);
        top: 0;
    }

    /* =======================================================
    📱 6. RESPONSIVE MOBILE / TABLETTE
    ======================================================= */

    @media (max-width: 991px) {

        .navbar-collapse {
            background: var(--bg-secondary);
            border-radius: 10px;
            padding: 15px;
            margin-top: 10px;
        }

        .navbar-nav {
            flex-direction: column;
            gap: 10px;
        }

        .nav-link {
            margin-right: 0;
        }

        .dropdown-menu {
            position: static !important;
            border: none;
            box-shadow: none;
        }
    }

    /* =======================================================
    🎛️ 7. SWITCH THEME
    ======================================================= */

    .theme-switcher {
        display: flex;
        align-items: center;
        padding: 10px;
    }

    /* SWITCH */
    .switch {
        position: relative;
        width: 50px;
        height: 24px;
    }

    .switch input {
        display: none;
    }

    .slider {
        position: absolute;
        cursor: pointer;
        inset: 0;
        background: #ccc;
        border-radius: 30px;
        transition: 0.3s;
    }

    .slider:before {
        content: "";
        position: absolute;
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background: white;
        border-radius: 50%;
        transition: 0.3s;
    }

    /* ACTIVE */
    input:checked + .slider {
        background: var(--primary);
    }

    input:checked + .slider:before {
        transform: translateX(26px);
    }

    /* LABEL */
    #theme-label {
        margin-left: 10px;
        font-size: 0.85rem;
        color: var(--text);
    }

    /* MOBILE */
    @media (max-width: 768px) {
        #theme-label {
            display: none;
        }
    }

    /* =======================================================
    🧾 8. FORMULAIRES (DARK/LIGHT AUTO)
    ======================================================= */

    input, select, textarea, .form-control {
        background: var(--input-bg);
        color: var(--input-text);
        border: 1px solid var(--input-border);
    }

    input::placeholder,
    textarea::placeholder {
        color: var(--input-placeholder);
    }

    input:focus,
    select:focus,
    textarea:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
    }

    /* =======================================================
    📊 9. TABLES
    ======================================================= */

    table {
            background: var(--table-bg);
            color: var(--table-text);
            border-color: var(--table-border);
        }

        table th,
        table td {
            color: var(--table-text);
            border-color: var(--table-border);
        }

        table thead {
            background: var(--table-head);
        }

        table tbody tr:nth-child(even) {
            background: var(--table-row-alt);
        }

        table tbody tr:hover {
            background: var(--table-hover);
        }

    /* =======================================================
    🧩 10. CARDS
    ======================================================= */

    .card {
        background: var(--card-bg);
        color: var(--card-text);
        border: 1px solid var(--card-border);
    }

    .card-body {
        background: var(--card-bg);
        color: var(--card-text);
    }

    .card-footer {
        background: var(--table-head);
        color: var(--card-text);
    }

    /* modals */

    .modal-content {
        background: var(--modal-bg);
        color: var(--modal-text);
        border: none;
    }

    .modal-header,
    .modal-footer {
        border-color: var(--table-border);
    }

    [data-theme="dark"] .btn-close {
        filter: invert(1);
    }

    /* select2 */

    .select2-container .select2-selection {
        background: var(--select-bg) !important;
        color: var(--select-text) !important;
        border: 1px solid var(--input-border) !important;
    }

    .select2-container .select2-selection__rendered {
        color: var(--select-text) !important;
    }

    .select2-container .select2-results__option {
        background: var(--select-bg) !important;
        color: var(--select-text) !important;
    }

    .select2-container .select2-results__option--highlighted {
        background: var(--primary) !important;
        color: white !important;
    }


    /* =======================================================
   🎯 ACCORDION ADAPTATIF DARK / LIGHT
   ======================================================= */

    /* ----------- MODE LIGHT (optionnel si tu veux contrôler) ----------- */
    [data-theme="light"] .accordion-item {
        background-color: #ffffff;
        border-color: #dee2e6;
    }

    [data-theme="light"] .accordion-button {
        background-color: #f8f9fa;
        color: #212529;
    }

    [data-theme="light"] .accordion-button:not(.collapsed) {
        background-color: #e9ecef;
        color: #000;
    }


    /* ----------- MODE DARK ----------- */

    /* Conteneur */
    [data-theme="dark"] .accordion-item {
        background-color: #1e1e2f;
        border: 1px solid #2c2c3e;
    }

    /* Header (bouton) */
    [data-theme="dark"] .accordion-button {
        background-color: #2a2a3d;
        color: #f1f1f1;
        border: none;
    }

    /* Quand ouvert */
    [data-theme="dark"] .accordion-button:not(.collapsed) {
        background-color: #3a3a55;
        color: #ffffff;
        box-shadow: none;
    }

    /* Hover */
    [data-theme="dark"] .accordion-button:hover {
        background-color: #34344a;
    }

    /* Corps */
    [data-theme="dark"] .accordion-body {
        background-color: #1e1e2f;
        color: #e0e0e0;
    }

    /* Bordures internes */
    [data-theme="dark"] .accordion-collapse {
        border-top: 1px solid #2c2c3e;
    }

    /* Chevron (flèche) */
    [data-theme="dark"] .accordion-button::after {
        filter: invert(1); /* 🔥 rend la flèche blanche */
    }

    /* Focus propre */
    [data-theme="dark"] .accordion-button:focus {
        box-shadow: 0 0 0 0.2rem rgba(100, 100, 255, 0.2);
    }

    .accordion-collapse {
    transition: all 0.3s ease;
}

    /* =======================================================
    ✨ 11. ANIMATIONS
    ======================================================= */

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* =======================================================
    SIDEBAR - STRUCTURE
    ======================================================= */

    .wrapper {
        display: flex;
        width: 100%;
    }

    /* SIDEBAR */
    #sidebar {
        width: 260px;
        min-width: 260px;
        height: 100vh;
        position: sticky;
        top: 0;
        transition: all 0.3s ease;
        background: var(--bg-secondary);
        border-right: 1px solid var(--border);
        display: flex;
        flex-direction: column;
    }

    /* MODE COLLAPSE */
    #sidebar.collapsed {
        width: 80px;
        min-width: 80px;
    }

    /* =======================================================
    HEADER SIDEBAR
    ======================================================= */

    #sidebar .toggle-btn {
        background: none;
        border: none;
        color: var(--text);
        font-size: 20px;
        padding: 10px;
        cursor: pointer;
    }

    .sidebar-logo {
        padding: 10px;
    }

    /* =======================================================
    MENU
    ======================================================= */

    .sidebar-nav {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    /* ITEM */
    .sidebar-item {
        margin-bottom: 5px;
    }

    /* LINK */
    .sidebar-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
        color: var(--text);
        text-decoration: none;
        border-radius: 8px;
        transition: 0.3s;
    }

    /* ICON */
    .sidebar-link i {
        font-size: 18px;
        min-width: 25px;
    }

    /* TEXTE */
    .sidebar-link span {
        transition: opacity 0.3s;
    }

    /* HOVER */
    .sidebar-link:hover {
        background: var(--hover);
        transform: translateX(5px);
    }

    /* ACTIVE */
    .sidebar-link.active {
        background: var(--primary);
        color: white;
    }

    /* COLLAPSE MODE : cacher texte */
    #sidebar.collapsed .sidebar-link span {
        opacity: 0;
        width: 0;
        /* overflow: hidden; */
    }

    /* CENTRER ICONES EN MODE COLLAPSE */
    #sidebar.collapsed .sidebar-link {
        justify-content: center;
    }

    /* =======================================================
    DROPDOWN
    ======================================================= */

    .sidebar-dropdown {
        padding-left: 20px;
    }

    .sidebar-dropdown .sidebar-link {
        font-size: 14px;
    }

    /* =======================================================
    MAIN CONTENT
    ======================================================= */

    .main {
        flex-grow: 1;
        padding: 15px;
        transition: all 0.3s ease;
    }


    /* =======================================================
   🧱 LAYOUT GLOBAL (STRUCTURE PRO)
   ======================================================= */

html, body {
    height: 100%;
    margin: 0;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* =======================================================
   📌 SIDEBAR
   ======================================================= */

#sidebar {
    width: 250px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ❌ CACHÉ SMARTPHONE */
@media (max-width: 767px) {
    #sidebar {
        display: none !important;
    }
}

/* ✔ TABLETTE + */
@media (min-width: 768px) {
    #sidebar {
        display: block;
    }
}

    

    /* =======================================================
    🦶 FOOTER STICKY PRO
    ======================================================= */

    .app-footer {
        background: linear-gradient(135deg, #1f1f1f, #2c2c2c);
        color: #ffc107;
        text-align: center;
        padding: 10px;
        width: 100%;
        font-size: 14px;
        letter-spacing: 0.5px;
    }



    [data-theme="dark"] .app-footer {
    background-color: #121212;
    color: #f1c40f;
}
    /* =======================================================
    RESPONSIVE (IMPORTANT)
    ======================================================= */

    /* TABLETTE + MOBILE */
    /* @media (max-width: 991px) {
        #sidebar {
            display: none !important;
        }

        .main {
            margin-left: 0 !important;
        }
    } */

    /* SCROLL SIDEBAR */
    #sidebar {
        overflow-y: auto;
    }

    /* SCROLLBAR MODERNE */
    #sidebar::-webkit-scrollbar {
        width: 6px;
    }

    #sidebar::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 10px;
    }

    /* =======================================================
    MODE COLLAPSED : DROPDOWN AU HOVER
    ======================================================= */

    #sidebar.collapsed .sidebar-item {
        position: relative;
    }

    /* MASQUER DROPDOWN PAR DEFAUT */
    #sidebar.collapsed .sidebar-dropdown {
        position: absolute;
        left: 80px;
        top: 0;
        min-width: 220px;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 10px;
        display: none;
        z-index: 999;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    /* AFFICHER AU HOVER */
    #sidebar.collapsed .sidebar-item:hover .sidebar-dropdown {
        display: block;
    }

    /* LIENS DANS HOVER */
    #sidebar.collapsed .sidebar-dropdown .sidebar-link {
        white-space: nowrap;
    }

    /* EFFET FLUIDE */
    #sidebar.collapsed .sidebar-dropdown {
        animation: fadeIn 0.2s ease;
    }

    #sidebar.collapsed .sidebar-dropdown {
        opacity: 0;
        transform: translateX(10px);
        transition: 0.2s;
    }

    #sidebar.collapsed .sidebar-item:hover .sidebar-dropdown {
        opacity: 1;
        transform: translateX(0);
    }

    /* SIDEBAR COLLAPSED MODE */
    #sidebar.collapsed {
        width: 80px;
    }

    /* CACHE TEXTE */
    #sidebar.collapsed .sidebar-link span {
        display: none;
    }

    /* DROPDOWN POSITION */
    #sidebar.collapsed .sidebar-dropdown {
        position: absolute;
        left: 80px;
        top: 0;
        min-width: 220px;
        background: var(--bg-secondary);
        border-radius: 10px;
        padding: 10px;
        display: none;
        z-index: 999;
    }

    /* HOVER ACTIF */
    #sidebar.collapsed .sidebar-item:hover > .sidebar-dropdown {
        display: block;
    }

    /* ANIMATION */
    #sidebar.collapsed .sidebar-dropdown {
        opacity: 0;
        transform: translateX(10px);
        transition: all 0.2s ease;
    }

    #sidebar.collapsed .sidebar-item:hover > .sidebar-dropdown {
        opacity: 1;
        transform: translateX(0);
    }

    /* SIDEBAR COLLAPSED MODE */
    #sidebar.collapsed {
        width: 80px;
    }

    /* CACHE TEXTE */
    #sidebar.collapsed .sidebar-link span {
        display: none;
    }

    /* DROPDOWN POSITION */
    #sidebar.collapsed .sidebar-dropdown {
        position: absolute;
        left: 80px;
        top: 0;
        min-width: 220px;
        background: var(--bg-secondary);
        border-radius: 10px;
        padding: 10px;
        display: none;
        z-index: 999;
    }

    /* HOVER ACTIF */
    #sidebar.collapsed .sidebar-item:hover > .sidebar-dropdown {
        display: block;
    }

    /* ANIMATION */
    #sidebar.collapsed .sidebar-dropdown {
        opacity: 0;
        transform: translateX(10px);
        transition: all 0.2s ease;
    }

    #sidebar.collapsed .sidebar-item:hover > .sidebar-dropdown {
        opacity: 1;
        transform: translateX(0);
    }

    

    /* =========================================
    SIDEBAR COLLAPSED MODE - VERSION STABLE
    ========================================= */

    #sidebar.collapsed {
        width: 80px;
        overflow: visible !important;
    }

    /* cacher texte */
    #sidebar.collapsed .sidebar-link span {
        display: none;
    }

    /* parent */
    #sidebar.collapsed .sidebar-item {
        position: relative;
    }

    /* dropdown flottant */
    #sidebar.collapsed .sidebar-dropdown {
        position: absolute;
        left: 100%;
        top: 0;
        min-width: 240px;

        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-radius: 10px;

        padding: 10px;
        z-index: 999;

        display: block !important;   /* 🔥 clé du problème */

        opacity: 0;
        visibility: hidden;
        transform: translateX(10px);

        transition: all 0.2s ease;
    }

    /* hover parent OU dropdown */
    #sidebar.collapsed .sidebar-item:hover > .sidebar-dropdown,
    #sidebar.collapsed .sidebar-dropdown:hover {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    /* liens */
    #sidebar.collapsed .sidebar-dropdown .sidebar-link {
        display: block;
        padding: 8px 12px;
        white-space: nowrap;
    }

    /* lien actif */
    .sidebar-link.active {
        background: var(--primary);
        color: white !important;
        border-radius: 6px;
    }

     /* =======================================================
    HEADER SIDEBAR
    ======================================================= */

    #sidebar .toggle-btn {
        background: none;
        border: none;
        color: var(--text);
        font-size: 20px;
        padding: 10px;
        cursor: pointer;
    }

    .sidebar-logo {
        padding: 10px;
    }

    /* Logo normal */
    .sidebar-logo {
        transition: opacity 0.3s ease;
    }

    /* Quand sidebar réduit */
    #sidebar.collapsed .sidebar-logo {
        display: none;
    }

    /* =======================================================
   🧱 FIX STRUCTURE EXISTANTE (SANS CHANGER HTML)
   ======================================================= */

    html, body {
        height: 100%;
        margin: 0;
    }

    /* Ton wrapper devient flex */
    .wrapper {
        display: flex;
        min-height: 100vh;
    }

    /* MAIN devient colonne */
    .main {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0; /* 🔥 évite débordement horizontal */
    }

    /* CONTENU prend toute la place */
    .main .container-fluid {
        flex: 1;
    }


    /* =======================================================
   📱 FIX SCROLL HORIZONTAL
   ======================================================= */

    body {
        overflow-x: hidden;
    }

    /* Empêche débordement contenu */
    .main {
        overflow-x: hidden;
    }

    /* IMPORTANT */
    .container-fluid {
        max-width: 100%;
    }

    /* =======================================================
   📌 SIDEBAR RESPONSIVE
   ======================================================= */

    /* Smartphone ❌ */
    @media (max-width: 767px) {
        #sidebar {
            display: none !important;
        }
    }

    /* Tablette ✔ */
    @media (min-width: 768px) {
        #sidebar {
            display: block;
        }
    }

    /* évite que des éléments débordent */
    * {
        box-sizing: border-box;
    }

    /* =======================================================
   ✨ BREADCRUMB MODERNE (STYLE SAAS)
    ======================================================= */

    .breadcrumb-container {
        padding: 10px 15px;
        border-radius: 8px;
    }

    /* RESET BOOTSTRAP */
    .custom-breadcrumb {
        background: transparent;
        margin: 0;
        padding: 0;
    }

    /* ITEMS */
    .custom-breadcrumb .breadcrumb-item {
        display: inline-flex;
        align-items: center;
        font-size: 14px;
    }

    /* LIENS */
    .custom-breadcrumb .breadcrumb-item a {
        text-decoration: none;
        color: var(--text);
        opacity: 0.7;
        transition: all 0.3s ease;
    }

    /* HOVER */
    .custom-breadcrumb .breadcrumb-item a:hover {
        opacity: 1;
        transform: translateY(-1px);
    }

    /* ITEM ACTIF */
    .custom-breadcrumb .breadcrumb-item.active {
        font-weight: 600;
        color: var(--primary, #0d6efd);
    }

    /* =======================================================
    🔥 SÉPARATEUR ÉLÉGANT (AU LIEU DE /)
    ======================================================= */

    .custom-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
        content: "⟩"; /* 👈 change ici */
        font-size: 18px;
        margin: 0 8px;
        color: #999;
    }

    /* =======================================================
    🌙 DARK MODE
    ======================================================= */

    [data-theme="dark"] .custom-breadcrumb .breadcrumb-item a {
        color: #ccc;
    }

    [data-theme="dark"] .custom-breadcrumb .breadcrumb-item.active {
        color: #4dabf7;
    }

    [data-theme="dark"] .custom-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
        color: #666;
    }

    /* Animation d’apparition */
    .custom-breadcrumb .breadcrumb-item {
        opacity: 0;
        transform: translateY(5px);
        animation: breadcrumbFade 0.4s ease forwards;
    }

    /* délai progressif */
    .custom-breadcrumb .breadcrumb-item:nth-child(1) { animation-delay: 0.05s; }
    .custom-breadcrumb .breadcrumb-item:nth-child(2) { animation-delay: 0.1s; }
    .custom-breadcrumb .breadcrumb-item:nth-child(3) { animation-delay: 0.15s; }
    .custom-breadcrumb .breadcrumb-item:nth-child(4) { animation-delay: 0.2s; }

    @keyframes breadcrumbFade {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .breadcrumb-container {
        background: rgba(0, 0, 0, 0.03);
    }

    [data-theme="dark"] .breadcrumb-container {
        background: rgba(255, 255, 255, 0.05);
    }
    

    /* =========================
   NAVBAR DROPDOWN HOVER
    ========================= */

    /* Affichage au survol */
    .navbar .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }

    /* Animation douce */
    .dropdown-menu {
        display: none;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.25s ease;
    }

    .navbar .dropdown:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    /* =========================
    SOUS-MENU (niveau 2)
    ========================= */

    .dropdown-submenu {
        position: relative;
    }

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-left: 0.1rem;
        display: none;
        opacity: 0;
        transform: translateX(10px);
        transition: all 0.25s ease;
    }

    /* Hover pour sous-menu */
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        transform: translateX(0);
    }

    
    /* ✅ Flèche propre à droite */
    .dropdown-submenu > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-submenu > a::after {
        content: "\F285"; /* bi-chevron-right */
        font-family: "bootstrap-icons";
        font-size: 12px;
        margin-left: auto;
    }

    /* .dropdown-submenu > a::after {
        content: "›";
        font-size: 14px;
        margin-left: 10px;
        opacity: 0.7;
    } */

    /* =========================
    DARK MODE SUPPORT
    ========================= */

    [data-theme="dark"] .dropdown-menu {
        background-color: #1e1e2f;
        border: 1px solid #333;
    }

    [data-theme="dark"] .dropdown-item {
        color: #e0e0e0;
    }

    [data-theme="dark"] .dropdown-item:hover {
        background-color: #2c2c3e;
        color: #fff;
    }

    /* Desktop uniquement */
    @media (min-width: 992px) {

        .navbar .dropdown-menu {
            display: none;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.25s ease;
        }

        .navbar .dropdown:hover > .dropdown-menu {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }

        /* Sous-menu */
        .dropdown-submenu:hover > .dropdown-menu {
            display: block;
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    /* Mobile submenu visible */
    .dropdown-submenu .dropdown-menu.show {
        display: block;
    }
    

    li {
        list-style: none;
    }

    a {
        text-decoration: none;
    }

    #global-spinner {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(255,255,255,0.7);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }
