/* GÉNÉRÉ par `npm run jetons` depuis design/jetons.json (Style Dictionary) : ne pas modifier à la main.
   Jetons de la refonte : charte v4.1 (blanc, encre, lavande et souci). Seul fichier où les couleurs ont le droit d'être écrites.
   Sources : docs/ux/charte.md §3, §4, §5 et §7.2. Règles vérifiées par tests/jetons.test.mjs. */
@font-face {
  font-family: 'Mielo Jakarta';
  src: url('../fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
  font-style: normal; font-weight: 500 700; font-display: swap;
}
@font-face {
  font-family: 'Mielo Fraunces';
  src: url('../fonts/mielo-fraunces-600-soft100.woff2') format('woff2');
  font-style: normal; font-weight: 600; font-display: swap;
  unicode-range: U+0020, U+0042, U+004D, U+0063, U+0065, U+0068, U+0069, U+006C, U+006E, U+006F, U+0075, U+0076, U+007A;
}

:root, [data-theme="light"] {
  --bg: #F5F5F5; /* fond (gris pur) */
  --surface: #FFFFFF; /* carte, sans cadre */
  --surface-2: #EEEEEE; /* encart, piste de jauge, segment inactif */
  --surface-3: #FFFFFF; /* élément posé sur une carte : feuille ouverte depuis une carte, menu */
  --ink: #141414; /* texte */
  --ink-2: #636363; /* texte secondaire, icônes */
  --line: #E5E5E5; /* séparateur */
  --line-strong: #878787; /* contour de champ, case, interrupteur */
  --selected: #E8E8E8; /* onglet actif, segment : aplat seulement */
  --on-selected: #141414;
  --action: #141414; /* l'encre : bouton plein, lien d'action, focus */
  --on-action: #FFFFFF;
  --action-hover: #3D3D3D;
  --action-pressed: #3D3D3D;
  --miel: #F2B53A; /* l'abeille seulement : sa pastille, l'icône d'app */
  --on-miel: #141414;
  --attention: #865700; --attention-soft: #FFF4DD;
  --problem: #A12F35; --problem-soft: #FBECEE; --on-problem: #FFFFFF;
  --info: #006778; --info-soft: #E7F4F6;
  --disabled-bg: #E8E8E8; --disabled-ink: #666666;
  --overlay: rgba(10, 10, 10, 0.42); /* voile derrière une feuille, web seulement : 0,42 en clair, 0,62 en sombre (charte v4) */
  --on-personne: #FFFFFF;
  /* Six couleurs de personne (charte §3.4), au choix à « Démarrer » : A = lavande, B = souci par défaut. Jamais deux identiques, jamais du texte. */
  --p-lavande: #6D5BF0; --p-souci: #E8590C; --p-menthe: #118F6F; --p-pivoine: #CB1043; --p-bleuet: #128DDA; --p-prune: #9326AC;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E0E; --surface: #1A1A1A; --surface-2: #262626; --surface-3: #333333;
    --ink: #F2F2F2; --ink-2: #A3A3A3; --line: #2B2B2B; --line-strong: #777777;
    --selected: #303030; --on-selected: #F2F2F2;
    --action: #F2F2F2; --on-action: #141414; --action-hover: #D9D9D9; --action-pressed: #D9D9D9;
    --miel: #E6B458; --on-miel: #141414;
    --attention: #E6C27A; --attention-soft: #3D321D;
    --problem: #F2A5A9; --problem-soft: #49292D; --on-problem: #141414;
    --info: #80DCEA; --info-soft: #183E43;
    --disabled-bg: #333333; --disabled-ink: #A3A3A3;
    --overlay: rgba(0, 0, 0, 0.62);
    --on-personne: #141414;
    --p-lavande: #A79BFF; --p-souci: #FF9E66; --p-menthe: #70EBC4; --p-pivoine: #F87582; --p-bleuet: #87C4FD; --p-prune: #C972CE;
  }
}
[data-theme="dark"] {
  --bg: #0E0E0E; --surface: #1A1A1A; --surface-2: #262626; --surface-3: #333333;
  --ink: #F2F2F2; --ink-2: #A3A3A3; --line: #2B2B2B; --line-strong: #777777;
  --selected: #303030; --on-selected: #F2F2F2;
  --action: #F2F2F2; --on-action: #141414; --action-hover: #D9D9D9; --action-pressed: #D9D9D9;
  --miel: #E6B458; --on-miel: #141414;
  --attention: #E6C27A; --attention-soft: #3D321D;
  --problem: #F2A5A9; --problem-soft: #49292D; --on-problem: #141414;
  --info: #80DCEA; --info-soft: #183E43;
  --disabled-bg: #333333; --disabled-ink: #A3A3A3;
  --overlay: rgba(0, 0, 0, 0.62);
  --on-personne: #141414;
  --p-lavande: #A79BFF; --p-souci: #FF9E66; --p-menthe: #70EBC4; --p-pivoine: #F87582; --p-bleuet: #87C4FD; --p-prune: #C972CE;
}

