/* Archives des événements – Mines Saint-Étienne
   Généré partiellement par intelligence artificielle. */

:root {
  /* Couleur de l'école : Pantone P 96-7 C.
     Valeur approchée, à remplacer par la valeur hexadécimale de la charte graphique. */
  --ecole: #1e3a6e;
  --ecole-clair: #e8edf6;
  --fond: #f6f7f9;
  --surface: #ffffff;
  --encre: #18202e;
  --discret: #5a6475;
  --filet: #d9dee6;
  --focus: #2f6fd6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ecole: #8fb0e8;
    --ecole-clair: #1d2738;
    --fond: #11161f;
    --surface: #171e2a;
    --encre: #e6eaf1;
    --discret: #9aa4b5;
    --filet: #2a3445;
    --focus: #8fb0e8;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; }
a:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* En-tête */
.entete {
  background: var(--ecole);
  color: #fff;
  padding: 3rem 1.25rem 2.5rem;
}
@media (prefers-color-scheme: dark) {
  .entete { background: #1e3a6e; }
}
.entete-interieur, .contenu, .lettres-interieur, .pied-interieur {
  max-width: 62rem;
  margin: 0 auto;
}
.ecole {
  margin: 0 0 1.5rem;
}
.ecole a {
  display: inline-block;
  padding: .5rem .75rem;
  background: #fff;
  border-radius: 4px;
  text-decoration: none;
}
.ecole a:hover { opacity: .9; }
.ecole img {
  display: block;
  height: 48px;
  width: auto;
}
.ecole img {
  display: block;
  height: 56px;
  width: auto;
}
h1 {
  margin: 0 0 .75rem;
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.chapeau {
  margin: 0 0 2rem;
  max-width: 38rem;
  font-size: 1.125rem;
  opacity: .9;
}
.recherche label {
  display: block;
  margin-bottom: .4rem;
  font-weight: 600;
}
.recherche input {
  width: 100%;
  max-width: 30rem;
  padding: .75rem 1rem;
  font: inherit;
  font-size: 1.0625rem;
  color: #18202e;
  background: #fff;
  border: 0;
  border-radius: 4px;
}
.recherche input:focus-visible { outline-color: #fff; }
.compte {
  margin: .6rem 0 0;
  font-size: .9375rem;
  opacity: .85;
  min-height: 1.5em;
}

/* Barre des lettres */
.lettres {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  border-bottom: 1px solid var(--filet);
}
.lettres-interieur {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem;
  padding: .5rem 1.25rem;
}
.lettres a {
  display: inline-block;
  min-width: 2.25rem;
  padding: .35rem .5rem;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  color: var(--ecole);
  border-radius: 3px;
}
.lettres a:hover { background: var(--ecole-clair); }
.lettres a[hidden] { display: none; }

/* Liste */
.contenu { padding: 1.5rem 1.25rem 3rem; }
.groupe {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--filet);
}
.groupe:last-of-type { border-bottom: 0; }
.groupe h2 {
  margin: 0;
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ecole);
  white-space: nowrap;
}
.groupe h2.chiffres { font-size: 2.25rem; padding-top: .6rem; }
.groupe ul { list-style: none; margin: 0; padding: 0; }
.groupe li + li { border-top: 1px solid var(--filet); }
.evenement {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .25rem 1.25rem;
  align-items: baseline;
  padding: .7rem .5rem;
  margin: 0 -.5rem;
  text-decoration: none;
  border-radius: 3px;
}
.evenement:hover { background: var(--ecole-clair); }
.evenement:hover .sigle { text-decoration: underline; }
.sigle {
  font-weight: 700;
  color: var(--ecole);
}
.intitule {
  display: block;
  color: var(--encre);
}
.hote {
  display: block;
  margin-top: .1rem;
  font-size: .875rem;
  color: var(--discret);
}
.annee {
  font-variant-numeric: tabular-nums;
  color: var(--discret);
  white-space: nowrap;
}
.vide {
  padding: 2rem 0;
  font-size: 1.0625rem;
}

/* Pied de page */
.pied {
  border-top: 1px solid var(--filet);
  background: var(--surface);
  color: var(--discret);
  font-size: .9375rem;
  padding: 1.5rem 1.25rem;
}

@media (max-width: 40rem) {
  .entete { padding-top: 2rem; }
  .groupe { grid-template-columns: 1fr; }
  .groupe h2 { font-size: 2.5rem; margin-bottom: .5rem; }
  .lettres-interieur { flex-wrap: nowrap; overflow-x: auto; }
}
