/* =========================================================
   LVH Sofia - Header / Navigation (commun toutes pages)
   ========================================================= */

/* TOPBAR */
.lvh-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--aefe-blue);
    z-index: var(--z-topbar);
    display: flex;
    align-items: center;
}

.lvh-topbar-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.lvh-pronote {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background .2s ease;
}
.lvh-pronote span { color: #fff; }
.lvh-pronote:hover { background: rgba(255,255,255,.12); }
.lvh-pronote img { width: 20px; height: 20px; object-fit: contain; }

.lvh-flags {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.lvh-flag {
    width: 22px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.35);
}

/* NAV PRINCIPALE */
.lvh-nav {
    position: fixed;
    top: var(--topbar-h);
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 118px;
    z-index: var(--z-nav);
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.85);
    border-bottom: 1px solid var(--menu-glass-border);
    transition: background .25s ease, border-color .25s ease;
    isolation: isolate;
}

.lvh-nav::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: 0;
    height: 12px;
    pointer-events: none;
    z-index: 0;
}

.lvh-nav.is-fr::after {
    background: linear-gradient(
        to bottom,
        #0055A4 0px, #0055A4 4px,
        #ffffff 4px, #ffffff 8px,
        #EF4135 8px, #EF4135 12px
    );
}

.lvh-nav.is-bg::after {
    background: linear-gradient(
        to bottom,
        #ffffff 0px, #ffffff 4px,
        #00966E 4px, #00966E 8px,
        #D62612 8px, #D62612 12px
    );
}

.lvh-nav.is-fr,
.lvh-nav.is-bg {
    background: rgba(255,255,255,.85);
}

.lvh-nav-inner {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

/* LOGO VH + AEFE OVERLAY */
.lvh-brand {
    position: relative;
    flex: 0 0 120px;
    width: 120px;
    height: var(--nav-h);
    display: flex;
    align-items: center;
}

.lvh-aefe-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: calc(var(--topbar-h) + var(--nav-h));
    z-index: calc(var(--z-nav) + 5);
    pointer-events: none;
}

.lvh-aefe-overlay img {
    position: absolute;
    left: max(18px, calc((100vw - var(--container)) / 2 + 18px));
    top: calc(var(--topbar-h) * 0.5);
    width: 92px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    background: #fff;
}

.lvh-logo-vh {
    width: 180px;
    height: auto;
    margin-top: 1px;
}

/* MENU DESKTOP */
.lvh-menu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-left: 10px;
}

.lvh-menu > a,
.lvh-dd-trigger {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text-blue) !important;
    font-weight: 400;
    font-size: 16px;
    padding: 10px 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    transition: background .2s ease;
    white-space: nowrap;
    outline: none;
}

.lvh-menu > a:hover,
.lvh-dd-trigger:hover {
    background: rgba(255,255,255,.20);
}

.lvh-home-ico { width: 22px; height: 22px; display: inline-block; }
.lvh-home-ico svg { width: 22px; height: 22px; display: block; fill: var(--aefe-blue); }

.lvh-dd {
    position: relative;
    z-index: 2;
}

.lvh-caret {
    width: 10px; height: 10px;
    display: inline-block;
    border-right: 2px solid rgba(0,45,97,.7);
    border-bottom: 2px solid rgba(0,45,97,.7);
    transform: rotate(45deg);
    margin-left: 2px;
}

.lvh-dd-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 270px;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(0,45,97,.18);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    padding: 10px;
    display: none;
    z-index: 10;
}

.lvh-dd-panel a {
    display: block;
    padding: 10px 10px;
    border-radius: 10px;
    color: var(--text-blue) !important;
    font-size: 14px;
    transition: background .15s ease;
}
.lvh-dd-panel a:hover { background: rgba(0,45,97,.08); }
.lvh-dd.is-open > .lvh-dd-panel { display: block; }

/* BURGER MOBILE */
.lvh-burger {
    display: none;
    margin-left: 10px;
    width: 44px; height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0,45,97,.18);
    background: rgba(255,255,255,.35);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
}
.lvh-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(0,45,97,.85);
    border-radius: 2px;
}

/* DRAWER MOBILE */
.lvh-drawer {
    position: fixed;
    top: var(--topbar-h);
    right: 0;
    height: calc(100vh - var(--topbar-h));
    width: min(92vw, 360px);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 1px solid rgba(0,45,97,.15);
    box-shadow: -18px 0 30px rgba(0,0,0,.12);
    transform: translateX(105%);
    transition: transform .25s ease;
    z-index: calc(var(--z-nav) + 1);
    padding: 14px 14px 18px;
    overflow: auto;
}
.lvh-drawer.is-open { transform: translateX(0); }

.lvh-drawer a,
.lvh-drawer button {
    width: 100%;
    text-align: left;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 16px;
    color: var(--text-blue) !important;
    cursor: pointer;
    outline: none;
}
.lvh-drawer a:hover,
.lvh-drawer button:hover {
    background: rgba(0,45,97,.06);
}

.lvh-m-dd {
    border: 1px solid rgba(0,45,97,.12);
    border-radius: 14px;
    overflow: hidden;
    margin: 8px 0;
}
.lvh-m-dd > button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}
.lvh-m-dd-panel {
    display: none;
    padding: 6px 6px 10px;
    background: rgba(0,45,97,.03);
}
.lvh-m-dd.is-open .lvh-m-dd-panel { display: block; }
.lvh-m-dd-panel a { font-size: 14px; padding: 10px 10px; }

.lvh-overlay {
    position: fixed;
    inset: 0;
    top: var(--topbar-h);
    background: rgba(0,0,0,.25);
    z-index: calc(var(--z-nav));
    display: none;
}
.lvh-overlay.is-open { display: block; }

/* RESPONSIVE */
@media (max-width: 992px) {
    .lvh-menu { display: none; }
    .lvh-burger { display: inline-flex; }
    .lvh-brand { width: 110px; flex-basis: 110px; }
    .lvh-aefe-overlay img { width: 86px; }
    .lvh-logo-vh { width: 66px; margin-top: 20px; }
}

@media (max-width: 520px) {
    .lvh-topbar-inner { gap: 10px; }
    .lvh-pronote { font-size: 13px; padding: 6px 8px; }
    .lvh-flag { width: 20px; height: 13px; }
    :root { --nav-h: 136px; }
    .lvh-brand { width: 100px; flex-basis: 100px; }
    .lvh-aefe-overlay img { width: 78px; }
    .lvh-logo-vh { width: 60px; margin-top: 18px; }
}
