/* ══ NAVBAR + MENU MOBILE (composant partagé) ══ */

.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 32px 60px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, transparent 100%);
    transition: padding .35s cubic-bezier(.16,1,.3,1),
                background .35s ease,
                backdrop-filter .35s ease;
}
.navbar.scrolled {
    padding: 14px 48px;
    background: rgba(8,12,18,0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav-left, .nav-right {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 32px;
}
/* Libellés CTA courts entre ~tablette large et petit desktop (évite le texte trop long) */
.nav-cta-label--short {
    display: none;
}
@media (min-width: 901px) and (max-width: 1200px) {
    .nav-left .nav-cta .nav-cta-label--long {
        display: none;
    }
    .nav-left .nav-cta .nav-cta-label--short {
        display: inline;
    }
}
.nav-right {
    justify-content: flex-end;
    /* Espace entre dernier CTA (nav-left) et premiers liens (nav-right) */
    margin-left: clamp(18px, 2.5vw, 36px);
}
/* < 1500px : logo à gauche, CTA + liens regroupés à droite */
.nav-logo {
    position: relative;
    left: auto;
    transform: none;
    order: -1;
    margin-right: auto;
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo img,
.nav-logo-img {
    height: 44px;
    width: auto;
    max-width: min(220px, 42vw);
    display: block;
    object-fit: contain;
    object-position: left center;
    transition: height .35s cubic-bezier(.16,1,.3,1), max-width .35s cubic-bezier(.16,1,.3,1);
}
.navbar.scrolled .nav-logo img,
.navbar.scrolled .nav-logo-img {
    height: 30px;
    max-width: min(160px, 38vw);
}

/* ≥ 1500px : logo centré (chevauche les deux colonnes) */
@media (min-width: 1500px) {
    .navbar {
        justify-content: space-between;
    }
    .nav-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        order: 0;
        margin-right: 0;
    }
    .nav-left,
    .nav-right {
        flex: 1;
    }
}

/* 1500–1600px : logo un peu plus petit pour aérer entre les deux colonnes */
@media (min-width: 1500px) and (max-width: 1600px) {
    .nav-logo img,
    .nav-logo-img {
        height: 36px;
        max-width: min(190px, 34vw);
    }
    .navbar.scrolled .nav-logo img,
    .navbar.scrolled .nav-logo-img {
        height: 26px;
        max-width: min(142px, 30vw);
    }
}

@media (min-width: 901px) and (max-width: 1499px) {
    .navbar {
        padding: 26px 36px;
    }
    .navbar.scrolled {
        padding: 12px 32px;
    }
    .nav-left,
    .nav-right {
        gap: 22px;
    }
    /* Logo SVG compact */
    .nav-logo img,
    .nav-logo-img {
        height: 32px;
        max-width: min(200px, 45vw);
    }
    .navbar.scrolled .nav-logo img,
    .navbar.scrolled .nav-logo-img {
        height: 22px;
        max-width: min(150px, 42vw);
    }
}

/* 901–1100px : logo + sélecteur langue plus compacts */
@media (min-width: 901px) and (max-width: 1100px) {
    .nav-logo img,
    .nav-logo-img {
        height: 24px;
        max-width: min(165px, 38vw);
    }
    .navbar.scrolled .nav-logo img,
    .navbar.scrolled .nav-logo-img {
        height: 17px;
        max-width: min(125px, 36vw);
    }
    .navbar .nav-right .nav-lang-dropdown {
        font-size: 9px;
        letter-spacing: 1.2px;
    }
    .navbar .nav-right .nav-lang-trigger {
        padding: 5px 8px;
        gap: 5px;
        border-radius: 6px;
    }
    .navbar .nav-right .nav-lang-chevron {
        width: 10px;
        height: 10px;
    }
    .navbar .nav-right .nav-lang-panel {
        min-width: 96px;
        padding: 4px;
        border-radius: 8px;
        top: calc(100% + 6px);
    }
    .navbar .nav-right .lang-btn.lang-option {
        padding: 6px 9px;
        font-size: 9px;
    }
}

.nav-link {
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-family: 'Geist Variable', ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    position: relative;
    transition: color .25s;
    white-space: nowrap;
}
.nav-link:hover { color: #fff; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: #137AA9;
    transition: width .3s cubic-bezier(.16,1,.3,1);
}
.nav-link:hover::after { width: 100%; }

.nav-link.active {
    color: #fff;
}
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.75);
    background: transparent;
    border: none;
    padding: 4px 0;
    text-decoration: none;
    cursor: pointer;
    transition: color .2s;
    position: relative;
}
.nav-cta::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: rgba(255,255,255,.4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s;
}
.nav-cta:hover { color: #fff; }
.nav-cta:hover::after { transform: scaleX(1); }

.nav-cta-outline {
    color: rgba(255,255,255,.55);
}
.nav-cta-outline:hover {
    color: #fff;
    transform: none;
}

/* 901–1499px : nav gauche + droite = même style que « Devenir distributeur » (10px / 500 / #fff / lh 16px).
   Placé après .nav-link / .nav-cta pour gagner en cascade sur les styles globaux. */
@media (min-width: 901px) and (max-width: 1499px) {
    .navbar .nav-link {
        font-family: 'Geist Variable', ui-sans-serif, system-ui, sans-serif;
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 2px;
        line-height: 16px;
        color: #fff;
        transition: color 0.2s;
    }
    .navbar .nav-link:hover {
        color: #fff;
    }
    .navbar .nav-link::after {
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        height: 1px;
        background: rgba(255, 255, 255, 0.4);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.25s;
    }
    .navbar .nav-link:hover::after {
        width: auto;
        transform: scaleX(1);
    }
    .navbar .nav-link.active {
        color: #fff;
    }
    .navbar .nav-link.active::after {
        width: auto;
        transform: scaleX(1);
    }
    .navbar .nav-left .nav-cta,
    .navbar .nav-left .nav-cta.nav-cta-outline {
        font-family: 'Geist Variable', ui-sans-serif, system-ui, sans-serif;
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 2px;
        line-height: 16px;
        color: #fff;
        transition: color 0.2s;
    }
    .navbar .nav-left .nav-cta:hover,
    .navbar .nav-left .nav-cta.nav-cta-outline:hover {
        color: #fff;
    }
    .navbar .nav-left .nav-cta::after {
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        height: 1px;
        background: rgba(255, 255, 255, 0.4);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.25s;
    }
    .navbar .nav-left .nav-cta:hover::after {
        width: auto;
        transform: scaleX(1);
    }
}

.nav-discover {
    color: rgba(255,255,255,.95) !important;
    font-weight: 700 !important;
    letter-spacing: 1.6px !important;
}
.nav-discover::after { background: rgba(255,255,255,.6) !important; }

/* ══ BURGER ══ */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1100;
}
.burger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .35s cubic-bezier(.16,1,.3,1),
                opacity .25s ease,
                width .35s cubic-bezier(.16,1,.3,1);
    transform-origin: center;
}
.burger-btn.open .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger-btn.open .burger-line:nth-child(2) {
    opacity: 0;
    width: 0;
}
.burger-btn.open .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ══ MENU MOBILE ══ */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(5,8,14,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s cubic-bezier(.16,1,.3,1);
}
.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}
.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    padding: 100px 32px 60px;
    gap: 40px;
}
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}
.mobile-nav-link {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
    transition: color .2s, padding-left .25s;
}
.mobile-nav-link:first-child { border-top: 1px solid rgba(255,255,255,.07); }
.mobile-nav-link:hover { color: #fff; padding-left: 8px; }
.mobile-nav-ctas {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

@media(max-width: 900px){
    .nav-left, .nav-right { display: none; }
    .navbar {
        padding: 16px 24px;
        justify-content: space-between;
    }
    .nav-logo {
        order: 0;
        margin-right: 0;
    }
    .nav-logo img,
    .nav-logo-img {
        height: 52px;
        max-width: min(260px, 55vw);
    }
    .navbar.scrolled .nav-logo img,
    .navbar.scrolled .nav-logo-img {
        height: 30px;
        max-width: min(180px, 50vw);
    }
    .burger-btn { display: flex; }
    .mobile-menu { display: block; }
}

/* < 800px : logo moins imposant avec le menu burger */
@media (max-width: 799px) {
    .nav-logo img,
    .nav-logo-img {
        height: 36px;
        max-width: min(200px, 68vw);
    }
    .navbar.scrolled .nav-logo img,
    .navbar.scrolled .nav-logo-img {
        height: 24px;
        max-width: min(148px, 58vw);
    }
}

/* < 400px : logo encore plus compact */
@media (max-width: 399px) {
    .nav-logo img,
    .nav-logo-img {
        height: 28px;
        max-width: min(175px, 72vw);
    }
    .navbar.scrolled .nav-logo img,
    .navbar.scrolled .nav-logo-img {
        height: 20px;
        max-width: min(132px, 65vw);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }
    .nav-left, .nav-right {
        display: none;
    }
}

/* Boutons hero réutilisés dans le menu mobile */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: .85rem 1.8rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s, border-color .25s, color .25s;
}
.hero-cta-primary {
    background: #137AA9;
    border: 1px solid #137AA9;
    color: #fff;
    overflow: hidden;
    min-width: 240px;
}
.hero-cta-primary:hover { background: #0f6490; border-color: #0f6490; }
.hero-cta-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
}
.hero-cta-secondary:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.7); }

