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

@import url("https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Nunito+Sans:wght@400;600;700;800&display=swap");

.site-header {
    height: 80px;

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

    padding: 0 14px;

    background: var(--header-green);

    position: relative;
    z-index: 100;
}


/* ========================================
MARQUE
======================================== */

.brand {
    max-width: 180px;

    color: #ffffff;

    text-decoration: none;
}

.brand:hover {
    color: #ffffff;
}

.brand-title {
    display: block;

    font-family: "Kalam", cursive;

    font-size: 27px;
    font-weight: 700;

    line-height: 1;

    letter-spacing: -0.5px;
}

.brand-tagline {
    display: none;

    font-family: "Nunito Sans", sans-serif;

    color: rgba(255, 255, 255, 0.97);
}


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

.desktop-nav {
    display: none;
}


/* ========================================
ZONE DROITE
======================================== */

.header-right {
    display: flex;
    align-items: center;

    gap: 8px;

    padding-right: 125px;
}


/* ========================================
BOUTON SOUTENIR MOBILE
======================================== */

.header-donation {
    position: fixed;

    top: 20px;
    right: 14px;

    z-index: 1000;

    padding: 9px 11px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: var(--coral);

    color: #ffffff;

    border: 2px solid transparent;
    border-radius: 5px;

    font-size: 14px;
    font-weight: 800;

    line-height: 1;

    white-space: nowrap;

    text-decoration: none;
}

.header-donation:hover {
    color: #ffffff;
}

.header-donation.is-floating {
    border-color: #e1ae86;
}


/* ========================================
HAMBURGER
======================================== */

.menu-button {
    width: 32px;
    height: 32px;

    padding: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;

    border: 0;

    background: transparent;

    cursor: pointer;
}

.menu-button span {
    width: 24px;
    height: 2px;

    display: block;

    background: #ffffff;

    border-radius: 20px;
}


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

@media (min-width: 761px) and (max-width: 1179px) {

    .site-header {
        height: 72px;

        padding: 0 24px;
    }

    .brand {
        max-width: 300px;

        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;

        gap: 1px;
    }

    .brand-title {
        font-size: 30px;
    }

    .brand-tagline {
        display: block;

        font-size: 12px;
        font-weight: 700;

        line-height: 1.1;

        letter-spacing: -0.1px;

        white-space: nowrap;

        transform: scaleX(1.025);
        transform-origin: left center;
    }

    .header-right {
        padding-right: 145px;
    }

    .header-donation {
        top: 15px;
        right: 24px;

        min-height: 42px;

        padding: 0 17px;

        font-size: 15px;
    }

    .menu-button {
        width: 40px;
        height: 40px;
    }

    .menu-button span {
        width: 29px;
        height: 3px;
    }
}


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

