/* Charte : gris sombre façon VS Code, pistache en accent, chocolat en touches.
   Source unique des couleurs, réutilisée par tous les projets web.
   Thème sombre par défaut ; [data-theme="light"] bascule en clair. */
:root {
  /* Osmose, l'arbre des talents (projects/rpg, ElementStyle, sprint 149) : éléments, styles, états d'un nœud. */
  --osmose-earth: #b07a45;
  --osmose-fire: #ef4b4b;
  --osmose-water: #3d9cff;
  --osmose-air: #52c45a;
  --osmose-lightning: #f2d03b;
  --osmose-ice: #8fe0f5;
  --osmose-mud: #8c7a3a;
  --osmose-magma: #ff7a2e;
  --osmose-steam: #c3a6e0;
  --osmose-sand: #d6bc84;
  --osmose-ether: #b8c4ff;
  --osmose-ash: #a89f98;
  --osmose-sap: #9ccc3d;
  --osmose-salt: #eef2f5;
  --osmose-heal: #ff7eb6;
  --osmose-shield: #a9c7e8;
  --osmose-melee: #e8a33d;
  --osmose-distance: #6bb8f2;
  --osmose-support: #ff7eb6;
  --osmose-terrain: #c9a27f;
  --osmose-tempo: #b48cff;
  --osmose-alchemy: #4fd1c5;
  --osmose-taken-fill: #33421f;
  --osmose-open: #e0e0e0;
  --osmose-open-fill: #262626;
  --osmose-excluded: #e07060;
  --osmose-excluded-fill: #2a1f1f;
  --osmose-locked: #8a8a8a;
  --osmose-locked-fill: #202020;
  --osmose-out-of-level: #5c5c5c;
  --osmose-out-of-level-fill: #1d1d1d;
  --osmose-coming: #6a6a6a;
  --osmose-losing: #f08070;
  --osmose-losing-fill: #3a2424;
  --osmose-ground: #1b1b1b;
  --osmose-cost: #f2d36b;
  --osmose-wood: #7a5434;
  --osmose-wood-light: #a8794f;
  --osmose-wood-dark: #3a2616;
  /* Osmose, la carte du monde en atlas (projects/rpg, AtlasStyle, sprint 167, D87) : biomes, mer, côte, contours. */
  --osmose-map-woods: #6fae5a;
  --osmose-map-mouldy: #8f9862;
  --osmose-map-lake: #72bd7c;
  --osmose-map-fields: #c4c76a;
  --osmose-map-ancestors: #4f7f48;
  --osmose-map-town: #d9c39a;
  --osmose-map-sea: #3f86c4;
  --osmose-map-sea-deep: #2a5f94;
  --osmose-map-shore: #e8d9a8;
  --osmose-map-coast: #1d4a75;
  --osmose-map-tree: #2e6b3a;
  --osmose-map-road: #e6e1d2;
  --osmose-map-label: #f0e6cc;
  /* Osmose, l'interface (projects/rpg, UiStyle et OsmoseTheme, sprint 157, D84) : fenêtres, reliefs, accent, doré. */
  --osmose-ui-window: #1f1f1f;
  --osmose-ui-hud: #1b1b1ceb;
  --osmose-ui-titlebar: #181818;
  --osmose-ui-frame: #7a5434;
  --osmose-ui-frame-dark: #3a2616;
  --osmose-ui-raised-top: #3a3a3d;
  --osmose-ui-raised-bottom: #262628;
  --osmose-ui-raised-hover-top: #46464a;
  --osmose-ui-raised-hover-bottom: #2e2e31;
  --osmose-ui-edge: #0d0d0d;
  --osmose-ui-primary-top: #d4f79e;
  --osmose-ui-primary-bottom: #a3d95a;
  --osmose-ui-lit-top: #3d4f24;
  --osmose-ui-lit-bottom: #25301a;
  --osmose-ui-well: #141414;
  --osmose-ui-gold-top: #ffe6ab;
  --osmose-ui-gold: #ffd166;
  --osmose-ui-gold-bottom: #c9962e;
  --osmose-ui-gold-text: #3a2410;
  --osmose-ui-text: #cccccc;
  --osmose-ui-text-strong: #e0e0e0;
  --osmose-ui-text-dim: #9d9d9d;
  --osmose-ui-text-off: #6a6a6a;
  --osmose-ui-hover: #2d2d2d;
  --osmose-ui-tab: #252526;
  --osmose-ui-tooltip: #181818f7;
  --osmose-ui-close-hover: #3a2424;
  --osmose-ui-close-hover-text: #f08070;
  --osmose-ui-scroll: #4a4a4a;
  --osmose-ui-scroll-hover: #6a6a6a;
  --pistache: #bef374;
  --pistache-pale: #e6f8c9;
  --chocolat: #5a3a22;
  --chocolat-clair: #c9a27f;
  --bambou: #4d7a1c;
  --gris-titre: #181818;
  --gris-fond: #1f1f1f;
  --gris-panneau: #252526;
  --gris-survol: #2d2d2d;
  --gris-texte: #cccccc;
  --gris-discret: #9d9d9d;

  --bg: var(--gris-fond);
  --header-bg: var(--gris-titre);
  --surface: var(--gris-panneau);
  --surface-2: var(--gris-survol);
  --text: var(--gris-texte);
  --text-strong: #ffffff;
  --muted: var(--gris-discret);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.24);
  --link: var(--pistache);
  --accent: var(--pistache);
  --on-accent: var(--chocolat);
  --pressed-bg: var(--pistache);
  --pressed-text: var(--chocolat);
  --seal-bg: var(--pistache);
  --seal-text: var(--chocolat);
  --dot: var(--chocolat-clair);
  --gantt-build: var(--chocolat-clair);
  --tag-bg: rgba(190, 243, 116, 0.12);
  --tag-text: var(--pistache-pale);
  --bar: var(--pistache);
  /* Charts (project management page): one data hue per theme, a muted reference, hairline grid. */
  --chart-series: var(--pistache);
  --chart-ref: var(--gris-discret);
  --chart-grid: rgba(255, 255, 255, 0.1);
  --risk-high: rgba(242, 140, 110, 0.22);
  --risk-high-text: #ffc7b5;
  --risk-medium: rgba(246, 210, 110, 0.2);
  --risk-medium-text: #f8dd96;
  --risk-low: rgba(190, 243, 116, 0.16);
  --risk-low-text: #d4f5a4;
  /* Othello board (D28): green felt, black and white discs, the same in both themes. */
  --oth-felt: #2e7d32;
  --oth-line: #1b5e20;
  --oth-black: #111111;
  --oth-white: #f5f5f5;
  --oth-hint: #c8e6c9;
  --oth-last: #ffb300;
  --oth-black-shade: rgba(255, 255, 255, 0.15);
  --oth-white-shade: rgba(0, 0, 0, 0.2);
  /* G-map figures (D24): drawn like a textbook figure, on white in both themes; alpha0 black,
     alpha1 red, alpha2 blue, the orbit shown in bamboo green and the current dart in orange. */
  --gm-paper: #ffffff;
  --gm-face-stroke: #9d9d9d;
  --gm-label: #5f5f5f;
  --gm-ink: #1f1f1f;
  --gm-a0: #1f1f1f;
  --gm-a1: #c62828;
  --gm-a2: #1565c0;
  --gm-orbit: #4d7a1c;
  --gm-current: #e65100;
  /* Diverging curvature scale (D17): blue <-> red around a gray light enough to show the lighting. */
  --curv-neg: #3987e5;
  --curv-zero: #a3a39f;
  --curv-pos: #e66767;
  /* Height filtration (sprint 36): chocolate at the bottom, pistachio at the top; critical points in the
     curvature scale's blue and red, saddles in amber. */
  --elev-low: #5a3a22;
  --elev-high: #bef374;
  --crit-min: #3987e5;
  --crit-saddle: #ffb300;
  --crit-max: #e66767;
  /* Orientation gizmo of the topology viewer (sprint 43): x red, y green, z blue, the convention of 3D software; the
     same in both themes, each letter outlined in black. */
  --axis-x: #e53935;
  --axis-y: #43a047;
  --axis-z: #1e88e5;
  /* Traffic lights of the Ada crossroads (D46): lamps lit or off, the road and its markings; the same in
     both themes, like a real crossroads. */
  --tl-red: #e53935;
  --tl-amber: #ffb300;
  --tl-green: #43a047;
  --tl-off: #3a3a3a;
  --tl-housing: #111111;
  --tl-road: #4a4a4a;
  --tl-marking: #e0e0e0;
  --tl-car: #c9a27f;

  --font-display: "Zen Maru Gothic", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 10px;
  --radius-lg: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 40px;
  --space-7: 64px;
  --maxw: 1080px;
  color-scheme: dark;
}

