/* Style commun : accueil, piano, autres, entresol.
   Chaque page le charge par <link rel="stylesheet">, puis ajoute ses propres
   règles dans son <style>, qui passent après celles-ci.
   L'article, le simulateur et les brouillons de l'entresol gardent leur style
   dans la page (voir divers/DETAILS.md, « À savoir »). */

:root {
  --bg: #fbfaf6;
  --text: #1f2420;
  --muted: #72776f;
  --accent: #2f6b4f;
  --rule: #e3e2db;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181b19;
    --text: #e6e4dc;
    --muted: #979c93;
    --accent: #86c4a3;
    --rule: #2c312d;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 1.1875rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 39rem;
  margin: 0 auto;
  padding: 4.5rem 1.375rem 3rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transition: text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

header { margin-bottom: 2.25rem; }
h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}
.tagline { margin: 0.375rem 0 0; }

.tagline, h2, footer, .note { color: var(--muted); }
.tagline, footer { font-size: 1.0625rem; }

h2 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 2.5rem 0 0.875rem;
}

p { margin: 0 0 1.125rem; }
ul { list-style: none; margin: 0; padding: 0; }
li { margin: 0 0 0.625rem; }

/* Année en marge des listes et sous les vignettes */
.year {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  color: var(--muted);
  flex-shrink: 0;
  width: 2.75rem;
  font-variant-numeric: tabular-nums;
}

footer { margin-top: 2.5rem; }

/* Garde un mot et sa ponctuation sur la même ligne (« univers ! »).
   L'espace insécable &nbsp; s'affiche trop large dans Charter. */
.insecable { white-space: nowrap; }

/* Bande en haut : les onglets du site. L'onglet de la page porte aria-current. */
.bande { border-bottom: 1px solid var(--rule); }
.bande ul {
  display: flex;
  gap: 1.75rem;
  max-width: 39rem;
  margin: 0 auto;
  padding: 1.125rem 1.375rem 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
}
.bande li { margin: 0; }
.bande a { color: var(--muted); text-decoration: none; }
.bande a:hover { color: var(--accent); }
.bande a[aria-current] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}
.bande + main { padding-top: 3rem; }

@media (max-width: 520px) {
  main { padding-top: 3rem; }
  .bande + main { padding-top: 2.25rem; }
  h1 { font-size: 1.75rem; }
  body { font-size: 1.125rem; }
}
@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}

/* Vidéos : vignettes YouTube côte à côte, l'une sous l'autre sur téléphone.
   Utilisées par l'accueil et par la page Piano. */
.videos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 1rem;
}
.videos a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.videos img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  background: var(--rule);
}
.videos p {
  margin: 0.45rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--muted);
}
.videos a:hover p { color: var(--text); }
.videos a:focus-visible img { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 600px) {
  .videos { grid-template-columns: 1fr; gap: 1.5rem; }
}
