/* ************** */
/* Header  */
/* ************** */

.header .wrapper{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.site-logo{
    display: block;
    width: 110px;
    height: 48px;
    @media all and (min-width: 640px){
        width: 130px;
        height: 56px;
    }

    svg{
        width: 100%;
        height: auto;
    }
}

/* ************** */
/* Navigations */
/* ************** */

ul.menu{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    &.vertical{
        flex-direction: column;
    }

    li > a{
        color: var(--wp--preset--color--black);
        text-decoration: none;
    }

    &.buttons-menu{
        gap: 15px;
        li > a{
            border-radius: 60px;
            padding: calc(0.667em + 4px) calc(1.333em + 2px) calc(0.667em + 2px) calc(1.333em + 2px);
            background-color: var(--wp--preset--color--alpha-black);
        }
    }
}

.nav-main{
    &:not(.visible){
        transform:translateY(-100%);
        opacity: 0;
    }

    width: 100vw;
    height: 100svh;
    background-color: var(--wp--preset--color--lightgray);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: .95;
    transition: transform .5s ease-out, opacity .6s ease-out;

    ul{
        text-align: center;
        align-items: center;
        justify-content: center;
        gap: 40px;
    }

    li > a{
        font-size: clamp(24px, calc(24px + (48 - 24) * ((100vw - 460px) / (1260 - 460))), 48px);
        font-family: var(--wp--preset--font-family--heading);
        text-transform: uppercase;
        display: flex;
        align-items: center;
        gap:40px;
        transition: color .3s;
        
        &:before,
        &:after{
            display: block;
            content:'';
            width: 0;
            height: 4px;
            background-color: var(--wp--preset--color--secondary);
            transition: width .3s ease;
        }
        &::before{
            border-radius: 5px 0 0 5px;
        }
        
        &::after{
            border-radius: 0 5px 5px 0;
        }

        &:hover{
            color: var(--wp--preset--color--secondary);
            &:before,
            &::after{
                width: 10px;
            }
        }
    }

    li.is-active > a{
        display: flex;
        align-items: center;
        gap:40px;
        color: var(--wp--preset--color--secondary);
        &:before,
        &:after{
            width: 80px;
        }
        &::before{
            border-radius: 5px 0 0 5px;
        }
         &::after{
            border-radius: 0 5px 5px 0;
        }
    }

    .close-button{
        position: absolute;
        bottom: 50px;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 60px;
        cursor: pointer;
        background-color: var(--wp--preset--color--black);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 60px;

        span{
            display: block;
            width: 26px;
            height: 2px;
            background-color: var(--wp--preset--color--white);
            &:first-child{
                transform: rotate(45deg);
            }
            &:last-child{
                transform: rotate(-45deg) translateX(1px) translateY(-1px);
            }
        }

        &:hover{
            transform: scale(1.1) translateY(-1px) translateX(-50%) !important;
        }
    }
}

.quick-start{
    margin-left: auto;
    .buttons-menu li > a{
        &.nav-main-toggle{
            background-color: var(--wp--preset--color--black);
            color: var(--wp--preset--color--white);
        }
    }
}

/* ************** */
/* Frontpage hero */
/* ************** */

.hero-section{
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    min-height: 80svh;
    padding-top: 80px;

    @media all and (min-width: 768px){
        min-height: 75vh;
    }

    .site-logo{
        width: 200px;
        height: auto;
        @media all and (min-width: 768px){
            width: 480px;
        }
    }

    .titles{
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    &:after{
        display: block;
        content: '';
        position: absolute;;
        top:100%;
        left:50%;
        transform: translateX(-50%);
        width: 75vw;
        height: 40vw;
        background-image: url(/wp-content/themes/sayouat-subtheme/assets/images/hero-rising.svg);
        background-size: cover;
    }

    h2{
        margin-top: 20px;
        font-size: clamp(20px, calc(18px + (24 - 18) * ((100vw - 460px) / (1260 - 460))), 24px);
        text-align: center;
        font-weight: 100;
        max-width: 70%;
    }

    ul.menu.buttons-menu{
        margin-top: 30px;
        li > a{
            padding-left: 46px;
            padding-right: 46px;
        }
    }
}

/* ************** */
/* Buttons hovers */
/* ************** */

.everest-forms-submit-button,
.buttons-menu a,
.wp-block-button a,
.menu.socials a,
.nav-main .close-button,
.swiper-button:not(.swiper-button-disabled){
    display: flex;
    transition: transform .4s ease, box-shadow .4s ease;
    box-shadow: 0 0 2px rgba(#1E221F, 0);

    &:hover{
        transform: scale(1.1) translateY(-1px);
        box-shadow: 0 2px 1px rgba(0, 0, 0, .2);
    }
}


/* ************** */
/* Swipers */
/* ************** */

:root {
    --swiper-theme-color: var(--wp--preset--color--secondary);
    --swiper-pagination-bottom: -30px;
    --swiper-pagination-bullet-size: 12px;
    --swiper-pagination-bullet-horizontal-gap: 6px;
}

/* Permer un affichage en grille dans l'éditeur de block et en swiper en front */
body .is-layout-grid.swiper-wrapper {
    display: flex !important; 
}

.swiper-container{
    position:relative;
    @media all and (min-width: 768px) and (max-width:1365px){
        max-width: calc(100% - 150px) !important;
    }
}

.swiper-wrapper{
    height: auto !important;
}

.swiper-button{
    width:60px;
    height: 60px;
    border-radius: 60px;
    background-image: url(/wp-content/themes/sayouat-subtheme/assets/images/swiper-button.svg);
    &:after{
        display: none;
    }

    &.swiper-button-prev{
        transform: rotate(-180deg) translateY(50%);
        &:not(.swiper-button-disabled):hover{
            transform: scale(1.1) rotate(-180deg) translateY(50%) !important;
            box-shadow: 0 -2px 1px rgba(0, 0, 0, .2);
        }
    }

    &.swiper-button-disabled{
        opacity: .5;
        filter: grayscale(100%);
    }
}

.swiper-pagination{
    left:50% !important;
    transform: translateX(-50%);
    @media all and (min-width: 768px){
        display: none;
    }
}

.swiper-button{
    @media all and (max-width: 767px){
        display: none;
    }
}

.swiper-controls{
    display: flex;
    justify-content: center;
    position: absolute;
    top: -24px;
    left:0;
    width: 100%;
    @media all and (min-width: 768px){
        left: -90px;
        width: calc(100% + 180px);
    }
    pointer-events: none;
    .swiper-button, 
    .swiper-pagination{
        pointer-events: all;
    }
}

/* ************** */
/* Footer */
/* ************** */
.footer{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 40px;
    padding: 60px 40px;
    background-color: var(--wp--preset--color--black);
    margin-top: 20px;

    .rising{
        position: absolute;
        bottom: 95%;
        left: 50%;
        width: 45vw;
        transform: translateX(-50%);
        z-index: -1;
        svg{
            width: 100%;
            height: auto;
        }
    }

    .site-logo{
        width:155px;
        height: 87px;
    }

    .menu.socials{
        gap: 15px;
        a{
            color: var(--wp--preset--color--primary);
            width: 32px;
            height: 32px;
            display: block;
            font-size: 0;
            background-size: cover;
            &.linkedin{
                background-image: url(/wp-content/themes/sayouat-subtheme/assets/images/socials/linkedin.svg);
            }
            &.insta{
                background-image: url(/wp-content/themes/sayouat-subtheme/assets/images/socials/instagram.svg);
            }
            &.facebook{
                background-image: url(/wp-content/themes/sayouat-subtheme/assets/images/socials/facebook.svg);
            }
        }
    }

    .menu.legal{
        gap: 20px;
        flex-direction: column;
        text-align: center;
        justify-content: center;

        @media all and (min-width: 640px){
            flex-direction: row;
            li:not(:nth-last-of-type(1))::after{
                content: '|';
                margin-left: 15px;
                font-weight: bold;
                color: var(--wp--preset--color--white);
            }
        }


        a{
            color: var(--wp--preset--color--white);
            font-family: var(--wp--preset--font-family--heading);
            text-transform: uppercase;
            transition: color .3s ease;
            &:hover{
                color:var(--wp--preset--color--primary);
            }
        }
    }
}