@media (min-width: 1180px) {

    .site-header {
        width: 100%;

        height: 112px;

        padding: 0;

        display: grid;

        grid-template-columns:
            365px
            minmax(0, 1fr)
            250px;

        align-items: stretch;

        gap: 0;

        background: transparent;

        position: relative;
    }


    .site-header::after {
        content: "";

        position: absolute;

        left: 0;
        right: 0;
        bottom: 0;

        height: 1px;

        background: #454b43;

        z-index: 500;

        pointer-events: none;
    }


    /* ========================================
    GAUCHE
    ======================================== */

    .brand {
        width: 100%;
        height: 112px;

        max-width: none;

        padding:
            0
            32px;

        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;

        gap: 0;

        background: var(--header-green);

        color: #ffffff;

        white-space: nowrap;
    }


    .brand-title {
        font-size: 36px;

        line-height: 0.94;

        letter-spacing: -0.7px;
    }


    .brand-tagline {
        display: block;

        margin-top: 2px;

        font-family: "Nunito Sans", sans-serif;

        font-size: 14px;
        font-weight: 700;

        line-height: 1.08;

        letter-spacing: -0.1px;

        color: rgba(255, 255, 255, 0.97);

        white-space: nowrap;

        transform: scaleX(1.035);
        transform-origin: left center;
    }


    /* ========================================
    CENTRE CLAIR
    ======================================== */

    .desktop-nav {
        min-width: 0;

        height: 112px;

        padding: 0 36px;

        display: flex;
        align-items: stretch;
        justify-content: center;

        gap: 14px;

        background:
            linear-gradient(
                90deg,
                #fdfefb 0%,
                #fbfcf7 58%,
                #f5f8ed 100%
            );
    }


    .desktop-nav a {
        height: 112px;

        min-width: 165px;

        padding: 0 18px;

        position: relative;

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

        color: #173d28;

        font-size: 16px;
        font-weight: 700;

        letter-spacing: -0.25px;

        text-decoration: none;

        white-space: nowrap;

        transition: color 0.2s ease;
    }


    /* ========================================
    SURVOL
    ======================================== */

    .desktop-nav a:hover {
        color: #4b9d36;
    }


    /* ========================================
    HOVER : LANGUETTE VERTE EN BAS
    ======================================== */

    .desktop-nav a::after {
        content: "";

        position: absolute;

        left: 50%;
        bottom: 0;

        width: 0;
        height: 7px;

        background: #6cbd4c;

        border-radius: 6px 6px 0 0;

        transform: translateX(-50%);

        transition:
            width 0.22s ease,
            height 0.22s ease;
    }


    .desktop-nav a:hover::after {
        width: 72px;
        height: 7px;
    }


    /* ========================================
    ACTIF : OVALE FAIT MAIN
    ======================================== */

    .desktop-nav a::before {
        content: "";

        position: absolute;

        left: 50%;
        top: 50%;

        width: calc(100% - 20px);
        height: 42px;

        border: 2px solid #6cbd4c;

        border-radius:
            48% 52% 46% 54% /
            55% 46% 54% 45%;

        transform:
            translate(-50%, -50%)
            rotate(-1.4deg);

        pointer-events: none;

        opacity: 0;

        transition:
            opacity 0.2s ease,
            transform 0.2s ease;
    }


    .desktop-nav a.is-active {
        color: #4b9d36;
    }


    .desktop-nav a.is-active::before {
        opacity: 1;
    }


    /*
    L'onglet actif garde son ovale,
    et n'affiche pas la languette au survol.
    */

    .desktop-nav a.is-active::after {
        width: 0;
        height: 0;
    }


    .desktop-nav a.is-active:hover::after {
        width: 0;
        height: 0;
    }


    /* ========================================
    DROITE VERTE
    ======================================== */

    .header-right {
        width: 250px;
        height: 112px;

        padding: 0 28px;

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

        background: var(--header-green);
    }


    .menu-button {
        display: none;
    }


    /* ========================================
    BOUTON CORAIL
    ======================================== */

    .header-donation {
        width: 100%;

        min-height: 58px;

        padding: 0 22px;

        position: static;

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

        background: var(--coral);

        color: #ffffff;

        border: 0;
        border-radius: 7px;

        font-size: 18px;
        font-weight: 900;

        white-space: nowrap;
    }


    .header-donation:hover {
        color: #ffffff;

        filter: brightness(0.96);
    }


    .header-donation.is-floating {
        border: 0;
    }
}


/* ========================================
TRÈS GRAND ÉCRAN
======================================== */

@media (min-width: 1700px) {

    .site-header {
        grid-template-columns:
            365px
            minmax(0, 1fr)
            250px;
    }

    .desktop-nav {
        padding-left: 42px;
        padding-right: 42px;

        gap: 18px;
    }

    .desktop-nav a {
        min-width: 180px;

        font-size: 17px;
    }

    .brand-tagline {
        font-size: 14px;

        transform: scaleX(1.035);
        transform-origin: left center;
    }
}