/* ─── NextLoop NavMenu ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap');

/* ── Header shell ── */
.nh-header {
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    font-family: 'Geist', 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.nh-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 48px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* ── Logo ── */
.nh-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nh-logo img {
    height: 34px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    object-position: left center;
    display: block;
}

/* ── Center nav links ── */
.nh-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.92);
    flex: 1;
    justify-content: center;
}

.nh-nav-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: color 0.15s;
}

.nh-nav-link:hover { color: #fff; }

.nh-nav-link svg { opacity: 0.7; flex-shrink: 0; }

/* ── Right actions ── */
.nh-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Frosted-glass ghost button (Connexion, Panier, Mon compte) */
.nh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.15s;
    white-space: nowrap;
    line-height: 1;
}

.nh-btn:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.nh-btn svg { flex-shrink: 0; }

/* Cart count inside button */
.nh-cart-count {
    font-variant-numeric: tabular-nums;
}

/* Icon-only button (logout, admin) */
.nh-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.15s;
    flex-shrink: 0;
}

.nh-icon-btn:hover { background: rgba(255,255,255,0.20); }
.nh-icon-btn svg { width: 17px; height: 17px; }

/* Language pill */
.nh-lang {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    padding: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.nh-lang a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 999px;
    transition: background 0.12s, color 0.12s;
}

.nh-lang a.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.nh-lang a:hover { color: #fff; }

/* ── Account flyout ── */
.nh-flyout {
    position: relative;
    z-index: 1102;
}

.nh-flyout-toggle {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}

.nh-flyout-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 176px;
    padding: 6px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(11,61,46,0.22);
    display: none;
    z-index: 1102;
    border: 1px solid rgba(11,61,46,0.08);
}

.nh-flyout-toggle:checked ~ .nh-flyout-panel {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nh-flyout-link {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #0F172A;
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.12s;
}

.nh-flyout-link:hover { background: #F8FAFC; }

.nh-flyout-link.is-active {
    background: #0B3D2E;
    color: #fff;
    font-weight: 600;
}

.nh-flyout-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1101;
    border: none;
    background: transparent;
    padding: 0; margin: 0;
    display: none;
    cursor: default;
}

.nh-flyout-toggle:checked ~ .nh-flyout-backdrop { display: block; }

.nh-inline-form {
    margin: 0; padding: 0;
    display: inline;
}

/* Flyout divider */
.nh-flyout-divider {
    height: 1px;
    background: #E2E8F0;
    margin: 4px 6px;
}

/* Favorites count badge inside flyout */
.nh-flyout-count {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    background: rgba(16,185,129,.15);
    color: #0B3D2E;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Logout item in flyout */
.nh-flyout-logout {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    color: #DC2626 !important;
    gap: 9px;
}
.nh-flyout-logout:hover { background: #FEF2F2 !important; }

/* ── Cart badge (for icon button variant) ── */
.nh-badge-wrap { position: relative; }

/* Slide-in animation — alternating class keys trigger a fresh animation each count change */
@keyframes nh-badge-pop {
    0%   { transform: translateY(-6px) scale(.8); opacity: 0; }
    60%  { transform: translateY(1px)  scale(1.1); opacity: 1; }
    100% { transform: translateY(0)    scale(1);   opacity: 1; }
}
.nh-badge-a { animation: nh-badge-pop .28s cubic-bezier(.16,1,.3,1); }
.nh-badge-b { animation: nh-badge-pop .28s cubic-bezier(.16,1,.3,1); }

.nh-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 17px; height: 17px;
    background: #10B981;
    border: 2px solid #0B3D2E;
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Pages below the absolute nav need top offset so content isn't hidden */
main { padding-top: 68px; }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .nh-inner { padding: 0 24px; gap: 20px; }
    .nh-nav { gap: 18px; font-size: 13.5px; }
}

@media (max-width: 860px) {
    /* hide center nav on tablet/mobile */
    .nh-nav { display: none; }
    .nh-inner { padding: 0 16px; height: 58px; }
    main { padding-top: 58px; }

    /* icon-only buttons — hide text labels */
    .nh-btn-label { display: none; }
    .nh-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 12px;
    }

    /* mobile: hide standalone logout icon, language pill, caret */
    .nh-icon-btn  { display: none; }
    .nh-lang      { display: none; }
    .nh-btn-caret { display: none; }
}