/* Personnes : A et B, aucun prénom dans le code. Défaut = lavande et souci (charte §3.4). */
:root, [data-theme] {
  --personne-a: var(--p-lavande);
  --personne-b: var(--p-souci);
}
[data-pa="lavande"] { --personne-a: var(--p-lavande); } [data-pa="souci"] { --personne-a: var(--p-souci); } [data-pa="menthe"] { --personne-a: var(--p-menthe); } [data-pa="pivoine"] { --personne-a: var(--p-pivoine); } [data-pa="bleuet"] { --personne-a: var(--p-bleuet); } [data-pa="prune"] { --personne-a: var(--p-prune); }
[data-pb="lavande"] { --personne-b: var(--p-lavande); } [data-pb="souci"] { --personne-b: var(--p-souci); } [data-pb="menthe"] { --personne-b: var(--p-menthe); } [data-pb="pivoine"] { --personne-b: var(--p-pivoine); } [data-pb="bleuet"] { --personne-b: var(--p-bleuet); } [data-pb="prune"] { --personne-b: var(--p-prune); }

/* Non colorés : typographie (rôles fixés), espacement, rayons, mouvement. Pas d'ombre. */
:root {
  --font-ui: 'Mielo Jakarta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-wordmark: 'Mielo Fraunces', Georgia, serif;
  --text-xs: .75rem;        /* 12 : légende */
  --text-sm: .8125rem;      /* 13 : secondaire, titre de section, puces */
  --text-body: 1rem;        /* 16 : corps */
  --text-sheet: 1.125rem;   /* 18 : titre de feuille */
  --text-title: 1.25rem;    /* 20 : titre d'écran */
  --text-hero: 3rem;        /* 48 : montant héros mobile (Plus Jakarta 700, chiffres tabulaires, interligne 52) */
  --text-hero-lg: 4rem;     /* 64 : montant héros ordinateur, dès 1024 px (700, chiffres tabulaires, interligne 68) */
  --text-hero-centimes: 1.5rem; /* 24 : virgule, centimes et « € » du héros mobile (600, ink-2) */
  --text-hero-centimes-lg: 2rem; /* 32 : virgule, centimes et « € » du héros ordinateur (600, ink-2) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-contenant: 16px; /* cartes, feuilles */
  --r-controle: 12px;  /* champs, segments, menus, tuile d’icône */
  --r-pilule: 999px;   /* boutons et puces seulement */
  --d1: 120ms; --d2: 200ms; --d3: 320ms;
  --courbe: cubic-bezier(.2, .7, .2, 1); /* repli sans linear() et courbe des fondus */
  --cible: 44px;
  --mascotte-sm: 32px; --mascotte-md: 40px; --mascotte-lg: 96px;
}
/* Ressorts (charte §7.2) : repli en courbe de Bézier de 320 ms, ressort linear() là où le navigateur le sait. */
:root {
  --ressort-mielo: var(--courbe); --d-ressort-mielo: var(--d3);
  --ressort-moment: var(--courbe); --d-ressort-moment: var(--d3);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --ressort-mielo: linear(0, .033, .115, .221, .337, .451, .558, .653, .734, .802, .858, .902, .935, .961, .979, .992, 1.001, 1.007, 1.01, 1.011, 1.011, 1.01, 1.009, 1.008, 1.007, 1.006, 1.005, 1.004, 1.003, 1);
    --d-ressort-mielo: 580ms;
    --ressort-moment: linear(0, .024, .086, .174, .278, .388, .5, .606, .704, .791, .866, .929, .979, 1.018, 1.047, 1.066, 1.078, 1.083, 1.083, 1.079, 1.073, 1.065, 1.056, 1.047, 1.037, 1.029, 1.021, 1.014, 1.009, 1.004, 1, .997, .995, .994, .993, .993, .993, .994, .994, .995, .996, .996, .997, 1);
    --d-ressort-moment: 860ms;
  }
}
:root { --hero: var(--text-hero); --hero-centimes: var(--text-hero-centimes); }
@media (min-width: 1024px) { :root { --hero: var(--text-hero-lg); --hero-centimes: var(--text-hero-centimes-lg); } }
@media (prefers-reduced-motion: reduce) { :root { --d1: 0ms; --d2: 0ms; --d3: 0ms; --d-ressort-mielo: 0ms; --d-ressort-moment: 0ms; } }
