/* navbar.css - CSS unique navbar + burger LEO */

/* Reset global tap highlight et outline - applique sur toutes les pages via navbar */
* { -webkit-tap-highlight-color: transparent; outline: none; }

        .navbar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 52px;
            background: #253348;
            border-bottom: 1px solid #3a4e6a;
            z-index: 99999;
        }

        .navbar-inner {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 1400px;
            height: 100%;
            display: flex;
            align-items: center;
            padding: 0;
            gap: 32px;
        }

        .navbar .brand {
            font-weight: 700;
            font-size: 1.1em;
            color: #fff;
            text-decoration: none;
            letter-spacing: 0.05em;
        }

        .dev-logout-btn {
            position: fixed; top: 12px; left: 12px; z-index: 200;
            display: flex; align-items: center; gap: 4px;
            background: #3a2a1a; border: 1px solid #cc8a2a;
            color: #ffb84d; text-decoration: none;
            font-size: 0.78em; font-weight: 500;
            padding: 5px 10px; border-radius: 5px;
            transition: all 0.2s; white-space: nowrap;
        }
        .dev-logout-btn:hover { background: #cc8a2a; color: #1e1408; }
        @media (max-width: 768px) {
            .dev-logout-btn { left: auto; right: 12px; }
            #lbv-title-prev, #lbv-title-next { display: none !important; }
        }

        .navbar .nav-links {
            display: flex;
            gap: 24px;
            flex: 1;
        }

        .navbar .nav-links a {
            color: #aabbdd;
            text-decoration: none;
            font-size: 0.88em;
            transition: color 0.2s;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .navbar .nav-links a:hover,
        .navbar .nav-links a.active { color: #fff; }

        .navbar .nav-links a.active { color: #1a8cff; }

        .nav-dropdown { position: relative; }
        .nav-dropdown-menu {
            position: absolute; top: 100%; left: 0; margin-top: 10px;
            background: #16213a; border: 1px solid #c5d0e0; border-radius: 8px;
            min-width: 200px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.35);
            display: none; flex-direction: column; gap: 2px; z-index: 500;
        }
        .nav-dropdown.open .nav-dropdown-menu { display: flex; }
        .nav-dropdown-menu a {
            color: #aabbdd; text-decoration: none; font-size: 0.88em;
            padding: 10px 12px 8px; border-radius: 5px; transition: background 0.15s, color 0.15s;
        }
        .nav-dropdown-menu a:hover { background: #1a8cff; color: #fff; }
        .nav-dropdown-menu a.active { color: #1a8cff; }
        .nav-dropdown-menu a.active:hover { color: #fff; }
        .nav-dropdown-menu .nav-dropdown-label {
            color: #fff; font-size: 0.72em; font-weight: 400; text-transform: uppercase;
            letter-spacing: 0.05em; text-decoration: underline; text-underline-offset: 3px;
            padding: 10px 0 4px 0; cursor: default; user-select: none;
            margin: 5px 12px 0; border-top: 1px solid #fff;
        }

        .navbar .nav-right {
            margin-left: auto;
            margin-right: -1px;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .navbar .nav-right a {
            color: #aabbdd;
            text-decoration: none;
            font-size: 0.88em;
            transition: color 0.2s;
        }

        .navbar .nav-right a:hover { color: #fff; }

        .navbar .user-btn {
            background: #2e3e5c;
            border: 1px solid #2a3545;
            border-radius: 6px;
            padding: 6px 12px;
            color: #e8eeff;
            font-size: 0.85em;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
        }

        .navbar .user-btn:hover { border-color: #1a8cff; color: #fff; }


        /* ======= BURGER (caché desktop) ======= */
        .burger {
            display: none;
            flex-direction: column;
            gap: 5px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px;
            margin-right: 4px;
            flex-shrink: 0;
        }
        .burger span {
            display: block;
            width: 22px;
            height: 2px;
            background: #aabbdd;
            border-radius: 2px;
            transition: all 0.3s;
        }

        /* ======= BARRE MOBILE (cachée desktop) ======= */
        .mobile-bar {
            display: none;
        }

        /* ======= OVERLAY (caché par défaut) ======= */
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            z-index: 150;
        }
        .sidebar-overlay.visible {
            display: block;
        }
        @media (max-width: 768px) {
            .sidebar-overlay { display: none !important; }
        }

        /* ======= TABLETTE 768-1024px ======= */
        @media (max-width: 1024px) {
            .navbar-inner { padding: 0 16px; gap: 20px; }
            .navbar .nav-links { gap: 16px; }
            .sidebar { width: 180px; }
            .main { padding: 24px 20px; }
        }

        @media (max-width: 768px) {
            .sidebar { border-radius: 10px; }
            .block { border-radius: 8px; }
        }

@media (max-width: 768px) {
    .navbar .nav-links { display: none; }
    .navbar .nav-right { display: none; }
    .navbar .user-btn span { display: none; }
    .burger { display: flex; }
}

/* ===== BURGER MENU MOBILE ===== */
.leo-burger-menu {
    display: none;
    position: fixed;
    top: 0; left: -100%; bottom: 0;
    width: 100%;
    background: #1e2a42;
    z-index: 99998;
    overflow-y: auto;
    padding: 60px 0 0;
}
.leo-burger-menu.open { left: 0; }


/* Groupe avec sous-menu */
.leo-bm-group-title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: none;
    border: none;
    border-bottom: 1px solid #253348;
    color: #aabbdd;
    font-size: 0.95em;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    text-align: left;
}
.leo-bm-group-title:hover { color: #fff; background: #253348; }
.leo-bm-arrow { font-size: 0.8em; transition: transform 0.2s; }

.leo-bm-group-items {
    display: none;
    flex-direction: column;
    background: #16213a;
}
.leo-bm-group-items.open { display: flex; }
.leo-bm-group-items a {
    display: block;
    padding: 12px 32px;
    color: #8899bb;
    text-decoration: none;
    font-size: 0.88em;
    border-bottom: 1px solid #1e2a42;
}
.leo-bm-group-items a:hover { color: #fff; background: #1a2535; }
.leo-bm-sublabel {
    padding: 8px 32px 4px;
    color: #556688;
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #1e2a42;
}

/* Liens simples */
.leo-bm-link {
    display: block;
    padding: 14px 24px;
    color: #aabbdd;
    text-decoration: none;
    font-size: 0.95em;
    border-bottom: 1px solid #253348;
}
.leo-bm-link:hover { color: #fff; background: #253348; }
.leo-bm-link-accent { }
.leo-bm-separator { height: 1px; background: #3a4e6a; margin: 8px 0; }

/* Burger -> croix */
@media (max-width: 768px) {
    .leo-burger-menu { display: block; }
    .burger span { transition: all 0.25s ease; }
    .burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Sections dans le burger menu */
.leo-bm-subsections {
    display: flex;
    flex-direction: column;
    background: #0d1525;
    border-bottom: 1px solid #1e2a42;
}
.leo-bm-section-link {
    display: block;
    padding: 10px 48px;
    color: #6688aa;
    text-decoration: none;
    font-size: 0.82em;
    border-bottom: 1px solid #1a2535;
}
@media (hover: hover) { .leo-bm-section-link:hover { color: #1a8cff; background: #1a2535; } }

/* Sous-groupes imbriques dans le burger menu */
.leo-bm-subgroup {
    border-bottom: 1px solid #1e2a42;
}
.leo-bm-subgroup-title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 48px;
    background: none;
    border: none;
    color: #8899bb;
    font-size: 0.88em;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    text-align: left;
}
.leo-bm-subgroup-title:hover { color: #fff; background: #1a2535; }
.leo-bm-subgroup .leo-bm-group-items a {
    padding-left: 64px;
}
.leo-bm-subgroup .leo-bm-section-link {
    padding-left: 72px;
    font-size: 0.82em;
    color: #556688;
}
.leo-bm-subgroup .leo-bm-sublabel {
    padding-left: 64px;
}

/* Section active dans le burger menu */
.leo-bm-section-link.active,
.leo-bm-subgroup .leo-bm-section-link.active {
    color: #ffffff !important;
    box-shadow: inset 3px 0 0 #1a8cff !important;
    background: rgba(26,140,255,0.08) !important;
}

/* Lien page courante actif dans burger */
.leo-bm-link.active {
    color: #1a8cff !important;
    border-left: 3px solid #1a8cff;
    background: rgba(26,140,255,0.08);
}
