@import "general.css";

/* Downward arrow */
#downward-arrow {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100vw;
    height: 10vh;
    left: 50%;
    margin-left: -50vw;
    margin-top: 14vh;
    margin-bottom: 15vh;
}

#downward-arrow img {
    position: relative;
    width: 5vw;
    height: auto;

    animation: float-vertical 2s ease-in-out infinite;
}

@keyframes float-vertical {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(20px); /* descend de 10px au milieu */
    }
    100% {
        transform: translateY(0px);  /* revient à sa position initiale */
    }
}


/* Parallax */

#container-parallax {
    position: relative;
    display: flex;
    flex-direction: column;

    width: 100vw;
    left: 50%;
    margin-left: -50vw;
}

#container-parallax .row {
    display: inline-flex;
    flex-direction: row;
    width: 100%;
}

#container-parallax > .row.reverse {
    display: inline-flex;
    flex-direction: row-reverse;
    width: 100%;
}

#container-parallax .parallax {
    width: 75%;
    height: 75vh;

    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow-x: hidden;
}

#container-parallax .description {
    position: relative;
    display: flex;
    width: 25%;
    height: 75vh;
    justify-content: center;
    align-items: center;
    overflow: hidden;

    font-size: 36px;
    font-family: 'Raleway', Arial, sans-serif;
}

#container-parallax .description .text {
    min-width: 85%;
    margin: auto 5%;

    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#container-parallax .description .text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#container-parallax .description .text .highlight {
    position: relative;
    display: inline-block;
    font-weight: 700;
}

#container-parallax .description .text.is-visible .highlight::after {
    content: '';
    position: absolute;
    height: 0.1em;
    top: 80%;
    left: 0;
    right: 0;

    transform-origin: left center;
    transform: scaleX(0);
    z-index: -1;

    background-color: white;
    opacity: 1;
    animation: highlight-grow 0.6s ease-out forwards;
    animation-delay: .5s; 
}

@keyframes highlight-grow {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}


#container-parallax .description .text.is-visible span.hover-active {
    animation: fondGris 0.3s ease forwards;
    border-radius: 3px;
}

@keyframes fondGris {
    from {
        background-color: rgba(200, 200, 200, 0);
    }
    to {
        background-color: rgba(200, 200, 200, 0.4);
    }
}