:root {
    font-size: 16px;
    --primary-color: #a6bf49;
    --background-color: #F2EEB3;
    --light-color: #fff;
    --dark-color: #000;
}

body {
    font-family: "Raleway", sans-serif;
    color: var(--dark-color);
    background: var(--background-color);
}

h1, h2, h3, h4 {
    font-family: "Bitter", serif;
}

/* HEADER */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 12rem;
    padding: 0 3%;
    background: var(--primary-color);
}

#header-nav-checkbox,
.header-nav-button {
    display: none;
}

.header-homepage-logo-link {
    height: 70%;
}

.header-homepage-logo-link img {
    height: 100%;
}

.header-nav {
    width: 60%;
}

.header-nav-display {
    display: flex;
    justify-content: space-between;
}

.header-nav-links::after {
    content: "";
    display: block;
    width: 90%;
    height: 1px;
    margin: auto;
    background: var(--dark-color);
    transform: scale(0);
    transform-origin: center;
    transition: transform 0.3s ease-out;
}

.header-nav-links:hover::after {
    transform: scale(1);
}

/* MAIN */

.main {
    padding: 1rem;
}

.main-landing-title {
    text-align: center;
}

.main-landing-title {
    font-size: 2rem;
    margin: 4rem 0;
}

.main-landing-welcome {
    font-size: 1.2rem;
    font-style: italic;
    margin-left: 10%;
}

.main-landing-presentation-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto;
    width: 80%;
    margin: auto;
}

.main-landing-text {
    margin: 1rem 0;
    order: 0;
}

/* MAIN >>> Diapo accueil */

.main-landing-diapo {
    position: relative;
    width: 500px;
    height: 400px;
    overflow: hidden;
    grid-column: 2;
    grid-row: 1 / 5;
    margin-left: 15%;
}

.main-landing-diapo .img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: diapoFade 32s infinite;
    transition: opacity 1s ease-in-out;
}

.main-landing-diapo .img1 {
    background-image: url("../img/homepage/img-diapo1.png"); /* image 1 */
    animation-delay: 0s;
}
.main-landing-diapo .img2 {
    background-image: url("../img/homepage/img-diapo2.png"); /* image 2 */
    animation-delay: 8s;
}
.main-landing-diapo .img3 {
    background-image: url("../img/homepage/img-diapo3.png"); /* image 3 */
    animation-delay: 16s;
}
.main-landing-diapo .img4 {
    background-image: url("../img/homepage/img-diapo4.png"); /* image 4 */
    animation-delay: 24s;
}

@keyframes diapoFade {
    0%   { opacity: 0; }
    10%   { opacity: 1; }
    23%  { opacity: 1; }
    33%  { opacity: 0; }
    100% { opacity: 0; }
}

/* FOOTER */

.footer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem;
    text-align: center;
    line-height: 2rem;
    background: var(--primary-color);
}

.bottom-footer {
    margin-top: 2rem;
}

.footer-labels {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
}

.footer-labels img {
    height: 5rem;
}

/* -----Under 1200px----- */

@media (max-width: 1200px) {

    /* HEADER */

    .header {
        position: relative;
        height: 8rem;
    }

    .header-nav-button {
        position: absolute;
        right: 5.2rem;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        height: 1.5rem;
        width: 1.5rem;
        cursor: pointer;
    }

    .header-nav-button span {
        display: block;
        height: 3px;
        width: 100%;
        border-radius: 1rem;
        background: var(--dark-color);
    }

    .header-homepage-logo-link {
        margin: auto;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 8rem;
        right: 0;
        width: 12rem;
        background: var(--primary-color);
        height: 20rem;
    }

    .header-nav-display {
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        height: 100%;
    }

    /* HEADER >>> on-click */

    #header-nav-checkbox:checked ~ .header-nav {
        display: block;
    }

    #header-nav-checkbox:checked ~ .header-nav-button {
        justify-content: center;
    }

    #header-nav-checkbox:checked ~ .header-nav-button span {
        position: absolute;
    }

    #header-nav-checkbox:checked ~ .header-nav-button span:nth-child(1) {
        transform: rotate(-135deg);
    }

    #header-nav-checkbox:checked ~ .header-nav-button span:nth-child(2) {
        display: none;
    }

    #header-nav-checkbox:checked ~ .header-nav-button span:nth-child(3) {
        transform: rotate(135deg);
    }

    /* MAIN */

    .main-landing-welcome {
        margin-left: 10%;
    }

    .main-landing-presentation-container {
        display: flex;
        flex-direction: column;
    }

    .main-landing-text {
        order: 0;
    }

    .main-landing-text:nth-child(3) {
        order: 4;
    }

    .main-landing-text:nth-child(4) {
        order: 5;
    }

    /* MAIN >>> Diapo accueil */

    .main-landing-diapo {
    margin: 0;
    width: 100%;
    max-width: 700px;
    height: 300px;
    align-self: center;
    order: 3;
    }

    /* FOOTER */

    .footer-labels img {
        height: 4rem;
    }
}

/* -----Under 600px----- */

@media (max-width: 600px) {
    body {
        font-size: 0.8rem;
    }

    /* HEADER */

    .header {
        height: 7rem;
    }

    .header-nav-button {
        right: 5%;
        width: 1rem;
        height: 1rem;
    }

    .header-nav-button span {
        height: 2px;
    }

    .header-nav {
        top: 7rem;
        width: 100vw;
        height: 10rem;
    }

    .header-nav-display {
        align-items: end;
        padding-right: 5%;
    }

    /* FOOTER */

    .footer-labels img {
        height: auto;
        width: 15vw;
    }
}
