/* ============================================
       STYLES NAVBAR (assets/accueil/navbar.php)
       ============================================ */
    
    /* FIX 1: Box-sizing global pour éviter les débordements */
    .navbar, .navbar * {
        box-sizing: border-box;
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        padding: 16px 0;
        background: var(--bg-navbar);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid transparent;
        transition: all var(--transition-speed) ease;
    }

    .navbar.scrolled {
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 30px var(--shadow);
        padding: 12px 0;
    }

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

    /* --- LOGO --- */
    .logo-link {
        display: flex;
        align-items: center;
        text-decoration: none;
        flex-shrink: 0;
    }

    .logo {
        position: relative;
        display: flex;
        align-items: center;
        height: 46px;
    }

    .logo img {
        height: 76px;
        width: auto;
        display: block;
        transition: opacity var(--transition-speed) ease;
    }

    .logo-light {
        display: block !important;
    }

    .logo-dark {
        display: none !important;
    }

    [data-theme="dark"] .logo-light {
        display: none !important;
    }

    [data-theme="dark"] .logo-dark {
        display: block !important;
    }

    /* --- MENU DE NAVIGATION --- */
    .nav-menu {
        display: flex;
        gap: 2px;
        list-style: none;
        margin: 0;
        padding: 0;
        align-items: center;
    }

    .nav-menu li {
        margin: 0;
        position: relative;
    }

    .nav-menu a.nav-link {
        text-decoration: none;
        color: var(--text-muted);
        font-size: 16px;
        font-weight: 500;
        padding: 8px 12px;
        border-radius: 8px;
        transition: all var(--transition-speed) ease;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .nav-menu a.nav-link:hover {
        color: var(--text-title);
        background: var(--bg-sub);
    }

    .nav-chevron {
        stroke: var(--text-muted);
        transition: stroke var(--transition-speed) ease, transform 0.3s ease;
        flex-shrink: 0;
    }

    .nav-menu a.nav-link:hover .nav-chevron {
        stroke: var(--text-title);
    }

    .nav-item.has-dropdown {
        position: relative;
    }

    .nav-link {
        cursor: pointer;
        user-select: none;
    }

    .nav-link.active .nav-chevron {
        transform: rotate(180deg);
    }

    /* --- DROPDOWN MENU - Version PC --- */
    .dropdown-menu {
        position: absolute;
        top: calc(100% + 12px);
        left: 50%;
        transform: translateX(-50%) translateY(10px) scale(0.97);
        background: var(--bg-dropdown);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 16px 16px;
        min-width: 600px;
        max-width: 600px;
        box-shadow: 0 20px 60px var(--shadow);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        z-index: 1001;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .dropdown-menu.open {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    [data-theme="dark"] .dropdown-menu {
        background: rgba(18, 18, 30, 0.98);
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .dropdown-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px 12px;
    }

    .dropdown-item {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 10px 8px;
        border-radius: 10px;
        text-decoration: none;
        transition: all 0.2s ease;
        border: 1px solid transparent;
        background: transparent;
        width: 100%;
    }

    .dropdown-item:hover {
        background: var(--bg-sub);
        border-color: var(--border);
    }

    [data-theme="dark"] .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .dropdown-icon {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        border-radius: 10px;
        background: var(--bg-sub);
        border: 1px solid var(--border);
        transition: all 0.2s ease;
    }

    .dropdown-icon i {
        font-size: 18px;
        color: var(--accent);
        transition: color 0.2s ease;
    }

    .dropdown-icon svg {
        width: 20px;
        height: 20px;
        stroke: var(--accent);
        transition: stroke 0.2s ease;
        flex-shrink: 0;
    }

    .dropdown-item:hover .dropdown-icon {
        background: var(--accent);
        border-color: var(--accent);
    }

    .dropdown-item:hover .dropdown-icon i {
        color: #fff;
    }

    .dropdown-item:hover .dropdown-icon svg {
        stroke: #fff;
    }

    .dropdown-text {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .dropdown-title {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-body);
        transition: color var(--transition-speed) ease;
        line-height: 1.3;
    }

    [data-theme="dark"] .dropdown-title {
        color: #ffffff;
    }

    .dropdown-desc {
        display: block;
        font-size: 12px;
        color: var(--text-muted);
        transition: color var(--transition-speed) ease;
        line-height: 1.3;
        margin-top: 2px;
    }

    [data-theme="dark"] .dropdown-desc {
        color: rgba(255, 255, 255, 0.6);
    }

    .dropdown-item:hover .dropdown-title {
        color: var(--accent);
    }

    .dropdown-item:hover .dropdown-desc {
        color: var(--text-body);
    }

    [data-theme="dark"] .dropdown-item:hover .dropdown-desc {
        color: rgba(255, 255, 255, 0.8);
    }

    /* --- ACTIONS --- */
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
    }

    .theme-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1.5px solid var(--border);
        background: var(--bg-card);
        color: var(--text-body);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        padding: 0;
        flex-shrink: 0;
        position: relative;
        box-shadow: 0 2px 8px var(--shadow);
    }

    .theme-toggle:hover {
        border-color: var(--accent);
        background: var(--bg-sub);
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 8px 25px var(--shadow-hover);
    }

    .btn-demo {
        padding: 10px 22px;
        font-size: 14px;
        white-space: nowrap;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        position: relative;
        overflow: hidden;
    }

    .menu-toggle {
        display: none;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1.5px solid var(--border);
        background: var(--bg-card);
        color: var(--text-body);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        padding: 0;
        flex-shrink: 0;
        box-shadow: 0 2px 8px var(--shadow);
    }

    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .nav-overlay.active {
        display: block;
        opacity: 1;
    }

    .menu-close-wrapper {
        display: none;
        justify-content: flex-end;
        padding: 8px 4px 16px 4px;
        border-bottom: 1px solid var(--border);
        margin-bottom: 8px;
    }

    .menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 1.5px solid var(--border);
        background: var(--bg-card);
        color: var(--text-body);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        padding: 0;
        box-shadow: 0 2px 8px var(--shadow);
        flex-shrink: 0;
    }

    .menu-demo-wrapper {
        display: none;
        padding-top: 12px;
        border-top: 1px solid var(--border);
        margin-top: 8px;
    }

    .btn-demo-mobile {
        display: block;
        width: 100%;
        text-align: center;
        padding: 14px 24px;
        background: var(--accent);
        color: #fff;
        border-radius: 999px;
        font-weight: 600;
        font-size: 16px;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        box-shadow: 0 4px 15px rgba(18, 58, 72, 0.2);
    }

    /* ============================================
       RESPONSIVE - TABLETTE & MOBILE
       ============================================ */
    @media (max-width: 968px) {
        .menu-toggle, .menu-close-wrapper, .menu-demo-wrapper {
            display: flex;
        }
        
        .menu-demo-wrapper {
            display: block;
        }

        .nav-menu {
            position: fixed;
            top: 0;
            right: -100%;
            width: 100%;
            max-width: 380px;
            height: 100vh;
            flex-direction: column;
            justify-content: flex-start;
            padding: 24px 24px 32px;
            gap: 2px;
            background: var(--bg-dropdown);
            border-left: 1px solid var(--border);
            box-shadow: -8px 0 50px var(--shadow);
            transition: right 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            overflow-y: auto;
            z-index: 999;
            align-items: stretch;
        }

        [data-theme="dark"] .nav-menu {
            background: rgba(18, 18, 30, 0.98);
            border-left-color: rgba(255, 255, 255, 0.08);
        }

        .nav-menu.active {
            right: 0;
        }

        .nav-menu li {
            width: 100%;
            list-style: none;
        }

        .nav-menu a.nav-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 16px;
            font-size: 17px;
            font-weight: 600;
            border-radius: 10px;
            white-space: normal;
            transition: all 0.25s ease;
        }

        .nav-menu a.nav-link:hover, .nav-menu a.nav-link.active {
            background: var(--bg-sub);
        }
        
        .nav-menu a.nav-link.active {
            color: var(--accent);
        }

        .dropdown-menu {
            position: static;
            transform: none !important;
            opacity: 1 !important;
            visibility: visible !important;
            pointer-events: all !important;
            box-shadow: none !important;
            border: none !important;
            background: transparent !important;
            padding: 0 !important;
            margin: 0 !important;
            min-width: 100% !important;
            max-width: 100% !important;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), padding 0.3s ease, margin 0.3s ease;
            border-radius: 0;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
        }

        .has-dropdown {
            position: relative;
        }

        .dropdown-menu.open {
            max-height: 800px;
            padding: 8px 0 !important;
            margin: 4px 0 8px 0 !important;
            border-top: 1px solid var(--border) !important;
            border-bottom: 1px solid var(--border) !important;
            background: var(--bg-sub) !important;
            border-radius: 12px !important;
            overflow: hidden;
        }

        [data-theme="dark"] .dropdown-menu.open {
            background: rgba(255, 255, 255, 0.06) !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
        }

        .dropdown-grid {
            grid-template-columns: 1fr;
            gap: 2px;
            padding: 4px 8px;
        }

        .dropdown-item {
            padding: 10px 12px;
            border-radius: 8px;
            border: none;
            background: transparent !important;
        }

        .dropdown-item:hover {
            background: var(--bg-card) !important;
            border-color: transparent;
        }

        [data-theme="dark"] .dropdown-item:hover {
            background: rgba(255, 255, 255, 0.08) !important;
        }

        .dropdown-icon {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            flex-shrink: 0;
            background: var(--bg-card);
            border: 1px solid var(--border);
        }

        [data-theme="dark"] .dropdown-icon {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.08);
        }

        .dropdown-icon i {
            font-size: 16px;
        }

        .dropdown-icon svg {
            width: 18px;
            height: 18px;
        }

        .dropdown-title {
            font-size: 14px;
        }

        .dropdown-desc {
            font-size: 12px;
        }

        .nav-actions .btn-demo {
            display: none !important;
        }

        .nav-link .nav-chevron {
            flex-shrink: 0;
        }
    }

    /* ============================================
       RESPONSIVE - MOBILE (< 600px)
       ============================================ */
    @media (max-width: 600px) {
        .navbar {
            padding: 12px 0;
        }

        .navbar-container {
            padding: 0 16px;
            gap: 12px;
        }

        .nav-menu {
            padding: 20px 18px 28px;
            max-width: 100%;
        }

        .nav-menu a.nav-link {
            font-size: 16px;
            padding: 12px 14px;
        }

        .dropdown-menu.open {
            padding: 6px 0 !important;
            margin: 2px 0 6px 0 !important;
        }

        .dropdown-grid {
            padding: 2px 6px;
            gap: 1px;
        }

        .dropdown-item {
            padding: 8px 10px;
            gap: 10px;
        }

        .dropdown-icon {
            width: 32px;
            height: 32px;
            border-radius: 6px;
        }

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

        .dropdown-icon svg {
            width: 16px;
            height: 16px;
        }

        .dropdown-title {
            font-size: 14px;
        }

        .dropdown-desc {
            font-size: 11px;
        }
    }

    /* ============================================
       DARK MODE - Support supplémentaire
       ============================================ */
    [data-theme="dark"] .menu-close-wrapper {
        border-color: rgba(255, 255, 255, 0.08);
    }

    [data-theme="dark"] .menu-demo-wrapper {
        border-color: rgba(255, 255, 255, 0.08);
    }

    [data-theme="dark"] .nav-menu {
        background: rgba(18, 18, 30, 0.98);
        border-color: rgba(255, 255, 255, 0.08);
    }

    [data-theme="dark"] .menu-close {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.08);
        color: var(--text-body);
    }

    [data-theme="dark"] .theme-toggle {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.08);
        color: var(--text-body);
    }

    [data-theme="dark"] .menu-toggle {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.08);
        color: var(--text-body);
    }