/* ==========================================================================
   Speak Chantier · tokens de l'app (identité « Le casque qui parle », guide-design §A)
   Kit : Barlow (français) + Barlow Condensed (anglais et mesures), orange #FF5B21,
   craie #F2F2EC, anthracite #19211D. L'app garde son rouge (corrections), son vert
   (débrief) et son fond nuit. Les anciens noms (--slab, --graphite…) restent des
   alias pour style.css ; les --sc-* sont la référence.
   Fontes auto-hébergées, licence SIL OFL (fonts/OFL-*.txt).
   ========================================================================== */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/Barlow-Regular.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/Barlow-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/Barlow-Bold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/BarlowCondensed-Bold.woff2") format("woff2"); }

:root {
  --sc-brand: #FF5B21; --sc-ink: #19211D; --sc-canvas: #F2F2EC; --sc-surface: #FFFFFF; --sc-muted: #626B65;
  --sc-link: #B83A0A; --sc-rule: #D8DDD7; --sc-focus: #19211D; --sc-en: #19211D;
  --sc-redline: #CF2338; --sc-approved: #1E7A4C; --sc-night: #101513; --sc-on-night: #EEF1EC;
  /* Échelle d'affichage (retours du 29/10, docs/zoom-affichage.md) : tout ce qui est en rem (corps, titres, espacements
     --s-*, valeurs en dur de style.css) suit --sc-zoom via la taille de base de <html> ; les valeurs en px ci-dessous
     sont réduites à la main dans le même rapport. Revenir à 1 rétablit l'affichage d'avant. */
  --sc-zoom: .875;
  --sc-radius: 8px; --sc-control-size: 44px;
  --sc-space-1: 7px; --sc-space-2: 14px; --sc-space-3: 21px; --sc-space-4: 28px; --sc-space-5: 42px; --sc-space-6: 56px;

  /* Alias historiques utilisés par style.css */
  --slab: var(--sc-canvas); --slab-2: #E6E7DF; --sheet: var(--sc-surface); --graphite: var(--sc-ink); --graphite-2: var(--sc-muted);
  --rule: #BEC4BC; --paint: var(--sc-brand); --paint-ink: var(--sc-link); --chalk: var(--sc-en); --link: var(--sc-link);
  --redline: var(--sc-redline); --approved: var(--sc-approved); --on-paint: var(--sc-ink);
  --scrim: rgba(12, 16, 15, .78); --night: var(--sc-night); --on-night: var(--sc-on-night);

  --f-voice: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif;
  --f-text:  "Barlow", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --t-xs: max(13px, .875rem);   /* 14 → 13 (plancher, au lieu de 12,25) */
  --t-sm: 1rem;      /* 16 = libellés */
  --t-md: 1.125rem;  /* 18 = corps */
  --t-lg: 1.3125rem; --t-xl: 1.5rem;
  --t-2xl: clamp(1.75rem, 1.2rem + 2.2vw, 2.25rem);
  --t-3xl: clamp(2.25rem, 1.4rem + 3.4vw, 3rem);
  --t-4xl: clamp(2.25rem, 1.4rem + 5.6vw, 4rem);
  --lh-text: 1.5; --lh-tight: 1.1;

  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 7rem;
  --r-ctl: var(--sc-radius); --r-sheet: var(--sc-radius);
  --measure: 66ch; --wrap: 1080px;
  --shadow-sheet: 0 1px 0 rgba(25,33,29,.06), 0 12px 28px -18px rgba(25,33,29,.35);
  --focus: 0 0 0 3px var(--slab), 0 0 0 6px var(--sc-focus);
  color-scheme: light;
}

/* Base des rem : 100 % × --sc-zoom (respecte la taille de police choisie dans le navigateur). */
html { font-size: calc(var(--sc-zoom) * 100%); }

/* Nuit de chantier (thème sombre) : orange en texte = #FF5B21, anglais = #FF5B21 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --slab: #121816; --slab-2: #18201D; --sheet: #1D2622; --graphite: #E7EBE5; --graphite-2: #F2F2EC; --rule: #34403B;
    --sc-link: #FF5B21; --sc-en: #FF5B21; --sc-focus: #F2F2EC; --sc-redline: #FF6274; --sc-approved: #5BCB8E; --sc-night: #0B0F0E; --sc-muted: #F2F2EC;
    --paint-ink: #FF5B21; --link: #FF5B21; --chalk: #FF5B21; --on-paint: #19211D; --redline: #FF6274; --approved: #5BCB8E; --night: #0B0F0E; --on-night: #EEF1EC;
    --scrim: rgba(6, 9, 8, .8);
    --shadow-sheet: 0 1px 0 rgba(0,0,0,.4), 0 16px 32px -20px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --slab: #121816; --slab-2: #18201D; --sheet: #1D2622; --graphite: #E7EBE5; --graphite-2: #F2F2EC; --rule: #34403B;
    --sc-link: #FF5B21; --sc-en: #FF5B21; --sc-focus: #F2F2EC; --sc-redline: #FF6274; --sc-approved: #5BCB8E; --sc-night: #0B0F0E; --sc-muted: #F2F2EC;
    --paint-ink: #FF5B21; --link: #FF5B21; --chalk: #FF5B21; --on-paint: #19211D; --redline: #FF6274; --approved: #5BCB8E; --night: #0B0F0E; --on-night: #EEF1EC;
    --scrim: rgba(6, 9, 8, .8);
    --shadow-sheet: 0 1px 0 rgba(0,0,0,.4), 0 16px 32px -20px rgba(0,0,0,.8);
    color-scheme: dark;
}