@media (max-width: 900px) {
    .hero-cta {
        width: 100%;
        justify-content: center;
        padding: .85rem 1.2rem;
        font-size: 10px;
        letter-spacing: 2.5px;
    }
}

/* Sélecteur de langue (dropdown) */
.nav-lang-dropdown {
    position: relative;
    flex-shrink: 0;
    font-family: 'Geist Variable', ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
}
.nav-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    font: inherit;
    letter-spacing: inherit;
    text-transform: uppercase;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.nav-lang-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}
.nav-lang-dropdown.is-open .nav-lang-trigger {
    background: rgba(19, 122, 169, 0.25);
    border-color: rgba(19, 122, 169, 0.55);
}
.nav-lang-current {
    min-width: 1.75em;
    text-align: left;
}
.nav-lang-chevron {
    flex-shrink: 0;
    opacity: 0.85;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-lang-dropdown.is-open .nav-lang-chevron {
    transform: rotate(180deg);
}
.nav-lang-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 148px;
    padding: 6px;
    margin: 0;
    list-style: none;
    background: rgba(12, 16, 24, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-lang-dropdown.is-open .nav-lang-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.lang-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    padding: 4px 6px;
    font: inherit;
    letter-spacing: inherit;
    text-transform: uppercase;
    transition: color 0.2s, opacity 0.2s;
}
.lang-btn.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    margin: 0;
    border-radius: 6px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
}
.lang-option-flag {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    width: 1.5em;
    text-align: center;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
}
.lang-option-label {
    letter-spacing: inherit;
}
.lang-btn.lang-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.lang-btn:hover {
    color: #fff;
}
.lang-btn.is-active {
    color: #5bb5d8;
}
.lang-btn.lang-option.is-active {
    background: rgba(19, 122, 169, 0.15);
}
.mobile-lang {
    width: 100%;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-lang .nav-lang-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 10px;
}
.mobile-lang .nav-lang-panel {
    position: static;
    width: 100%;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    padding: 0;
    transform: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-lang.nav-lang-dropdown.is-open .nav-lang-panel {
    opacity: 1;
    visibility: visible;
    height: auto;
    padding: 6px;
    overflow: visible;
    pointer-events: auto;
}
