/* navbar.css - CSS unique navbar + burger LEO */
/* br dans les titres hero : visible uniquement sur mobile */
.hero h1 br { display: none; }
@media (max-width: 768px) { .hero h1 br { display: inline; } }
/* Exception transition pour bottom-links slide */
#leo-burger-menu .leo-bm-bottom-links { transition: transform 0.35s cubic-bezier(0.4,0,0.2,1) !important; }

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

/* Font navbar commune a toutes les pages */
.navbar, .navbar * { font-family: 'Roboto', 'Segoe UI', sans-serif; }
/* Pas de transition sur les elements navbar */
.navbar a, .navbar button, .navbar .user-btn, .navbar .nav-links a, .navbar .nav-right a { transition: none !important; }
.leo-bm-panel { transition: transform 0.35s cubic-bezier(0.4,0,0.2,1) !important; }

        .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: 0;
        }

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

        .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: 1200px) {
            .dev-logout-btn { display: none; }
        }
        @media (min-width: 1201px) {
            .dev-logout-btn { display: flex; }
        }
        @media (max-width: 768px) {
            #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 .edit-toggle-label {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: default;
            font-size: 0.82em;
            color: #556677;
            user-select: none;
            font-family: 'Roboto', 'Segoe UI', sans-serif;
        }
        .navbar .edit-toggle-label input[type="checkbox"] {
            width: 13px;
            height: 13px;
            margin: 0;
            accent-color: #1a8cff;
            cursor: default;
            opacity: 0.5;
            flex-shrink: 0;
        }

        .navbar .user-btn {
            background: #2e3e5c;
            border: 1px solid #2a3545;
            border-radius: 6px !important;
            padding: 6px 12px;
            color: #e8eeff;
            font-size: 0.85em;
            font-family: 'Roboto', 'Arial Narrow', Arial, sans-serif !important;
            font-size: 13px !important;
            letter-spacing: 0;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: none !important;
            text-decoration: none;
            line-height: 1;
            box-sizing: border-box;
            white-space: nowrap;
            width: 130px;
            justify-content: center;
        }

        .navbar .user-btn:visited,
        .navbar .user-btn:active,
        .navbar .user-btn:focus,
        .navbar .user-btn:focus-visible { background: #2e3e5c !important; border-color: #2a3545 !important; color: #e8eeff !important; outline: none !important; }
        @media (hover: hover) { .navbar .user-btn:hover { border-color: #1a8cff; color: #fff; } }


        /* ======= BURGER (caché desktop) ======= */
        .burger {
            display: none; /* cache par defaut, affiche par media query ou is-mobile */
            flex-direction: column;
            gap: 5px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px 0 8px 8px;
            margin-right: 0;
            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 (min-width: 1201px) {
    .burger { display: none !important; }
}

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

/* Fallback JS : classe is-mobile sur html */
html.is-mobile .navbar .nav-links { display: none !important; }
html.is-mobile .navbar .nav-right { display: none !important; }
html.is-mobile .navbar .user-btn span { display: none; }
html.is-mobile .burger { display: flex !important; }
html.is-mobile button.burger { display: flex !important; }
html.is-mobile #burger { display: flex !important; }

/* ===== BURGER MENU MOBILE ===== */
.leo-burger-menu {
    display: none;
    position: fixed;
    top: 53px; left: -100%; bottom: 0;
    width: 100%;
    background: #1e2a42;
    z-index: 99998;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}
.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 #3a4e6a;
    color: #aabbdd;
    font-size: 0.95em;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    text-align: left;
}
@media (hover: hover) { .leo-bm-group-title:hover { color: #fff; background: #253348; } }
@media (hover: none) { .leo-bm-group-title:active { color: #fff !important; box-shadow: inset 3px 0 0 #1a8cff; background: rgba(26,140,255,0.08); } }
.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 #2e3e5c;
}
@media (hover: hover) { .leo-bm-group-items a:hover { color: #fff; background: #1a2535; } }
@media (hover: none) { .leo-bm-group-items a:active { color: #fff !important; box-shadow: inset 3px 0 0 #1a8cff; background: rgba(26,140,255,0.08); } }
.leo-bm-sublabel {
    padding: 8px 24px 4px;
    color: #1a8cff;
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #2e3e5c;
}

/* Liens simples */
/* Retrait automatique pour tous les items de sous-panels */
.leo-bm-sub-panel .leo-bm-link,
.leo-bm-sub-panel .leo-bm-section-link,
.leo-bm-sub-panel .leo-bm-drilldown,
.leo-bm-sub-panel .leo-bm-back ~ .leo-bm-link,
.leo-bm-sub-panel .leo-bm-back ~ .leo-bm-section-link {
    padding-left: 40px;
}
.leo-bm-link {
    display: block;
    padding: 14px 24px;
    color: #e8eeff;
    text-decoration: none;
    font-size: 0.95em;
    border-bottom: 1px solid #3a4e6a;
}
@media (hover: hover) { .leo-bm-link:hover { color: #fff; background: #253348; } }
@media (hover: none) { .leo-bm-link:active { color: #fff !important; box-shadow: inset 3px 0 0 #1a8cff; background: rgba(26,140,255,0.08); } }
.leo-bm-link-accent { font-weight: 500; }
.leo-bm-logout { color: #cc8a2a !important; }
@media (hover: hover) { .leo-bm-logout:hover { color: #ffaa44 !important; background: rgba(204,138,42,0.08) !important; } }
.leo-bm-separator { height: 1px; background: #3a4e6a; margin: 8px 0; }

/* Burger -> croix */
@media (max-width: 1024px) {
    .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 #2e3e5c;
}
.leo-bm-section-link {
    display: block;
    padding: 14px 24px;
    color: #e8eeff;
    text-decoration: none;
    font-size: 0.95em;
    border-bottom: 1px solid #3a4e6a;
}
@media (hover: hover) { .leo-bm-section-link:hover { color: #1a8cff; background: #1a2535; } }
@media (hover: none) { .leo-bm-section-link:not(.active):active { color: #fff !important; background: rgba(26,140,255,0.08); } }

/* Sous-groupes imbriques dans le burger menu */
.leo-bm-subgroup {
    border-bottom: 1px solid #2e3e5c;
}
.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;
}
@media (hover: hover) { .leo-bm-subgroup-title:hover { color: #fff; background: #1a2535; } }
@media (hover: none) { .leo-bm-subgroup-title:active { color: #fff !important; box-shadow: inset 3px 0 0 #1a8cff; background: rgba(26,140,255,0.08); } }
.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: #ffffff !important;
    box-shadow: inset 3px 0 0 #1a8cff;
    background: rgba(26,140,255,0.08);
}
.leo-bm-link.has-active-child,
.leo-bm-bottom-connexion.has-active-child {
    color: #ffffff;
    box-shadow: inset 3px 0 0 #1a8cff;
    background: rgba(26,140,255,0.08);
}


 LEO */

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

/* Font navbar commune a toutes les pages */
.navbar, .navbar * { font-family: 'Roboto', 'Segoe UI', sans-serif; }
/* Pas de transition sur les elements navbar */
.navbar a, .navbar button, .navbar .user-btn, .navbar .nav-links a, .navbar .nav-right a { transition: none !important; }
.leo-bm-panel { transition: transform 0.35s cubic-bezier(0.4,0,0.2,1) !important; }

        .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: 0;
        }

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

        .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: 1200px) {
            .dev-logout-btn { display: none; }
        }
        @media (min-width: 1201px) {
            .dev-logout-btn { display: flex; }
        }
        @media (max-width: 768px) {
            #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 .edit-toggle-label {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: default;
            font-size: 0.82em;
            color: #556677;
            user-select: none;
            font-family: 'Roboto', 'Segoe UI', sans-serif;
        }
        .navbar .edit-toggle-label input[type="checkbox"] {
            width: 13px;
            height: 13px;
            margin: 0;
            accent-color: #1a8cff;
            cursor: default;
            opacity: 0.5;
            flex-shrink: 0;
        }

        .navbar .user-btn {
            background: #2e3e5c;
            border: 1px solid #2a3545;
            border-radius: 6px !important;
            padding: 6px 12px;
            color: #e8eeff;
            font-size: 0.85em;
            font-family: 'Roboto', 'Arial Narrow', Arial, sans-serif !important;
            font-size: 13px !important;
            letter-spacing: 0;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: none !important;
            text-decoration: none;
            line-height: 1;
            box-sizing: border-box;
            white-space: nowrap;
            width: 130px;
            justify-content: center;
        }

        .navbar .user-btn:visited,
        .navbar .user-btn:active,
        .navbar .user-btn:focus,
        .navbar .user-btn:focus-visible { background: #2e3e5c !important; border-color: #2a3545 !important; color: #e8eeff !important; outline: none !important; }
        @media (hover: hover) { .navbar .user-btn:hover { border-color: #1a8cff; color: #fff; } }


        /* ======= BURGER (caché desktop) ======= */
        .burger {
            display: none; /* cache par defaut, affiche par media query ou is-mobile */
            flex-direction: column;
            gap: 5px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px 0 8px 8px;
            margin-right: 0;
            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 (min-width: 1201px) {
    .burger { display: none !important; }
}

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

/* Fallback JS : classe is-mobile sur html */
html.is-mobile .navbar .nav-links { display: none !important; }
html.is-mobile .navbar .nav-right { display: none !important; }
html.is-mobile .navbar .user-btn span { display: none; }
html.is-mobile .burger { display: flex !important; }
html.is-mobile button.burger { display: flex !important; }
html.is-mobile #burger { display: flex !important; }

/* ===== BURGER MENU MOBILE ===== */
.leo-burger-menu {
    display: none;
    position: fixed;
    top: 53px; left: -100%; bottom: 0;
    width: 100%;
    background: #1e2a42;
    z-index: 99998;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}
.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 #3a4e6a;
    color: #aabbdd;
    font-size: 0.95em;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    text-align: left;
}
@media (hover: hover) { .leo-bm-group-title:hover { color: #fff; background: #253348; } }
@media (hover: none) { .leo-bm-group-title:active { color: #fff !important; box-shadow: inset 3px 0 0 #1a8cff; background: rgba(26,140,255,0.08); } }
.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 #2e3e5c;
}
@media (hover: hover) { .leo-bm-group-items a:hover { color: #fff; background: #1a2535; } }
@media (hover: none) { .leo-bm-group-items a:active { color: #fff !important; box-shadow: inset 3px 0 0 #1a8cff; background: rgba(26,140,255,0.08); } }
.leo-bm-sublabel {
    padding: 8px 24px 4px;
    color: #1a8cff;
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #2e3e5c;
}

/* Liens simples */
.leo-bm-link {
    display: block;
    padding: 14px 24px;
    color: #e8eeff;
    text-decoration: none;
    font-size: 0.95em;
    border-bottom: 1px solid #3a4e6a;
}
@media (hover: hover) { .leo-bm-link:hover { color: #fff; background: #253348; } }
@media (hover: none) { .leo-bm-link:active { color: #fff !important; box-shadow: inset 3px 0 0 #1a8cff; background: rgba(26,140,255,0.08); } }
.leo-bm-link-accent { font-weight: 500; }
.leo-bm-logout { color: #cc8a2a !important; }
@media (hover: hover) { .leo-bm-logout:hover { color: #ffaa44 !important; background: rgba(204,138,42,0.08) !important; } }
.leo-bm-separator { height: 1px; background: #3a4e6a; margin: 8px 0; }

/* Burger -> croix */
@media (max-width: 1024px) {
    .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 #2e3e5c;
}
.leo-bm-section-link {
    display: block;
    padding: 14px 24px;
    color: #e8eeff;
    text-decoration: none;
    font-size: 0.95em;
    border-bottom: 1px solid #3a4e6a;
}
@media (hover: hover) { .leo-bm-section-link:hover { color: #1a8cff; background: #1a2535; } }
@media (hover: none) { .leo-bm-section-link:not(.active):active { color: #fff !important; background: rgba(26,140,255,0.08); } }

/* Sous-groupes imbriques dans le burger menu */
.leo-bm-subgroup {
    border-bottom: 1px solid #2e3e5c;
}
.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;
}
@media (hover: hover) { .leo-bm-subgroup-title:hover { color: #fff; background: #1a2535; } }
@media (hover: none) { .leo-bm-subgroup-title:active { color: #fff !important; box-shadow: inset 3px 0 0 #1a8cff; background: rgba(26,140,255,0.08); } }
.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: #ffffff !important;
    box-shadow: inset 3px 0 0 #1a8cff;
    background: rgba(26,140,255,0.08);
}



/* ===== BOUTON USER (icone personne) ===== */
.leo-user-btn {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 52px;
    width: 52px;
    background: none;
    border: none;
    cursor: pointer;
    color: #aabbdd;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 0;
    transition: none !important;
}
.leo-user-btn svg {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}
@media (max-width: 1200px) {
    .leo-user-btn { display: flex; }
}
@media (hover: hover) { .leo-user-btn:hover { color: #fff; } }

/* ===== PANNEAU UTILISATEUR (droite) ===== */
.leo-user-menu {
    display: none;
    position: fixed;
    top: 52px; left: 0; right: 0; bottom: 0;
    width: 100%;
    background: #1e2a42;
    z-index: 99998;
    overflow-y: auto;
    padding: 8px 0 0;
    flex-direction: column;
    transition: none !important;
    text-align: right;
}
.leo-user-menu.open { display: flex; }


.leo-user-menu .leo-bm-link { text-align: right; padding-right: 24px; }
.leo-user-menu .leo-bm-logout { text-align: right; padding-right: 24px; }


/* ===== BURGER DRILL-DOWN ===== */
.leo-bm-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.leo-bm-panel {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: #1e2a42;
    display: flex;
    flex-direction: column;
    padding-top: 0;
    padding-bottom: 99px;
    transform: translateX(100%);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.leo-bm-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: #253348;
    border: none;
    color: #e8eeff;
    font-size: 0.95em;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-weight: 500;
    border-bottom: 1px solid #3a4e6a;
    position: sticky;
    top: 0;
    z-index: 10;
}
@media (hover: hover) { .leo-bm-back:hover { background: #2e3e5c; } }
@media (hover: none) { .leo-bm-back:active { background: #3a4e6a !important; color: #fff !important; } }
.leo-bm-drilldown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    border-bottom: 1px solid #3a4e6a;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    width: 100%;
    text-align: left;
    color: #e8eeff;
    font-size: 0.95em;
    padding: 14px 24px;
}
.leo-bm-chevron {
    color: #e8eeff;
    font-size: 1.2em;
    margin-right: 4px;
}

/* Mode paysage mobile : menu à plat scrollable */
@media (orientation: landscape) and (max-width: 1200px) {
    .leo-bm-portrait-only { display: none !important; }
    /* Liens auth dans les panels : visibles uniquement en paysage drill/panel actif */
    .leo-bm-ls-auth { display: block; }
    /* Landscape-only : masque par defaut, transition CSS */
    .leo-bm-landscape-only {
        display: block;
        position: fixed;
        top: 52px; left: 0; right: 0; bottom: 0;
        overflow-y: auto;
        z-index: 99999;
        transform: translateX(-100%);
        transition: transform 0.35s ease;
        visibility: visible;
    }
    /* Menu ouvert sans panel actif ni drill : landscape visible */
    .leo-burger-menu.open:not(.has-active-panel):not(.drilling) .leo-bm-landscape-only {
        transform: translateX(0);
    }
    /* Drilling depuis landscape : landscape glisse a gauche */
    .leo-burger-menu.open.drilling:not(.has-active-panel) .leo-bm-landscape-only {
        transform: translateX(-100%);
    }
    /* Avec section active : landscape masque */
    .leo-burger-menu.open.has-active-panel .leo-bm-landscape-only {
        display: none !important;
    }
    /* Slider panels : masque par defaut */
    #leo-bm-slider {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 99999;
        pointer-events: none;
        padding-top: 0;
        visibility: hidden;
    }
    /* Slider visible quand panel actif ou drilling */
    .leo-burger-menu.open.has-active-panel #leo-bm-slider,
    .leo-burger-menu.open.drilling #leo-bm-slider {
        visibility: visible;
    }
    #leo-bm-slider .leo-bm-panel {
        pointer-events: auto;
        padding-top: 52px;
    }
    #leo-bm-panel-1 {
        display: none !important;
    }
    .leo-bm-panel { padding-bottom: 8px; }
}
@media (orientation: portrait), (min-width: 1201px) {
    .leo-bm-portrait-only { display: block; }
    .leo-bm-landscape-only { display: none !important; }
    .leo-bm-ls-auth { display: none !important; }
}
.leo-bm-landscape-separator { height: 2px; background: #1a8cff; margin: 0; }
.leo-bm-ls-auth {
    border-top: 1px solid #3a4e6a;
    margin-top: auto;
}
.leo-bm-ls-auth a {
    display: block;
    padding: 14px 24px;
    color: #e8eeff;
    text-decoration: none;
    font-size: 0.95em;
    border-bottom: 1px solid #3a4e6a;
    font-family: 'Roboto', sans-serif;
}
.leo-bm-ls-auth a:last-child { border-bottom: none; }
.leo-bm-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid #253348;
    border-bottom: none;
}
.leo-bm-bottom-links {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 2px solid #1a8cff;
    background: #141e30;
    z-index: 99999;
    display: none;
}
.leo-burger-menu.open .leo-bm-bottom-links {
    display: block;
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1) !important;
    pointer-events: auto;
    will-change: transform;
}
.leo-bm-bottom-links * { transition: none !important; }
.leo-bm-scroll-arrow {
    position: fixed;
    bottom: 102px;
    left: 0;
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a8cff;
    font-size: 1.3em;
    pointer-events: none;
    opacity: 0.85;
    z-index: 99999;
    visibility: hidden;
}
/* Masquer bottom-links uniquement pour les panels compte */
.leo-burger-menu.open.drilling-account .leo-bm-bottom-links {
    transform: translateX(-100%);
    pointer-events: none;
}
.leo-bm-bottom-connexion {
    display: block;
    padding: 14px 24px;
    line-height: 1.5;
    cursor: pointer;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    -webkit-appearance: none;
    color: #e8eeff;
    text-decoration: none;
    font-size: 0.95em;
    border-bottom: 1px solid #3a4e6a;
}
.leo-bm-bottom-creer {
    display: block;
    padding: 14px 24px;
    color: #e8eeff;
    text-decoration: none;
    font-size: 0.95em;
}
.leo-bm-bottom-connexion.active, .leo-bm-bottom-creer.active {
    color: #ffffff !important;
    box-shadow: inset 3px 0 0 #1a8cff;
    background: rgba(26,140,255,0.08);
}
.bm-tapped { color: #fff !important; box-shadow: inset 3px 0 0 #1a8cff !important; background: rgba(26,140,255,0.08) !important; }

@media (hover: hover) {
    .leo-bm-bottom-connexion:hover, .leo-bm-bottom-creer:hover { color: #fff; background: #253348; }
}
@media (hover: none) {
    .leo-bm-bottom-connexion:active, .leo-bm-bottom-creer:active { color: #fff !important; box-shadow: inset 3px 0 0 #1a8cff; background: rgba(26,140,255,0.08); }
}

/* Bloquer la selection de texte dans le burger menu */
.leo-burger-menu *::selection {
    background: transparent;
    color: inherit;
}
.leo-burger-menu *::-moz-selection {
    background: transparent;
    color: inherit;
}

.leo-burger-menu a,
.leo-burger-menu button,
.leo-burger-menu .leo-bm-link,
.leo-burger-menu .leo-bm-section-link {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

.leo-burger-menu * {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}
