h1,
h2,
h3,
h4,
h5,
h6 {
  color: #1e1e1e !important;
}

.card-projet {
  display: flex;
  width: 50rem;
  min-height: 20rem;
  height: fit-content;
  align-items: flex-start;
  gap: 1rem;
}

.card-projet:hover {
  color: #1e1e1e;
}

.card-projet p {
  margin: 0;
}

.projet-info {
  display: flex;
  width: 21.75rem;
  flex-direction: column;
  gap: 1.7rem;
  padding: 1rem 0;
}

.card-projet .thumbnail {
  width: 25.5rem;
  height: 100%;
}

.card-projet .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.projet-titre {
  display: flex;
  justify-content: space-between;
  font-size: 6rem;
}

.projet-separator {
  height: 2px;
  background: #1e1e1e;
  margin: 0;
}

.filtre {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filtre h1 {
  font-size: 6rem;
  font-weight: 750;
}

#filtres-categories {
  display: flex;
  gap: 1rem;
  text-transform: capitalize;
}

#filtres-categories button {
  color: #1e1e1e;
  background-color: white;
  border: solid 2px #1e1e1e;
}

#filtres-categories button:hover {
  color: #1f69c2;
  background-color: white;
  border: solid 2px #1f69c2;
}

#filtres-categories .actif {
  color: white;
  background-color: #1e1e1e;
}

#filtres-categories .actif:hover {
  color: white;
  background-color: #1f69c2;
}

#liste-projets {
  position: relative;
}

.archive-projet {
  margin: 3rem auto;
  display: flex;
  flex-direction: column;
  width: 80%;
  align-items: stretch;
  gap: 4rem;
}

.groupe-annee {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0 20px;
  padding-top: 40px;
}

.projets-de-annee {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.annee-label {
  display: flex;
  font-size: 6.75rem;
  font-weight: 900;
  line-height: 1;
}

.annee-sticky {
  display: inline-block;
  visibility: hidden;
}

.annee-scroll {
  display: inline-block;
}

#annee-prefix {
  position: fixed;
  pointer-events: none;
  font-size: 6.75rem;
  font-weight: 900;
  line-height: 1;
  z-index: 10;
  transition: opacity 0.2s;
}

#btn-afficher-plus {
  width: fit-content;
  align-self: center;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ── Tablette paysage ≤ 1024px ─────────────────────────────── */
@media (max-width: 1024px) {

  .archive-projet {
    width: 90%;
    gap: 3rem;
    margin: 2rem auto;
  }

  /* Titre + filtres passent en colonne */
  .filtre {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .filtre h1 {
    font-size: 4.5rem;
  }

  /* Filtres scrollables si débordement */
  #filtres-categories {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #filtres-categories::-webkit-scrollbar {
    display: none;
  }

  #filtres-categories button {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Année : taille réduite */
  .annee-label {
    font-size: 5rem;
  }

  #annee-prefix {
    font-size: 5rem;
  }

  /* Card : réduite mais toujours en ligne */
  .card-projet {
    width: 100%;
    min-height: unset;
  }

  .card-projet .thumbnail {
    width: 45%;
    flex-shrink: 0;
  }

  .projet-info {
    width: auto;
    flex: 1;
    gap: 1.2rem;
  }

  .projet-titre {
    font-size: 1.4rem;
  }
}

/* ── Tablette portrait ≤ 768px ──────────────────────────────── */
@media (max-width: 768px) {

  .filtre h1 {
    font-size: 2.8rem;
  }

  .archive-projet {
    width: 100%;
    margin: 1.5rem auto;
    padding: 0 1rem;
    gap: 2rem;
  }

  .groupe-annee {
    grid-template-columns: 1fr;
    padding-top: 20px;
    gap: 12px;
  }

  .annee-label {
    font-size: 2.5rem;
  }

  #annee-prefix {
    display: none;
  }

  .annee-sticky {
    visibility: visible;
  }

  .projets-de-annee {
    gap: 24px;
  }

  .card-projet {
    flex-direction: column;
    width: 100%;
    min-height: unset;
    gap: 0.75rem;
  }

  .card-projet .thumbnail {
    width: 100%;
    height: auto;
  }

  .card-projet .thumbnail img {
    border-radius: 6px;
  }

  .projet-info {
    width: 100%;
    gap: 0.75rem;
    padding: 0.5rem 0;
  }

  .projet-titre {
    font-size: 1.1rem;
  }

  #btn-afficher-plus {
    width: 100%;
    text-align: center;
  }
}

/* ── Mobile ≤ 400px ─────────────────────────────────────────── */
@media (max-width: 400px) {

  .archive-projet {
    padding: 0 0.75rem;
    gap: 1.5rem;
    margin: 1rem auto;
  }

  .filtre h1 {
    font-size: 2.2rem;
  }

  #filtres-categories button {
    font-size: 0.78rem;
    padding: 5px 10px;
  }

  .annee-label {
    font-size: 2rem;
  }

  .projet-titre {
    font-size: 1rem;
  }

  .card-projet .thumbnail img {
    border-radius: 4px;
  }

  .projet-info {
    gap: 0.5rem;
  }

  #btn-afficher-plus {
    font-size: 0.85rem;
    padding: 0.7rem 1rem;
  }
}
