/* AJH — jetons du design system, style « canevas relié » (maquette A6, mis à jour le 29/11/2026). À charger avant ajh.css.
   Thème : suit le réglage clair/sombre de l'appareil ; <html data-theme="light"> ou "dark" force un thème.
   Une seule police, Figtree (licence OFL), auto-hébergée : aucun appel à Google (RGPD). */

@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree-900.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  /* Couleurs de marque : fixes dans les deux thèmes. */
  --brand-noir: #1B1B1B;
  --brand-tomate: #FF5436;
  --brand-creme: #F6F0E6;
  /* Thème clair (canevas). */
  --surface: #FAFAF7;
  --surface-raised: #FFFFFF;
  --surface-sunken: #F1F0EC;
  --surface-inverse: #1B1B1B;
  --grid-dot: #D4D4CF;
  --ink: #1B1B1B;
  --ink-muted: #52524E;
  --ink-subtle: #6B6B66;
  --ink-inverse: #FAFAF7;
  --line: #E4E4DE;
  --line-strong: #8E8E88;
  --accent: #FF5436;
  --accent-hover: #FF6D52;
  --on-accent: #1B1B1B;
  --accent-ink: #B8361C;
  --accent-soft: #FFF0EB;
  --accent-line: #FFC4B5;
  --focus: #B8361C;
  --nav-bg: #1B1B1B;
  --nav-ink: #FAFAF7;
  --nav-muted: #A1A19B;
  --nav-active: #2E2E2B;
  --nav-line: #52524E;                      /* bordures des boutons fantômes sur fond noir */
  --success: #1D6E4E;
  --success-soft: #DDF0E6;
  --warning: #8A4E00;
  --warning-soft: #FBEBCF;
  --danger: #A8193F;
  --danger-soft: #F9DDE4;
  --info: #2A5A88;
  --info-soft: #DDE8F3;
  --neutral-soft: #EDEDE8;
  --shadow-sm: 0 1px 2px rgba(27,27,27,0.08);
  --shadow-overlay: 0 12px 32px rgba(27,27,27,0.18);
  --shadow-card: 0 8px 24px rgba(27,27,27,0.08);   /* nœuds qui flottent sur la grille de points */
  --shadow-node: 0 16px 40px rgba(27,27,27,0.25);  /* le seul nœud central */
  /* Couleurs propres au site (lot 5 du 24/11/2026), rangées en jetons : mêmes dans les deux thèmes. */
  --voile: rgba(27,27,27,.55);              /* derrière les fenêtres, menus et panneaux */
  --voile-leger: rgba(27,27,27,.28);        /* doigt des scènes animées */
  --shadow-hover: 0 10px 24px rgba(27,27,27,.08);          /* cartes au survol */
  --shadow-capture: 0 24px 60px -30px rgb(0 0 0 / .45);    /* captures des pages de réalisation */
  --paper: #FFFFFF;                         /* papier des supports imprimés (reste clair en sombre) */
  --paper-ink: #1B1B1B;
  --shadow-paper: 0 1px 2px rgba(27,27,27,.12), 0 8px 24px rgba(27,27,27,.10);
  --demo-voile-onglets: rgba(250,250,247,.1); /* démo ISIRA® : fond des onglets */
  --demo-bord-fictif: rgba(250,250,247,.35);  /* démo ISIRA® : bord de « données fictives » */
  --demo-point-fictif: #F2B544;               /* démo ISIRA® : point de « données fictives » */
  --demo-papier: #fff;                        /* démo ISIRA® : papier du cadre */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --control-height: 40px;
  --control-height-sm: 32px;
  --control-height-lg: 48px;
  --sidebar-width: 248px;
  --topbar-height: 64px;
  --container-max: 1200px;
  --measure: 68ch;
  --measure-lecture: 68ch; /* texte courant : 80 caractères au plus par ligne (avec Figtree, 1ch vaut environ 1,15 caractère) */
  --font-display: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #141414;
    --surface-raised: #1E1E1E;
    --surface-sunken: #0E0E0E;
    --surface-inverse: #FAFAF7;
    --grid-dot: #2A2A27;
    --ink: #F4F4F0;
    --ink-muted: #B4B4AE;
    --ink-subtle: #93938D;
    --ink-inverse: #1B1B1B;
    --line: #2E2E2B;
    --line-strong: #6E6E68;
    --accent-ink: #FF7A61;
    --accent-soft: #3A231D;
    --accent-line: #6B3326;
    --focus: #FF7A61;
    --nav-bg: #141414;
    --nav-active: #262626;
    --nav-line: #52524E;
    --success: #5CC99A;
    --success-soft: #16362A;
    --warning: #F2B64C;
    --warning-soft: #3A2C12;
    --danger: #FF85A2;
    --danger-soft: #3D1C25;
    --info: #8DB8E6;
    --info-soft: #1B2D40;
    --neutral-soft: #2A2A27;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
    --shadow-overlay: 0 12px 32px rgba(0,0,0,0.6);
    --shadow-card: 0 8px 24px rgba(0,0,0,0.45);
    --shadow-node: 0 16px 40px rgba(0,0,0,0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --surface: #141414;
  --surface-raised: #1E1E1E;
  --surface-sunken: #0E0E0E;
  --surface-inverse: #FAFAF7;
  --grid-dot: #2A2A27;
  --ink: #F4F4F0;
  --ink-muted: #B4B4AE;
  --ink-subtle: #93938D;
  --ink-inverse: #1B1B1B;
  --line: #2E2E2B;
  --line-strong: #6E6E68;
  --accent-ink: #FF7A61;
  --accent-soft: #3A231D;
  --accent-line: #6B3326;
  --focus: #FF7A61;
  --nav-bg: #141414;
  --nav-active: #262626;
  --nav-line: #52524E;
  --success: #5CC99A;
  --success-soft: #16362A;
  --warning: #F2B64C;
  --warning-soft: #3A2C12;
  --danger: #FF85A2;
  --danger-soft: #3D1C25;
  --info: #8DB8E6;
  --info-soft: #1B2D40;
  --neutral-soft: #2A2A27;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-overlay: 0 12px 32px rgba(0,0,0,0.6);
  --shadow-card: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-node: 0 16px 40px rgba(0,0,0,0.6);
  color-scheme: dark;
}

