@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: #f3f3f3;
    grid-area: article;
    padding: 10px;
}
article img {
    width: 100%;
}
#image {
    padding: 8px;
}
#content {
    display: flex;
    justify-content: space-between;         /* espace au milieu entre photo et texte */
}
#texte {
    width: 70%;
    text-align: justify;
    font-size: 17px;
}
.centrer {
    text-align: center;
}
button {
    background-color: #f30;
    color: white;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 50px;
    padding-right: 50px;
    border: none;
    font-size: 22px;
    border-radius: 25px;
    cursor: pointer;
    outline: none;              /*suppression la bordure du bouton lorsqu'on clique*/
}
button:hover {
    background-color: #f90;
}
#photo {
    width: 28%;
}
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*/
    }
    #content {
        flex-direction: column;
    }
    #texte {
        width: 100%;
        margin-bottom: 5px;
    }
    #photo {
        width: 100%;
        display: flex;
        justify-content: space-between;      /* espace au milieu entre les 2 photos */
    }
    #photo div {
        width: 49%;
    }
    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;
    }

}