.index-wrapper {
  font-family: "Rhymes", sans-serif;
  font-size: 12px;
  line-height: 1;
  padding: 70px 25px;
  font-feature-settings: "onum";
}

.index-header {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  margin-left: 310px;
  gap: 20px;
  font-family: "Rhymes", sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid black;
  position: sticky;
  background: transparent;
  z-index: 10;
  padding-bottom: 0.4em;
}

.index-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 75px; /* ajuste selon la hauteur de ton header + sticky container */
  background-color: white;
  z-index: 0; /* ou moins que le header si besoin */
  pointer-events: none; /* pour ne pas bloquer les clics sur le header */
}

.index-list {
  display: flex;
  flex-direction: column;
}

.index-line {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  margin-left: 310px;
  gap: 20px;
  text-decoration: none;
  color: black;
  padding: 0.5em 0;
  border-bottom: 1px solid black;
  transition: background 0.3s ease;
  padding-bottom: 25px;
}

.index-line:hover {
  /* background: #fafafa; */
  opacity: 0.3;
}

@media screen and (max-width: 768px) {
  .index-wrapper {
    font-family: "Rhymes", sans-serif;
    font-size: 12px;
    line-height: 1;
    padding: 70px 25px;
    font-feature-settings: "onum";
  }

  .index-header {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    margin-left: 310px;
    gap: 20px;
    font-family: "Rhymes", sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    border-bottom: 1px solid black;
    position: sticky;
    background: transparent;
    z-index: 10;
    padding-bottom: 0.4em;
  }

  .index-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background-color: white;
    z-index: 0;
    pointer-events: none;
  }

  .index-list {
    display: flex;
    flex-direction: column;
  }

  .index-line {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    margin-left: 310px;
    gap: 20px;
    text-decoration: none;
    color: black;
    padding: 0.5em 0;
    border-bottom: 1px solid black;
    transition: background 0.3s ease;
    padding-bottom: 25px;
  }

  .index-line:hover {
    opacity: 0.3;
  }

  /* ====== MOBILE ====== */
  @media screen and (max-width: 768px) {
    .header {
      position: relative;
      padding-bottom: 0px;
    }
    /* on supprime le trait vertical gauche */
    .header::before {
      content: none;
    }

    /* on réutilise ::after pour la ligne horizontale avec 15px de marge */
    .header::after {
      content: "";
      display: block; /* au cas où il était masqué */
      position: absolute;
      top: 32px; /* reset l'ancien top */
      width: auto; /* reset l'ancien width */
      left: 15px;
      right: 15px;
      bottom: 0;
      height: 1px;
      background: black;
      pointer-events: none;
    }

    /* Typo globale mobile */
    .index-wrapper {
      font-size: 14px;
      line-height: 1.2;
      padding: 80px 15px 40px 15px;
    }

    /* Header : toujours 3 colonnes, sans marge gauche */
    .index-header {
      grid-template-columns: 2fr 2fr 1fr; /* 3 colonnes maintenues */
      margin-left: 0;
      gap: 10px;
      font-size: 14px;
      background-color: white;
      position: sticky;
      top: 10px;
      z-index: 10;
    }

    .index-background {
      height: 20px;
    }

    /* Lignes : même grille à 3 colonnes, alignées sous le header */
    .index-line {
      grid-template-columns: 2fr 2fr 1fr; /* 3 colonnes maintenues */
      margin-left: 0;
      gap: 10px;
      padding: 12px 0 24px;
      align-items: start;
    }

    /* Garantit l’alignement du contenu sur les 3 colonnes */
    .index-line > :nth-child(1) {
      grid-column: 1;
    }
    .index-line > :nth-child(2) {
      grid-column: 2;
    }
    .index-line > :nth-child(3) {
      grid-column: 3;
    }

    /* Typo uniforme à 14px dans les lignes */
    .index-line > * {
      font-size: 14px;
    }

    /* Les contenus peuvent passer à la ligne si nécessaire */
    .index-line > * {
      white-space: normal;
    }

    .site-footer {
      font-size: 14px;
    }
  }
}
