/* Jetons de design — piste A « planning mural ». Mode sombre via prefers-color-scheme. */
:root {
  color-scheme: light dark;
  --font-display: 'Archivo', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --font-text: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --bg: #f4f4f0;
  --sheet: #ffffff;
  --ink: #16181d;
  --muted: #5d616b;
  --rule: #e2e2dc;
  --rule-strong: #d6d6cf;
  --accent: #ff6900;
  --on-accent: #16181d;
  --weekend: #f8f8f4;
  --outside: #efefea;
  --outside-ink: #8a8d95;
  --drop: #fff1e6;
  --hatch: #ecece6;
  --event-ink: #0b5c45;
  --event-bg: #dff2ea;
  --shadow: 0 18px 50px rgba(22, 24, 29, 0.18);
  --overlay: rgba(22, 24, 29, 0.32);

  /* Types */
  --type-always-on: #2f5bd3;
  --type-ugc: #c2410c;
  --type-star-ac: #8e2aa8;
  --type-event: #0b7a5c;
  --type-collab: #c2185b;
  --type-playground: #0e7490;
  --type-global: #7c5e10;
  --type-none: #5d616b;

  /* Statuts : texte / fond */
  --st-publie: #146c3c;        --st-publie-bg: #e2f3e9;
  --st-a-valider: #a84300;     --st-a-valider-bg: #ffe7d6;
  --st-lance: #344286;         --st-lance-bg: #e6e9f6;
  --st-a-lancer: #7a5600;      --st-a-lancer-bg: #f9eecd;
  --st-a-programmer: #5e3bb3;  --st-a-programmer-bg: #ece6fa;
  --st-a-publier: #5e3bb3;     --st-a-publier-bg: #ece6fa;
  --st-programme: #0f6a73;     --st-programme-bg: #dff2f3;
  --st-on-hold: #b42318;       --st-on-hold-bg: #fde7e5;
  --st-kill: #5d616b;          --st-kill-bg: #ececE8;
  --st-other: #4a4f59;         --st-other-bg: #ececE8;
}

/* Sombre : automatique selon le système (sauf si l’utilisateur a choisi « Clair »)… */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #111215;
    --sheet: #1a1c21;
    --ink: #f1f1ec;
    --muted: #a3a7b0;
    --rule: #2b2e35;
    --rule-strong: #393d46;
    --accent: #ff7a1a;
    --on-accent: #16181d;
    --weekend: #1e2026;
    --outside: #15161a;
    --outside-ink: #6f737c;
    --drop: #3a2412;
    --hatch: #24262c;
    --event-ink: #8de0c2;
    --event-bg: #123a2e;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    --overlay: rgba(0, 0, 0, 0.55);

    --type-always-on: #8aa6ff;
    --type-ugc: #ff9661;
    --type-star-ac: #d88bec;
    --type-event: #5fd0aa;
    --type-collab: #ff7fae;
    --type-playground: #5ccbe2;
    --type-global: #dcbb5a;
    --type-none: #a3a7b0;

    --st-publie: #8be0ad;        --st-publie-bg: #163626;
    --st-a-valider: #ffb47e;     --st-a-valider-bg: #42230f;
    --st-lance: #aeb9f7;         --st-lance-bg: #20274a;
    --st-a-lancer: #f1cf6f;      --st-a-lancer-bg: #3a2e0c;
    --st-a-programmer: #c6b1ff;  --st-a-programmer-bg: #2d2249;
    --st-a-publier: #c6b1ff;     --st-a-publier-bg: #2d2249;
    --st-programme: #85d9df;     --st-programme-bg: #123638;
    --st-on-hold: #ff9f9f;       --st-on-hold-bg: #421919;
    --st-kill: #9aa0aa;          --st-kill-bg: #27292e;
    --st-other: #c3c6cd;         --st-other-bg: #27292e;
  }
}

/* … ou choisi explicitement avec le bouton de thème. */
:root[data-theme='dark'] {
  --bg: #111215;
  --sheet: #1a1c21;
  --ink: #f1f1ec;
  --muted: #a3a7b0;
  --rule: #2b2e35;
  --rule-strong: #393d46;
  --accent: #ff7a1a;
  --on-accent: #16181d;
  --weekend: #1e2026;
  --outside: #15161a;
  --outside-ink: #6f737c;
  --drop: #3a2412;
  --hatch: #24262c;
  --event-ink: #8de0c2;
  --event-bg: #123a2e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --overlay: rgba(0, 0, 0, 0.55);

  --type-always-on: #8aa6ff;
  --type-ugc: #ff9661;
  --type-star-ac: #d88bec;
  --type-event: #5fd0aa;
  --type-collab: #ff7fae;
  --type-playground: #5ccbe2;
  --type-global: #dcbb5a;
  --type-none: #a3a7b0;

  --st-publie: #8be0ad;        --st-publie-bg: #163626;
  --st-a-valider: #ffb47e;     --st-a-valider-bg: #42230f;
  --st-lance: #aeb9f7;         --st-lance-bg: #20274a;
  --st-a-lancer: #f1cf6f;      --st-a-lancer-bg: #3a2e0c;
  --st-a-programmer: #c6b1ff;  --st-a-programmer-bg: #2d2249;
  --st-a-publier: #c6b1ff;     --st-a-publier-bg: #2d2249;
  --st-programme: #85d9df;     --st-programme-bg: #123638;
  --st-on-hold: #ff9f9f;       --st-on-hold-bg: #421919;
  --st-kill: #9aa0aa;          --st-kill-bg: #27292e;
  --st-other: #c3c6cd;         --st-other-bg: #27292e;
}

:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }
