/* ===== LevelPlan V9 · jetons de design =====
   Contraste vérifié (WCAG AA) pour chaque thème × mode : texte ≥ 4,5:1 sur bg, bg2, s1, s2 (et s3),
   coches et pictogrammes ≥ 3:1. Toute nouvelle teinte de texte doit passer l'audit (docs/AUDIT-V9.md).
   Thème par défaut : « Cartographe » — nuit d'encre, or chaud, bleu de lune, vélin (V10.2 : palette de la planche chibi).
   Au repos : calme et sombre. La lumière (laiton, halos, particules) est réservée aux récompenses.
   Les thèmes historiques (Prisme, Bonbon, Aurore, Sylve, Système, Braise) restent disponibles. */
@font-face {
  font-family: 'LP Serif';
  src: url('../fonts/lp-serif.woff') format('woff');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'LP Serif';
  src: url('../fonts/lp-serif-italic.woff') format('woff');
  font-weight: 400 700; font-style: italic; font-display: swap;
}
:root {
  color-scheme: dark;
  /* surfaces */
  --bg: #090d16; --bg2: #0c111c; --s1: #111826; --s2: #161f31; --s3: #1e2a40; --s4: #283750;
  --line: #262f45; --line2: #3a465f; --grid: #ffffff0f; --grid2: #ffffff17;
  /* texte (vélin) */
  --tx: #f0ece3; --tx2: #ccd1d9; --mu: #a9b2c1; --mu2: #9ba5b5;
  /* laiton : action principale et récompenses */
  --ac: #d2ad68; --ac2: #b8924c; --acs: #e6c98e; --acbg: #d2ad681f; --acline: #d2ad6855; --actx: #1a1206;
  /* vert-de-gris : l'Orbe, l'état actif, l'accompli */
  --vg: #8fb7ea; --vgs: #bed5f5; --vgbg: #8fb7ea1c;
  --ok: #6cc4a4; --okbg: #6cc4a41f; --ko: #e88f7f; --kotx: #2a0d08; --kobg: #e2735f1f; --warn: #db9857; --warnbg: #d9924e1f;
  --inv: #f0ece3; --invtx: #10171d; --me: #22394a; --metx: #f0ece3;
  /* catégories : teintes de carte ancienne */
  --c-cours: #7f9fd6; --c-revision: #a494dc; --c-sport: #dc8f5f; --c-social: #7fbb8e; --c-relation: #d9829d; --c-travail: #cdb065; --c-perso: #8fb4c2;
  /* stats */
  --s-int: #7f9fd6; --s-for: #e0875c; --s-vit: #d9b84a; --s-soc: #6fbf8a; --s-amo: #e07fa0; --s-ric: #c9b17d;
  --i1: #99a3ae; --i2: #6fa9d6; --i3: #a99ade; --i4: #d9924e; --i5: #e68473;
  /* rangs (E → S) : lettre et échelle des rangs */
  --rk-e: #bbc2ce; --rk-d: #74cbff; --rk-c: #3ddc97; --rk-b: #c2bcff; --rk-a: #ffb454; --rk-s: #ffa8b8;
  --viz1: #6fa9d6; --viz2: #d9924e;
  /* forme */
  --r-xl: 16px; --r-l: 12px; --r-m: 10px; --r-s: 8px; --r-xs: 6px;
  --shadow: 0 18px 40px #0000004d, 0 2px 6px #0000002e;
  --shadow-s: 0 6px 10px #00000038;
  --font-b: system-ui, -apple-system, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Noto Sans", Ubuntu, Arial, sans-serif;
  --font-d: 'LP Serif', "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --track: 0;
  --nav-h: 54px; --top-h: 58px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  /* marge sous la barre de navigation : on empiète un peu sur la zone du trait d'accueil (iPhone) */
  --nav-sb: max(calc(var(--safe-b) - 14px), 6px);
  --glow: #d2ad6855;
  --hexfill: color-mix(in srgb, var(--vg) 28%, transparent); --hexline: var(--vg); --hexbonus: color-mix(in srgb, var(--ac) 14%, transparent); --hexbonusl: var(--ac); --hexin: color-mix(in srgb, var(--vg) 6%, transparent); --hex100: color-mix(in srgb, var(--tx) 30%, transparent);
  --fs: 15px;
}
:root[data-mode=light] {
  color-scheme: light;
  --bg: #eef1f1; --bg2: #e5eaeb; --s1: #fbfcfb; --s2: #f3f6f5; --s3: #e7ecec; --s4: #dbe2e3;
  --line: #d6dfe0; --line2: #c3cfd1; --grid: #16222c10; --grid2: #16222c1c;
  --tx: #16212b; --tx2: #2e3c48; --mu: #4d5a64; --mu2: #5b6974;
  --ac: #8a6420; --ac2: #74531a; --acs: #7a5718; --acbg: #8a64201a; --acline: #8a642055; --actx: #fff8ea;
  --vg: #2e7d6d; --vgs: #22685b; --vgbg: #2e7d6d17;
  --ok: #266e56; --okbg: #2c7f631a; --ko: #ab3e2b; --kotx: #fff; --kobg: #b9432f14; --warn: #915215; --warnbg: #a45d181a;
  --inv: #16212b; --invtx: #fbfcfb; --me: #dce8e6; --metx: #16212b;
  --c-cours: #3f68b0; --c-revision: #6d58b8; --c-sport: #bb6230; --c-social: #3f8a57; --c-relation: #b6507a; --c-travail: #94762a; --c-perso: #3f7f93;
  --s-int: #3f68b0; --s-for: #a7572b; --s-vit: #856a15; --s-soc: #387a4d; --s-amo: #b04a74; --s-ric: #8a6420;
  --i1: #5d6872; --i2: #356a96; --i3: #6a54b6; --i4: #965516; --i5: #ae3f2c;
  --rk-e: #50596d; --rk-d: #005b93; --rk-c: #126541; --rk-b: #5a3fc8; --rk-a: #854b00; --rk-s: #a9001e;
  --viz1: #2f74b8; --viz2: #c0662a;
  --shadow: 0 14px 34px #1a2a3a1f, 0 2px 6px #1a2a3a14; --shadow-s: 0 4px 12px #1a2a3a17;
  --glow: #8a642033;
}
:root[data-text=large] { --fs: 16.5px; }
:root[data-text=xlarge] { --fs: 18px; }

