/* Pupitre chant — styles communs à tous les écrans : polices, couleurs (clair / sombre), base. */

@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../polices/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../polices/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../polices/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Young Serif"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../polices/young-serif-latin-400-normal.woff2") format("woff2"); }

:root {
  --fond: #f6f7f9;
  --surface: #ffffff;
  --encre: #1d2230;
  --doux: #5f677a;
  --trait: #dfe2ea;
  --accent: #3446b8;
  --accent-pale: rgba(52, 70, 184, .13);
  --soprano: #d2483a;
  --alto: #c98a12;
  --tenor: #2f8f5b;
  --basse: #2f6fc9;
  --metronome: #6b7280;
  --papier-filtre: none;
  --titre: "Young Serif", Georgia, "Times New Roman", serif;
  --texte: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #13161e; --surface: #1b1f2a; --encre: #e8eaf1; --doux: #9aa2b6; --trait: #2c3242;
    --accent: #8e9cff; --accent-pale: rgba(142, 156, 255, .2);
    --soprano: #f07a6c; --alto: #e6b04a; --tenor: #5cc489; --basse: #6ba3f0; --metronome: #a3a9b8;
    --papier-filtre: invert(.9) hue-rotate(180deg); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #13161e; --surface: #1b1f2a; --encre: #e8eaf1; --doux: #9aa2b6; --trait: #2c3242;
  --accent: #8e9cff; --accent-pale: rgba(142, 156, 255, .2);
  --soprano: #f07a6c; --alto: #e6b04a; --tenor: #5cc489; --basse: #6ba3f0; --metronome: #a3a9b8;
  --papier-filtre: invert(.9) hue-rotate(180deg); color-scheme: dark;
}

html, body { height: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font: 15px/1.4 var(--texte);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.petit {
  border: 1px solid var(--trait); background: var(--surface); border-radius: 8px;
  padding: 6px 10px; font-size: .88rem;
}
.petit[aria-pressed="true"] { background: var(--accent); color: var(--surface); border-color: var(--accent); }

/* Message d'erreur plein écran (morceau introuvable, serveur injoignable) */
.erreur-page { max-width: 520px; margin: 15vh auto 0; padding: 0 16px; }
.erreur-page h1 { font: 400 1.6rem/1.2 var(--titre); margin: 0 0 8px; }
.erreur-page p { color: var(--doux); margin: 0; }
.erreur-page p + p { margin-top: 16px; }
.erreur-page a { color: var(--accent); }
