header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--couleur-fond-entete);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 1000;
}


/* Menu */
/* Le fonctionnement du menu sur petit écran est inspiré de
 https://github.com/threkk/examples/tree/main/css-only-hamburger-menu */

/* Definit FontAwesome comme la police pour les divers icônes */
i {
    font-family: FontAwesome;
    font-style: normal;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin-right: 2rem; /* Augmente la marge à droite */
    margin-bottom: 0;
    display: flex; /* Utilise un conteneur flex */
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    text-decoration: none;
    color: grey;
    font-size: 16px; /* Légèrement plus grande taille de police */
}

nav ul li a.selectionne {
    color: #333;
}

/* Ces deux lignes cachent l'icône et la case à cocher en mode grant écran */
nav input[type="checkbox"],
nav label {
  display: none;
}

/* Mode écran téléphone : l'entête est organisé verticalement, à droite, et les liens vers les sections
sont accéssibles dérrière une icône "hamburger" */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: end;
    }

    /* Here is the magic: if the checkbox is not marked, the adjacent list is not displayed */
    input[type="checkbox"]:not(:checked) + ul {
      display: none;
    }

    nav {
      flex-direction: row;
      flex-wrap: wrap;
      margin-left: 0;
      margin-right: 0;
    }

    /* Stlying the menu icon, the checkbox stays hidden */
    nav label {
      text-align: right;
      display: block;
      padding: 0.5em;
      line-height: 1.6em;
      align-self: center;
    }

    /* Because we are in mobile mode, we want to display it as a vertical list */
    nav ul {
      display: block;
    }

    nav ul li {
      margin-bottom: 0;
      width: 100%;
      text-align: right;
      padding-bottom: 0.2em;
    }
  }
