@import url('https://fonts.googleapis.com/css2?family=Anton&display=swap');
body {
    margin: 0;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;
}
#site {
    display: grid;
    grid-template-columns: 1fr 4fr;
    grid-template-rows: 90px;                           /* donne une hauteur au header*/
    grid-template-areas:
                "header header"
                "nav section"
                "nav article"
                "footer footer";
}
header {
    background-color: #7c7d7f;
    grid-area: header;
    background-image: url(images/img-header.png);       /* pas de hauteur pour une image de fond*/
    background-repeat: no-repeat;
    display: flex;
    flex-direction: row-reverse;                        /* ligne commence à droite*/
    font-family: 'Anton', sans-serif;
    font-size: 25px;
    letter-spacing: 2px;
    border-bottom: 1px solid black;
}
header div {
    width: 50%;         
    /* largeur de 50%, et la boite div est calée à droite par la propriété flex-direction */
    display: flex;                                      /* en ligne par défaut*/
    align-items: center;                                /* centrer les items img+texte sur l'axe secondaire (vertical)*/
}
nav {
    background-color: #000;
    padding-top: 40px;
    grid-area: nav;
}
nav ul {
    margin: 0;
    padding: 0;                 /* neutraliser toutes les marges*/
    display: flex;              /* par défaut en lignes */
    flex-direction: column;     /* passage en colonnes*/
    align-items: center;        /* centrer sur l'axe secondaire (horizontal) */
}
nav li {
    list-style: none;
    padding: 20px;
}
nav li a {
    text-decoration: none;
    color: #fc0;
    font-size: 20px;
    transition: 0.4s;
}
nav li a:hover {
    color: #fff;
    transition: 0.4s;

}
section {
    background-color: #006;
    color: white;
    text-align: center;
    font-family: 'Anton', sans-serif;
    font-size: 40px;
    letter-spacing: 1px;
    padding-top: 10px;
    padding-bottom: 10px;
    grid-area: section;
}
article {
    background-color: rgb(248, 17, 171);
    grid-area: article;
}
footer {
    background-color: rgb(184, 246, 12);
    grid-area: footer;
    display: flex;
    justify-content: space-around;
    padding-top: 25px;
    padding-bottom: 25px;
}
footer div {
    width: 35%;
    padding: 25px;
}
footer div:nth-child(1) {
    text-align: center;
    color: #666;
}
footer a {
    color: #000;
    text-decoration: none;
}


@media screen and (max-width: 800px){
    #site {
        grid-template-columns: 1fr;
        grid-template-areas:
                    "header"
                    "nav"
                    "article"
                    "footer";
    }
    header {
        background-image: none;
    }
    header div {
        width: 100%;         
        justify-content: center;                    /* centrer sur l'axe principal (horizontal)*/
    }
    section {
        display: none;      /* cache la section, et sorti du flux */
        /*visibility: hidden;  cache la section, mais présente dans le fux*/
    }
    nav {
        padding: 0;
    }
    nav ul {
        flex-direction: row;                    /* passage en lignes*/
        justify-content: space-around;          /* espace identique partout sur l'axe principal (horizontal) */
    }
    footer {
        flex-direction: column;
    }
    footer div {
        width: 100%;
        padding: 0;
    }
    footer div:nth-child(2) {
        display: flex;
        justify-content: center;
        padding-top: 25px;
    }

}