/* ==========================================================================
   HEADER — LONS ENTREPRENEURS
   ========================================================================== */


/* ==========================================================================
   HEADER GLOBAL
   ========================================================================== */

.site-header {
    position: fixed;

    top: 0;
    left: 0;

    z-index: 9997;

    width: 100%;

    background: #0E2434;

    transform: translateY(0);

    transition:
        transform .35s cubic-bezier(.4, 0, .2, 1),
        box-shadow .3s ease;
}


/*
 * navigation.js peut continuer à poser ces classes :
 * le header reste volontairement bleu nuit dans tous les états.
 */

.site-header.nav-transparent,
.site-header.nav-colored,
.site-header.is-static-colored {
    background: #0E2434;
}

.site-header.nav-colored {
    box-shadow:
        0 10px 35px
        rgba(3, 16, 25, .10);
}


/*
 * Masquage au scroll conservé.
 */

#masthead.header--hidden {
    transform: translateY(-100%);
}


/* ==========================================================================
   BARRE
   ========================================================================== */

.header-bar {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 36px;

    min-height: 86px;

    padding: 12px 0;
}


/* ==========================================================================
   LOGO
   ========================================================================== */

.header-logo {
    display: inline-flex;

    align-items: center;

    flex: 0 0 auto;

    margin: 0;

    text-decoration: none;

    transition:
        opacity .3s ease,
        transform .3s cubic-bezier(.16, 1, .3, 1);
}

.header-logo:hover {
    opacity: .88;

    transform: translateY(-1px);
}

.header-logo img {
    display: block;

    width: auto;
    height: auto;

    max-width: 118px;
    max-height: 62px;

    object-fit: contain;
}

.header-logo__fallback {
    color: #FFFFFF;

    font-family: "Poppins", sans-serif;
    font-size: 2rem;
    font-weight: 700;
}


/* ==========================================================================
   PARTIE DROITE
   ========================================================================== */

.header-bar__right {
    display: flex;

    align-items: center;

    gap: 28px;

    margin-left: auto;
}


/* ==========================================================================
   NAVIGATION DESKTOP
   ========================================================================== */

.main-navigation {
    display: flex;

    align-items: center;
}