/* Styles typographiques (Figtree). Sur téléphone, les grands titres se réduisent avec clamp(). */
.ajh-display-xl { font: 900 clamp(40px, 8vw, 72px)/1.03 var(--font-display); letter-spacing: -0.04em; }
.ajh-display-lg { font: 900 clamp(36px, 6.5vw, 56px)/1.07 var(--font-display); letter-spacing: -0.04em; }
.ajh-display-md { font: 900 clamp(30px, 5vw, 40px)/1.1 var(--font-display); letter-spacing: -0.03em; }
.ajh-h1 { font: 900 clamp(30px, 5vw, 40px)/1.15 var(--font-sans); letter-spacing: -0.03em; }
.ajh-h2 { font: 900 28px/34px var(--font-sans); letter-spacing: -0.03em; }
.ajh-h3 { font: 700 21px/28px var(--font-sans); }
.ajh-h4 { font: 700 18px/24px var(--font-sans); }
.ajh-body-lg { font: 400 19px/30px var(--font-sans); }
.ajh-body { font: 400 16px/24px var(--font-sans); }
.ajh-body-sm { font: 400 14px/20px var(--font-sans); }
.ajh-caption { font: 400 12px/16px var(--font-sans); }
/* Sur-titre : casse de phrase, plus de capitales espacées. */
.ajh-overline { font: 700 14px/20px var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--accent-ink); }
.ajh-label { font: 500 14px/20px var(--font-sans); }
.ajh-button { font: 700 15px/20px var(--font-sans); }
.ajh-numeric { font: 500 14px/20px var(--font-sans); font-variant-numeric: tabular-nums; }
