@charset "utf8";
@import "commun.css";

/* ------------------- Le header -------------------- */
header {
    display: flex;
    align-items: flex-end;
    flex-direction: row;
    justify-content: space-between;

    padding: 3em 1em;

    width: 100%;
    height: 100vh;

    background-image: url("../img/hero.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: bottom right;
}

h1 {
    display: inline-block;

    margin: 0;

    font-size: 7em;

    animation-name: apparition;
    animation-duration: 1s;
}

header > .cont-titre {
    max-width: 60%;
    padding: 2em 1em;

    /* background-image: linear-gradient(0deg, rgba(71, 55, 55, 0.333), transparent); */
    background-color: var(--coul-boite-accueil);
}

header p {
    margin-bottom: 0;

    font-size: 3em;
    font-family: var(--police-titres);
    color: white;
}

header span {
    display: inline-block;

    animation-name: apparition;
    animation-duration: 1s;
}

#mot-jaune {
    color: var(--jaune);
    animation-delay: .5s;
}

#mot-orange {
    color: var(--orange-fonce);
    animation-delay: 1s;
}

#mot-vert {
    color: var(--vert-clair);
    animation-delay: 1.5s;
}

.apparition-debut {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
    animation-fill-mode: forwards;
}

@keyframes apparition {
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.scroller {
    flex-grow: 1; /* Pour pouvoir centrer le contenu */

    opacity: 0;
    animation: apparition-scroller 1s ease-in forwards;
    animation-delay: 2.75s;
}

@keyframes apparition-scroller {
    100% {
        opacity: 1;
    }
}

.scroller a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;

    color: white;
    text-decoration: none;
}

.scroller span {
    font-family: var(--police-titres);
}

.scroller svg {
    animation: anim-scroller 2s ease-in-out infinite;
}

@keyframes anim-scroller {
    0% {
        transform: translate3d(0, -50%, 0);
        opacity: 0;
    }
    
    50% {
        opacity: 1;
    }

    100% {
        transform: translate3d(0, 50%, 0);
        opacity: 0;
    }
}

@media screen and (max-width: 1050px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;

        gap: 2em;
    }

    h1 {
        font-size: 5em;
    }

    header p {
        font-size: 2em;
    }

    .scroller {
        align-self: center;
        flex-grow: 0;
    }
}

@media screen and (max-width: 750px) {
    header > .cont-titre {
        max-width: none;
    }

    h1 {
        font-size: 3.5em;
    }

    header p {
        font-size: 1.8em;
    }
}

@media screen and (max-width: 620px) {
    header {
        background-image: url("../img/hero-mobile.jpg");
        background-position: center;
    }

    h1 {
        font-size: 3em;
    }

    .cont-titre > p {
        font-size: var(--step-3);
    }
}

/* ------------- fin du header --------------------- */

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7em;

    padding: 7em 1em;
}

/* Les "cartes" des enjeux */
section {
    padding: 0 1em;
}

.enjeu {
    display: flex;
    align-items: center;
    gap: 3vw;

    max-width: 1100px;

    padding: 1em;

    text-decoration: none;
    color: inherit;

    background-color: white;

    box-shadow: var(--ombre-legere);
}

.inverse {
    flex-direction: row-reverse;
}

.enjeu > * {
    transition: all 1s var(--cb-bz);
}

.enjeu:hover img {
    transform: scale(1.1);
}

.enjeu:hover div {
    transform: scale(0.9);
}

.enjeu h2 {
    font-size: var(--step-4);
}

.enjeu p {
    font-size: var(--step-1);
}

/* carte sur l'enjeu monetaire */
#monetaire span {
    color: var(--jaune);
}

#monetaire img {
    border: 5px solid var(--jaune);
}

/* carte sur l'enjeu spéculatif */
#speculatif span {
    color: var(--orange-fonce);
}

#speculatif img {
    border: 5px solid var(--orange-fonce);
}

/* carte sur l'enjeu écologique */
#ecologique span {
    color: var(--vert-clair);
}

#ecologique img {
    border: 5px solid var(--vert-clair);
}

@media screen and (max-width: 900px) {
    .enjeu {
        flex-direction: column;

        width: 100%;
        padding: 2em;
    }

    .enjeu img {
        max-width: 400px;
        width: 100%;
        height: auto;
    }
}