.nav-pill-list {
    display: flex;

    align-items: center;

    gap: 4px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.nav-pill-item {
    position: relative;

    margin: 0;
}

.nav-pill-link {
    position: relative;

    display: inline-flex;

    align-items: center;

    gap: 7px;

    margin: 0;

    padding: 11px 12px;

    border-radius: 24px;

    color: #FFFFFF;

    font-family: "Poppins", sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.2;

    text-decoration: none;

    transition:
        color .3s ease,
        background-color .3s ease;
}

.nav-pill-link::after {
    content: "";

    position: absolute;

    left: 12px;
    right: 12px;
    bottom: 4px;

    height: 2px;

    border-radius: 10px;

    background: #2EA3F2;

    opacity: 0;

    transform: scaleX(.35);

    transition:
        opacity .3s ease,
        transform .3s cubic-bezier(.16, 1, .3, 1);
}

.nav-pill-link:hover,
.nav-pill-item.current-item > .nav-pill-link {
    color: #FFFFFF;

    background: rgba(255, 255, 255, .04);
}

.nav-pill-link:hover::after,
.nav-pill-item.current-item > .nav-pill-link::after {
    opacity: 1;

    transform: scaleX(1);
}


/* ==========================================================================
   CHEVRON
   ========================================================================== */

.nav-pill-chevron {
    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    margin-top: -3px;

    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    transform: rotate(45deg);

    transition:
        transform .3s ease;
}

.nav-pill-item.is-open
.nav-pill-chevron {
    margin-top: 3px;

    transform: rotate(-135deg);
}


/* ==========================================================================
   CTA HEADER
   ========================================================================== */

.header-cta.btn.btn-primary {
    flex: 0 0 auto;

    gap: 10px;

    min-height: 46px;

    padding:
        7px
        7px
        7px
        18px;

    border-radius: 30px;

    background: #2EA3F2;

    color: #FFFFFF;

    white-space: nowrap;
}

.header-cta.btn.btn-primary:hover,
.header-cta.btn.btn-primary:focus-visible {
    background: #FFFFFF;

    color: #0E2434;
}

.header-cta.btn.btn-primary
.btn__icon {
    width: 32px;
    height: 32px;

    background-color: #153951;
}


/* ==========================================================================
   DROPDOWN DESKTOP
   ========================================================================== */

.nav-pill-dropdown {
    position: absolute;

    top: calc(100% + 14px);
    left: 50%;

    z-index: 20;

    width: 620px;
    max-width: 90vw;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transform:
        translateX(-50%)
        translateY(-8px);

    transition:
        opacity .25s ease,
        transform .25s ease,
        visibility 0s linear .25s;
}

.nav-pill-item.is-open
.nav-pill-dropdown {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;

    transform:
        translateX(-50%)
        translateY(0);

    transition:
        opacity .25s ease,
        transform .25s ease;
}

.nav-pill-dropdown-inner {
    display: flex;

    align-items: stretch;

    gap: 20px;

    padding: 20px;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;

    background: #153951;

    box-shadow:
        0 24px 60px
        rgba(3, 16, 25, .28);
}

.nav-pill-dropdown-nav {
    display: flex;
    flex-direction: column;

    justify-content: center;

    gap: 4px;

    width: 48%;
}

.nav-pill-dropdown-featured {
    display: flex;
    flex-direction: column;

    gap: 5px;

    margin: 0 0 8px;

    padding: 14px 16px;

    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;

    color: #FFFFFF;

    text-decoration: none;

    transition:
        background-color .3s ease;
}

.nav-pill-dropdown-featured:hover,
.nav-pill-dropdown-featured.is-active {
    background:
        rgba(46, 163, 242, .10);
}

.nav-pill-dropdown-featured-title {
    color: #2EA3F2;

    font-family: "Poppins", sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-pill-dropdown-featured-text {
    color:
        rgba(255, 255, 255, .72);

    font-family: "Poppins", sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.45;
}

.nav-pill-dropdown-list {
    display: flex;
    flex-direction: column;

    gap: 2px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.nav-pill-dropdown-list li {
    margin: 0;
}

.nav-pill-dropdown-list a {
    display: block;

    margin: 0;

    padding: 11px 14px;

    border-radius: 10px;

    color: #FFFFFF;

    font-family: "Poppins", sans-serif;
    font-size: 1.4rem;
    font-weight: 500;

    text-decoration: none;

    transition:
        color .3s ease,
        background-color .3s ease;
}

.nav-pill-dropdown-list a:hover,
.nav-pill-dropdown-list li.current-item a,
.nav-pill-dropdown-list a.is-active {
    background:
        rgba(46, 163, 242, .10);

    color: #2EA3F2;
}

.nav-pill-dropdown-image {
    position: relative;

    width: 52%;

    aspect-ratio: 4 / 3;

    overflow: hidden;

    border-radius: 12px;

    background:
        rgba(255, 255, 255, .04);
}

.js-pill-image {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 0;

    transform: translateZ(0);

    backface-visibility: hidden;

    will-change: opacity;
}

.js-pill-image.is-active {
    opacity: 1;
}


/* ==========================================================================
   BURGER
   ========================================================================== */

.burger-toggle {
    position: relative;

    z-index: 9999;

    display: none;

    flex: 0 0 42px;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;

    background: #153951;

    cursor: pointer;
}

.burger-toggle__bar {
    display: block;

    width: 19px;
    height: 2px;

    border-radius: 4px;

    background: #FFFFFF;

    transition:
        transform .3s ease,
        opacity .3s ease;
}

.burger-toggle.is-active
.burger-toggle__bar:nth-child(1) {
    transform:
        translateY(7px)
        rotate(45deg);
}

.burger-toggle.is-active
.burger-toggle__bar:nth-child(2) {
    opacity: 0;
}

.burger-toggle.is-active
.burger-toggle__bar:nth-child(3) {
    transform:
        translateY(-7px)
        rotate(-45deg);
}


/* ==========================================================================
   PAGES SANS HERO
   ========================================================================== */

.site-main--no-hero {
    padding-top: 86px;
}


/* ==========================================================================
   TABLETTE / MOBILE
   ========================================================================== */

@media (max-width: 991.98px) {

    .header-bar {
        min-height: 78px;

        gap: 16px;

        padding: 10px 0;
    }

    .header-logo img {
        max-width: 104px;
        max-height: 56px;
    }

    .header-bar__right {
        gap: 12px;
    }

    .burger-toggle {
        display: flex;
    }


    /* ----------------------------------------------------------------------
       Overlay menu
       ---------------------------------------------------------------------- */

    #site-navigation.js-nav-pill {
        position: fixed;

        inset: 0;

        z-index: 9998;

        display: flex;

        align-items: flex-start;
        justify-content: center;

        width: 100%;
        height: 100vh;
        height: 100dvh;

        padding:
            110px
            32px
            40px;

        overflow-y: auto;

        background: #0E2434;

        opacity: 0;
        visibility: hidden;

        pointer-events: none;

        transition:
            opacity .3s ease,
            visibility 0s linear .3s;
    }

    #site-navigation.js-nav-pill.is-menu-open {
        opacity: 1;
        visibility: visible;

        pointer-events: auto;

        transition:
            opacity .3s ease;
    }

    .nav-pill-list {
        flex-direction: column;

        align-items: stretch;

        width: 100%;
        max-width: 560px;

        gap: 4px;
    }

    .nav-pill-link {
        justify-content: space-between;

        width: 100%;

        padding: 16px 12px;

        border-radius: 12px;

        font-size: 2rem;
    }

    .nav-pill-link::after {
        display: none;
    }


    /* ----------------------------------------------------------------------
       Dropdown mobile
       ---------------------------------------------------------------------- */

    .nav-pill-dropdown {
        position: static;

        width: 100%;
        max-width: none;
        max-height: 0;

        overflow: hidden;

        opacity: 1;
        visibility: visible;

        pointer-events: auto;

        transform: none;

        transition:
            max-height .35s ease;
    }

    .nav-pill-item.is-open
    .nav-pill-dropdown {
        max-height: 900px;

        transform: none;
    }

    .nav-pill-dropdown-inner {
        display: block;

        padding:
            2px
            0
            12px
            18px;

        border: 0;
        border-radius: 0;

        background: transparent;

        box-shadow: none;
    }

    .nav-pill-dropdown-nav {
        width: 100%;
    }

    .nav-pill-dropdown-featured {
        margin: 0;

        padding: 12px 0;

        border: 0;
        border-radius: 0;

        background: transparent !important;
    }

    .nav-pill-dropdown-featured-title {
        color: #2EA3F2;

        font-size: 1.6rem;
    }

    .nav-pill-dropdown-featured-text {
        color:
            rgba(255, 255, 255, .66);
    }

    .nav-pill-dropdown-list a {
        padding: 11px 0;

        font-size: 1.6rem;
        font-weight: 400;

        color:
            rgba(255, 255, 255, .80);
    }

    .nav-pill-dropdown-list a:hover,
    .nav-pill-dropdown-list li.current-item a,
    .nav-pill-dropdown-list a.is-active {
        background: transparent;

        color: #2EA3F2;
    }

    .nav-pill-dropdown-image {
        display: none;
    }


    /*
     * Le CTA reste visible dans la barre
     * comme sur la maquette.
     */
    .header-cta.btn.btn-primary {
        min-height: 42px;

        padding:
            6px
            6px
            6px
            15px;

        font-size: 1.3rem;
    }

    .header-cta.btn.btn-primary
    .btn__icon {
        width: 30px;
        height: 30px;
    }


    html.js-mobile-menu-open,
    body.js-mobile-menu-open {
        height: 100%;

        overflow: hidden;
    }


    .site-main--no-hero {
        padding-top: 78px;
    }

}


/* ==========================================================================
   PETIT MOBILE
   ========================================================================== */

@media (max-width: 575.98px) {

    .header-bar {
        min-height: 72px;

        padding: 8px 0;
    }

    .header-logo img {
        max-width: 88px;
        max-height: 50px;
    }

    .header-bar__right {
        gap: 8px;
    }


    /*
     * Sur les très petits écrans :
     * texte du CTA masqué, on conserve
     * uniquement son rond avec la flèche.
     */

    .header-cta.btn.btn-primary
    .btn__icon {
        width: 32px;
        height: 32px;
    }


    #site-navigation.js-nav-pill {
        padding:
            96px
            20px
            32px;
    }

    .nav-pill-link {
        padding: 14px 10px;

        font-size: 1.8rem;
    }

    .site-main--no-hero {
        padding-top: 72px;
    }

}


/* ==========================================================================
   ACCESSIBILITÉ
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .site-header,
    .header-logo,
    .nav-pill-link,
    .nav-pill-link::after,
    .nav-pill-chevron,
    .nav-pill-dropdown,
    .header-cta,
    .burger-toggle__bar {
        transition: none !important;
    }

}