/* ---------- thèmes historiques (identité V7, en jetons) ---------- */
:root[data-skin=prisme] { --r-l: 22px; --r-m: 18px; --r-s: 14px; --font-b: "Baloo 2", "Nunito", system-ui, sans-serif; --font-d: "Baloo 2", system-ui, sans-serif; }
:root[data-skin=prisme][data-mode=dark] { --bg: #111735; --bg2: #18204a; --s1: #1b2452; --s2: #212c61; --s3: #29366f; --s4: #33428a; --line: #303d83; --line2: #3c4b9a; --tx: #f5f7ff; --tx2: #d6defd; --mu: #9fb0e3; --mu2: #8c99c7; --ac: #ffc93a; --ac2: #f0b000; --acs: #ffe27d; --acbg: #ffc93a22; --actx: #3b2400; --vg: #4cc6ff; --vgs: #9be2ff; --vgbg: #4cc6ff22; --me: #2177c5; --metx: #fff; }
:root[data-skin=prisme][data-mode=light] { --bg: #e6f4ff; --bg2: #f4faff; --s1: #ffffff; --s2: #f2f8ff; --s3: #e6f0fc; --s4: #d4e5f7; --line: #d4e5f7; --line2: #bfd6ef; --tx: #1b2a4e; --tx2: #33466f; --mu: #4d5e7d; --mu2: #526d9c; --ac: #e8a400; --ac2: #c98e00; --acs: #8a5a00; --acbg: #ffc93a33; --actx: #4a2c00; --vg: #138ed0; --vgs: #0869a8; --vgbg: #159fe81a; --me: #107bb4; --metx: #fff; }
:root[data-skin=bonbon] { --r-l: 26px; --r-m: 20px; --r-s: 16px; --font-b: "Fredoka", system-ui, sans-serif; --font-d: "Fredoka", system-ui, sans-serif; }
:root[data-skin=bonbon][data-mode=dark] { --bg: #1f1224; --bg2: #2a1830; --s1: #301c37; --s2: #3a2242; --s3: #452a4f; --s4: #52325e; --line: #4e3059; --line2: #603a6d; --tx: #fff0fa; --tx2: #f1d4ea; --mu: #caa3c5; --mu2: #a98ba5; --ac: #ff8fc7; --ac2: #ff6fb6; --acs: #ffc2e0; --acbg: #ff8fc722; --actx: #3d0d26; --vg: #8fe3cf; --vgs: #bff3e6; --vgbg: #8fe3cf22; --me: #d72781; --metx: #fff; }
:root[data-skin=bonbon][data-mode=light] { --bg: #fff4fb; --bg2: #f2fbf8; --s1: #ffffff; --s2: #fff7fc; --s3: #fdeef7; --s4: #f6d9ea; --line: #f6d9ea; --line2: #efc6de; --tx: #3d2140; --tx2: #5c3a5e; --mu: #745771; --mu2: #8f6088; --ac: #de1b74; --ac2: #d23579; --acs: #c2267a; --acbg: #ff5fae1a; --actx: #fff; --vg: #1f9f82; --vgs: #157a65; --vgbg: #37c9a722; --me: #e30071; --metx: #fff; }
:root[data-skin=aurore][data-mode=dark] { --bg: #07080c; --bg2: #11131a; --s1: #15171e; --s2: #1b1e27; --s3: #232631; --s4: #2c3040; --line: #272a34; --line2: #33374a; --tx: #f7f7fa; --tx2: #d3d4dc; --mu: #9a9cab; --mu2: #848797; --ac: #8c83ff; --ac2: #756cff; --acs: #c9c7ff; --acbg: #756cff22; --actx: #120f33; --vg: #ffb6d9; --vgs: #ffd3e8; --vgbg: #ffb6d922; --me: #655ce8; --metx: #fff; }
:root[data-skin=aurore][data-mode=light] { --bg: #f4f3fb; --bg2: #ecebf8; --s1: #ffffff; --s2: #f7f6fd; --s3: #efedf9; --s4: #e4e1f2; --line: #e4e1f2; --line2: #d8d4ee; --tx: #17162b; --tx2: #34324d; --mu: #5a586f; --mu2: #686685; --ac: #6a5cff; --ac2: #5746f0; --acs: #4b3fd1; --acbg: #6a5cff17; --actx: #fff; --vg: #e2508f; --vgs: #b83471; --vgbg: #e2508f17; --me: #6a5cff; --metx: #fff; }
:root[data-skin=sylve] { --r-l: 18px; --r-m: 14px; --r-s: 11px; --font-d: "Cinzel", Georgia, serif; }
:root[data-skin=sylve][data-mode=dark] { --bg: #0e150f; --bg2: #162017; --s1: #18231a; --s2: #1e2b20; --s3: #263527; --s4: #304332; --line: #2c3d2e; --line2: #3a503c; --tx: #f3eedb; --tx2: #ddd6bb; --mu: #aeb296; --mu2: #8d947f; --ac: #e0b060; --ac2: #c99838; --acs: #f2d49b; --acbg: #e0b06022; --actx: #1b1a10; --vg: #6fbf73; --vgs: #a5dca8; --vgbg: #6fbf7322; --me: #4f7a3f; --metx: #fff; }
:root[data-skin=sylve][data-mode=light] { --bg: #f4ecd6; --bg2: #ece1c2; --s1: #fffaf0; --s2: #fbf3e1; --s3: #f3e8cc; --s4: #e2d3ac; --line: #e2d3ac; --line2: #d4c193; --tx: #2d2a1c; --tx2: #4a4430; --mu: #585341; --mu2: #69624b; --ac: #96681e; --ac2: #855a12; --acs: #7a4f0e; --acbg: #9a6b1f18; --actx: #fffaf0; --vg: #3f8a3c; --vgs: #2f6d2d; --vgbg: #3f8a3c18; --me: #547f37; --metx: #fff; }
:root[data-skin=systeme] { --r-xl: 10px; --r-l: 8px; --r-m: 6px; --r-s: 5px; --r-xs: 4px; --font-d: "Chakra Petch", system-ui, sans-serif; --font-b: "Chakra Petch", system-ui, sans-serif; }
:root[data-skin=systeme][data-mode=dark] { --bg: #03050b; --bg2: #060b17; --s1: #07101f; --s2: #0a1628; --s3: #0d1d35; --s4: #123057; --line: #123057; --line2: #1a4378; --tx: #e8f6ff; --tx2: #bfe1ff; --mu: #7fa6c9; --mu2: #5f85a9; --ac: #3aa0ff; --ac2: #1f86ea; --acs: #8ef3ff; --acbg: #3aa0ff1f; --actx: #021018; --vg: #8ef3ff; --vgs: #c6fbff; --vgbg: #8ef3ff1f; --me: #0f4f96; --metx: #fff; }
:root[data-skin=systeme][data-mode=light] { --bg: #eef6ff; --bg2: #e2effd; --s1: #ffffff; --s2: #f5faff; --s3: #e8f2fd; --s4: #bcd9f5; --line: #bcd9f5; --line2: #9cc6ef; --tx: #06203a; --tx2: #16395c; --mu: #425d78; --mu2: #506c88; --ac: #0a6fd6; --ac2: #075bb1; --acs: #0b4f9c; --acbg: #0a6fd614; --actx: #fff; --vg: #0095b4; --vgs: #00738b; --vgbg: #00a3c414; --me: #0a6fd6; --metx: #fff; }
:root[data-skin=braise] { --r-xl: 12px; --r-l: 10px; --r-m: 8px; --r-s: 6px; --r-xs: 4px; --font-d: "Oxanium", system-ui, sans-serif; }
:root[data-skin=braise][data-mode=dark] { --bg: #070304; --bg2: #120607; --s1: #150809; --s2: #1d0b0c; --s3: #281012; --s4: #3a1416; --line: #3a1416; --line2: #55191c; --tx: #ffece6; --tx2: #f5cfc5; --mu: #c79a90; --mu2: #9b756d; --ac: #ff5a3b; --ac2: #e0402a; --acs: #ffb03b; --acbg: #ff3b3b1f; --actx: #1a0604; --vg: #ffb03b; --vgs: #ffd08a; --vgbg: #ffb03b1f; --me: #8f1d1d; --metx: #fff; }
:root[data-skin=braise][data-mode=light] { --bg: #fff3ef; --bg2: #ffe7e0; --s1: #ffffff; --s2: #fff8f6; --s3: #fdebe6; --s4: #f3cfc6; --line: #f3cfc6; --line2: #e9b3a6; --tx: #2a0d0a; --tx2: #4a1c16; --mu: #7d4e46; --mu2: #8f5c50; --ac: #d11f2e; --ac2: #b01422; --acs: #a3330c; --acbg: #d11f2e14; --actx: #fff; --vg: #cf7100; --vgs: #9e5700; --vgbg: #e07b0014; --me: #d11f2e; --metx: #fff; }