/* Clair façon VS Code Light : jamais de pistache en texte sur ce fond. */
:root[data-theme="light"] {
  --chart-series: var(--bambou);
  --chart-ref: #616161;
  --chart-grid: rgba(0, 0, 0, 0.1);
  --bg: #ffffff;
  --header-bg: #f8f8f8;
  --surface: #f8f8f8;
  --surface-2: #ececec;
  --text: #3b3b3b;
  --text-strong: #1f1f1f;
  --muted: #616161;
  --border: rgba(0, 0, 0, 0.12);
  --border-strong: rgba(0, 0, 0, 0.3);
  --link: var(--bambou);
  --pressed-bg: var(--chocolat);
  --pressed-text: #ffffff;
  --seal-bg: var(--chocolat);
  --seal-text: var(--pistache);
  --dot: var(--chocolat);
  --gantt-build: var(--chocolat);
  --tag-bg: var(--pistache-pale);
  --tag-text: var(--chocolat);
  --risk-high: #f2c4b4;
  --risk-high-text: #7a2410;
  --risk-medium: #f6e2a6;
  --risk-medium-text: #6b4a05;
  --risk-low: var(--pistache-pale);
  --risk-low-text: #2f5210;
  --curv-neg: #2a78d6;
  --curv-pos: #e34948;
  color-scheme: light;
}
