html{
    height: 100%;
    /* Marge par rapport au bord */
    padding: 15px;
    /* Faire grandir vers l'intérieur et pas agrandir de ce fait */
    box-sizing: border-box;
}
body{
    height: 100%;
    /* Taille de la bordure et couleur en hex */
    border: 4px solid #F11616;
    margin: 0;
}
header{
    padding-top: 1%;
    padding-bottom: 1%;
    /* Taille de l'en-tête */
    height: 30%;
    /* Faire grandir vers l'intérieur et pas agrandir de ce fait */
    box-sizing: border-box;
}
#headerLogo{
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
nav {
    /* Hauteur de la barre de navigation */
    height: 8%;
    background-color: #686C6B;
}
nav ul{
    height: 100%;
    margin: 0;
    padding:0;
    display:flex;
    justify-content: space-evenly;
}

nav li {
    list-style: none;
    height: 100%;
}
nav li a{
    font-size: 24px;
    color:black;
    text-decoration: none;
    height: 100%;
    padding: 0 20px;
    display:flex;
    align-items: center;
}
nav ul li a:hover {
    background-color: #555;
}
.main{
    height:55%;
    align-content: center;

    display:grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 45% 45%;
    grid-row-gap: 5%;
}
figure{
    margin: 0;
    height: 100%;
    width: 100%;
    text-align: center;
}
figure img{
    max-width:90%;
    max-height:90%;
}
figure figcaption{
    height: 10%;
}
@media only screen and (max-width: 768px) {
    .main {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 300px);
        align-content: unset;
        overflow-y: auto;
        box-sizing: border-box;
        padding: 5% 0;
    }
    figure figcaption{
        height: 20%;
    }
    figure img{
        max-width:80%;
        max-height:80%;
    }
}

.topnav a.active {
    background-color: #404140;
    color: white;
}

.topnav .icon {
    display: none;
}

@media screen and (max-width: 768px) {
    .topnav li:not(:first-child) {
        display: none;
        background-color:  #686C6B;
    }
    .topnav a.icon {
        display: block;
        align-self: center;
        color: white;
    }
}

@media screen and (max-width: 768px) {
    .topnav.responsive li {
        float: none;
        display: block;
        text-align: left;
    }
    .topnav.responsive{
        display: block;
        position: relative;
    }
}

.mainSection{
    height: 55%;
    text-align: center;
    padding: 0 4%;
}  

.mainSection section{
    height: 100%;
    display: flex;
    flex-direction: column;
    place-content: center;
    overflow-y: auto;
}


.mainSectionContact{
    height: 55%;
    text-align: center;
    padding: 0 4%;
}  

.mainSectionContact section{
    height: 100%;
    display: flex;
    flex-direction: column;
    place-content: center;
    overflow-y: auto;
}

footer{
    height: 7%;
    display: flex;
    justify-content: center;
    place-items: center;
}

@media screen and (max-width: 440px) {
    footer{
        text-align: center;
    }
}

@media screen and (max-width: 400px) {
    .mainSection section{
        place-content: flex-start;
    }
}

.mainSectionContact section {
  font-size: 30px;
}

.mainSection section {
  font-size: 20px;
}

figcaption {
    font-size: 20px;
}