/* Jeez — jetons de design. Source unique pour toutes les interfaces (console, équipage, patient, structure,
   médecin, assureur).
   Langage visuel inspiré des Human Interface Guidelines d'Apple (25/10/2026, doc 07 § 6) : gris système, matériaux
   translucides, grandes typographies, formes arrondies, une seule couleur d'action. La sémantique opérationnelle
   ne change pas : bleu = action ; rouge = urgence vitale (P0) et danger, rien d'autre ; orange = P1 ; ambre =
   avertissement ; vert = confirmation. Contrastes AA vérifiés par test/unit/design-tokens.test.ts. */

/* Inter à taille optique (axes graisse + taille) : coupe « Display » serrée pour les grands titres, comme SF Pro
   Display. Police auto-hébergée (CSP stricte, aucun CDN) ; elle porte le zéro barré exigé sur les priorités. */
@font-face {
  font-family: 'Inter';
  src: url('/vendor/fonts/inter-latin-opsz-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('/vendor/fonts/inter-latin-ext-opsz-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Couleurs de marque, relevées sur le logo officiel du 20/10/2026 (doc 07 § 1) */
  --jeez-red: #f1392e;
  --jeez-blue: #0055ac;
  --jeez-white: #f6f4f2;

  /* Typographie : échelle iOS (Dynamic Type, taille « Large ») ramenée au web */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 12px;   /* Caption */
  --fs-sm: 13px;   /* Footnote */
  --fs-md: 15px;   /* Subheadline */
  --fs-lg: 17px;   /* Headline, Body */
  --fs-xl: 22px;   /* Title 2 */
  --fs-2xl: 28px;  /* Title 1 */
  --fs-3xl: 34px;  /* Large Title */
  --fw-regular: 420; --fw-medium: 520; --fw-bold: 640; --fw-black: 760;
  --track-tight: -0.022em; --track-body: -0.011em;

  /* Espacements (base 4) et formes : coins larges et réguliers */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;

  /* Mouvement : courbes amorties d'iOS, durées courtes (< 300 ms) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 140ms; --dur-fast: 180ms; --dur-base: 240ms; --dur-slow: 280ms;

  /* Cibles tactiles (Apple HIG 44 pt, Material 48 dp) et superpositions (échelle unique de z-index) */
  --tap: 44px; --tap-lg: 56px;
  --z-sticky: 10; --z-overlay: 40; --z-toast: 50; --z-banner: 900;

  /* Matériaux (barres, feuilles, bannières) : fond translucide saturé et flouté */
  --blur: saturate(180%) blur(20px);

  /* Voyant du compte de commissions (doc 18) : vert = courses reçues ; rouge = commission due */
  --light-green: #22c55e; --light-red: var(--jeez-red);

  /* Thème sombre (défaut de la console et de l'équipage) : noir vrai et gris graphite, comme iOS */
  color-scheme: dark;
  --bg: #000000;
  --bg-elev: #1c1c1e;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-hover: #3a3a3c;
  --surface-raised: #636366;            /* segment choisi, interrupteur */
  --fill: rgb(118 118 128 / 0.24);      /* boutons gris, champs, contrôles segmentés */
  --fill-strong: rgb(118 118 128 / 0.36);
  --line: #38383a;
  --line-strong: #48484a;
  --card-line: rgb(255 255 255 / 0.04);
  --material: rgb(28 28 30 / 0.72);
  --material-thick: rgb(28 28 30 / 0.9);
  --ink: #f5f5f7;
  --ink-2: #c7c7cc;
  --ink-3: #98989d;
  /* Bleu d'action : un fond (texte blanc, AA) et un texte (sur fond sombre, AA) */
  --brand: #1f6fd1;
  --brand-ink: #ffffff;
  --brand-text: #5aa9ff;
  --brand-soft: rgb(90 169 255 / 0.16);
  --focus: #5aa9ff;

  --p0: #d92d20; --p0-soft: rgb(241 57 46 / 0.18); --p0-ink: #ffffff;
  --p1: #c2410c; --p1-soft: rgb(249 115 22 / 0.18);
  --p2: #1f6fd1; --p2-soft: rgb(90 169 255 / 0.16);
  --p3: #636366; --p3-soft: rgb(142 142 147 / 0.22);
  --ok: #30d158; --ok-soft: rgb(48 209 88 / 0.16); --ok-ink: #7ee2a0;
  --warn: #f5a524; --warn-soft: rgb(245 165 36 / 0.16); --warn-ink: #ffd27a; --on-warn: #1f1400;
  --on-ok: #04210f;
  --danger: #d92d20; --danger-soft: rgb(255 69 58 / 0.16); --danger-ink: #ff9f97;

  --shadow-1: none;
  --shadow-2: 0 8px 24px rgb(0 0 0 / 0.45);
  --shadow-3: 0 24px 64px rgb(0 0 0 / 0.6);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f2f2f7;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --surface-hover: #e9e9ee;
  --surface-raised: #ffffff;
  --fill: rgb(118 118 128 / 0.12);
  --fill-strong: rgb(118 118 128 / 0.2);
  --line: #e5e5ea;
  --line-strong: #c7c7cc;
  --card-line: rgb(0 0 0 / 0.04);
  --material: rgb(255 255 255 / 0.72);
  --material-thick: rgb(249 249 251 / 0.92);
  --ink: #1d1d1f;
  --ink-2: #3c3c43;
  --ink-3: #6e6e73;
  --brand: var(--jeez-blue);
  --brand-text: var(--jeez-blue);
  --brand-soft: rgb(0 85 172 / 0.1);
  --focus: var(--jeez-blue);

  --p0: #e1251b; --p0-soft: rgb(241 57 46 / 0.1);
  --p1: #c2410c; --p1-soft: rgb(234 88 12 / 0.1);
  --p2: var(--jeez-blue); --p2-soft: rgb(0 85 172 / 0.1);
  --p3: #636366; --p3-soft: rgb(99 99 102 / 0.12);
  --ok: #28a745; --ok-soft: rgb(40 167 69 / 0.12); --ok-ink: #1e7b34;
  --warn: #f59e0b; --warn-soft: rgb(245 158 11 / 0.14); --warn-ink: #9a5b00; --on-warn: #1f1400;
  --danger: #e1251b; --danger-soft: rgb(241 57 46 / 0.08); --danger-ink: #b4170f;

  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.04), 0 2px 8px rgb(0 0 0 / 0.04);
  --shadow-2: 0 4px 12px rgb(0 0 0 / 0.06), 0 12px 32px rgb(0 0 0 / 0.08);
  --shadow-3: 0 24px 64px rgb(0 0 0 / 0.18);
}
