/* Styles de l'appli (un seul fichier). Thème noir et bleu, rendu « pro » : voir CLAUDE.md. Les sections suivent les écrans et les étapes de ROADMAP.md. */
/* Polices hébergées dans l'appli (dossier fonts/, licences OFL à côté) : aucune requête vers Google. Sous-ensemble latin, fichiers à axe de graisse variable. */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../fonts/Figtree-400-700-latin.woff2') format('woff2'); 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: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../fonts/JetBrainsMono-400-500-latin.woff2') format('woff2'); 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; }
:root { /* Thème unique bleu / noir */
  --bg: #0B0C0F; --surface: #131418; --inset: #0F1013; --line: #26272E; --track: #24262D; --ctl: #4B4E58; --fg: #EDEEF0; --muted: #9B9DA6; --accent: #6E95E8; --on-accent: #0B0C0F; --accent-text: #9DB8F0; --done: #35D6C4; --on-done: #03211D; --done-text: #4FE0CF; --done-bg: #0A2A2B; --done-line: #1E6B66; --done-fg: #BDF6EF; --b3: #A99BFF; --cv-bg: #15161B; --cv1: #5B8CFF; --cv2: #35D6C4; --cv3: #8FB8FF; --cv4: #FF8FA3; --cv5: #A99BFF; --cvd: #2C2E36; --panel: #191A1F; --btn: #EDEEF0; --on-btn: #0B0C0F; --reward: #FF8A3D; --font-brand: 'Figtree', system-ui, sans-serif; /* seulement le titre de l'écran (h1, h2.big) */
  --font-title: 'Figtree', system-ui, sans-serif;      /* les autres titres */
  --font-display: 'Figtree', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --font-mono: 'Figtree', system-ui, sans-serif;   /* chiffres et étiquettes : Figtree aussi */
  --font-code: 'JetBrains Mono', ui-monospace, monospace;   /* seulement les blocs de code */
  color-scheme: dark;; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.5; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 32px 56px; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.wrap { margin: 0 auto; display: flex; flex-direction: column; gap: 24px; max-width: 560px; }
.view { display: flex; flex-direction: column; gap: 24px; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
h1 { margin: 0; font-family: var(--font-brand); font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
.note { margin: 0; font-size: 14px; color: var(--muted); max-width: 70ch; }
.hero { display: flex; flex-wrap: wrap; gap: 16px; }
.bar { display: block; height: 10px; background: var(--track); overflow: hidden; border-radius: 2px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.bar > i.is-done { background: var(--done); }
.btn { align-self: flex-start; min-height: 48px; padding: 0 22px; font-size: 16px; font-weight: 700; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; background: var(--btn); color: var(--on-btn); border: none; font-family: var(--font-display); box-shadow: none; filter: none; border-radius: 10px; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { font-weight: 500; min-height: 44px; padding: 0 18px; font-size: 15px; transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; box-shadow: none; border-radius: 10px; border: 1px solid var(--ctl); background: transparent; color: var(--fg); }
.btn-ghost:hover { filter: none; background: rgba(237, 238, 240, 0.072); border-color: var(--fg); color: var(--fg); }
.pin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.pin-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; box-shadow: none; border: none; background: none; }
.pin-text { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pin-title { font-family: var(--font-display); font-size: 17px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.pin-item.is-done .pin-title { color: var(--muted); }
.pin-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.pin-empty { margin: 0; color: var(--muted); font-size: 15px; max-width: 52ch; }
.notice { margin: 0; font-size: 14px; font-weight: 500; color: var(--accent-text); }
#heroMoti { display: flex; flex-direction: column; gap: 16px; }
.quote { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 1.25; font-weight: 700; text-wrap: balance; }
.moti-meta { margin: 0; font-size: 14px; color: var(--muted); }
.moti-add { border-top: 1px solid var(--line); }
.moti-add summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); }
.moti-form { display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; }
.moti-form label { font-size: 14px; font-weight: 500; color: var(--muted); }
.moti-row { display: flex; flex-wrap: wrap; gap: 8px; }
.moti-row input { flex: 1 1 160px; box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 12px; background: var(--inset); border: 1px solid var(--ctl); border-radius: 6px; font-size: 16px; }
.st-done { color: var(--done-text); }
.st-cur { color: var(--accent-text); }
.st-todo { color: var(--muted); }
.stB { stop-color: var(--cv5); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 15px; color: var(--muted); }
.crumbs .here { color: var(--fg); font-weight: 500; padding: 0 10px; }
h2.big { margin: 0; font-family: var(--font-brand); font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
.goal { margin: 0; color: var(--muted); }
.obj-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.obj { display: flex; gap: 16px; align-items: flex-start; padding: 18px; background: var(--inset); border: 1px solid var(--line); border-radius: 6px; }
.check { flex: none; width: 44px; height: 44px; padding: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid var(--ctl); cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; border-radius: 6px; border-color: var(--ctl); background: rgba(237, 238, 240, 0.036); }
.check svg { width: 22px; height: 22px; stroke: var(--on-done); opacity: 0; }
.check[aria-pressed="true"] { background: var(--done); border-color: var(--done); }
.check[aria-pressed="true"] svg { opacity: 1; animation: tick 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.obj-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.obj-title { font-family: var(--font-display); font-size: 19px; line-height: 1.25; font-weight: 700; padding-top: 9px; overflow-wrap: anywhere; }
.obj.is-done .obj-title { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.chip-k { font-family: var(--font-mono); font-size: 13px; }
.k-ex { color: var(--accent-text); }
.k-tp { color: var(--done-text); }
.sheet { box-sizing: border-box; width: min(560px, calc(100% - 24px)); max-height: 88vh; padding: 0; margin: auto; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; }
.sheet::backdrop { background: rgba(0, 0, 0, 0.5); }
.sheet-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 8px 20px; border-bottom: 1px solid var(--line); }
.sheet-bar h2 { margin: 0; font-family: var(--font-title); font-size: 20px; font-weight: 700; }
#session { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.badges-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.badges-head h3 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; text-align: center; color: var(--muted); opacity: 0.5; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.badge.on { border-style: solid; border-color: var(--bc); color: var(--fg); opacity: 1; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.badge svg { width: 34px; height: 34px; }
.badge.on svg { color: var(--bc); }
.badge-n { font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
canvas#celebCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sheet.celeb { width: min(360px, calc(100% - 32px)); margin: auto; border-radius: 6px; border: 1px solid var(--line); text-align: center; position: fixed; }
.celeb-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 28px 24px 24px; }
.celeb .btn { align-self: center; }
.cel-item { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 8px; }
.cel-medal { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--bc); border-radius: 6px; background: var(--inset); color: var(--bc); margin-bottom: 8px; animation: pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.cel-medal svg { width: 52px; height: 52px; }
.cel-k { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--muted); animation: rise 0.4s 0.35s both; }
.cel-n { margin: 0; font-family: var(--font-title); font-size: 24px; font-weight: 700; animation: rise 0.4s 0.45s both; }
.cel-s { margin: 0; font-size: 14px; color: var(--muted); animation: rise 0.4s 0.5s both; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#sessionDlg .bar i { animation: barGrow 0.7s ease-out; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.backup { flex-basis: 100%; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.backup h3 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--fg); }
.export-box { box-sizing: border-box; width: 100%; padding: 10px 12px; background: var(--inset); border: 1px solid var(--ctl); border-radius: 6px; color: var(--fg); font-family: var(--font-mono); font-size: 12px; }
.stats { flex-wrap: wrap; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.stat { flex: 1 1 110px; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--inset); border: 1px solid var(--line); border-radius: 6px; }
.stat-lv { flex: 2 1 200px; }
.stat-v { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.1; }
.stat-k { font-size: 13px; color: var(--muted); }
.sess-meta { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.crit { display: flex; flex-direction: column; gap: 4px; }
.crit-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crit-k { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.crit-n { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.crit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.crit-b { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 6px 4px; background: none; border: 0; border-radius: 6px; color: var(--fg); font-size: 15px; line-height: 1.35; text-align: left; cursor: pointer; }
.crit-b:hover { background: var(--surface); }
.crit-box { flex: none; width: 24px; height: 24px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid var(--ctl); transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; border-radius: 4px; background: rgba(237, 238, 240, 0.036); }
.crit-box svg { width: 16px; height: 16px; stroke: var(--on-done); opacity: 0; }
.crit-b[aria-pressed="true"] .crit-box { background: var(--done); border-color: var(--done); }
.crit-b[aria-pressed="true"] .crit-box svg { opacity: 1; animation: tick 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.act { min-height: 44px; font-size: 14px; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; gap: 6px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--ctl); background: transparent; color: var(--fg); }
.act:hover { background: rgba(237, 238, 240, 0.072); border-color: var(--fg); color: var(--fg); }
.act[aria-pressed="true"] { font-weight: 700; color: var(--fg); background: rgba(237, 238, 240, 0.096); border-color: rgba(237, 238, 240, 0.4); }
.why { border-top: 1px dashed var(--line); padding-top: 2px; }
.why summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--accent-text); }
.why p { margin: 0 0 10px; font-size: 15px; line-height: 1.5; max-width: 62ch; }
.why p strong { font-weight: 700; }
.add { border-top: 1px solid var(--line); padding-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.add h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.add-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--muted); }
.field input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 12px; background: var(--inset); border: 1px solid var(--ctl); border-radius: 6px; font-size: 16px; }
.field input::placeholder, .moti-row input::placeholder { color: var(--muted); opacity: 0.8; }
.add .btn { align-self: flex-end; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.foot .ask { color: var(--fg); }
@media (max-width: 640px) {
  .sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: 6px 20px 0 0; border-bottom: 0; max-height: 90vh; }
  #session { padding: 14px 16px 24px; }
  body { padding-block: 20px 40px; }
  .wrap, .view { gap: 16px; }
  h1 { font-size: 28px; }
  h2.big { font-size: 24px; }
  .hero { gap: 12px; }
  .quote { font-size: 18px; }
  #heroMoti { gap: 10px; }
  .btn { min-height: 44px; font-size: 15px; padding: 0 18px; }
  .pin-item { padding: 10px 12px; }
  .pin-title { font-size: 16px; }
  .obj { padding: 12px; gap: 12px; }
  .obj-title { font-size: 17px; padding-top: 10px; }
  .seg button { min-width: 64px; padding: 0 16px; }
}

/* Boutons : style sobre, couleurs unies, sans lueur */
.btn:active { transform: scale(0.98); }
.btn-ghost:active { transform: scale(0.98); box-shadow: none; }
.act:active { transform: scale(0.96); }
.act:disabled { opacity: 0.6; cursor: wait; }
.check:hover { border-color: var(--fg); }
.check:active { transform: scale(0.94); }
.crit-b:active .crit-box { transform: scale(0.88); }

/* Parcours 2D / 3D */
.seg { display: inline-flex; gap: 4px; padding: 4px; border: none; background: var(--panel); border-radius: 12px; }
.seg button { min-height: 44px; min-width: 76px; padding: 0 20px; border: 1px solid transparent; background: transparent; color: var(--muted); font-family: var(--font-title); font-size: 17px; font-weight: 700; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; border-radius: 4px; }
.seg button:hover { color: var(--fg); background: rgba(237, 238, 240, 0.072); }
.seg button[aria-pressed="true"] { background: var(--btn); color: var(--on-btn); border-color: var(--fg); }

/* Panneau Ma progression : En ce moment + motivation */
.sess-block { display: flex; flex-direction: column; gap: 8px; }
#session > * { flex-shrink: 0; }
.sess-block h3 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
#heroPins .pin-list { gap: 8px; }
#heroPins .pin-item { padding: 8px 10px; gap: 10px; }
#heroPins .pin-title { font-size: 15px; }
#heroPins .pin-meta { font-size: 11px; }
#heroPins .pin-empty { font-size: 14px; }
.sess-block.moti { position: relative; padding: 12px 14px 4px; overflow: hidden; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.sess-block.moti::before { content: "\201C"; position: absolute; left: 6px; top: -20px; font-family: var(--font-title); font-size: 100px; line-height: 1; color: var(--accent); opacity: 0.10; pointer-events: none; }
.sess-block.moti #heroMoti { gap: 6px; position: relative; }
.sess-block.moti .quote { font-size: 17px; font-weight: 500; font-style: italic; color: var(--fg); }
.sess-block.moti .moti-meta { font-size: 13px; }
.sess-block.moti #heroMoti .btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
.sess-block.moti .moti-add { border-top: none; }
.sess-block.moti .moti-add summary { font-size: 13px; }

/* ===== Version chemin (façon appli d'apprentissage) ===== */
body { padding-block: 0 96px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -16px; padding: 10px 16px; background: rgba(11, 12, 15, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-stats { min-height: 44px; display: flex; align-items: center; background: none; border: 1px solid transparent; color: var(--fg); font-family: var(--font-display); font-size: 16px; font-weight: 700; cursor: default; gap: 10px; padding: 0 8px; border-radius: 6px; }
.top-stats:hover { border-color: transparent; background: none; }
.top-stats .st { display: inline-flex; align-items: center; gap: 5px; }
.top-stats svg { width: 22px; height: 22px; display: block; }
.top-stats .fl { color: #FFB25B; }
.top-stats .fl.off { color: #8A6A52; }
.top-stats .gem { color: var(--accent-text); }
.top-stats.bump { animation: bump 0.5s; }
.node { position: relative; width: 74px; height: 70px; padding: 0; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; background: var(--track); color: var(--ctl); box-shadow: 0 7px 0 #0E1628; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.node svg { width: 32px; height: 32px; }
.node:active { transform: translateY(5px); box-shadow: 0 2px 0 #0E1628; }
.node.done { background: linear-gradient(160deg, #5BE6D4, #2DB9A8); color: #03211D; box-shadow: 0 7px 0 #17786E; }
.node.done:active { box-shadow: 0 2px 0 #17786E; }
.node.cur { background: linear-gradient(160deg, color-mix(in srgb, var(--u) 70%, #fff), var(--u)); color: #04122B; box-shadow: 0 7px 0 color-mix(in srgb, var(--u) 55%, #000), 0 0 0 9px var(--bg), 0 0 0 13px color-mix(in srgb, var(--u) 45%, transparent); }
.node.cur:active { box-shadow: 0 2px 0 color-mix(in srgb, var(--u) 55%, #000), 0 0 0 9px var(--bg), 0 0 0 13px color-mix(in srgb, var(--u) 45%, transparent); }
.node.big { width: 92px; height: 86px; }
.node.big svg { width: 40px; height: 40px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg); }
.tabbar button { flex: 0 1 140px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px; border: 2px solid transparent; background: none; color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; border-radius: 6px; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--fg); border-color: var(--fg); background: rgba(237, 238, 240, 0.06); }
#lesson { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
#lesson > * { flex-shrink: 0; }
#lesson .obj { padding: 0; background: none; border: none; }
#lesson .obj > .check { display: none; }
#lesson .obj-title { padding-top: 0; font-size: 20px; }
.lesson-k { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.lesson-foot { flex: none; display: flex; flex-direction: column; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.lesson-foot .btn { width: 100%; align-self: stretch; min-height: 52px; font-size: 16px; }
.lesson-foot .btn.undo { background: transparent; color: var(--muted); border: 1px solid var(--line); box-shadow: none; text-transform: none; letter-spacing: 0; }
.toast { position: fixed; left: 50%; top: 66px; width: max-content; z-index: 60; transform: translate(-50%, -20px); opacity: 0; padding: 10px 18px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); font-size: 14px; font-weight: 500; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
#setView, #cheminView { padding-top: 20px; }
#setView #session { padding: 0; overflow: visible; gap: 16px; }
#setView .sess-block h3, #setView .badges-head h3 { font-size: 18px; }
#setView > .sess-block { padding-top: 16px; border-top: 1px solid var(--line); }
.genre-chip { min-height: 44px; min-width: 0; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; font-size: 14px; padding: 0 8px; border: none; background: none; border-radius: 8px; color: var(--fg); }
.genre-chip:hover { border: none; background: none; color: var(--accent-text); }
.btn.wide { align-self: stretch; width: 100%; min-height: 52px; margin-top: 4px; }
.back { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px 0 8px; font-size: 15px; font-weight: 500; cursor: pointer; border-radius: 10px; border: 1px solid var(--ctl); background: transparent; color: var(--fg); }
.back svg { width: 20px; height: 20px; }
.back:hover { background: rgba(237, 238, 240, 0.072); border-color: var(--fg); color: var(--fg); }
#rubCrumbs { gap: 10px; }
.rub-list { list-style: none; padding: 0; display: flex; flex-direction: column; margin: 0; gap: 0; overflow: hidden; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.rub-row { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; color: var(--fg); cursor: pointer; min-height: 72px; padding: 12px 14px; border: none; border-radius: 0; background: none; }
.rub-row:hover { border-color: rgba(237, 238, 240, 0.4); background: rgba(237, 238, 240, 0.036); }
.rr-ic { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--track); color: var(--ctl); border-radius: 6px; }
.rr-ic svg { width: 20px; height: 20px; }
.rub-row.done .rr-ic { color: #03211D; background: var(--done); }
.rub-row.cur .rr-ic { background: var(--btn); color: var(--on-btn); }
.rub-row.cur { border-color: rgba(237, 238, 240, 0.4); background: rgba(237, 238, 240, 0.048); }
.rr-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rr-t strong { font-size: 15px; line-height: 1.25; }
.rr-t small { font-size: 13px; line-height: 1.3; color: var(--muted); }
.rr-s { flex: none; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.rub-row.done .rr-s { color: var(--done-text); }
.rub-row.cur .rr-s { color: var(--fg); }
.rub-row.locked { opacity: 0.75; }
.rr-lock { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 0; padding: 10px 12px 0; }
.rr-lock-txt { font-size: 13px; color: var(--muted); }
#suiviView, #homeView { padding-top: 20px; }
.learn-head { display: flex; flex-direction: column; gap: 12px; }
.lh-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.lh-ic { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(237, 238, 240, 0.084); color: var(--fg); }
.lh-ic svg { width: 26px; height: 26px; }
.lh-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.lh-t small { font-size: 12px; color: var(--muted); }
.lh-t strong { font-size: 16px; }
.sess-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 18px; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.sess-card.running { border-color: rgba(53, 214, 196, 0.6); align-items: center; text-align: center; border: none; border-radius: 12px; box-shadow: none; background: #0A2326; }
.sc-k { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.sc-lab { font-size: 14px; color: var(--muted); margin-top: 2px; }
.sc-select { min-height: 48px; width: 100%; padding: 0 12px; border: 1px solid var(--ctl); border-radius: 6px; background: var(--inset); color: var(--fg); font: inherit; font-size: 15px; }
.sc-target { font-size: 16px; font-weight: 700; }
.sess-card.paused { border-color: rgba(240, 180, 80, 0.6); border: none; border-radius: 12px; box-shadow: none; background: #261D0B; }
.sess-card.paused .chrono { color: #F0B450; }
.sess-card.running .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.sess-card.running .btn-ghost svg { width: 18px; height: 18px; }
.chrono { font-family: var(--font-mono); font-size: 52px; font-weight: 500; line-height: 1.1; color: var(--done-fg); font-variant-numeric: tabular-nums; }
.big-btn { align-self: stretch; min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; border-radius: 10px; }
.big-btn svg { width: 20px; height: 20px; }
.big-btn.stop { background: var(--done); color: var(--on-done); }
.s-block { display: flex; flex-direction: column; gap: 10px; }
.s-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.s-head h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.s-meta { font-size: 13px; color: var(--muted); text-align: right; }
.s-empty { margin: 0; padding: 14px; color: var(--muted); font-size: 14px; line-height: 1.45; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.wk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 14px 0; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.wk-stats div { display: flex; flex-direction: column; gap: 2px; padding: 0 14px; border: none; border-radius: 0; background: none; }
.wk-stats strong { font-family: var(--font-display); font-size: 20px; }
.wk-stats span { font-size: 12px; color: var(--muted); }
.wk-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 130px; padding: 10px 8px 6px; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.wk-col { height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.wk-v { font-family: var(--font-mono); font-size: 10px; color: var(--muted); white-space: nowrap; min-height: 13px; }
.wk-bar { flex: 1 1 auto; width: 100%; max-width: 26px; display: flex; align-items: flex-end; border-radius: 3px; background: var(--track); overflow: hidden; }
.wk-bar i { display: block; width: 100%; background: var(--accent); border-radius: 3px; }
.wk-col.today .wk-bar i { background: var(--done); }
.wk-d { font-size: 12px; color: var(--muted); }
.wk-col.today .wk-d { color: var(--fg); font-weight: 700; }
.cur-obj { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; text-align: left; color: var(--fg); cursor: pointer; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.cur-obj .rr-ic { background: var(--btn); color: var(--on-btn); }
.jr-list, .pr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jr-day { margin-top: 6px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin: 0; padding: 12px 12px 0; }
.jr-item { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; color: var(--fg); cursor: pointer; border: none; border-radius: 0; background: none; }
.jr-dur { flex: none; min-width: 58px; font-family: var(--font-mono); font-size: 13px; color: var(--accent-text); }
.jr-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jr-t strong { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.jr-t small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-proof { flex: none; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--done-line); color: var(--done-text); font-size: 11px; }
.pr-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: none; border-radius: 0; background: none; }
.pr-ic { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(169, 155, 255, 0.16); color: var(--b3); }
.pr-ic svg { width: 22px; height: 22px; }
#sheetBody { padding: 14px 16px 20px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-form { display: flex; flex-direction: column; gap: 8px; }
.sheet-form label { font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 6px; }
.sheet-form textarea, .sheet-form input { box-sizing: border-box; width: 100%; padding: 10px 12px; border: 1px solid var(--ctl); border-radius: 6px; background: var(--inset); color: var(--fg); font: inherit; font-size: 16px; }
.sheet-form input { min-height: 48px; }
.sheet-form textarea.mono { font-family: var(--font-mono); font-size: 13px; }
.sf-sum { margin: 0; font-size: 15px; }
.sf-hint { margin: 0; font-size: 13px; color: var(--muted); }
.log-detail { display: flex; flex-direction: column; gap: 10px; }
.log-detail pre { margin: 0; max-height: 260px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--inset); font-family: var(--font-code); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-detail .ld-k { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.log-detail p { margin: 0; }
.danger { color: #FF8FA3 !important; }
#path { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.cur-card { gap: 8px; }
.cc-title { margin: 0; font-family: var(--font-display); font-size: 20px; line-height: 1.25; }
.cc-ex { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.cc-acts { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: 6px; }
.cc-acts .btn { align-self: stretch; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; font-size: 15px; }
.cc-acts .btn svg { width: 18px; height: 18px; }
.lv-sec { border: none; background: var(--panel); border-radius: 12px; box-shadow: none; overflow: hidden; }
.lv-sec > summary { list-style: none; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; cursor: pointer; }
.lv-sec > summary::-webkit-details-marker { display: none; }
.lv-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lv-t small { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.lv-t strong { font-family: var(--font-title); font-weight: 700; letter-spacing: 0; font-size: 18px; }
.lv-st { flex: none; font-family: var(--font-mono); font-size: 13px; color: var(--accent-text); display: flex; align-items: center; }
.lv-st svg { width: 18px; height: 18px; color: var(--ctl); }
.pill-ok { padding: 3px 9px; border-radius: 6px; color: var(--done-text); font-family: var(--font-body); font-size: 12px; border: none; background: var(--done-bg); }
.chev { flex: none; width: 20px; height: 20px; color: var(--muted); transition: transform 0.2s ease; }
.lv-sec[open] > summary .chev { transform: rotate(180deg); }
.lv-sec.locked > summary { opacity: 0.7; }
.lv-body { display: flex; flex-direction: column; gap: 0; padding: 0 0 4px; border-top: 1px solid var(--line); padding-top: 0; }
.rb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; border-radius: 12px; box-shadow: none; border: none; background: none; }
.rb-row { --u: var(--cv1); width: 100%; min-height: 68px; display: flex; align-items: center; gap: 12px; text-align: left; color: var(--fg); cursor: pointer; border: none; border-radius: 0; background: none; padding: 10px 16px; }
.rb-row:hover { border-color: color-mix(in srgb, var(--u) 60%, transparent); background: rgba(237, 238, 240, 0.036); }
.rb-ic { flex: none; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: color-mix(in srgb, var(--u) 22%, #070B15); color: color-mix(in srgb, var(--u) 70%, #fff); }
.rb-ic svg { width: 22px; height: 22px; }
.rb-row.done .rb-ic { color: #03211D; background: var(--done); }
.rb-row.locked { opacity: 0.6; }
.rb-row.locked .rb-ic { background: var(--track); color: var(--ctl); }
.rb-row.cur { border-color: color-mix(in srgb, var(--u) 70%, transparent); background: color-mix(in srgb, var(--u) 10%, transparent); }
.rb-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rb-t strong { font-size: 15px; line-height: 1.25; }
.rb-meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.rb-meta em { font-style: normal; margin-right: 6px; padding: 1px 6px; border-radius: 3px; background: color-mix(in srgb, var(--u) 20%, transparent); color: color-mix(in srgb, var(--u) 60%, #fff); }
.rb-meta b { color: var(--accent-text); font-weight: 500; }
.rb-t .bar { height: 5px; }
.rb-go { flex: none; width: 18px; height: 18px; color: var(--muted); }
#rubView { gap: 20px; padding-top: 12px; }
.rub-page { display: flex; flex-direction: column; gap: 22px; }
#rubDyn { display: flex; flex-direction: column; gap: 18px; }
.rp-head { display: flex; align-items: flex-start; gap: 14px; }
.rp-ic { flex: none; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: rgba(237, 238, 240, 0.084); color: var(--fg); border-radius: 6px; }
.rp-ic svg { width: 28px; height: 28px; }
.rp-t { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rp-t .goal { font-size: 15px; line-height: 1.45; }
.ok-txt { color: var(--done-text); }
.rp-sub { margin: 4px 0 -6px; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.add-wrap { border-top: 1px solid var(--line); padding-top: 6px; }
.add-wrap > summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; color: var(--accent-text); font-size: 15px; font-weight: 500; }
.add-wrap .add { border-top: none; padding-top: 6px; }
.adapt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 6px; background: rgba(237, 238, 240, 0.06); color: var(--fg); font-size: 14px; border: none; }
.adapt strong { color: var(--fg); }
.adapt.muted { border-color: var(--line); color: var(--muted); border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
#heroPins .pin-item > .check { display: none; }
.genre-chip svg { flex: none; width: 20px; height: 20px; }
.chemin-head { display: flex; flex-direction: column; gap: 8px; }
.seg-big { align-self: center; }
.seg-big button { min-width: 110px; min-height: 48px; font-size: 20px; }
.genres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.g-card { --u: var(--cv1); position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; text-align: left; color: var(--fg); cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.2s ease; box-shadow: none; border: 1px solid transparent; border-radius: 12px; background: var(--panel); }
.g-card:active { transform: scale(0.98); box-shadow: none; }
.g-card:hover { border-color: color-mix(in srgb, var(--u) 60%, transparent); }
.g-card[aria-pressed="true"] { box-shadow: none; border-color: var(--fg); background: rgba(237, 238, 240, 0.06); }
.g-ic { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: color-mix(in srgb, var(--u) 25%, #070B15); color: color-mix(in srgb, var(--u) 70%, #fff); }
.g-ic svg { width: 30px; height: 30px; }
.g-name { font-family: var(--font-title); font-size: 18px; font-weight: 700; line-height: 1.15; }
.g-desc { font-size: 13px; line-height: 1.35; color: var(--muted); }
.g-card .bar { width: 100%; height: 6px; margin-top: auto; }
.g-meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.g-tag { position: absolute; top: 12px; right: 12px; padding: 3px 8px; border-radius: 6px; background: var(--u); color: #04122B; font-size: 13px; font-weight: 700; }
.g-extra { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.g-extra .g-ic { flex: none; width: 44px; height: 44px; }
.g-extra strong { color: var(--fg); }
@media (max-width: 360px) { .genres { grid-template-columns: 1fr; } }
#setView .foot { flex-direction: column; align-items: flex-start; }

/* Quand une feuille du bas est ouverte, la page derrière ne défile plus */
body:has(dialog[open]) { overflow: hidden; }

/* Durée en heures + minutes, et message d'avertissement dans une session */
.dur { border: none; margin: 6px 0 0; padding: 0; min-width: 0; }
.dur legend { padding: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.dur-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px 10px; margin-top: 6px; }
.dur-row label { font-size: 14px; color: var(--muted); }
.dur-row input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--ctl); border-radius: 6px; background: var(--inset); color: var(--fg); font: inherit; font-size: 16px; }
.sf-hint.warn { color: #FFB25B; }

/* Preuves : vignettes des captures d'écran */
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs:empty { display: none; }
.thumb-wrap { position: relative; }
.thumb { display: block; width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 6px; background: var(--inset); overflow: hidden; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb.manquante { opacity: 0.4; }
.thumb-x { position: absolute; top: -14px; right: -14px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; background: none; border: none; cursor: pointer; }
.thumb-x span { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--ctl); color: var(--fg); font-size: 18px; line-height: 1; }
.add-img { align-self: flex-start; display: inline-flex; align-items: center; cursor: pointer; }
.field-k { margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.proof { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* Capture d'écran agrandie */
.img-view { width: min(900px, calc(100% - 16px)); margin: auto; border-radius: 6px; border-bottom: 1px solid var(--line); }
.img-body { overflow: auto; padding: 10px; max-height: calc(88vh - 64px); overscroll-behavior: contain; }
.img-body img { display: block; width: 100%; height: auto; border-radius: 6px; }

/* Valider par la preuve : ce qu'il manque pour valider un objectif */
.lesson-foot .crit-k { margin-bottom: 4px; }
.lesson-foot .btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* Le rond à gauche de la fiche montre seulement si l'objectif est validé (on valide en bas de la fiche) */
.check.static { cursor: default; pointer-events: none; }

/* Objectif du jour : une ligne discrète dans « Cette semaine » */
.goal-line { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.goal-txt { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--muted); }
.goal-txt strong { color: var(--fg); font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.ring { flex: none; width: 32px; height: 32px; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--accent-text); stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray 0.4s; }
.goal-line.reached .ring-fg { stroke: var(--done); }

/* Tableau de bord (Profil) */
.dash-weeks { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; padding: 10px 6px 6px; height: 150px; }
.dash-weeks .wk-d { font-size: 10px; }
.dash-weeks .wk-v { font-size: 9px; }

/* Journal : filtres par catégorie */
.jr-filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.jr-chip { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; background: var(--inset); border: 1px solid var(--line); border-radius: 6px; color: var(--fg); font: inherit; font-size: 14px; cursor: pointer; }
.jr-chip span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.jr-chip[aria-pressed="true"] { border-color: var(--fg); color: var(--fg); background: rgba(237, 238, 240, 0.06); }
.jr-chip-n { min-width: 0; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: inherit; font-size: inherit; color: inherit; }
.jr-chip .jr-chip-n { font-size: 14px; color: inherit; font-family: inherit; }

/* Fiche objectif : les 3 conditions pour valider (maquette v2) */
.cond { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cond li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.cond li.ko { color: var(--muted); }
.cd-ic { flex: none; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 4px; border: 2px solid var(--ctl); }
.cond li.ok .cd-ic { background: var(--done); border-color: var(--done); color: var(--on-done); }
.cd-ic svg { width: 14px; height: 14px; }
.cond-k { margin: 0 0 8px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.lesson-foot .btn.blocked { opacity: 0.55; box-shadow: none; }
.lesson-foot .btn-ghost.start { margin-top: 8px; text-transform: none; letter-spacing: 0; background: transparent; color: var(--fg); border: 1px solid rgba(237, 238, 240, 0.4); box-shadow: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.lesson-foot .btn-ghost.start svg { width: 18px; height: 18px; }
.jr-tag { flex: none; padding: 3px 8px; border-radius: 6px; font-size: 11px; border: 1px solid var(--line); color: var(--muted); }
.jr-tag.short { border-color: rgba(255, 196, 107, 0.45); color: #FFD796; }

/* Protéger mes données (maquette v2) */
.warn-card { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: none; background: #261D0B; border-radius: 12px; }
.wc-ic { flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(255, 196, 107, 0.14); color: #FFC46B; }
.wc-ic svg { width: 22px; height: 22px; }
.wc-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wc-t strong { font-size: 14px; }
.wc-t small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.warn-card .act { flex: none; color: #FFD796; border-color: rgba(255, 196, 107, 0.45); }
.dc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dc-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; background: var(--inset); border: 1px solid var(--line); }
.dc-list li > span:first-child { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dc-list strong { font-size: 14px; }
.dc-list small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.dc-list .act, .dc-list .pill-ok { flex: none; }

/* Bilan de la semaine (maquette v2) */
.report { padding: 14px; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.report .s-head { min-height: 0; }
.rep-phrase { margin: 0; font-size: 15px; line-height: 1.5; }
.rep-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rep-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 6px; background: var(--inset); border: 1px solid var(--line); }
.rep-list span:first-child { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.rep-list strong { font-size: 14px; font-weight: 500; line-height: 1.4; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 12px; height: 12px; border-radius: 3px; background: var(--track); }
.dots i.on { background: var(--b3); }

/* Premier lancement guidé (maquette v2) */
body.onb-on .tabbar, body.onb-on .topbar { display: none !important; }
#onbView { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
#onbView[hidden] { display: none; }
.onb-dots { display: flex; gap: 6px; }
.onb-dots i { flex: 1; height: 5px; border-radius: 3px; background: var(--track); }
.onb-dots i.on { background: var(--btn); }
.onb-k { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
#onbView .big { margin: 0; }
#onbView .note { margin: 0; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.goal-chip { min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--fg); cursor: pointer; font: inherit; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; }
.goal-chip strong { font-family: var(--font-mono); font-size: 26px; font-weight: 500; }
.goal-chip span { font-size: 12px; color: var(--muted); }
.goal-chip[aria-pressed="true"] { border-color: var(--fg); background: rgba(237, 238, 240, 0.072); box-shadow: none; }
.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.how li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.how-n { flex: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--btn); color: var(--on-btn); font-family: var(--font-mono); font-weight: 500; border-radius: 6px; }
.how li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.how strong { font-size: 15px; }
.how small { font-size: 13px; line-height: 1.4; color: var(--muted); }
.onb-sum { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; padding: 12px 14px; border-radius: 6px; background: var(--inset); border: 1px solid var(--line); font-size: 14px; }
.onb-sum span { color: var(--muted); }
.onb-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.onb-nav .btn { min-width: 120px; }
.onb-nav .btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); box-shadow: none; }

/* Compte Google (maquette v2) et bouton officiel « Continuer avec Google » */
.acc-card { display: flex; flex-direction: column; gap: 10px; }
.acc-card .acts { display: flex; gap: 8px; }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.acc-av { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #0B1120; font-weight: 700; font-size: 18px; background: var(--btn); border-radius: 6px; }
.acc-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-t strong { font-size: 15px; }
.acc-t small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.dc-list small.err { color: #FFB25B; }
.g-signin { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid #8E918F; border-radius: 6px; background: #131314; color: #E3E3E3; font: 500 15px/20px 'Figtree', 'Roboto', Arial, sans-serif; cursor: pointer; }
.g-signin svg { flex: none; width: 20px; height: 20px; }
.g-signin:hover { background: #1c1c1e; }
.g-signin:active { background: #242426; }

/* Accueil : écran de bienvenue avec ou sans compte (maquette v2) */
.welcome { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 24px; }
.wl-logo { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--on-btn); background: var(--btn); box-shadow: none; }
.wl-logo svg { width: 36px; height: 36px; }
.login-box { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.login-box .btn-ghost { margin-top: 10px; background: transparent; color: var(--fg); border: 1px solid var(--line); box-shadow: none; }
.dc-list .bar { display: block; margin-top: 6px; }
.dc-list li > span:first-child .bar { align-self: stretch; }

/* Sessions détectées dans Unity (étape 5.1) */
.un-item { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 6px; background: var(--inset); border: 1px solid var(--line); }
.un-item + .un-item { margin-top: 8px; }
.un-ic { flex: none; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(237, 238, 240, 0.084); color: var(--fg); }
.un-ic svg { width: 22px; height: 22px; }
.un-t { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.un-t strong { font-size: 14px; }
.un-t small { font-size: 12px; color: var(--muted); }
.un-acts { display: flex; gap: 6px; margin-left: auto; }
.jr-tag.unity { border-color: rgba(237, 238, 240, 0.4); color: var(--fg); }

/* Repères dans la preuve : ambre et pointillé, pour ne jamais être pris pour une condition de validation */
.hints { margin-top: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; border: none; background: rgba(255, 196, 107, 0.08); border-radius: 12px; }
.hints-k { font-family: var(--font-mono); font-size: 13px; color: #FFD796; }
.hints-note { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.hint-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hint-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.hint-list li.ko { color: var(--muted); }
.hint-ic { flex: none; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border: 1.5px dashed rgba(255, 196, 107, 0.55); border-radius: 6px; }
.hint-list li.ok .hint-ic { border-style: solid; border-color: #FFC46B; background: rgba(255, 196, 107, 0.18); color: #FFD796; }
.hint-ic svg { width: 12px; height: 12px; }

/* Mode test (?test=1) */
.test-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; background: #2A2210; border-bottom: 1px solid rgba(255, 196, 107, 0.45); color: #FFD796; font-size: 12px; line-height: 1.35; }
.test-banner a { flex: none; min-height: 44px; display: inline-flex; align-items: center; color: #FFD796; text-decoration: underline; }

/* Mini-quiz (étape 3.2) */
.quiz { display: flex; flex-direction: column; gap: 12px; }
.quiz-q { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; }
.quiz-choices { display: flex; flex-direction: column; gap: 8px; }
.quiz-choice { width: 100%; min-height: 48px; padding: 10px 14px; text-align: left; font: inherit; font-size: 14px; line-height: 1.4; color: var(--fg); background: var(--inset); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.quiz-choice[aria-disabled="true"] { cursor: default; }
.quiz-choice.good { border-color: var(--done); background: rgba(80, 200, 140, 0.12); }
.quiz-choice.bad { border-color: rgba(255, 120, 120, 0.7); background: rgba(255, 120, 120, 0.1); }
.quiz-fb, .quiz-res { margin: 0; padding: 10px 12px; border-radius: 6px; font-size: 14px; line-height: 1.45; border: 1px solid var(--line); }
.quiz-fb.ok, .quiz-res.ok { border-color: var(--done); }
.quiz-fb.ko, .quiz-res.ko { border-color: rgba(255, 196, 107, 0.45); }

/* Carte de quiz en bas d'une rubrique (étape 3.2) */
.quiz-card { margin-top: 8px; padding: 14px; display: flex; flex-direction: column; gap: 10px; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.quiz-card.done { border-color: var(--done-line); background: var(--done-bg); }
.quiz-card .rp-sub { margin: 0; }
.qc-ok { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--done-fg); }

/* Quiz : barre de progression et compteur */
.quiz-head { display: flex; align-items: center; gap: 12px; }
.quiz-bar { flex: 1 1 auto; height: 8px; border-radius: 6px; background: var(--track); overflow: hidden; }
.quiz-bar i { display: block; height: 100%; border-radius: 6px; background: var(--accent); transition: width 0.25s; }
.quiz-count { flex: none; font-family: var(--font-mono); font-size: 14px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.badge-ok { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; background: var(--done-bg); color: var(--done-fg); font-size: 12px; font-weight: 700; border: none; }
.badge-ok svg { width: 12px; height: 12px; }
.qc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* « Je connais déjà ça » et objectifs déclarés acquis (étape 4.1) : pointillé, pour ne pas ressembler à « Validé » */
.known-card { margin: 4px 0 8px; padding: 12px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.known-card p { margin: 0; font-size: 14px; line-height: 1.45; }
.known-card small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.known-note { margin: 0 0 8px; padding: 10px 12px; font-size: 13px; line-height: 1.45; color: var(--done-text); border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.rub-row.known { border-style: dashed; border-color: var(--done-line); border: none; }
.rub-row.known .rr-ic { background: transparent; border: 1.5px dashed var(--done-text); color: var(--done-text); }
.rub-row.known .rr-s { color: var(--done-text); }

/* Bouton de langue, au milieu de la barre du haut */
.lang-btn { flex: none; min-height: 44px; font-family: var(--font-mono); font-weight: 500; cursor: pointer; font-size: 13px; padding: 0 8px; min-width: 44px; border: none; background: none; border-radius: 8px; color: var(--fg); }
.lang-btn:hover { border: none; background: none; color: var(--accent-text); }
.lang-btn[hidden] { display: none; }

/* Stats (semaine, niveau, profil) : un seul bloc, traits verticaux entre les stats */
.wk-stats div + div { border-left: 1px solid var(--line); }

/* Journal et projets : une liste = un bloc, des traits fins entre les lignes */
.jr-list, .pr-list { gap: 0; background: var(--panel); border-radius: 6px; overflow: hidden; }
.jr-list li + li:not(.jr-day), .pr-list li + li { border-top: 1px solid var(--line); }
.jr-list .jr-day + li { border-top: none; }

/* ----- Apprendre : un niveau = un bloc, les rubriques sont des lignes séparées par des traits ----- */
.rb-list li + li { border-top: 1px solid var(--line); border-color: var(--line); }
.lv-body > :not(.rb-list) { margin: 8px 12px 0; }

/* ----- Rubrique : la liste des objectifs = un seul bloc ----- */
.rub-list > li + li, .rub-list > .rub-row + .rub-row { border-top: 1px solid var(--line); }

/* ----- Choix de chemin : cartes sans « marche » ni dégradé ----- */
.lv-body .wk-stats { padding: 6px 0 10px; border: none; background: none; border-radius: 0; }

/* ----- Profil ----- */
.stat { flex: none; padding: 14px; border: none; border-radius: 0; background: none; }
.stat + .stat { border-left: 1px solid var(--line); border-color: var(--line); }
.stat-lv { grid-column: 1 / -1; border-left: none !important; border-top: 1px solid var(--line); }
.pin-list > * + * { border-top: 1px solid var(--line); border-color: var(--line); }

/* Un bloc = fond légèrement plus clair que --bg, SANS bordure ; seuls des traits fins séparent ce qu'il contient. */
.jr-list, .pr-list { border: none; background: var(--panel); border-radius: 12px; box-shadow: none; }
.sess-card .sc-select { background: var(--bg); border-color: transparent; border-radius: 10px; }
.stat-lv, .jr-list li + li:not(.jr-day), .pr-list li + li, .rub-list > li + li { border-color: var(--line); }

/* Journal replié et objectifs déclarés : lignes repliables, comme les niveaux d'Apprendre */
.jr-sec > summary { min-height: 56px; }
.jr-sec .lv-st { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.jr-sec .lv-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.dcl-details > summary { list-style: none; min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.dcl-details > summary::-webkit-details-marker { display: none; }
.dcl-details[open] > summary { margin-bottom: 8px; }

/* Tableau de bord du Profil : diagramme en bâtons (fins, sans fond, sur une ligne de base) */
.dash-weeks .wk-bar { max-width: 8px; background: transparent; border-radius: 0; border-bottom: 1px solid var(--line); box-sizing: content-box; }
.dash-weeks .wk-bar i { border-radius: 2px 2px 0 0; }
.dash-weeks .wk-col { gap: 6px; }

/* ===== Piste perso (2D Isométrique Pixel, phase 7) ===== */
/* Liste : pondération des piliers, un cadre par palier, groupes de piliers (point coloré + label) */
.ps-desc { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.ps-k, .ps-gk { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.ps-pond { display: flex; flex-direction: column; margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); gap: 10px; }
.ps-pil { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.ps-n { flex: 0 0 172px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--pc); white-space: nowrap; }
.ps-n b { font-family: var(--font-mono); color: var(--pc); margin-right: 4px; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1.5px solid var(--pc); border-radius: 50%; font-size: 11px; margin: 0; flex: none; }
.ps-pil .bar i { background: var(--pc); border-radius: 3px; }
.ps-palier { font-family: var(--font-title); display: flex; align-items: baseline; gap: 8px; margin: 10px 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 16px; }
.ps-palier span { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 6px; flex: 1; display: none; }
.ps-groupe { margin-top: 12px; padding: 0; border-left: none; }
.ps-row { background: none; border: none; border-radius: 0; padding: 4px 0; min-height: 44px; gap: 10px; align-items: flex-start; }
.ps-fiche .obj-title { margin: 0 0 12px; }

/* Cadre du module (accent bleu) et cadres des paliers */
.ps-sec { border: 1px solid var(--fg); box-shadow: inset 3px 0 0 var(--fg); }
.ps-sec > summary small { color: var(--fg); }
.ps-sec .lv-body { padding: 0 12px 14px; }
.ps-box { margin-top: 14px; padding: 4px 12px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.ps-palier em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; flex: none; margin-left: auto; }
.ps-groupe .rub-list { margin-top: 4px; background: none; border-radius: 0; padding: 0; }
.ps-groupe .rub-list li + li { border-top: none; }
.ps-gk { display: flex; align-items: center; gap: 8px; color: var(--pc); font-weight: 700; }
.ps-fiche { padding: 12px; border: 1px solid var(--line); border-radius: 6px; }

.ps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); flex: none; }

/* Lignes d'objectifs : simples, avec une puce ronde (pleine quand l'objectif est validé) */
.ps-pil .bar { flex: 1; height: 6px; background: var(--track); border-radius: 3px; }
.ps-row:hover { background: none; border: none; border-radius: 0; padding: 4px 0; min-height: 44px; gap: 10px; align-items: flex-start; }
.ps-row::before { content: ''; flex: none; width: 10px; height: 10px; margin-top: 7px; border: 1.5px solid var(--muted); border-radius: 50%; }
.ps-row .rr-t strong { font-weight: 400; font-size: 14px; line-height: 1.4; }

/* Fiche : sections Leçon / Exercice / Rendu attendu / Critères, texte aéré, exercice et rendu dans des cases */
.ps-sect { margin-top: 20px; }
.ps-sk { display: block; margin-bottom: 4px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.ps-sect p { font-size: 15px; margin: 0 0 12px; line-height: 1.65; white-space: normal; color: var(--text-soft, var(--fg)); }

.ps-sect p:last-child { margin-bottom: 0; }
.ps-sect .ps-lead { font-size: 16px; font-weight: 600; color: var(--fg); }
.ps-sect strong { color: var(--fg); font-weight: 700; }
.gloss { display: inline; padding: 0; margin: 0; border: none; background: none; font: inherit; color: var(--accent-text); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-color: var(--ctl); }
.gloss:hover { text-decoration-color: var(--accent-text); }
.gloss-sheet { width: min(420px, calc(100% - 24px)); }
.gloss-def { margin: 0; padding: 16px 20px 20px; font-size: 15px; line-height: 1.6; color: var(--fg); }
.ps-ressource { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent-text); text-decoration: none; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--inset); }
.ps-ressource:hover { border-color: var(--fg); background: rgba(237, 238, 240, 0.048); }
.ps-box2 { padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }

/* Statut des lignes (« Validé », « À rédiger »), paliers verrouillés */
.ps-row .rr-s { flex: none; display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.ps-row .rr-s svg { width: 12px; height: 12px; }
.ps-row.done::before { background: var(--done); border-color: var(--done); }
.ps-row.done .rr-s { color: var(--done-text); }
.ps-box.locked .ps-groupe, .ps-groupe.locked { opacity: 0.55; }
.ps-palier svg { width: 14px; height: 14px; flex: none; color: var(--muted); }
.ps-lock { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.ps-ok { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--done-text); vertical-align: middle; }
.ps-ok svg { width: 12px; height: 12px; }
.ps-fiche .acts { margin-top: 16px; }

/* Pilier Code : code fourni, code en ligne, indices et solution */
/* Pas de ligatures : « != » doit rester « != » (et pas ≠), sinon un débutant recopie un signe qui n'existe pas en C# */
.ps-code, .ps-sect code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.ps-sect code { font-family: var(--font-code); font-size: 0.88em; padding: 1px 4px; border-radius: 4px; background: var(--inset); overflow-wrap: anywhere; }
.ps-code { margin: 0; max-width: 100%; overflow-x: auto; padding: 10px 0; background: var(--inset); border: 1px solid var(--line); border-radius: 6px; font-family: var(--font-code); font-size: 12px; line-height: 1.6; tab-size: 4; -webkit-overflow-scrolling: touch; }
.ps-code code { display: block; min-width: max-content; padding: 0; background: none; font-size: inherit; overflow-wrap: normal; }
.ps-code .l { display: block; padding: 0 12px; white-space: pre; color: var(--fg); }
.ps-code .l.todo { padding-left: 9px; border-left: 3px solid #FFB454; background: rgba(255, 180, 84, 0.10); color: #FFD796; }
.ps-ind { border-top: 1px solid var(--line); }
.ps-ind:last-child { border-bottom: 1px solid var(--line); }
.ps-ind summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.ps-ind p { padding-bottom: 12px; }
.ps-sol-btn { min-height: 44px; }
.ps-sol-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ps-sol-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.ps-sol-code { margin-top: 12px; }

/* ===== V2 : nouvelle mise en forme (maquette/devuno-v2.html) ===== */
/* Même thème ; seule la quantité affichée d'un coup change. Classes préfixées « v2- » pour ne rien casser d'ancien. */
[class^="v2-"], [class*=" v2-"] { box-sizing: border-box; }
.v2-sk, .v2-sec b { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.v2-sec { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 32px; margin-top: 4px; }
.v2-sec b { font-weight: 500; }
.v2-link-btn { min-height: 44px; padding: 0 4px; border: none; background: none; color: var(--accent-text); font-size: 13px; cursor: pointer; }
.v2-pad { padding: 8px 14px; }

/* Barre du haut : le chemin se change en le touchant, la roue ouvre les Réglages */
.genre-chip { background: none; border: none; color: var(--fg); font: inherit; }
.chip-caret { color: var(--muted); font-size: 12px; margin-left: 2px; }
.top-right { display: flex; align-items: center; gap: 2px; flex: none; }
.gear-btn { flex: none; width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: none; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; }
.gear-btn svg { width: 22px; height: 22px; }
.gear-btn:hover { color: var(--accent-text); }
.gear-btn[hidden] { display: none; }

/* Carte « Prochain objectif » */
.v2-head { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--panel); }
.v2-head b { font-size: 17px; line-height: 1.3; }
.v2-head .mono { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.v2-btn { align-self: stretch; min-height: 44px; font-size: 15px; }
.mono { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* Niveau / palier : un bloc repliable avec barre de progression ; verrouillé : cadenas, non ouvrable */
.v2-palier { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.v2-palier > button { width: 100%; min-height: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; background: var(--surface); border: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.v2-palier > button b { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.v2-palier > button b svg { width: 16px; height: 16px; color: var(--muted); }
.v2-palier.locked > button { color: var(--muted); }
.v2-bar { flex-basis: 100%; height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.v2-bar i { display: block; height: 100%; background: var(--accent); }
.v2-barline { display: flex; align-items: center; gap: 12px; }
.v2-barline .v2-bar { flex: 1; }

/* Ligne d'un accordéon (rubrique, pilier) : point de couleur, nom, compteur, chevron */
.v2-pil { border-top: 1px solid var(--line); }
.v2-pil > button { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: none; border: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.v2-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--pc, var(--track)); }
.v2-pil-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.v2-pil.locked .v2-pil-name { color: var(--muted); }
.v2-pil > button svg { width: 14px; height: 14px; flex: none; color: var(--muted); }
.v2-pil-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.v2-chev, .v2-go { color: var(--muted); transition: transform 0.15s ease; flex: none; }
[aria-expanded="true"] > .v2-chev { transform: rotate(90deg); }
.v2-objs { list-style: none; margin: 0; padding: 0 14px 8px 33px; display: flex; flex-direction: column; }
.v2-objs li { border-top: 1px solid rgba(30, 47, 82, 0.5); }
.v2-objs li:first-child { border-top: none; }
.v2-objs li button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 6px 0; background: none; border: none; color: var(--fg); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.v2-objs .c { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ctl); flex: none; display: inline-flex; align-items: center; justify-content: center; }
.v2-objs .c svg { width: 10px; height: 10px; color: var(--on-done, #03211D); }
.v2-objs li.done button { color: var(--muted); }
.v2-objs li.done .c { background: var(--done); border-color: var(--done); }
.v2-objs li.cur button { color: var(--accent-text); font-weight: 600; }
.v2-objs li.cur .c { border-color: var(--fg); }

/* Liste de lignes dans un bloc (pistes perso, réglages, épinglés) */
.v2-rows { border-radius: 12px; background: var(--panel); overflow: hidden; }
.v2-row { width: 100%; min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: none; border: none; color: var(--fg); font: inherit; font-size: 14px; text-align: left; }
button.v2-row { cursor: pointer; }
.v2-rows > .v2-row + .v2-row, .v2-rows > button + .v2-row, .v2-rows > .v2-row + button, .v2-rows > button + button { border-top: 1px solid var(--line); }
.v2-row-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.v2-stack { flex-direction: column; align-items: stretch; }
.v2-stack .g-signin { width: 100%; }
.v2-row-t b { font-weight: 600; overflow-wrap: anywhere; }
.v2-row-t small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.v2-row-t b.danger, .danger { color: #FF8FA3; }
.v2-val { color: var(--muted); font-size: 13px; white-space: nowrap; flex: none; }
.v2-reset { margin-top: 12px; }

/* Rubrique : liste courte (titre + état) */
.v2-ftitle { display: flex; flex-direction: column; gap: 4px; }
.v2-ftitle h3 { margin: 0; }
.v2-ftitle > p { margin: 0; color: var(--muted); font-size: 13px; }
.v2-list { list-style: none; margin: 0; padding: 0; border-radius: 12px; background: var(--panel); overflow: hidden; }
.v2-list li + li { border-top: 1px solid var(--line); }
.v2-li { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: none; border: none; color: var(--fg); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.v2-li > svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.v2-li-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.v2-li.done { color: var(--muted); }
.v2-li.done > svg { color: var(--done); }
.v2-li.cur { color: var(--accent-text); font-weight: 600; }
.v2-li.locked { color: var(--muted); }
.v2-circle { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--ctl); }
.v2-li.cur .v2-circle { border-color: var(--fg); }
.v2-box { padding: 12px; background: var(--inset); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: 6px; }
.v2-box p { margin: 0; }
.known-card.v2-box { background: var(--inset); }
.known-card .sf-hint { margin: 0; }

/* Fiche d'objectif : titre, sous-titre, 3 onglets qui restent en haut quand on défile */
.v2-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--inset); border: 1px solid var(--line); border-radius: 10px; position: sticky; top: -14px; z-index: 2; }
.v2-tabs button { min-height: 44px; padding: 8px 4px; border: none; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.v2-tabs button[aria-selected="true"] { background: var(--btn); color: var(--on-btn); }
.v2-tabs .n { font-family: var(--font-mono); font-size: 11px; opacity: 0.85; }
.v2-panel { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.v2-panel[hidden] { display: none; }
.v2-panel p { margin: 0; }
.v2-next { align-self: stretch; }
.v2-aide { display: flex; }
.v2-foot { padding: 0; border-top: none; }
.ps-fiche { display: flex; flex-direction: column; gap: 12px; padding: 0; border: none; }
.ps-fiche .ps-sect { margin-top: 0; }

/* Profil : stats, prochains badges, épinglés */
.v2-stats3 { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--panel); border-radius: 12px; }
.v2-stats3 > div { padding: 12px; display: flex; flex-direction: column; min-width: 0; }
.v2-stats3 > div + div { border-left: 1px solid var(--line); }
.v2-stats3 b { font-size: 18px; overflow-wrap: anywhere; }
.v2-stats3 span { font-size: 12px; color: var(--muted); }
.v2-badges3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.v2-badge3 { padding: 12px 6px; text-align: center; border-radius: 10px; background: var(--panel); font-size: 12px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.v2-badge3 small { font-family: var(--font-mono); color: var(--muted); }
.v2-badge3 .ring { width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--track) 0); -webkit-mask: radial-gradient(circle, transparent 11px, #000 12px); mask: radial-gradient(circle, transparent 11px, #000 12px); }
.v2-pins { list-style: none; margin: 0; padding: 0; border-radius: 12px; background: var(--panel); overflow: hidden; }
.v2-pin { display: flex; align-items: center; gap: 6px; padding-right: 8px; }
.v2-pin + .v2-pin { border-top: 1px solid var(--line); }
.v2-pin-main { flex: 1; min-width: 0; min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; background: none; border: none; color: var(--fg); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.v2-pin.done .v2-row-t b { color: var(--muted); }
#heroPins.sess-block { padding: 0; background: none; border: none; display: flex; flex-direction: column; gap: 8px; }
.sess-block.moti { margin-top: 4px; }

/* Réglages : aide « ? » */
.v2-help { width: 28px; height: 28px; min-height: 44px; min-width: 44px; border-radius: 50%; border: none; background: none; color: var(--muted); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.v2-help::before { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--ctl); }
.v2-help[aria-expanded="true"] { color: var(--accent-text); }
.v2-helpbox { padding: 12px 14px; background: var(--inset); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.v2-helpbox p { margin: 0; }
.v2-rows .g-signin { flex: none; }
.lesson-foot:empty { display: none; }

/* ===== Retouches V2 : récompenses en orange (ce qu'on gagne), toast, bouton ===== */
/* L'orange sert seulement à ce qu'on gagne : série, XP, objectif validé, rang, badges. Boutons, onglets, liens, focus restent bleus. */
:root { --reward: #FF8A3D; --reward-bg: rgba(255, 138, 61, 0.12); --on-reward: #1A0E04; --gf: #F5D547; }
.lesson-foot .btn { text-transform: none; letter-spacing: 0; font-size: 16px; }
.toast { top: auto; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); }
.toast.on { transform: translate(-50%, 0); }
.toast.reward { background: var(--reward); color: var(--on-reward); border-color: var(--reward); font-weight: 700; }
.top-stats .st, .top-stats .fl, .top-stats .gem { color: var(--reward); }
.top-stats .st.off, .top-stats .fl.off { color: var(--muted); }
.v2-reward { color: var(--reward); }
.rbar { display: block; height: 5px; margin-top: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.rbar i { display: block; height: 100%; background: var(--reward); }
.v2-rank { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.win { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px; text-align: center; border: 1px solid var(--reward); border-radius: 14px; background: var(--reward-bg); margin-bottom: 12px; }
.win .big-check { width: 56px; height: 56px; border-radius: 50%; background: var(--reward); color: var(--on-reward); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.win b { font-size: 18px; }
.win p { margin: 0; color: var(--muted); font-size: 13px; }
.win .gain { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-family: var(--font-mono); font-size: 13px; color: var(--reward); }
#sheetBody > .btn { margin-top: 12px; width: 100%; }

/* Suivi : cercle « Aujourd'hui » plein avec coche, barres de la semaine */
.goal-line.reached .ring-fg { stroke: var(--reward); }
.ring-ok { display: none; stroke: var(--reward); }
.goal-line.reached .ring-ok { display: inline; }
.goal-line.reached .goal-txt strong { color: var(--reward); }
.goal-ok { display: none; color: var(--muted); font-size: 12px; }
.goal-line.reached .goal-ok { display: block; }
.wk-col.today .wk-bar i { background: var(--accent); }
.wk-col.part .wk-bar i { background: var(--accent); opacity: 0.55; }
.wk-col.goal .wk-bar i { background: var(--reward); opacity: 1; }
.wk-stats > div:nth-child(3) strong { color: var(--reward); }
.v2-lg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.v2-lg span { display: flex; align-items: center; gap: 6px; }
.v2-lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Badges obtenus : contour orange ; anneaux qui se remplissent en orange */
.badge.on { border: 2px solid var(--reward); background: var(--reward-bg); color: var(--fg); }
.v2-badge3 .ring { background: conic-gradient(var(--reward) calc(var(--p) * 1%), var(--track) 0); }
.ps-code .l.todo { border-left-color: var(--co, #FF8FA3); background: rgba(255, 143, 163, 0.10); color: var(--co, #FF8FA3); }

/* ===== Projets (maquette devuno-projets) ===== */
/* Le rouge sert uniquement à l'urgence (priorité haute) ; l'orange reste réservé aux récompenses. */
.v2-logo { --lc: var(--accent); width: 32px; height: 32px; flex: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--lc); background: color-mix(in srgb, var(--lc) 16%, transparent); overflow: hidden; }
.v2-logo svg { width: 20px; height: 20px; }
.v2-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-logo.grand { width: 56px; height: 56px; border-radius: 12px; }
.v2-logo.grand svg { width: 32px; height: 32px; }
.v2-prio { font-family: var(--font-mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; flex: none; }
.v2-prio.haute { color: #FF6B6B; } .v2-prio.moyenne { color: var(--accent-text); } .v2-prio.basse { color: var(--muted); }
.v2-projets { display: flex; flex-direction: column; gap: 10px; }
.v2-pcard { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--panel); border: 1px solid transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.v2-pcard.urgent { border-color: rgba(255, 107, 107, 0.55); }
.v2-prow { display: flex; align-items: center; gap: 10px; }
.v2-prow b { flex: 1; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.v2-star { color: var(--accent-text); }
.v2-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px 10px; flex-wrap: wrap; }
.v2-count { color: #FF6B6B; font-weight: 700; }
.v2-histlink { width: 100%; min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: none; font: inherit; font-size: 14px; color: var(--accent-text); cursor: pointer; }
.v2-histlink span { color: var(--muted); font-size: 13px; }
.v2-ptitle { display: flex; align-items: center; gap: 14px; }
.v2-ptitle .v2-ftitle { min-width: 0; }
.v2-prow2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.v2-tasks { list-style: none; margin: 0; padding: 0; border-radius: 12px; background: var(--panel); }
.v2-tasks li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 14px; font-size: 14px; }
.v2-tasks li + li { border-top: 1px solid var(--line); }
.v2-tasks .cb { width: 44px; min-height: 44px; margin-left: -12px; flex: none; background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; color: #03211D; font-size: 13px; }
.v2-tasks .cb::before { content: ''; position: absolute; width: 20px; height: 20px; border: 2px solid var(--ctl); border-radius: 5px; }
.v2-tasks li.done .cb::before { background: var(--done); border-color: var(--done); }
.v2-tasks .cb { z-index: 0; } .v2-tasks .cb { font-weight: 700; }
.v2-tasks .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; margin-left: -12px; }
.v2-tasks .t-titre { min-height: 44px; padding: 10px 0; background: none; border: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.v2-tasks li.done .t-titre { color: var(--muted); text-decoration: line-through; }
.link-obj { align-self: flex-start; min-height: 32px; padding: 0 0 8px; background: none; border: none; font: inherit; font-size: 12px; color: var(--accent-text); text-align: left; cursor: pointer; }
.v2-hist { list-style: none; margin: 0; padding: 0; border-radius: 12px; background: var(--panel); }
.v2-hist li + li { border-top: 1px solid var(--line); }
.v2-hist-b { width: 100%; min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: none; border: none; color: var(--fg); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.v2-hist-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v2-hist-t b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.v2-hist-t small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.v2-hist-d { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; flex: none; }
.v2-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.v2-chip { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--inset); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.v2-chip[aria-pressed="true"] { color: var(--fg); border-color: var(--fg); }
.v2-chip .v2-logo { width: 22px; height: 22px; border-radius: 6px; } .v2-chip .v2-logo svg { width: 14px; height: 14px; }
.v2-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.v2-input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--ctl); background: var(--inset); color: var(--fg); font: inherit; font-size: 16px; }
.v2-logo-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.v2-icons, .v2-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-ico, .v2-col { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--inset); color: var(--lc); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.v2-ico svg { width: 22px; height: 22px; }
.v2-col { border-radius: 50%; background: var(--lc); border: 2px solid var(--bg); }
.v2-ico[aria-pressed="true"], .v2-col[aria-pressed="true"] { outline: 2px solid var(--fg); outline-offset: 1px; }
.v2-models { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v2-model { min-height: 64px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--inset); color: var(--muted); font: inherit; font-size: 12px; text-align: left; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.v2-model b { font-size: 14px; color: var(--fg); }
.v2-model.on { border-color: var(--fg); background: rgba(237, 238, 240, 0.048); }
.v2-box-c { width: 20px; height: 20px; flex: none; border: 2px solid var(--ctl); border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.v2-box-c.on { background: var(--done); border-color: var(--done); color: #03211D; }
.v2-switch { width: 40px; height: 22px; border-radius: 999px; background: var(--btn); position: relative; flex: none; }
.v2-switch::after { content: ''; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.v2-switch.off { background: var(--track); } .v2-switch.off::after { right: auto; left: 3px; }
.v2-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.v2-check input { width: 20px; height: 20px; }

.v2-pcard .v2-bar { flex: none; }
#projetView .btn, #nouveauCorps .btn { align-self: stretch; }
.v2-tasks .cb { isolation: isolate; }
.v2-tasks .cb::before { z-index: -1; }
#projetView { display: flex; flex-direction: column; gap: 12px; }
#nouveauCorps, #historiqueCorps { display: flex; flex-direction: column; gap: 12px; }
#projetView .v2-bar { flex: none; }

/* ===== Rappels ===== */
.v2-notif { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(230, 237, 251, 0.10); font-size: 13px; align-items: flex-start; }
.v2-notif .ic { width: 28px; height: 28px; border-radius: 7px; background: var(--btn); flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--on-btn); font-weight: 700; }
.v2-notif .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v2-notif .tx b { font-size: 13px; overflow-wrap: anywhere; }
.v2-notif .tx small { color: var(--muted); font-size: 11px; }
.v2-notif .more { color: var(--muted); font-size: 12px; }
.v2-notif.h { background: rgba(255, 107, 107, 0.16); border: 1px solid rgba(255, 107, 107, 0.6); }
.v2-notif.h .ic { background: #FF6B6B; color: #2A0606; }
.v2-notif.b { opacity: 0.75; }
.v2-x { flex: none; width: 44px; min-height: 44px; margin: -8px -10px -8px 0; background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.v2-lock { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.v2-lvl { display: flex; flex-direction: column; gap: 4px; }
.v2-lvl-r { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.v2-lvl small { color: var(--muted); font-size: 12px; }
.v2-times { display: flex; align-items: center; gap: 6px; flex: none; }
.v2-time { width: 104px; min-height: 44px; padding: 6px 8px; font-size: 15px; }
#rappelsCorps { display: flex; flex-direction: column; gap: 12px; }

/* ===== Suivi plus court ===== */
.v2-today { display: flex; flex-direction: column; }
.sess-card.compact { padding: 12px; gap: 8px; }
.sess-card.compact .sc-select { min-height: 44px; }
.v2-save { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 0 0 12px; border-radius: 12px; background: #261D0B; font-size: 13px; color: #FFD796; }
.v2-save span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-save .act { flex: none; color: #FFD796; border-color: rgba(255, 196, 107, 0.45); }
.v2-save .v2-x { margin: 0; color: #FFD796; }
.v2-hist-b .v2-logo { flex: none; }
.v2-hist-b .v2-hist-t { flex: 1 1 auto; }
.v2-hist-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.v2-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: rgba(230, 237, 251, 0.12); color: var(--muted); font-size: 11px; }

/* ===== Aster, le coach ===== */
.coach { position: relative; flex: none; width: 64px; height: 64px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, rgba(237, 238, 240, 0.4), rgba(237, 238, 240, 0.4) 60%, transparent 80%), var(--inset); }
.coach.happy { border-color: var(--reward); background: radial-gradient(circle at 50% 40%, rgba(255, 138, 61, 0.40), rgba(255, 138, 61, 0.08) 60%, transparent 80%), var(--inset); }
.coach img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.coach.lg { width: 120px; height: 120px; border-radius: 24px; }
.coach.sm { width: 48px; height: 48px; border-radius: 12px; }
.coach .idle { animation: aster-bob 1.2s steps(1) infinite; }
.coach .blink { opacity: 0; animation: aster-bob 1.2s steps(1) infinite, aster-blink 4s steps(1) infinite; }
.coach .happy { display: none; animation: aster-hop 0.6s ease-in-out infinite; }
.coach.happy .idle, .coach.happy .blink { display: none; }
.coach.happy .happy { display: block; }
@keyframes aster-bob { 0% { transform: translateY(0); } 50% { transform: translateY(3%); } }
@keyframes aster-blink { 0%, 92% { opacity: 0; } 93%, 97% { opacity: 1; } 98% { opacity: 0; } }
@keyframes aster-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-8%); } }
@media (prefers-reduced-motion: reduce) { .coach img { animation: none !important; } }
.coach-row { display: flex; gap: 12px; align-items: flex-start; }
.say { position: relative; flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--panel); font-size: 14px; line-height: 1.45; }
.say::before { content: ''; position: absolute; left: -6px; top: 18px; width: 12px; height: 12px; background: var(--panel); transform: rotate(45deg); }
.coach-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.coach-card .sf-hint { margin: 0; }
.mini-btns { display: flex; gap: 8px; }
.mini-btns .btn { min-height: 44px; font-size: 14px; flex: 1; }
.mini-btns .btn-ghost { flex: none; width: auto; padding: 0 14px; }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--track); }
.steps i.on { background: var(--btn); }
.onb-top { display: flex; justify-content: space-between; align-items: center; }
.skip-btn { min-height: 44px; padding: 0 8px; background: none; border: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { min-height: 44px; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--inset); color: var(--fg); font: inherit; font-size: 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.choice small { color: var(--muted); font-size: 12px; }
.choice[aria-pressed="true"] { border-color: var(--fg); background: rgba(237, 238, 240, 0.048); }

/* ===== Le mot d'Aster ===== */
.coach.xs { width: 32px; height: 32px; border-radius: 8px; }
.coach-card.haute { border-color: rgba(255, 107, 107, 0.5); }
.coach-card.fete { border-color: var(--reward); background: var(--reward-bg); }
.coach-card.repli { padding: 0; }
.coach-hd { display: flex; justify-content: space-between; align-items: center; }
.coach-fold { width: 44px; min-height: 44px; margin: -10px -10px -10px 0; background: none; border: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.coach-fold .chev, .coach-line .chev { transform: rotate(-90deg); display: flex; }
.coach-fold .chev svg, .coach-line .chev svg { width: 16px; height: 16px; }
.coach-line { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: none; border: none; color: var(--fg); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.coach-line .chev { transform: rotate(90deg); color: var(--muted); margin-left: auto; }
.coach-resume { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan li { display: flex; gap: 10px; align-items: center; font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--inset); border: 1px solid var(--line); }
.plan li .n { font-family: var(--font-mono); font-size: 12px; color: var(--muted); width: 44px; flex: none; }
.plan li .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.plan li small { color: var(--muted); font-size: 12px; }
.pace { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.08); font-size: 13px; }
.pace-sub { color: var(--muted); }
.coach-autres { color: var(--muted); font-size: 12px; }
.v2-opt { color: var(--muted); font-size: 12px; }
.v2-tasks li.opt .t-titre { color: var(--muted); }
.v2-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }

/* ===== Victoire et bilan d'Aster ===== */
.win .coach { margin: 0 auto; }
.bilan { display: flex; flex-direction: column; gap: 12px; }
.bilan .coach-card p { margin: 0; font-size: 14px; line-height: 1.45; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { padding: 12px; border-radius: 10px; background: var(--panel); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi b { font-size: 18px; font-family: var(--font-mono); font-weight: 600; }
.kpi span { font-size: 12px; color: var(--muted); }

/* ===== Révisions ===== */
.rcard { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.rcard .src { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.rcard .q { font-size: 16px; font-weight: 600; line-height: 1.4; }
.rcard .opt { min-height: 44px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--inset); color: var(--fg); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.rcard .opt.good { border-color: var(--done); background: rgba(53, 214, 196, 0.10); }
.rcard .opt.bad { border-color: #FF8FA3; background: rgba(255, 143, 163, 0.08); }
.rcard .term { text-align: center; font-size: 24px; font-weight: 700; padding: 18px 0 6px; overflow-wrap: anywhere; }
.rcard .rhint { margin: 0; text-align: center; color: var(--muted); font-size: 13px; }
.rcard .flip { border-top: 1px dashed var(--line); padding-top: 12px; font-size: 14px; line-height: 1.5; }
.fb { padding: 12px 14px; border-radius: 10px; background: var(--panel); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.fb b { font-size: 14px; }
.fb b.ok { color: var(--done); }
.fb .next { font-family: var(--font-mono); font-size: 12px; color: var(--accent-text); }
.grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grade .btn { min-height: 44px; font-size: 13px; padding: 0 6px; }
#revisionCorps, #memoireCorps { display: flex; flex-direction: column; gap: 12px; }
.boxes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.boxes div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.boxes b { font-size: 16px; color: var(--fg); }
.boxes b.v2-reward { color: var(--reward); }
.boxes i { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--accent); }
.mem { list-style: none; margin: 0; padding: 0; border-radius: 12px; background: var(--panel); }
.mem li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 11px 14px; font-size: 14px; align-items: center; }
.mem li + li { border-top: 1px solid var(--line); }
.mem small { color: var(--muted); font-size: 12px; }
.mem .bar { grid-column: 1 / -1; display: block; height: 5px; border-radius: 3px; background: var(--track); overflow: hidden; }
.mem .bar i { display: block; height: 100%; background: var(--accent); }
#revisionCorps > .btn { width: 100%; }

/* ===== Visite guidée et astuces ===== */
dialog.visite { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: none; background: transparent; color: var(--fg); overflow: hidden; }
dialog.visite::backdrop { background: transparent; }
dialog.visite.sans-spot { background: rgba(3, 5, 10, 0.6); }
.visite .spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 2px var(--fg), 0 0 0 9999px rgba(3, 5, 10, 0.74); pointer-events: none; }
.visite .tip { position: fixed; left: 14px; right: 14px; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--fg); max-width: 520px; margin: 0 auto; }
.visite .tip .say { background: var(--inset); }
.visite .tip .say::before { background: var(--inset); }
.visite .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.visite .foot-btns { display: flex; align-items: center; gap: 6px; }
.visite .foot .btn { width: auto; min-height: 44px; padding: 0 16px; font-size: 14px; }
.visite .skipl { min-height: 44px; padding: 0 10px; background: none; border: none; color: var(--muted); font: inherit; font-size: 13px; display: inline-flex; align-items: center; cursor: pointer; }
.visite .dots { display: flex; gap: 5px; }
.visite .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--track); }
.visite .dots i.on { background: var(--btn); }

/* ===== Visite : mouvements (coupés avec prefers-reduced-motion) ===== */
.visite .spot { transition: top 0.4s ease, left 0.4s ease, width 0.4s ease, height 0.4s ease; }
.visite .tip { transition: top 0.4s ease; }
.visite .spot.sans-glisse, .visite .tip.sans-glisse { transition: none; }
.visite .tip.entre .coach-row, .visite .tip.entre .foot, .visite .tip.entre .visite-section { animation: visite-entre 0.35s ease both; }
@keyframes visite-entre { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.view.glisse { animation: page-glisse 0.45s ease both; }
@keyframes page-glisse { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
.visite-section { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.visite-section b { color: var(--accent-text); font-weight: 600; }
.visite-section .vs-n { color: var(--muted); }
.visite-section .vs-fl { color: var(--accent-text); }
@media (prefers-reduced-motion: reduce) {
  .visite .spot, .visite .tip { transition: none !important; }
  .visite .tip.entre .coach-row, .visite .tip.entre .foot, .visite .tip.entre .visite-section, .view.glisse { animation: none !important; }
}
body.glisse-en-cours { overflow-x: clip; }

/* ===== Chaque appareil à sa place ===== */
.v2-tag-tel { display: inline-flex; align-self: flex-start; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: rgba(53, 214, 196, 0.12); color: var(--done); font-size: 12px; font-weight: 600; }
.v2-pc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--inset); border: 1px dashed var(--ctl); }
.v2-pc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.v2-pc-t small { color: var(--muted); font-size: 12px; }
.v2-pc .act { flex: none; }
.v2-pc-ok { flex: none; color: var(--done); font-size: 18px; }
.coach-pc { margin: 0; font-size: 13px; color: var(--muted); }
.coach-pc b { color: var(--fg); font-weight: 600; }
.ps-codebar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ps-codebar .act { min-height: 44px; }

/* ===== Confort sur PC ===== */
/* Survol et curseur main sur tout ce qui est cliquable (seulement avec une souris) */
@media (hover: hover) {
  button:not(:disabled), [data-action], summary, select, label[for] { cursor: pointer; }
  button:disabled { cursor: not-allowed; }
  .btn:not(.btn-ghost):not(.ghost):hover { background: #FFFFFF; }
  .btn-ghost:hover, .btn.ghost:hover, .act:hover, .v2-link-btn:hover { background: rgba(237, 238, 240, 0.084); border-color: var(--fg); }
  .v2-row:hover, .v2-pcard:hover, .v2-hist-b:hover, .choice:hover, .rcard .opt:hover, .goal-chip:hover, .g-card:hover, .cur-obj:hover,
  .v2-phead:hover, .v2-pil > button:hover, .coach-line:hover, .v2-histlink:hover, .v2-pin-main:hover, .quiz-choice:hover, .v2-model:hover, .v2-ico:hover { background: rgba(237, 238, 240, 0.06); }
  .v2-tasks li:hover { background: rgba(237, 238, 240, 0.042); }
  .v2-tasks .cb:hover { border-color: var(--accent); }
  .v2-tabs button:hover:not([aria-selected="true"]), .tabbar button:hover:not([aria-current="page"]) { background: rgba(237, 238, 240, 0.06); color: var(--fg); }
  .ps-obj:hover, .obj-row:hover, .ps-ligne:hover { background: rgba(237, 238, 240, 0.048); }
}

/* Grand écran (≥ 1024 px) : barre de navigation sur le côté, Suivi sur deux colonnes, fiche ouverte à droite de la liste */
.suivi-grille, .suivi-g, .suivi-d { display: contents; }   /* petits écrans : rien ne change */
@media (min-width: 1024px) {
  body { padding-left: 112px; padding-right: 24px; padding-bottom: 24px; }
  .tabbar { top: 0; right: auto; bottom: 0; width: 96px; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 6px; padding: 76px 8px 8px; border-top: none; border-right: 1px solid var(--line); }
  .tabbar button { flex: none; width: 100%; }
  .wrap { max-width: 1120px; }
  .topbar { margin: 0; }
  .suivi-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .suivi-g, .suivi-d { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
  /* La fiche : colonne de droite, la liste reste utilisable à gauche */
  #lessonDlg:not(.page) { position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: min(46vw, 640px); max-height: none; height: 100vh; margin: 0; border-radius: 0; border-width: 0 0 0 1px; }
  body:has(#lessonDlg[open]:not(.page)) .wrap { margin-right: min(46vw, 640px); max-width: none; }
  body:has(#lessonDlg[open]:not(.page)) #homeView, body:has(#lessonDlg[open]:not(.page)) #pisteView, body:has(#lessonDlg[open]:not(.page)) #rubView { max-width: 560px; }
  body:has(#lessonDlg[open]:not(.page)) .suivi-grille { grid-template-columns: minmax(0, 1fr); }
}
.ps-codeblock { display: flex; flex-direction: column; gap: 6px; }
.ps-codeblock + .ps-codeblock { margin-top: 14px; }
.ps-codetitre { font-family: var(--font-code); font-size: 12px; color: var(--accent-text); overflow-wrap: anywhere; }

/* ===== Bandeau d'alerte (stockage plein, erreur imprévue) et écran « sauvegarde illisible » ===== */
.bandeau-alerte { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px; background: #3A1A12; color: #FFD9C8; border-bottom: 1px solid #FF8A3D; }
.bandeau-alerte[hidden] { display: none; }
.ba-t { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ba-t span { color: #F2C4AE; font-size: 13px; }
.ba-b { display: flex; flex-wrap: wrap; gap: 8px; }
.ba-b .act { min-height: 44px; }
#abimeeView { display: flex; flex-direction: column; gap: 14px; }

/* ===== Écrans larges (≥ 1024 px) : Projet, Profil, Historique, Réglages, Ta mémoire ===== */
.pj-grille, .pj-g, .pj-d { display: contents; }   /* petits écrans : rien ne change */
@media (min-width: 1024px) {
  #projetView { display: block; }
  .pj-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .pj-g, .pj-d { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  /* Profil : stats et badges à gauche ; Ta mémoire, « En ce moment » et la phrase à droite */
  #setView #session { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "stats memoire" "stats pins" "badges pins" "badges moti"; gap: 16px 24px; align-items: start; }
  #sessStats { grid-area: stats; } #sessBadges { grid-area: badges; } #sessMemoire { grid-area: memoire; } #heroPins { grid-area: pins; } #session > .moti { grid-area: moti; }
  /* Historique, Réglages, Ta mémoire : une colonne centrée, plus large qu'une fiche de téléphone */
  #historiqueView, #reglagesView, #memoireView { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }
  body:has(#lessonDlg[open]:not(.page)) #historiqueView, body:has(#lessonDlg[open]:not(.page)) #reglagesView, body:has(#lessonDlg[open]:not(.page)) #memoireView { max-width: 560px; margin-left: 0; margin-right: 0; }
  body:has(#lessonDlg[open]:not(.page)) #setView #session { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stats" "memoire" "pins" "badges" "moti"; }
  body:has(#lessonDlg[open]:not(.page)) .pj-grille { grid-template-columns: minmax(0, 1fr); }
}

/* ===== LerpUp : logo (icône + « Lerp » + « Up » orange), Figtree 800 ===== */
.logo { display: inline-flex; align-items: center; gap: 8px; flex: none; font-family: var(--font-brand); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; line-height: 1; color: var(--fg); white-space: nowrap; }
.logo svg { width: 24px; height: 24px; flex: none; }
.logo b { font-weight: 700; color: #FF8A3D; }
.logo-lg { font-size: 30px; gap: 10px; }
.logo-lg svg { width: 36px; height: 36px; }

/* ===== Vitrine LerpUp : accueil, salle 0, tarifs, confidentialité (maquette/lerpup-sobre.html, écrans 1 à 4) ===== */
body.vt-on .wrap { max-width: 1120px; }
.vt { display: flex; flex-direction: column; gap: 40px; }
.vt h2, .vt h3, .vt h4 { margin: 0; text-wrap: balance; }
.vt p { margin: 0; }
.vt-label { font-size: 13px; color: var(--muted); }
.vt-lead { font-size: 18px; color: var(--muted); max-width: 48ch; }
.vt-note { font-size: 13px; color: var(--muted); }
.vt-err { font-size: 14px; font-weight: 500; color: #FF6B6B; }
.vt-ok { font-size: 14px; font-weight: 500; color: var(--done-text); }
.vt-lien { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: none; background: none; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; text-decoration: none; }
.vt-lien:hover, .vt-lien.on { color: var(--fg); }
.vt-lien.on { font-weight: 600; }
.vt-conf a { color: var(--link); }
.vt-sm { height: 32px; min-height: 32px; padding: 0 12px; font-size: 14px; border-radius: 6px; }
.vt-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--panel); color: var(--muted); }
.vt-tag-ok { background: rgba(53, 214, 196, 0.12); color: var(--done-text); }
.vt-tag-plus { background: rgba(169, 155, 255, 0.12); color: var(--b3); }
.vt-titre { font-family: var(--font-brand); font-size: clamp(34px, 4.6vw, 54px); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; }
.vt-titre em { font-style: normal; color: var(--reward); }
.vt-titre-s { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; letter-spacing: -0.03em; }

.vt-nav { display: flex; align-items: center; gap: 24px; padding: 8px 0; }
.vt-liens { display: flex; gap: 20px; }
.vt-nav-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.vt-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; padding: 24px 0 8px; }
.vt-hero > div:first-child { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.vt-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.vt-rassure { font-size: 13px; color: var(--muted); }
.vt-aster-tel { display: none; }
.vt-show { display: flex; align-items: flex-end; }
.vt-pcard { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.vt-pcard h3 { font-size: 20px; font-weight: 700; }
.vt-petit { font-size: 13px; color: var(--muted); }
.vt-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vt-mini li { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: 10px; background: var(--inset); font-size: 14px; }
.vt-mini li.ok { color: var(--muted); }
.vt-mini li.ok .vt-ic { color: var(--done); }
.vt-mini li.cur { background: var(--panel); }
.vt-mini .k { margin-left: auto; font-size: 13px; color: var(--muted); }
.vt-ic { display: inline-flex; }
.vt-aster-pc { flex: none; margin: 0 0 -6px -28px; position: relative; z-index: 1; }
.vt-comment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vt-comment > div { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--surface); }
.vt-comment > div + div { border-left: 1px solid var(--line); }
.vt-comment b { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; }
.vt-comment p { font-size: 14px; color: var(--muted); }
.vt-bande { display: flex; flex-direction: column; gap: 16px; }
.vt-bande h3 { font-size: 28px; font-weight: 700; }
.vt-track { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 24px; padding: 22px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.vt-track-t h4 { font-size: 24px; font-weight: 700; }
.vt-track-t p { color: var(--muted); margin-top: 8px; }
.vt-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.vt-units { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.vt-units li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.vt-units li > span { width: 18px; flex: none; color: var(--muted); }
.vt-units small { display: block; color: var(--muted); font-size: 13px; }
.vt-mot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; max-width: 760px; padding: 24px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.vt-mot p { font-size: 16px; line-height: 1.6; }
.vt-mot .sig { margin-top: 10px; color: var(--muted); font-size: 14px; }
.vt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.vt-foot .logo { font-size: 16px; }
.vt-foot .logo svg { width: 20px; height: 20px; }
.vt-foot a.vt-lien { display: inline-flex; }

/* Salle 0 */
.vt-salle0 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.vt-sandbox { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vt-scene { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--inset); }
.vt-scene canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 7; image-rendering: pixelated; }
.vt-knobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vt-knob { min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-align: left; cursor: pointer; }
.vt-knob .sw { width: 36px; height: 20px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; }
.vt-knob .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg); transition: transform 0.12s; }
.vt-knob[aria-pressed="true"] { border-color: var(--line-2); }
.vt-knob[aria-pressed="true"] .sw { background: var(--done); }
.vt-knob[aria-pressed="true"] .sw::after { transform: translateX(16px); }
.vt-knob span:last-child { display: flex; flex-direction: column; min-width: 0; }
.vt-knob b { font-size: 14px; }
.vt-knob small { color: var(--muted); font-size: 13px; }
.vt-gagne { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; border: 2px solid var(--reward); background: var(--reward-bg); }
.vt-gagne[hidden] { display: none; }
.vt-gagne b { display: block; font-size: 18px; font-weight: 600; }
.vt-gagne p { font-size: 14px; color: var(--muted); }
.vt-cote { display: flex; flex-direction: column; gap: 16px; }
.vt-pourquoi { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.vt-pourquoi h3 { font-size: 18px; font-weight: 600; }
.vt-pourquoi p { font-size: 14px; }

/* Tarifs */
.vt-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vt-plan { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.vt-plan-plus { border: 2px solid var(--b3); }
.vt-plan h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 22px; font-weight: 600; }
.vt-plan .prix { font-size: 44px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.vt-plan .prix small { font-size: 15px; color: var(--muted); font-weight: 500; }
.vt-plan .par { font-size: 13px; color: var(--muted); }
.vt-plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.vt-plan li { display: flex; gap: 10px; align-items: flex-start; }
.vt-plan li svg { margin-top: 2px; color: var(--done); }
.vt-plan-plus li svg { color: var(--b3); }
.vt-plan .btn.wide { margin-top: auto; }
.vt-fond { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: center; padding: 22px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.vt-fond h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.vt-fond p { font-size: 14px; color: var(--muted); }
.vt-form { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vt-form-l { display: flex; flex-wrap: wrap; gap: 8px; }
.vt-form-l input { flex: 1 1 200px; min-width: 0; box-sizing: border-box; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--inset); color: var(--fg); font-size: 15px; }
.vt-case { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; color: var(--muted); cursor: pointer; }
.vt-case input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--fg); border-radius: 50%; }
.vt-faq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; font-size: 15px; }
.vt-faq b { display: block; margin-bottom: 4px; }
.vt-faq p { color: var(--muted); font-size: 14px; }
.vt-conf { display: flex; flex-direction: column; gap: 6px; max-width: 70ch; padding-top: 14px; border-top: 1px solid var(--line); }
.vt-conf h3 { font-size: 17px; font-weight: 700; }
.vt-conf p { font-size: 15px; color: var(--muted); }
@media (max-width: 900px) {
  .vt-hero, .vt-track, .vt-salle0, .vt-plans, .vt-fond, .vt-faq { grid-template-columns: 1fr; }
  .vt-hero { gap: 24px; padding-top: 8px; }
  .vt-liens, .vt-aster-pc { display: none; }
  .vt-ctas { flex-direction: column; align-self: stretch; }
  .vt-ctas .btn { width: 100%; }
  .vt-aster-tel { display: flex; justify-content: center; align-self: stretch; }
  .vt-show { display: block; }
  .vt-comment { grid-template-columns: 1fr; }
  .vt-comment > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .vt-units { grid-template-columns: 1fr; }
  .vt-knobs { grid-template-columns: 1fr; }
  .vt-mot { grid-template-columns: 1fr; justify-items: start; }
}
/* Questionnaire de départ : choix en grille, et « Ton parcours » à droite sur grand écran */
#onbView .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.onb-grille { display: flex; flex-direction: column; gap: 16px; }
.onb-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.onb-reco { display: none; }
@media (min-width: 1024px) {
  .wrap:has(.onb-grille) { max-width: 980px; }
  .onb-grille { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .onb-reco { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); position: sticky; top: 24px; }
  .onb-reco h3 { margin: 0; font-size: 22px; font-family: var(--font-title); }
  .onb-reco ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .onb-reco li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
  .onb-reco li span { color: var(--muted); }
  .onb-reco .onb-k { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
}

/* ===== Lot X, étape 4 : le Parcours (7 unités) et la salle (maquette/lerpup-sobre.html, écrans 5, 6 et 8) ===== */
.pc-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pc-crumb { margin: 0; font-size: 13px; color: var(--muted); }
.next { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px; border: 2px solid var(--fg); border-radius: 12px; background: var(--surface); }
.next-t { display: flex; flex-direction: column; min-width: 0; }
.next-t b { font-size: 17px; overflow-wrap: anywhere; }
.next-t small { font-size: 13px; color: var(--muted); }
.un-liste { display: flex; flex-direction: column; gap: 10px; }
.un-bloc { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.un-ligne, .un-tete { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 12px 16px; text-align: left; color: var(--fg); }
.un-ligne { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.un-ligne.locked .un-t b { color: var(--muted); }
.un-tete { border: 0; background: none; cursor: pointer; }
.un-n { flex: none; width: 24px; font-size: 20px; font-weight: 700; color: var(--muted); }
.un-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.un-t b { font-size: 17px; font-weight: 600; }
.un-t small { font-size: 13px; color: var(--muted); }
.un-r { flex: none; display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.un-r .bar { width: 96px; }
.un-salles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 0 16px 16px; }
.room { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--inset); color: var(--fg); text-align: left; cursor: pointer; min-width: 0; }
.room:hover { background: var(--panel); }
.room.cur { border-color: var(--fg); }
.room .pil { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.room-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.room-t b { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.room-t small { font-size: 13px; color: var(--muted); }
.room.done .room-t b { color: var(--muted); }
.room-ok { flex: none; color: var(--done); display: inline-flex; }

/* Une salle : une page (elle couvre la zone de l'écran, la navigation reste visible ; « Parcours » ramène en arrière) */
#lessonDlg.page { position: fixed; top: 0; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); width: auto; height: auto; max-height: none; margin: 0; border: 0; border-radius: 0; background: var(--bg); z-index: 25; }
#lessonDlg.page[open] { display: flex; flex-direction: column; }
#lessonDlg.page .sheet-bar { justify-content: flex-start; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--inset); }
#lessonDlg.page .sheet-bar .act { order: -1; }
#lessonDlg.page .sheet-bar h2 { font-size: 17px; font-weight: 600; }
#lessonDlg.page #lesson { box-sizing: border-box; width: 100%; max-width: 1040px; margin: 0 auto; padding: 18px 16px 28px; }
@media (min-width: 1024px) {
  #lessonDlg.page { left: 200px; bottom: 0; }
  #lessonDlg.page #lesson { padding: 28px; }
}

.sl { display: flex; flex-direction: column; gap: 16px; }
.sl-prog { display: flex; align-items: center; gap: 12px; max-width: 360px; }
.sl-prog .bar { flex: 1; }
.sl-bandeau { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--panel); font-size: 14px; }
.sl-grille { display: flex; flex-direction: column; gap: 16px; }
.sl-taches { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sl-tache { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sl-tache.ouverte { border-color: var(--line-2); }
.sl-hd { width: 100%; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 0; background: none; color: var(--fg); text-align: left; cursor: pointer; font-size: 15px; }
.sl-hd b { flex: 1; min-width: 0; font-weight: 600; }
.sl-tache.fait .sl-hd b { color: var(--muted); }
.sl-num { width: 28px; height: 28px; flex: none; border-radius: 6px; background: var(--panel); font-weight: 600; display: flex; align-items: center; justify-content: center; }
.sl-tache.fait .sl-num { background: var(--done); color: var(--bg); }
.sl-lieu { display: inline-flex; gap: 4px; color: var(--muted); }
.sl-bd { display: flex; flex-direction: column; gap: 14px; padding: 4px 16px 18px; font-size: 15px; }
@media (min-width: 1024px) { .sl-bd { padding-left: 56px; } }
.sl-bd p { margin: 0; }
.sl-k { font-size: 13px; color: var(--muted); }
.sl-carte { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 8px; background: var(--inset); border-left: 3px solid var(--pc); }
.sl-carte p { color: var(--fg); }
.sl-code, .sl-erreur { margin: 0; padding: 14px; overflow-x: auto; background: var(--inset); border: 1px solid var(--line); border-radius: 8px; font-family: var(--font-code); font-size: 13px; line-height: 1.6; }
.sl-erreur { color: #FF8F8F; white-space: pre-wrap; overflow-wrap: anywhere; }
.sl-choix, .sl-lignes { display: flex; flex-direction: column; gap: 8px; }
.sl-rep, .sl-ligne { min-height: 48px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--inset); color: var(--fg); text-align: left; font-size: 15px; cursor: pointer; }
.sl-ligne code { font-family: var(--font-code); font-size: 13px; overflow-wrap: anywhere; }
.sl-rep.ok { border: 2px solid var(--done); }
.sl-rep.ko { border: 2px solid var(--urgent, #FF6B6B); }
.sl-seq { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-family: var(--font-code); font-size: 13px; }
.sl-fb { padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.sl-fb.ok { background: rgba(53, 214, 196, 0.08); color: var(--fg); }
.sl-fb.ko { background: rgba(255, 107, 107, 0.08); color: var(--fg); }
.sl-fb b { color: var(--done-text); }
.sl-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--done-text); font-size: 14px; }
.sl-cote { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sl-aster { display: flex; gap: 12px; align-items: flex-start; }
.sl-aster .say { padding: 12px 14px; border-radius: 12px; background: var(--panel); font-size: 14px; flex: 1; }
.sl-bloque { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sl-bloque > b { display: block; padding: 14px 16px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--line); }
.sl-bloque > p, .sl-bloque > .ps-ressource { margin: 0; padding: 12px 16px; font-size: 14px; }
.sl-blocage { padding: 0 16px; }
.sl-blocage + .sl-blocage { border-top: 1px solid var(--line); }
.sl-blocage summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; font-size: 14px; }
.sl-blocage p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
@media (min-width: 1024px) {
  .sl-grille { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
}
@media (max-width: 700px) {
  .next { grid-template-columns: auto minmax(0, 1fr); }
  .next .btn { grid-column: 1 / -1; width: 100%; }
  .un-r .bar { display: none; }
}

/* ===== Lot X : composants sobres (maquette/lerpup-sobre.html, écran 9). Ce bloc l'emporte sur les règles plus haut. ===== */
:root { --link: #9DB8F0; --line-2: #3A3C45; }
h1, h2, h3, h4, h5 { letter-spacing: -0.02em; }
.ic { flex: none; }

/* Boutons : 3 hauteurs (48 action principale d'un écran, 40 par défaut, 32 dans une liste ou une barre), plats, sans ombre */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--btn); color: var(--on-btn); font-family: var(--font-body); font-weight: 600; font-size: 15px; box-shadow: none; filter: none; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 0.12s; }
.btn:hover, .btn:active { background: #FFFFFF; filter: none; transform: none; }
.btn.lg, .btn.wide, .big-btn, .v2-btn, .lesson-foot .btn { height: 48px; min-height: 48px; padding: 0 22px; font-size: 16px; border-radius: 8px; }
.btn.wide { align-self: stretch; width: 100%; margin-top: 0; }
.big-btn, .v2-btn { align-self: stretch; }
.btn-ghost, .btn.btn-ghost { background: transparent; color: var(--fg); border: 0; box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 600; font-size: 15px; padding: 0 16px; }
.btn-ghost:hover, .btn-ghost:active { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--fg); }
.btn.discret { background: none; box-shadow: none; color: var(--fg); }
.btn.discret:hover { background: var(--panel); }
.big-btn.stop { background: var(--done); color: var(--on-done); }
.big-btn.stop:hover { background: #5BE3D3; }
.act { display: inline-flex; align-items: center; justify-content: center; gap: 6px; position: relative; height: 32px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 0.12s; }
.act::after { content: ''; position: absolute; inset: -6px -2px; }   /* la zone tactile reste de 44 px */
.act:hover, .act:active { background: var(--panel); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); transform: none; }
.act[aria-pressed="true"] { background: var(--panel); box-shadow: inset 0 0 0 1px var(--fg); }
.ps-codebar .act { min-height: 32px; }
.seg button { border-radius: 8px; font-family: var(--font-body); }

/* Titre de l'écran, logo : Figtree 800 */
.logo { font-family: var(--font-body); font-weight: 800; letter-spacing: -0.03em; }
.logo b { font-weight: 800; }
h1, h2.big { font-weight: 800; letter-spacing: -0.03em; }

/* Cases rondes, badges arrondis, barres pleines */
.v2-tasks .cb::before, .crit-box, .cd-ic, .v2-box-c { border-radius: 50%; }
.badge-ok, .g-tag { border-radius: 999px; }
.bar, .v2-bar, .rbar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > i, .v2-bar > i, .rbar > i { display: block; height: 100%; border-radius: 999px; background: var(--fg); }
.bar > i.is-done { background: var(--done); }
.rbar > i, .or > i { background: var(--reward); }

/* Aster en entier : pixel art, sans lissage, taille multiple de 32 */
.aster-full { position: relative; display: inline-block; flex: none; image-rendering: pixelated; }
.aster-full img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.aster-full .idle { animation: aster-bob 1.2s steps(1) infinite; }
.aster-full .blink { opacity: 0; animation: aster-bob 1.2s steps(1) infinite, aster-blink 4s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .aster-full img { animation: none !important; } .aster-full .blink { display: none; } }

/* ===== Lot X, étape 3 : navigation (Aujourd'hui, Parcours, Projets, Profil) et écran « Aujourd'hui » ===== */
.tabbar { gap: 0; padding: 0 8px env(safe-area-inset-bottom, 0px); }
.tabbar button { flex: 1 1 0; min-height: 60px; max-width: 200px; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 500; gap: 4px; }
.tabbar button[aria-current="page"] { color: var(--fg); font-weight: 600; background: none; border: 0; }
.tab-pc { display: none !important; }
.genre-chip { display: none; }
@media (min-width: 1024px) {
  .tabbar { width: 200px; padding: 76px 12px 12px; gap: 4px; align-items: stretch; }
  .tabbar button { flex: none; width: 100%; max-width: none; min-height: 40px; height: 40px; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 0 10px; border-radius: 8px; font-size: 14px; }
  .tabbar svg { width: 18px; height: 18px; }
  .tabbar button[aria-current="page"] { background: var(--panel); box-shadow: inset 2px 0 0 var(--reward); }
  .tabbar button:hover { background: var(--panel); }
  .tab-pc { display: flex !important; }
  body { padding-left: 224px; }
  .genre-chip { display: inline-flex; }
  #suiviView, #projetsView { max-width: 640px; margin-left: auto; margin-right: auto; width: 100%; }
}
.suivi-g, .suivi-d { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.coach-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.coach-row .say { background: var(--panel); border-radius: 12px; }
.today { display: flex; flex-direction: column; gap: 8px; }
.today h3 { margin: 0; font-size: 22px; font-weight: 700; }
.todo-l { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.todo-l li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; }
.todo-l li + li { border-top: 1px solid var(--line); }
.todo-l .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.todo-l .t b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.todo-l .t small { font-size: 13px; color: var(--muted); }
.todo-l .chk { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; }
.todo-l li.done .chk { background: var(--reward); border-color: var(--reward); color: var(--on-btn); }
.todo-l li.done .t b { color: var(--muted); text-decoration: line-through; }
.later { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 12px; font-size: 14px; color: var(--muted); margin: 0; }
.sess-card.compact { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sess-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sess-sur { display: flex; flex-direction: column; min-width: 0; }
.sess-sur small { font-size: 13px; color: var(--muted); }
.sess-sur b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.sc-select[hidden] { display: none; }
.learn-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chemin-btn svg { margin-left: 2px; }
@media (min-width: 1024px) { .chemin-btn { display: none; } }

/* ===== Lot PC, étape 1 : la coque PC (≥ 1024 px) : barre latérale de 232 px, plus de barre du haut ===== */
.side-logo, .side-bas { display: none; }
@media (min-width: 1024px) {
  body { padding: 0 0 0 232px; }
  .topbar { display: none; }
  .wrap { box-sizing: border-box; width: 100%; max-width: 1200px; padding: 32px 40px 48px; margin: 0 auto; gap: 24px; }
  .tabbar { width: 232px; padding: 16px 12px 12px; gap: 4px; background: var(--inset); }
  .side-logo { display: flex; padding: 4px 10px 20px; }
  .side-bas { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
  .side-stats { display: flex; gap: 16px; padding: 4px 10px 8px; font-weight: 700; font-size: 17px; }
  .side-stats .st { display: inline-flex; align-items: center; gap: 6px; color: var(--reward); }
  .side-stats .st.off { color: var(--muted); }
  .side-lien { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 14px; cursor: pointer; text-align: left; }
  .side-lien:hover, .side-lien[aria-current="page"] { background: var(--panel); color: var(--fg); }
  .side-compte { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; font-size: 14px; color: var(--fg); min-width: 0; }
  .side-avatar { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--panel); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
  .side-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #lessonDlg.page { left: 232px; }
  #suiviView, #projetsView { max-width: none; }
}

/* ===== Lot PC, étape 2 : Aujourd'hui sur PC ===== */
.suivi-grille { display: flex; flex-direction: column; gap: 16px; }
.suivi-tete { display: flex; flex-direction: column; gap: 2px; }
.suivi-date { margin: 0; color: var(--muted); font-size: 15px; text-transform: capitalize; }
.pc-seul { display: none; }
.sess-card .chrono { font-size: 40px; font-weight: 700; color: var(--fg); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sess-card .chrono.idle { color: var(--muted); }
.sess-card .sc-k { font-size: 13px; color: var(--muted); }
.goal-bar { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.goal-bar .goal-t { font-size: 13px; color: var(--muted); }
.goal-bar .goal-t b { color: var(--fg); font-weight: 600; margin-left: 4px; }
.goal-bar .bar { grid-column: 1 / -1; grid-row: 2; }
.goal-bar .act { grid-row: 1; grid-column: 2; }
.pj-urgent { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.pj-bas { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pj-ech { font-size: 13px; color: var(--muted); }
.pj-ech.urgent { color: var(--urgent, #FF6B6B); font-weight: 600; }
@media (min-width: 1024px) {
  .suivi-grille { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
  .suivi-g, .suivi-d { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .pc-seul { display: flex; flex-direction: column; gap: 16px; }
  .sess-card.compact .btn.lg { width: 100%; }
}

/* ===== Lot PC, étape 3 : Parcours sur PC ===== */
.pc-d { display: none; }
.pc-g { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pc-seg { display: inline-flex; }
@media (min-width: 1024px) {
  .tel-seul { display: none !important; }
  .chemin-btn { display: inline-flex !important; }
  .pc-grille { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
  .pc-d { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 32px; }
  .pc-tete { align-items: center; }
  #learnHead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  #learnHead .learn-acts { margin-top: 0; }
  .pc-seg button { height: 40px; min-height: 40px; min-width: 0; padding: 0 16px; font-size: 14px; font-weight: 600; border-radius: 6px; }
  .pc-prog { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
  .pc-prog h3 { margin: 0; font-size: 18px; font-weight: 700; }
  .pc-prog dl { margin: 0; display: flex; flex-direction: column; }
  .pc-prog dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
  .pc-prog dt { color: var(--muted); }
  .pc-prog dd { margin: 0; font-weight: 600; text-align: right; }
  /* « Voir la fiche » : 40 px, à droite de la carte */
  .v2-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; }
  .v2-head > .v2-btn { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: auto; height: 40px; min-height: 40px; padding: 0 16px; font-size: 15px; }
}

/* ===== Lot PC, étape 4 : Projets sur PC ===== */
.pc-titre { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pj-cartes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 1280px) { .pj-cartes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pj-grille-pc { display: flex; flex-direction: column; gap: 24px; }
.pj-cartes .v2-pcard { height: 100%; }
.pj-archives summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--muted); font-size: 15px; }
.pj-archives[open] summary { margin-bottom: 12px; }

/* ===== Lot PC, étape 5 : Profil sur PC ===== */
@media (min-width: 1024px) {
  #setView #session { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "stats stats" "semaine memoire" "badges pins" "badges moti"; gap: 24px; align-items: start; }
  #profilSemaine { grid-area: semaine; display: flex; flex-direction: column; gap: 16px; }
  #sessStats { grid-area: stats; } #sessBadges { grid-area: badges; } #sessMemoire { grid-area: memoire; } #heroPins { grid-area: pins; } #session > .moti { grid-area: moti; }
  .v2-stats3 { grid-template-columns: repeat(4, 1fr); }
  .v2-stats3 > div { padding: 20px; gap: 4px; }
  .v2-stats3 b { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
  .v2-stats3 span { font-size: 14px; }
  .pc-memoire { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px 0; font-size: 14px; color: var(--muted); }
  body:has(#lessonDlg[open]:not(.page)) #setView #session { grid-template-areas: "stats" "semaine" "memoire" "pins" "badges" "moti"; }
}
@media (max-width: 1023px) { #profilSemaine { display: none; } }

/* ===== Lot PC, étape 6 : Réglages, Historique et Révisions sur PC ===== */
.hi-grille, .hi-liste { display: contents; }
.rg-pc { display: none; }
@media (min-width: 1024px) {
  #reglagesView, #historiqueView { max-width: none; margin-left: 0; margin-right: 0; }
  .rg-pc { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
  .rg-menu { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 32px; }
  .rg-menu button { height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 14px; text-align: left; cursor: pointer; }
  .rg-menu button:hover, .rg-menu button[aria-current="true"] { background: var(--panel); color: var(--fg); }
  .rg-menu button[aria-current="true"] { font-weight: 600; box-shadow: inset 2px 0 0 var(--reward); }
  .rg-corps { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 720px; }
  .rg-titre { margin: 0; font-size: 20px; font-weight: 700; }
  .hi-grille { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
  .hi-filtres { flex-direction: column; flex-wrap: nowrap; align-items: stretch; position: sticky; top: 32px; }
  .hi-filtres .v2-chip { justify-content: flex-start; }
  .hi-liste { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  #revisionView { max-width: 640px; margin-left: auto; margin-right: auto; width: 100%; }
  .rev-raccourcis { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
}
.v2-stats3 > .pc-seul { display: none; }
@media (min-width: 1024px) { .v2-stats3 > .pc-seul { display: flex; } }

/* ===== Lot V, étape 1 : grille d'espacement (8, 16, 24, 32, 48) et en-tête d'écran commun ===== */
:root { --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; }
/* En-tête commun : titre (et sous-titre) à gauche, actions ou sélecteur à droite, alignés en bas, puis 24 px avant le contenu */
.pc-tete { align-items: flex-end; gap: var(--s2); margin-bottom: var(--s3); }
.pc-tete h2, .pc-tete h3 { margin: 0; }
.pc-sub { margin: var(--s1) 0 0; font-size: 15px; color: var(--muted); }
.pc-g { gap: var(--s2); }
.un-liste { gap: var(--s2); }
.un-salles { gap: var(--s1); padding: 0 var(--s2) var(--s2); }
.sl, .sl-grille, .sl-cote { gap: var(--s2); }
.sl-taches { gap: var(--s1); }
.sl-bd { gap: var(--s2); padding: var(--s1) var(--s2) var(--s2); }
@media (min-width: 1024px) {
  #pisteCrumbs { display: none; }
  .pc-grille { gap: var(--s3); align-items: start; }
  .pc-tete { align-items: flex-end; }
  .pc-d { top: var(--s4); gap: var(--s2); }
  .pc-prog { gap: var(--s2); padding: var(--s3); }
  .un-bloc, .un-ligne { width: 100%; }
  .sl-grille { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s3); align-items: start; }
}

/* ===== Lot V, étape 2 : la tâche Prouver (4 groupes) ===== */
.pv { display: flex; flex-direction: column; gap: var(--s3); }
.pv-n { margin: 0; font-size: 14px; color: var(--muted); }
.pv-grp { display: flex; flex-direction: column; gap: var(--s1); }
.pv-grp > header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.pv-grp > header b { font-size: 17px; font-weight: 700; }
.pv-grp > header small { font-size: 13px; color: var(--muted); }
.pv-ligne { display: flex; align-items: center; gap: var(--s1); padding: var(--s2); border: 1px solid var(--line); border-radius: 8px; background: var(--inset); font-size: 15px; flex-wrap: wrap; }
.pv-ligne.ok .pv-st { color: var(--done-text); }
.pv-st { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.pv-ask { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2); border: 1px solid var(--line); border-radius: 8px; background: var(--inset); }
.pv-ask p { margin: 0; }
.pv-rep { padding: var(--s2); border-radius: 8px; background: var(--surface); border: 1px solid var(--line-2); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-ai { display: flex; gap: var(--s1); align-items: flex-start; font-size: 14px; }
.pv-ai.ok { color: var(--done-text); }
.pv-valid { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; padding-top: var(--s2); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pv-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--done-text); }
.pv-valid .btn.blocked { opacity: 0.45; }

/* ===== Lot V, étape 3 : les 4 étapes du Testeur LerpUp dans la tâche Faire ===== */
.tt { display: flex; flex-direction: column; gap: var(--s2); }
.tt-pas { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s2); align-items: start; }
.tt-n { width: 28px; height: 28px; border-radius: 50%; background: var(--panel); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.tt-pas > div { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.tt-seed { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.tt-seed b { font-size: 24px; letter-spacing: 0.08em; }
.tt-url { display: block; flex: 1; min-width: 0; padding: var(--s1) var(--s2); border-radius: 8px; background: var(--inset); border: 1px solid var(--line); font-family: var(--font-code); font-size: 13px; overflow-wrap: anywhere; }
.tt-code { display: flex; gap: var(--s1); flex-wrap: wrap; }
.tt-in { flex: 1; min-width: 180px; height: 48px; padding: 0 var(--s2); border-radius: 8px; border: 1px solid var(--line-2); background: var(--inset); font-family: var(--font-code); font-size: 15px; text-transform: uppercase; }

/* ===== Lot V, étape 4 : réponses libres (Explique) ===== */
.pv-ta { width: 100%; min-height: 96px; padding: var(--s2); border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font-size: 15px; resize: vertical; }
.pv-acts { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.pv-cpt { margin-left: auto; font-size: 13px; color: var(--muted); }
.pv-ai.ko { color: var(--fg); }
.pv-ai.ko b { color: #FF8F8F; }

/* ===== Lot V, étape 5 : Aujourd'hui en tableau de bord ===== */
.tb-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.tb-kpi { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.tb-k { display: inline-flex; align-items: center; gap: var(--s1); font-size: 14px; color: var(--muted); }
.tb-kpi b { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.tb-kpi b.or { color: var(--reward); }
.tb-kpi small { font-size: 13px; color: var(--muted); }
.tb-resume { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s2); align-items: center; padding: var(--s3); border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.tb-resume-t { display: flex; flex-direction: column; min-width: 0; }
.tb-resume-t b { font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.tb-resume-t small { font-size: 13px; color: var(--muted); }
.tb-h { margin: var(--s1) 0 0; font-size: 20px; font-weight: 700; }
.tb-lien { display: inline; padding: 0; border: 0; background: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.goal-ring { display: flex; align-items: center; gap: var(--s2); }
.goal-ring .goal-t { display: flex; flex-direction: column; font-size: 14px; color: var(--muted); }
.goal-ring .goal-t b { color: var(--fg); font-size: 17px; }
.sess-card.libre { display: flex; flex-direction: column; gap: var(--s2); }
.tb-heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.tb-heat i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--track); }
.tb-heat i.c1 { background: rgba(255, 138, 61, 0.45); }
.tb-heat i.c2 { background: var(--reward); }
.tb-heat i.auj { outline: 1px solid var(--fg); }
.tb-heatcard { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
@media (min-width: 1024px) {
  #suiviView { gap: var(--s3); }
  .suivi-g .coach-card .mini-btns { display: none; }
}
@media (max-width: 1023px) { .tb-kpis, .tb-resume, .sess-card.libre, .tb-h, .tb-heatcard { display: none !important; } }

/* ===== Lot V, étape 6 : profil façon plateforme (PC) et page publique ===== */
.moi { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--s3); align-items: start; }
.moi-id, .moi-d { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.moi-pseudo { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.moi-meta { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s1); font-size: 14px; color: var(--muted); }
.moi-meta span { display: inline-flex; align-items: center; gap: 6px; }
.moi-bio { margin: 0; font-size: 15px; } .moi-bio.vide { color: var(--muted); }
.moi-btns { display: flex; gap: var(--s1); }
.aster-tenue { width: 128px; height: 128px; image-rendering: pixelated; image-rendering: crisp-edges; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.moi-carte { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.moi-carte h3 { margin: 0; font-size: 17px; font-weight: 700; }
.moi-tete { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.moi-k { font-size: 13px; color: var(--muted); }
.moi-chk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); font-size: 14px; }
.moi-chk li { display: flex; align-items: center; gap: var(--s1); color: var(--muted); } .moi-chk li.done { color: var(--fg); }
.moi-chk .chk { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--ctl); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.moi-chk li.done .chk { background: var(--done); border-color: var(--done); color: var(--bg); }
.moi-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.moi-annee { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.moi-annee i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--track); }
.moi-annee i.c1 { background: rgba(255, 138, 61, 0.45); } .moi-annee i.c2 { background: var(--reward); }
.moi-comp { display: flex; flex-direction: column; gap: var(--s1); }
.moi-ligne { display: grid; grid-template-columns: 120px minmax(0, 1fr) 56px; gap: var(--s2); align-items: center; font-size: 14px; }
.moi-ligne small { text-align: right; color: var(--muted); }
.moi-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s2); }
.moi-bdg { display: flex; flex-direction: column; align-items: center; gap: var(--s1); text-align: center; font-size: 13px; color: var(--muted); }
.moi-bdg.got { color: var(--fg); }
.moi-bdg .hx { width: 56px; height: 64px; display: flex; align-items: center; justify-content: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--track); color: var(--muted); }
.moi-bdg.got .hx { background: var(--reward); color: var(--on-reward); }
.moi-form { display: flex; flex-direction: column; gap: var(--s1); }
.moi-form input:not([type=checkbox]), .moi-form textarea { min-height: 44px; padding: var(--s1) var(--s2); border-radius: 8px; border: 1px solid var(--line-2); background: var(--inset); color: var(--fg); font-size: 15px; }
.moi-tenues { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s1); }
.moi-tenue { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s1); border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: 12px; cursor: pointer; min-height: 44px; }
.moi-tenue.on { border: 2px solid var(--reward); } .moi-tenue.lock img { opacity: 0.4; } .moi-tenue .lk { position: absolute; top: 8px; right: 8px; }
.moi-tenue .aster-tenue { width: 64px; height: 64px; }
.moi-sw { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s1) 0; font-size: 15px; }
.moi-sw small { display: block; color: var(--muted); font-size: 13px; }
.moi-fin { display: flex; justify-content: flex-end; gap: var(--s1); margin-top: var(--s2); }
.page-publique { background: var(--bg); color: var(--fg); }
.pp-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); max-width: 1120px; margin: 0 auto; padding: var(--s3) var(--s2); }
.pp-main { max-width: 1120px; padding: 0 var(--s2) var(--s5); }
@media (max-width: 1023px) {
  .moi { grid-template-columns: minmax(0, 1fr); }
  .moi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .moi-ligne { grid-template-columns: 90px minmax(0, 1fr) 48px; }
  .page-publique .moi { display: grid; }
}
@media (min-width: 1024px) {
  #sessStats, #sessBadges { display: none; }
  #setView #session { grid-template-areas: "semaine memoire" "pins moti"; }
  body:has(#lessonDlg[open]:not(.page)) #setView #session { grid-template-areas: "semaine" "memoire" "pins" "moti"; }
}
/* Correctif : une unité fermée ne dépasse plus de la largeur (padding et trait comptés dans les 100 %) */
.un-ligne, .un-tete, .un-bloc { box-sizing: border-box; max-width: 100%; }

/* ===== Gamification, lot 1 : cohérence sur PC (maquette lerpup-gamification.html, écran 5) ===== */
@media (min-width: 1024px) {
  /* 1. Un seul retour : flèche + nom de l'écran d'avant, 32 px, sans cadre, en haut à gauche */
  .back, #lessonDlg.page .sheet-bar [data-action="closeLesson"] { min-height: 32px; height: 32px; padding: 0 var(--s1) 0 0; border: 0; background: none; border-radius: 6px; color: var(--muted); font-size: 15px; font-weight: 500; }
  .back:hover, #lessonDlg.page .sheet-bar [data-action="closeLesson"]:hover { background: none; color: var(--fg); }
  #lessonDlg.page .sheet-bar { border-bottom: 0; background: none; padding: var(--s2) var(--s4) 0; }
  #lessonDlg.page .sheet-bar h2 { display: none; }
  /* 2. Une ligne = un lien */
  .todo-l.lignes { gap: var(--s1); }
  /* 4. Messages en bas à droite, empilés */
  .toast.pile { position: fixed; left: auto; top: auto; right: var(--s3); bottom: var(--s3); transform: none; opacity: 1; width: 340px; max-width: calc(100vw - 2 * var(--s3)); padding: 0; border: 0; background: none; box-shadow: none; display: flex; flex-direction: column; gap: var(--s1); pointer-events: none; z-index: 70; }
  .toast.pile:empty { display: none; }
  .toast-item { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s2); padding: var(--s2); border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); animation: toast-entre 0.2s ease-out; font-size: 14px; font-weight: 400; }
  .toast-item.reward { border-color: var(--reward); }
  .toast-item .ti-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(53, 214, 196, 0.14); color: var(--done-text); }
  .toast-item.reward .ti-ic { background: var(--reward-bg); color: var(--reward); }
  .toast-item .ti-t { display: flex; flex-direction: column; min-width: 0; }
  .toast-item b { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
  .toast-item small { color: var(--muted); font-size: 13px; }
  /* 5. Historique : les filtres en rangée de pastilles de 32 px au-dessus de la liste */
  .hi-grille { display: flex; flex-direction: column; gap: var(--s2); }
  .hi-filtres { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s1); }
  .hi-filtres .v2-chip { min-height: 32px; height: 32px; padding: 0 var(--s2); border-radius: 16px; justify-content: center; }
  .hi-liste { gap: var(--s2); }
}
.lg-ligne { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 56px; padding: var(--s1) var(--s2); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); text-align: left; font: inherit; cursor: pointer; }
button.lg-ligne:hover { border-color: var(--line-2); background: var(--inset); }
.lg-ligne.statique { cursor: default; color: var(--muted); }
.lg-ic { flex: none; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--inset); color: var(--muted); }
.todo-l.lignes li.done .lg-ic { color: var(--done-text); }
.lg-ligne .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lg-ligne .t b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.lg-ligne .t small { font-size: 13px; color: var(--muted); }
.lg-info { flex: none; font-size: 13px; color: var(--muted); }
.lg-ch { flex: none; color: var(--muted); display: inline-flex; }
@keyframes toast-entre { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast-item { animation: none; } }
.todo-l.lignes li, .todo-l.lignes li.done { border: 0; padding: 0; background: none; }

/* ===== Gamification, lot 2 : Aujourd'hui (carte Prochaine étape, défis, ta semaine) et la salle ===== */
.tb-etape { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s3); border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.te-corps { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.te-k { font-size: 13px; color: var(--muted); }
.te-titre { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.te-tache { margin: 0; font-size: 14px; color: var(--muted); }
.bar.tq > i, .te-bar > i { background: var(--done); }
.te-why { margin: 0; font-size: 15px; color: var(--fg); }
.tb-carte { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tb-tete { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.tb-tete h3 { margin: 0; font-size: 17px; font-weight: 700; }
.tb-k2 { font-size: 13px; color: var(--muted); }
.tb-defi { display: flex; flex-direction: column; gap: 6px; }
.td-t { display: flex; justify-content: space-between; gap: var(--s1); font-size: 14px; }
.td-t small { color: var(--muted); font-size: 13px; }
.tb-defi.fait .td-t small { color: var(--reward); font-weight: 600; }
.tb-jours { display: flex; justify-content: space-between; gap: var(--s1); }
.tb-jour { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.tb-jour i { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); background: none; color: var(--bg); }
.tb-jour.actif i { background: var(--reward); border-color: var(--reward); color: var(--on-reward); }
.tb-jour.repos i { border: 1.5px dashed #9B8AF0; color: #9B8AF0; }
.tb-jour.manque i { background: var(--track); border-color: var(--track); }
.tb-jour.auj i { border-width: 2px; border-color: var(--fg); }
.tb-jour.auj small { color: var(--fg); font-weight: 800; }
.tb-jour.actif.auj i { border-color: var(--reward); }
/* La salle : titre de 30 px, barre turquoise sur toute la largeur, étiquettes à la place des icônes */
.sl .obj-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.sl-prog { display: flex; align-items: center; gap: var(--s2); max-width: none; width: 100%; }
.sl-prog .bar { flex: 1; height: 8px; border-radius: 4px; }
.sl-prog .bar > i { transition: width 0.6s ease-out; }
.sl-prog-t { flex: none; white-space: nowrap; font-size: 14px; color: var(--muted); }
.sl-lieu { font-size: 13px; color: var(--muted); padding: 2px var(--s1); border: 1px solid var(--line-2); border-radius: 12px; white-space: nowrap; }
.sl-num { position: relative; }
.sl-tache.fait .sl-num { background: var(--done); color: var(--bg); }
.sl-tache.nouveau .sl-num { animation: coche-rebond 0.45s ease-out; }
.sl-tache.nouveau .sl-num::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--done); animation: coche-cercle 0.6s ease-out forwards; pointer-events: none; }
@keyframes coche-rebond { 0% { transform: scale(0.6); } 55% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes coche-cercle { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sl-tache.nouveau .sl-num, .sl-tache.nouveau .sl-num::after { animation: none; } .sl-prog .bar > i { transition: none; } }

/* ===== Gamification, lot 3 : salle terminée, nouveau rang, nouveau badge (PC) ===== */
.fin-dlg, .rang-dlg { padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg); color: var(--fg); }
.fin-dlg { width: min(960px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow: auto; }
.fin-dlg::backdrop, .rang-dlg::backdrop { background: rgba(0, 0, 0, 0.72); }
.fin-grille { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s4); padding: var(--s4); }
.fin-g, .fin-d { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.fin-sol { display: flex; align-items: flex-end; justify-content: center; height: 148px; border-bottom: 2px solid var(--line-2); }
.fin-saut { display: inline-block; animation: fin-saut 0.7s ease-out 0.15s 1 both; }
.fin-k { margin: 0; font-size: 14px; font-weight: 700; color: var(--done-text); }
.fin-titre { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; outline: none; }
.fin-resume { margin: 0; font-size: 15px; color: var(--muted); }
.fin-unite { display: flex; flex-direction: column; gap: var(--s1); }
.fin-unite-t { font-size: 14px; }
.fin-segs { display: flex; gap: 4px; }
.fin-segs i { flex: 1; height: 8px; border-radius: 4px; background: var(--track); }
.fin-segs i.fait { background: var(--done); }
.fin-segs i.courant { background: var(--done); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--done); animation: fin-brille 1.2s ease-in-out 2; }
.fin-suivant { display: flex; flex-direction: column; gap: 2px; padding: var(--s2); border: 1.5px dashed var(--line-2); border-radius: 12px; }
.fin-suivant small { color: var(--muted); font-size: 13px; }
.fin-d h3 { margin: 0; font-size: 20px; font-weight: 700; }
.fin-lignes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); }
.fin-ligne, .fin-total { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s1) var(--s2); border-radius: 8px; background: var(--surface); border: 1px solid var(--line); animation: fin-ligne 0.35s ease-out both; animation-delay: calc(0.4s + var(--k) * 0.2s); }
.fin-ligne b, .fin-total b { color: var(--reward); font-weight: 800; white-space: nowrap; }
.fin-total { margin: 0; border-color: var(--reward); background: var(--reward-bg); font-weight: 700; }
.fin-rang { display: flex; flex-direction: column; gap: var(--s1); }
.fin-rang-t { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s1); }
.fin-rang-t small { color: var(--reward); font-weight: 700; }
.fin-rang .bar > i { transition: width 0.8s ease-out; }
.fin-tenue { display: flex; align-items: center; gap: var(--s2); padding: var(--s2); border: 1px solid var(--reward); border-radius: 12px; background: var(--reward-bg); }
.fin-tenue span { display: flex; flex-direction: column; }
.fin-tenue small { color: var(--muted); font-size: 13px; }
.fin-boutons { display: flex; gap: var(--s2); justify-content: flex-end; padding: 0 var(--s4) var(--s4); }
.fin-plus { position: absolute; right: 0; top: -4px; color: var(--reward); font-weight: 800; font-size: 14px; animation: fin-plus 1.4s ease-out forwards; pointer-events: none; }
#sideBas .side-stats .st { position: relative; }
.rang-dlg { width: min(520px, calc(100vw - 48px)); overflow: hidden; z-index: 90; }
#rangCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rang-in { position: relative; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); align-items: stretch; }
.rang-nom { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -0.03em; color: var(--reward); animation: fin-ligne 0.5s ease-out both; }
.rang-echelle { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rang-echelle li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--s1); align-items: center; font-size: 14px; color: var(--muted); }
.rang-echelle li.passe, .rang-echelle li.courant { color: var(--fg); }
.rang-echelle li.courant { font-weight: 800; color: var(--reward); }
.rang-echelle .rg-pt { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--ctl); display: inline-flex; align-items: center; justify-content: center; }
.rang-echelle li.passe .rg-pt, .rang-echelle li.courant .rg-pt { background: var(--done); border-color: var(--done); color: var(--bg); }
.rang-echelle small { color: var(--muted); }
.moi-bdg.brille .hx { animation: fin-brille 1s ease-in-out 2; }
@keyframes fin-saut { 0% { transform: translateY(0); } 45% { transform: translateY(-48px); } 100% { transform: translateY(0); } }
@keyframes fin-ligne { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fin-brille { 0%, 100% { filter: none; } 50% { filter: brightness(1.7) drop-shadow(0 0 8px var(--reward)); } }
@keyframes fin-plus { 0% { opacity: 0; transform: translateY(8px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px); } }
@media (prefers-reduced-motion: reduce) {
  .fin-saut, .fin-ligne, .fin-total, .fin-segs i.courant, .fin-plus, .rang-nom, .moi-bdg.brille .hx { animation: none; }
  .fin-rang .bar > i { transition: none; }
}
@media (max-width: 1023px) { #finDlg, #rangDlg { width: calc(100vw - 24px); } .fin-grille { grid-template-columns: minmax(0, 1fr); padding: var(--s2); } }

/* ===== Carnet de bord, lot A : Mon jeu (étapes, journal, « Je bloque sur… ») ===== */
.side-lien.plus { color: var(--b3); }
.side-lien.plus:hover { color: var(--b3); }
.jeu-tete { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.jeu-id { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.jeu-id h2 { margin: 0; overflow-wrap: anywhere; }
.jeu-sous { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--muted); font-size: 14px; }
.jeu-actions { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; }
.jeu-carte { padding: var(--s2); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.jeu-k { color: var(--muted); font-size: 13px; }
.jeu-etapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s1); }
.jeu-etape { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 76px; padding: 12px; text-align: left; color: var(--muted); cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: none; }
.jeu-etape b { color: var(--fg); font-size: 15px; }
.jeu-etape small { font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.jeu-etape:hover { background: rgba(237, 238, 240, 0.05); }
.jeu-etape.vue { border-color: var(--fg); }
.jeu-etape.courante .je-pt { border-color: var(--reward); background: var(--reward); }
.jeu-etape.fait .je-pt { border-color: var(--done); background: var(--done); color: var(--bg); }
.je-pt { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ctl); display: inline-flex; align-items: center; justify-content: center; }
.je-pt svg { width: 12px; height: 12px; }
.jeu-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); align-items: start; }
.jeu-g, .jeu-d { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.v2-tasks li.now { box-shadow: inset 3px 0 0 var(--reward); }
.jeu-now { color: var(--reward); font-size: 12px; font-weight: 700; }
.jeu-sems { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s1); align-items: end; height: 96px; }
.jeu-sem { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.jeu-sem i { display: block; width: 100%; min-height: 3px; border-radius: 3px; background: var(--reward); }
.jeu-sem small { color: var(--muted); font-size: 11px; }
.jr-liste { display: flex; flex-direction: column; border-radius: 12px; background: var(--panel); }
.jr-entree { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: var(--s2); padding: var(--s2); }
.jr-entree + .jr-entree { border-top: 1px solid var(--line); }
.jr-quand { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.jr-quand b { color: var(--fg); font-size: 14px; }
.jr-corps { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.jr-corps p { margin: 0; overflow-wrap: anywhere; }
.jr-vide { color: var(--muted); }
.jr-vignette .thumb img { display: block; width: 160px; max-width: 100%; height: auto; border-radius: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tagf { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: rgba(255, 138, 61, 0.14); color: var(--reward); font-size: 13px; font-weight: 600; }
.tag-idee { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--track); color: var(--muted); font-size: 13px; }
.jr-bloc { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2); border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.jr-bloc h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 17px; }
.jr-bloc textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 64px; padding: 10px 12px; border: 1px solid var(--ctl); border-radius: 8px; background: var(--inset); color: var(--fg); }
.jr-bloc .btn { align-self: flex-start; }
.jr-sugg { display: flex; align-items: center; gap: var(--s1); width: 100%; min-height: 56px; padding: 8px 12px; text-align: left; color: var(--fg); cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: var(--inset); }
.jr-sugg:hover { border-color: var(--fg); }
.jr-sugg .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.jr-sugg .t small { color: var(--muted); font-size: 13px; }
@media (min-width: 1024px) { .jeu-cols { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 700px) { .jeu-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .jr-entree { grid-template-columns: minmax(0, 1fr); gap: 4px; } .jr-quand { flex-direction: row; gap: 8px; align-items: baseline; } }

/* ===== Carnet de bord, lot B : questionnaire (ton jeu), premier jour, Aujourd'hui ===== */
.tabbar button.vide { opacity: 0.45; }
.jeu-genres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jeu-ou { flex-wrap: wrap; }
.or-line { text-align: center; color: var(--muted); font-size: 14px; }
.jeu-nouveau { display: flex; flex-direction: column; gap: var(--s2); max-width: 640px; }
.pj1-grille { display: flex; flex-direction: column; gap: var(--s3); max-width: 880px; }
.tb-etape.pj1 { align-items: center; }
.pj1-cadres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.pj1-cadre { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: var(--s2); border: 1.5px dashed var(--ctl); border-radius: 12px; color: var(--muted); }
.pj1-cadre b { color: var(--fg); }
.pj1-cadre small { font-size: 13px; }
@media (max-width: 1023px) { .tb-etape.pj1 { grid-template-columns: minmax(0, 1fr); } .tb-etape.pj1 .coach { display: none; } .tb-etape.pj1 .btn { width: 100%; justify-content: center; } }
@media (max-width: 700px) { .jeu-genres { grid-template-columns: minmax(0, 1fr); } .pj1-cadres { grid-template-columns: minmax(0, 1fr); } }
.suivi-date.libre { text-transform: none; }
.tel-rapide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1); } .tel-rapide .btn { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 8px; }

/* ===== Carnet de bord, lot C : le Parcours en chemin ===== */
.chemin { position: relative; display: flex; flex-direction: column; gap: var(--s2); padding-left: var(--s3); }
.chemin::before { content: ''; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.chemin > .un-bloc, .chemin > .un-ligne { position: relative; }
.chemin > .un-bloc::before, .chemin > .un-ligne::before { content: ''; position: absolute; left: calc(-1 * var(--s3) + 2px); top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ctl); }
.chemin > .un-bloc.fini::before { background: var(--done); border-color: var(--done); }
.chemin > .un-bloc.cur::before { background: var(--reward); border-color: var(--reward); }
.chemin > .un-bloc.cur { border-color: var(--ctl); }
.un-n.ok { color: var(--done); display: inline-flex; align-items: center; }
.un-r.ok { color: var(--done-text); }
.un-ligne.locked .un-t small { color: var(--muted); }
.room { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.room .st { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ctl); display: inline-flex; align-items: center; justify-content: center; }
.room .st.ok { background: var(--done); border-color: var(--done); color: var(--bg); }
.room .st svg { width: 12px; height: 12px; }
.room.go { border: 2px solid var(--fg); background: var(--surface); }
.room .dur { flex: none; color: var(--muted); font-size: 13px; }
.room .vskill { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 6px; border-radius: 999px; background: var(--done-bg); color: var(--done-text); font-size: 13px; font-weight: 600; }
.room .vskill svg { width: 14px; height: 14px; }
.room .btn.sm { flex: none; min-height: 32px; padding: 0 14px; font-size: 14px; display: inline-flex; align-items: center; }
.un-salles { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .un-salles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .un-salles .room.go { grid-column: 1 / -1; } }

/* ===== Carnet de bord, lot C : Mémoire, fiches, retour après une pause, auto-contrôle ===== */
.pause { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border: 1px solid var(--b3); border-radius: 12px; background: rgba(169, 155, 255, 0.1); }
.pause-t { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pause-t b { font-size: 17px; }
.pause-t small { color: var(--muted); font-size: 14px; }
.fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s2); }
.fiche { display: flex; flex-direction: column; text-align: left; color: var(--fg); cursor: pointer; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.fiche:hover { border-color: var(--ctl); }
.fiche .bd { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2); }
.fiche .bd > b { font-size: 17px; }
.params { display: flex; flex-direction: column; gap: 4px; }
.params span { display: flex; justify-content: space-between; gap: var(--s1); font-size: 13px; color: var(--muted); }
.params em { font-style: normal; color: var(--fg); text-align: right; overflow-wrap: anywhere; }
.fiche .ft { display: flex; justify-content: space-between; gap: var(--s1); flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.ab { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--inset); max-height: 140px; overflow: hidden; }
.ab img { display: block; width: 100%; height: 140px; object-fit: cover; image-rendering: pixelated; }
.ab.cap { grid-template-columns: 1fr; }
.ab .lb { position: absolute; bottom: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(11, 12, 15, 0.8); font-size: 11px; }
.ab .lb.l { left: 6px; } .ab .lb.r { right: 6px; }
.fiche-detail { display: flex; flex-direction: column; gap: var(--s2); }
.fiche-detail .ab { border-radius: 10px; max-height: 220px; }
.fd-t { font-size: 20px; } .fd-th { color: var(--muted); font-size: 13px; }
.mem-detail { padding: var(--s1) 0; } .mem-detail summary { cursor: pointer; color: var(--muted); font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.jr-actions { display: flex; }
.regl-saisie { display: flex; flex-direction: column; gap: var(--s1); }
.regl-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--s1); align-items: center; }
.regl-ligne input { min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid var(--ctl); border-radius: 8px; background: var(--inset); color: var(--fg); }
.pv-modele { padding: var(--s2); border-radius: 10px; border: 1px dashed var(--ctl); background: var(--inset); display: flex; flex-direction: column; gap: 6px; }
.pv-modele p, .pv-modele ul { margin: 0; font-size: 14px; }
.pv-det summary { cursor: pointer; color: var(--muted); font-size: 14px; min-height: 32px; display: flex; align-items: center; }

/* ===== Carnet de bord, lot D : le défi jouable « Reproduis ce saut » ===== */
.df { display: flex; flex-direction: column; gap: var(--s2); max-width: 880px; padding: var(--s2); }
.df .big { margin: 0; }
.sj { display: flex; flex-direction: column; gap: var(--s2); }
.sj-scene { position: relative; border-radius: 12px; overflow: hidden; background: var(--inset); border: 1px solid var(--line); }
.sj-svg { display: block; width: 100%; height: auto; }
.sj-score { position: absolute; top: 12px; right: 16px; display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--muted); }
.sj-pct { font-size: 34px; line-height: 1; font-weight: 800; color: var(--fg); letter-spacing: -0.02em; }
.sj-pct.gagne { color: var(--done); }
.sj-legende { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); color: var(--muted); font-size: 13px; }
.sj-legende i { display: inline-block; width: 22px; height: 0; border-top: 2px dashed #9B9DA6; vertical-align: middle; margin-right: 6px; }
.sj-legende i.me { border-top: 3px solid var(--reward); }
.sj-legende i.ref { border-top: 2px solid #5B5E6B; }
.sj-actions { display: flex; flex-wrap: wrap; gap: var(--s1); }
.sj-reglages { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s2); border-radius: 12px; background: var(--panel); }
.sj-reglage > div { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 14px; }
.sj-reglage code { font-family: var(--font-code); color: var(--reward); }
.sj-reglage input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--reward); }
@media (prefers-reduced-motion: reduce) { .sj-hero { transition: none; } }

/* ===== Carnet de bord, lot E : vitrine, tarifs, profil public en portfolio ===== */
.vt-jour { display: flex; gap: var(--s2); align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--inset); font-size: 14px; }
.vt-jour span { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); flex: none; min-width: 52px; }
.vt-jour span b { color: var(--fg); font-size: 13px; }
.vt-jour p { margin: 0; }
.vt-sugg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--reward); background: rgba(255, 138, 61, 0.08); font-size: 14px; }
.vt-sugg > span:first-child { color: var(--reward); flex: none; margin-top: 2px; }
.vt-sugg small { display: block; color: var(--muted); font-size: 13px; }
.vt-defi { display: flex; flex-direction: column; gap: var(--s2); max-width: 880px; }
.moi-jeu { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s1) 0; }
.moi-jeu + .moi-jeu { border-top: 1px solid var(--line); }
.moi-jeu-ic { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--inset); color: var(--reward); }
.moi-jeu > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: flex-start; }
.moi-jeu p { margin: 0; color: var(--muted); font-size: 14px; }
.moi-jeu .btn.sm { min-height: 32px; padding: 0 12px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.moi-pills { display: flex; flex-wrap: wrap; gap: var(--s1); }
.vskill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 6px; border-radius: 999px; background: var(--done-bg); color: var(--done-text); font-size: 13px; font-weight: 600; }
.vskill svg { width: 14px; height: 14px; }
.moi-journal { display: flex; flex-direction: column; }
.moi-entree { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: var(--s2); padding: var(--s1) 0; }
.moi-entree + .moi-entree { border-top: 1px solid var(--line); }
.moi-entree span { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.moi-entree span b { color: var(--fg); font-size: 14px; }
.moi-entree p { margin: 0; overflow-wrap: anywhere; }
.jr-pub { font-size: 13px; color: var(--muted); }
.jr-actions { flex-wrap: wrap; gap: var(--s2); align-items: center; }
@media (max-width: 700px) { .moi-entree { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

#memoireView, #projetWrap, #pisteView { width: 100%; }
@media (min-width: 1024px) { #memoireView { max-width: none; margin-left: 0; margin-right: 0; } }

.sup-liste { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.vt-ou { margin: 0; color: var(--muted); font-size: 14px; }
.vt-conf ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* ===== Lot 1 (réparer) : Parcours en une colonne, carte Prochaine étape qui ne se coupe plus ===== */
.un-salles, .un-salles .room.go { grid-template-columns: minmax(0, 1fr); grid-column: auto; }
@media (min-width: 1024px) { .un-salles { grid-template-columns: minmax(0, 1fr); } .un-salles .room.go { grid-column: auto; } }
.room { flex-wrap: nowrap; }
.room-t b { overflow-wrap: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.room-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room .tagf { flex: none; }
/* Carte Prochaine étape : Aster, le texte et le bouton s'empilent sur téléphone ; sur PC le bouton passe sous le texte */
.tb-etape { grid-template-columns: auto minmax(0, 1fr); }
.tb-etape > .btn { grid-column: 2; justify-self: start; }
.te-titre { overflow-wrap: break-word; word-break: normal; hyphens: manual; }
@media (max-width: 1023px) {
  .tb-etape { grid-template-columns: minmax(0, 1fr); }
  .tb-etape > .btn { grid-column: 1; justify-self: stretch; justify-content: center; width: 100%; }
}

/* ===== Lot 2 : le bas de la barre latérale tient en 2 lignes (série et XP, puis le compte avec son menu) ===== */
@media (min-width: 1024px) {
  .side-bas { position: relative; }
  .side-moi { height: 44px; gap: 10px; }
  .side-moi .side-nom { flex: 1; min-width: 0; text-align: left; color: var(--fg); }
  .side-moi svg:last-child { margin-left: auto; flex: none; }
  .side-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); z-index: 20; }
}
.lerpup-plus-ligne { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--b3); font-size: 14px; cursor: pointer; }
.lerpup-plus-ligne:hover { text-decoration: underline; }
.plus-menu { align-self: center; position: relative; }
.plus-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.plus-menu summary::-webkit-details-marker { display: none; }
.plus-menu[open] > .act:not(summary) { display: block; margin-top: 4px; }

/* ===== Lot 3 : le bac à sable « Le village cassé » ===== */
.bs { display: flex; flex-direction: column; gap: var(--s3); max-width: 1120px; margin: 0 auto; width: 100%; }
.bs-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s3); flex-wrap: wrap; }
.bs-tete .vt-lead { max-width: 520px; margin: 0; }
.bs-compte { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s1); }
.bs-n { font-size: 17px; }
.bs-pastilles { display: inline-flex; gap: 8px; }
.bs-p { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ctl); background: transparent; display: inline-block; }
.bs-p.ok { background: var(--done); border-color: var(--done); }
.bs-p.rebond { animation: bs-rebond .5s ease-out; }
@keyframes bs-rebond { 0% { transform: scale(.5); } 60% { transform: scale(1.5); } 100% { transform: scale(1); } }
.bs-actions { display: flex; gap: var(--s1); }
.bs-indice { margin: 0; padding: var(--s2); border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.bs-grille { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s3); align-items: start; }
.bs-scene { display: flex; flex-direction: column; gap: var(--s1); }
.bs-scene canvas { width: 100%; height: auto; aspect-ratio: 4 / 3; border: 1px solid var(--line-2); border-radius: 10px; image-rendering: pixelated; background: #000; display: block; }
.bs-scene canvas:focus-visible { outline: 2px solid var(--ctl); outline-offset: 2px; }
.bs-insp { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: var(--s2); display: flex; flex-direction: column; gap: var(--s2); }
.bs-hier { display: flex; flex-wrap: wrap; gap: 6px; }
.bs-obj { min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.bs-obj[aria-pressed="true"] { color: var(--fg); border-color: var(--fg); }
.bs-nom, .bs-comp h4 { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.bs-nom b { font-size: 17px; }
.bs-nom small, .bs-comp h4 small, .bs-lab small { color: var(--muted); font-size: 13px; font-weight: 400; }
.bs-comp { display: flex; flex-direction: column; gap: var(--s1); padding-top: var(--s2); border-top: 1px solid var(--line); }
.bs-comp h4 b { font-size: 15px; }
.bs-ligne { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); min-height: 44px; }
.bs-lab { display: flex; flex-direction: column; min-width: 0; }
.bs-lab b { font-size: 14px; font-weight: 600; }
.bs-switch { appearance: none; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--ctl); position: relative; cursor: pointer; margin: 0; }
.bs-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--fg); transition: left .15s; }
.bs-switch:checked { background: var(--done); }
.bs-switch:checked::after { left: 21px; }
.bs-switch:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.bs-curseur { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
.bs-curseur input[type="range"] { grid-column: 1 / -1; width: 100%; }
.bs-curseur output { font-family: var(--font-code, monospace); font-size: 14px; }
.bs-ligne select { min-height: 36px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--inset); color: var(--fg); padding: 0 8px; font: inherit; }
.bs-code { display: block; padding: 8px 10px; border-radius: 8px; background: var(--inset); color: var(--muted); font-size: 13px; overflow-x: auto; }
.bs-fin { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border: 1px solid var(--done); border-radius: 12px; background: var(--surface); }
.bs-fin-g { display: flex; align-items: center; gap: var(--s3); }
.bs-fin h3 { margin: 0 0 var(--s1); font-size: 24px; }
.bs-suite { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; padding-top: var(--s2); border-top: 1px solid var(--line); }
.bs-tel { text-align: left; }
@media (max-width: 1023px) { .bs-grille { grid-template-columns: minmax(0, 1fr); } .bs-compte { align-items: flex-start; } }
@media (prefers-reduced-motion: reduce) { .bs-p.rebond { animation: none; } }

/* ===== Refonte (maquette 8, maquette/lerpup-refonte.html) : classes de la maquette, adaptées aux variables de l'appli =====
   Les classes qui existaient déjà dans l'appli (room, grid2, mem, params, kpi, ring) sont limitées aux écrans refaits (.rf). */
:root { --dim: #6B6E78; --plus: #A99BFF; --urgent: #FF6B6B; }
/* En-tête de page : titre à gauche, actions à droite, même ligne, alignées sur le bas du titre */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.ph h3, .ph h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.ph .sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.ph .sub a, .ph .sub button { color: var(--muted); background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.ph .acts { display: flex; gap: 8px; align-items: center; }
.rf .grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s3); align-items: start; }
.rf .grid2.moitie { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s2); }
.stack { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
@media (max-width: 1000px) { .rf .grid2, .rf .grid2.moitie { grid-template-columns: 1fr; } }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.box.tight { padding: 18px; gap: 12px; }
.bh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bh h4 { margin: 0; font-size: 17px; font-weight: 700; }
.bh small, .bh a, .bh button { font-size: 13px; color: var(--muted); text-decoration: none; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.lbl { font-size: 13px; color: var(--muted); }
.btn-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.dots-btn { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: none; border: 0; cursor: pointer; flex: none; position: relative; }
.dots-btn:hover { background: var(--panel); color: var(--fg); }
.dots-btn svg { width: 18px; height: 18px; }
.btn.sec { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.sec:hover { background: var(--panel); }
.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line); }
.rows a, .rows button.r, .rows .r { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 16px; color: var(--fg); text-decoration: none; width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.rows a:hover, .rows button.r:hover { background: var(--panel); }
.rows .ico { width: 34px; height: 34px; border-radius: 8px; background: var(--panel); display: flex; align-items: center; justify-content: center; flex: none; color: var(--muted); }
.rows .ico svg { width: 17px; height: 17px; }
.rows .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rows .t b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .t small { font-size: 13px; color: var(--muted); }
.rows .meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.rows .chev { width: 18px; height: 18px; color: var(--dim); flex: none; }
.ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.ck svg { width: 13px; height: 13px; }
.ck.on { background: var(--done); border-color: var(--done); color: var(--bg); }
.tagp, .tagf, .tagd, .tagn { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tagp { background: rgba(169,155,255,.12); color: var(--plus); }
.tagf { background: rgba(255,138,61,.1); color: var(--reward); }
.tagd { background: rgba(53,214,196,.1); color: var(--done); }
.tagn { background: var(--panel); color: var(--muted); }
.tagf svg, .tagp svg, .tagd svg { width: 12px; height: 12px; }
/* Aujourd'hui */
.next1 { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s3); padding: var(--s3); border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); }
.next1 .k { font-size: 13px; color: var(--muted); }
.next1 .ttl { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 6px; overflow-wrap: break-word; }
.next1 .why { font-size: 14px; color: var(--muted); max-width: 60ch; margin: 0; }
.next1 .foot1 { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.next1 .foot1 .bar-p { flex: 1; min-width: 120px; }
@media (max-width: 1023px) { .next1 { grid-template-columns: minmax(0, 1fr); } .next1 .foot1 .btn { width: 100%; } }
.bar-p { height: 6px; background: var(--panel); border-radius: 999px; overflow: hidden; }
.bar-p i { display: block; height: 100%; border-radius: 999px; background: var(--fg); }
.bar-p.or i { background: var(--reward); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week span { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.week i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; box-sizing: border-box; color: var(--bg); }
.week i svg { width: 13px; height: 13px; }
.week i.on { background: var(--reward); border-color: var(--reward); }
.week i.repos { border-style: dashed; border-color: var(--plus); color: var(--plus); }
.week span.today { color: var(--fg); font-weight: 700; } .week span.today i { border-color: var(--fg); }
.heat { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 3px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: #1C1D23; }
.heat i.a { background: #6B3F22; } .heat i.b { background: #B8622D; } .heat i.c { background: var(--reward); }
.quest-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.quest-row b { font-size: 14px; font-weight: 600; } .quest-row .r { font-size: 13px; color: var(--muted); }
.quest-row .r.ok { color: var(--reward); font-weight: 600; }
.quest-row .bar-p { grid-column: 1 / -1; }
/* Défi jouable de la semaine et question du jour (Aujourd'hui) */
.ds .ds-nom { display: flex; align-items: flex-start; gap: 10px; }
.ds .ds-t { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.ds .ds-t b { font-size: 15px; font-weight: 600; }
.ds .ds-ico { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,138,61,.14); color: var(--reward); flex: none; }
.ds > .btn, .qj > .btn { align-self: flex-start; }
.qj .qj-q { margin: 0; font-size: 14px; line-height: 1.45; }
.qj .fb { background: var(--inset); }
/* Mon jeu */
.gh { display: flex; gap: var(--s2); align-items: center; }
.glogo { width: 56px; height: 56px; border-radius: 12px; background: linear-gradient(135deg, #2A2116, #14161B); border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: #FF8A3D; flex: none; }
.glogo svg { width: 26px; height: 26px; }
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.stage { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; position: relative; text-decoration: none; color: var(--fg); background: none; border: 0; border-radius: 0; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.stage + .stage { border-left: 1px solid var(--line); }
.stage:hover { background: var(--panel); }
.stage .top { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.stage .top i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.stage .top i svg { width: 11px; height: 11px; color: var(--bg); }
.stage small { font-size: 12px; color: var(--muted); }
.stage .bar-p { height: 4px; }
.stage.done .top i { background: var(--done); border-color: var(--done); }
.stage.now { background: var(--panel); } .stage.now .top i { border-color: var(--reward); background: var(--reward); }
.stage.now::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--reward); }
@media (max-width: 700px) { .stages { grid-template-columns: 1fr 1fr; } .stage:nth-child(3) { border-left: 0; } .stage:nth-child(n+3) { border-top: 1px solid var(--line); } }
.jr { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); align-items: start; }
.jr:first-child { border-top: 0; padding-top: 0; }
.jr .when { font-size: 13px; color: var(--muted); } .jr .when b { display: block; color: var(--fg); font-size: 14px; }
.jr p { font-size: 15px; margin: 0; }
.jr.quiet { align-items: center; padding: 10px 0; } .jr.quiet p { color: var(--muted); font-size: 14px; }
.empty-step { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 12px; border: 1px dashed var(--line-2); }
.empty-step p { color: var(--muted); font-size: 14px; margin: 0; }
.sugg-t { display: flex; flex-wrap: wrap; gap: 8px; }
.sugg-t button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; background: none; color: var(--fg); font-family: inherit; cursor: pointer; }
.sugg-t button:hover { background: var(--panel); }
.sugg-t button svg { width: 14px; height: 14px; color: var(--muted); }
.bars4 { display: flex; gap: 10px; align-items: flex-end; height: 72px; }
.bars4 div { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); height: 100%; justify-content: flex-end; }
.bars4 i { width: 100%; border-radius: 4px; background: var(--line-2); } .bars4 i.c { background: var(--reward); }
/* Parcours */
.unit-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s2); align-items: center; padding: var(--s3); border-radius: 12px 12px 0 0; background: linear-gradient(120deg, rgba(53,214,196,.08), rgba(255,138,61,.05) 60%, transparent), var(--surface); border: 1px solid var(--line-2); border-bottom: 0; }
.rf .unit-hero .ring { width: 64px; height: 64px; position: relative; flex: none; }
.rf .unit-hero .ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.rf .unit-hero .ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; }
.unit-hero h4 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.unit-hero p { font-size: 14px; color: var(--muted); margin: 2px 0 0; }
.unit-hero .learn { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.unit-body { border: 1px solid var(--line-2); border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; background: var(--surface); padding: var(--s2) var(--s3) var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.feat { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s3); padding: var(--s2); border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2); }
.feat .thumb { border-radius: 8px; overflow: hidden; background: #0A0B0E; aspect-ratio: 4 / 3; max-width: 100%; position: relative; }
.feat .thumb svg, .feat .thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.feat .k { font-size: 13px; color: var(--reward); font-weight: 700; }
.feat h5 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; }
.feat .tech { font-size: 13px; color: var(--muted); }
.feat p { font-size: 14px; margin: 10px 0 0; max-width: 58ch; }
.feat .foot1 { display: flex; gap: 12px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.feat .foot1 .meta { font-size: 13px; color: var(--muted); }
@media (max-width: 700px) { .feat { grid-template-columns: 1fr; } .unit-hero { grid-template-columns: 64px minmax(0, 1fr); } .unit-hero .lbl { grid-column: 1 / -1; text-align: left !important; } }
.fold { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); padding: 4px 2px; background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left; width: 100%; }
.fold svg { width: 16px; height: 16px; }
.fold .ck { width: 18px; height: 18px; } .fold .ck svg { width: 11px; height: 11px; }
.rf .room { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; min-height: 52px; padding: 8px 14px; border-radius: 10px; border: 0; background: none; color: var(--fg); text-decoration: none; width: 100%; font: inherit; text-align: left; cursor: pointer; flex-wrap: nowrap; }
.rf .room:hover { background: var(--panel); }
.rf .room .nm b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf .room .nm small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf .room .dur { font-size: 13px; color: var(--muted); white-space: nowrap; }
.rf .room.defi .ck { border-color: var(--reward); background: var(--reward); color: var(--bg); } .rf .room.defi .ck svg { width: 11px; height: 11px; }
.unit-line { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); width: 100%; font: inherit; color: var(--fg); text-align: left; }
button.unit-line { cursor: pointer; }
.unit-line .n { width: 40px; height: 40px; border-radius: 10px; background: var(--panel); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.unit-line.ok .n { background: var(--done); color: var(--bg); } .unit-line .n svg { width: 18px; height: 18px; }
.unit-line b { font-size: 16px; } .unit-line small { display: block; font-size: 13px; color: var(--muted); }
.unit-line .r { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.unit-line .r svg { width: 16px; height: 16px; }
.unit-line.lock { opacity: .6; }
/* Mémoire */
.rf .mem { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); min-height: 520px; }
.rf .mem .list { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.rf .mem .list .chips { padding: 12px; border-bottom: 1px solid var(--line); }
.rf .mem .it { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-decoration: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; width: 100%; border-radius: 0; }
.rf .mem .it:hover { background: var(--panel); }
.rf .mem .it.on { background: var(--panel); box-shadow: inset 2px 0 0 var(--reward); }
.rf .mem .it b { font-size: 14px; font-weight: 600; line-height: 1.35; }
.rf .mem .it span { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.rf .mem .read { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.rf .mem .read .k { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.rf .mem .read h4 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.keep { padding: 16px 18px; border-radius: 10px; background: rgba(255,138,61,.06); border: 1px solid rgba(255,138,61,.25); font-size: 15px; line-height: 1.5; }
.keep b { display: block; font-size: 12px; color: var(--reward); margin-bottom: 4px; }
.rf .mem .params { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; gap: 0; padding: 0; }
.rf .mem .params div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 12px 16px; font-size: 14px; }
.rf .mem .params div + div { border-top: 1px solid var(--line); }
.rf .mem .params span { color: var(--muted); }
.rf .mem .params code { justify-self: start; font-family: var(--font-code); font-size: 13px; color: var(--fg); background: var(--inset); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.rf .mem .read .acts { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: var(--s2); border-top: 1px solid var(--line); }
@media (max-width: 1000px) { .rf .mem { grid-template-columns: 1fr; } .rf .mem .list { border-right: 0; } .rf .mem .params div { grid-template-columns: 1fr; gap: 4px; } }
/* Profil */
.pf { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s3); align-items: start; }
.idc { position: sticky; top: 0; }
.idc .av { width: 96px; height: 96px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); position: relative; overflow: hidden; display: block; }
.idc h4 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.rankline { display: flex; flex-direction: column; gap: 6px; }
.rankline div { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); } .rankline div b { color: var(--fg); }
.rf .kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.rf .kpis .kpi { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.rf .kpis .kpi span { font-size: 13px; color: var(--muted); }
.rf .kpis .kpi b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-family: var(--body); }
.rf .kpis .kpi b.or { color: var(--reward); }
.rf .kpis .kpi small { font-size: 12px; color: var(--muted); }
.bdgs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.bdg { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 12px; color: var(--muted); }
.bdg b { color: var(--fg); font-size: 13px; font-weight: 600; }
.bdg svg { width: 48px; height: 48px; }
.bdg.next { opacity: .5; }
.wk7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 110px; }
.wk7 div { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 12px; color: var(--muted); }
.wk7 i { width: 100%; max-width: 28px; border-radius: 4px; background: var(--line-2); min-height: 4px; }
.wk7 i.c { background: var(--reward); }
.wk7 div.today { color: var(--fg); font-weight: 700; }
@media (max-width: 1000px) { .pf { grid-template-columns: 1fr; } .idc { position: static; } .bdgs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rf .kpis { grid-template-columns: 1fr 1fr; } }
/* Menu « … » d'une ligne */
.menu-dots { position: relative; }
.menu-dots > summary { list-style: none; cursor: pointer; }
.menu-dots > summary::-webkit-details-marker { display: none; }
.menu-dots .menu { position: absolute; right: 0; top: 36px; z-index: 15; min-width: 220px; display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.menu-dots .menu button { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--fg); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.menu-dots .menu button:hover { background: var(--panel); }

/* Profil (maquette 8) : sur PC seule la page .pf s'affiche ; un badge nouveau brille deux fois */
@media (min-width: 1024px) { #setView #session, #setView #profilProjets, #setView #profilSemaine { display: none !important; } }
.bdg.brille svg { animation: bdgBrille 1s ease-in-out 2; }
@keyframes bdgBrille { 50% { transform: scale(1.12) rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .bdg.brille svg { animation: none; } }

/* ===== Le village cassé, façon Unity (maquette 8, écran 6) ===== */
.bs { max-width: 1240px; }
.sb-top { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.sb-top h3 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.pills { display: flex; gap: 6px; align-items: center; }
.pills i { width: 28px; height: 8px; border-radius: 999px; background: var(--panel); } .pills i.on { background: var(--done); }
.pills i.rebond { animation: bs-rebond .5s ease-out; }
.sb { display: grid; grid-template-columns: 200px minmax(0, 1fr) 300px; gap: 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #0E0F13; }
.sb .pane { background: var(--surface); display: flex; flex-direction: column; min-width: 0; }
.sb .pane h6 { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.sb .pane h6 svg { width: 14px; height: 14px; }
.hier { display: flex; flex-direction: column; padding: 6px; gap: 2px; font-size: 14px; }
.hier button { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 8px; border-radius: 6px; color: var(--fg); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.hier button:hover { background: var(--panel); }
.hier button svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.hier button.sub { padding-left: 26px; }
.hier button.on { background: rgba(157,184,240,.14); }
.hier .bug, .hier .fix { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hier .bug { background: var(--urgent); } .hier .fix { background: var(--done); }
.scene-wrap { position: relative; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; }
.scene-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #15161B; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.scene-bar .play { display: inline-flex; gap: 4px; margin: 0 auto; }
.scene-bar .play button { width: 30px; height: 24px; border-radius: 4px; background: var(--panel); border: 0; display: flex; align-items: center; justify-content: center; color: var(--fg); cursor: pointer; }
.scene-bar .play button.on { background: rgba(157,184,240,.25); }
.scene-bar .play svg { width: 12px; height: 12px; }
.sb canvas.scene { display: block; width: 100%; height: auto; image-rendering: pixelated; border: 0; border-radius: 0; aspect-ratio: auto; background: #000; }
.scene-hint { position: absolute; left: 12px; bottom: 12px; font-size: 12px; color: #EDEEF0; background: rgba(0,0,0,.55); padding: 4px 8px; border-radius: 6px; }
.comp { border-bottom: 1px solid var(--line); }
.comp .ch { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; font-weight: 700; background: #17181D; }
.comp .ch svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.comp .ch small { font-weight: 500; color: var(--muted); font-size: 11px; }
.comp .ch .tg-in { margin-left: auto; appearance: none; width: 14px; height: 14px; border-radius: 3px; background: var(--panel); border: 1px solid var(--line-2); cursor: pointer; position: relative; flex: none; }
.comp .ch .tg-in:checked { background: var(--done); border-color: var(--done); }
.comp .ch .tg-in:checked::after { content: ''; position: absolute; left: 3px; top: 0; width: 4px; height: 8px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.comp .ch .tg-in:disabled { cursor: default; opacity: .7; }
.comp .ch .tg-in:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.comp.bad .ch { box-shadow: inset 0 0 0 1px rgba(255,107,107,.6); }
.fieldr { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; align-items: center; padding: 8px 14px; font-size: 13px; }
.fieldr span small { display: block; font-size: 11px; color: var(--dim); }
.fieldr .v { display: flex; align-items: center; gap: 6px; min-height: 28px; }
.fieldr .v select { width: 100%; height: 28px; border-radius: 6px; background: var(--inset); border: 1px solid var(--line-2); color: var(--fg); font-family: var(--mono); font-size: 12px; padding: 0 6px; }
.fieldr .v input[type="range"] { width: 100%; min-width: 0; }
.fieldr .v output { font-family: var(--mono); font-size: 12px; min-width: 28px; text-align: right; }
.fieldr.bad .v select, .fieldr.bad .v .bs-switch { outline: 1px solid rgba(255,107,107,.6); }
.fieldr.bad { box-shadow: inset 0 0 0 1px rgba(255,107,107,.45); border-radius: 6px; }
.fieldr.bad > span:first-child { color: var(--fg); }
.insp-help { margin: 12px 14px; padding: 10px 12px; border-radius: 8px; background: rgba(255,107,107,.06); border: 1px solid rgba(255,107,107,.25); font-size: 13px; }
.insp-help b { color: var(--urgent); display: block; font-size: 12px; margin-bottom: 2px; }
.buglist { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.buglist div { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.buglist div b { font-size: 13px; display: flex; align-items: center; gap: 4px; } .buglist div small { color: var(--muted); font-size: 12px; }
.buglist div.ok { border-color: rgba(53,214,196,.35); } .buglist div.ok b { color: var(--done); }
.buglist div.hid b { color: var(--muted); }
@media (max-width: 1100px) { .sb { grid-template-columns: 1fr; } .buglist { grid-template-columns: 1fr 1fr; } }

/* Correctif : les textes d'une ligne de salle ou d'unité se coupent avec « … » au lieu de faire défiler la page sur le côté */
.rf .room .nm, .unit-line > div, .rf .mem .it b, .stage > * { min-width: 0; }
.rf .room .nm { overflow: hidden; }
.parcours-unites, .unit-body, .feat > div { min-width: 0; }
.rf .room .tagf { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .rf .room { grid-template-columns: 22px minmax(0, 1fr) auto; } .rf .room .dur { display: none; } }

/* ===== Le chrono toujours visible pendant une session ===== */
.sess-mini { display: flex; align-items: center; gap: 8px; }
.sess-mini[hidden] { display: none; }
.sess-mini .sm-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; background: none; border: 0; color: var(--fg); font: inherit; text-align: left; cursor: pointer; padding: 0; min-height: 44px; }
.sess-mini .sm-t { font-family: var(--mono); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--reward); flex: none; }
.sess-mini .sm-n { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sess-mini .btn.sm { height: 32px; min-height: 32px; padding: 0 12px; font-size: 14px; border-radius: 8px; flex: none; }
.sess-mini .sm-pause { box-shadow: inset 0 0 0 1px var(--line-2); background: none; color: var(--fg); }
/* Téléphone : une barre de 56 px collée au-dessus des onglets du bas (le bloc est dans la barre de navigation, il s'y accroche) */
@media (max-width: 1023px) {
  .sess-mini { position: absolute; left: 0; right: 0; bottom: 100%; height: 56px; padding: 0 12px; background: var(--surface); border-top: 1px solid var(--line-2); box-sizing: border-box; }
  body.sess-on { padding-bottom: 56px; }
}
/* PC : un bloc fixe en haut de la barre latérale, sous le logo */
@media (min-width: 1024px) {
  .sess-mini { flex-wrap: wrap; padding: 12px; margin: 0 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
  .sess-mini .sm-info { flex: 1 1 100%; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 0; }
  .sess-mini .sm-t { font-size: 26px; }
  .sess-mini .sm-pause, .sess-mini .btn:not(.sm-pause) { flex: 1; }
}
/* « Session lancée » avec « Annuler » : 10 secondes */
.snack-session { position: fixed; z-index: 55; left: 50%; bottom: calc(56px + 60px + 12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-size: 14px; max-width: calc(100vw - 24px); }
.snack-session[hidden] { display: none; }
@media (min-width: 1024px) { .snack-session { left: calc(232px + var(--s3)); bottom: var(--s3); transform: none; } }

/* ===== Plus de texte vertical sur téléphone : tout enfant de flex ou de grid qui contient du texte peut rétrécir ===== */
/* (:where garde une spécificité nulle : les règles plus précises de l'appli gardent la main) */
:where(div, span, p, a, b, strong, small, em, code, label, li, h1, h2, h3, h4, h5, h6, section, article, aside, header, footer, nav, dd, dt, legend, summary) { min-width: 0; }
/* Les titres de ligne se coupent avec « … » au lieu de passer à la ligne lettre par lettre */
.t > b, .nm > b, .v2-row-t > b, .lg-ligne .t > b, .sess-sur > b, .sess-sur small, .room-t > b, .t-titre, .rf .mem .it > b, .un-t > b, .unit-line > div > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
.ph > div:first-child { flex: 1 1 220px; min-width: 0; }
.ph h2, .ph h3 { overflow: hidden; text-overflow: ellipsis; }
.ph .gh > div { flex: 1; min-width: 0; }
.ph .sub { overflow: hidden; text-overflow: ellipsis; }
.next1 > div, .tb-etape > div { min-width: 0; }
.next1 .ttl { overflow-wrap: break-word; }
.v2-pcard, .v2-pcard > * { min-width: 0; }
.v2-pcard b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ===== Correctifs (test des écrans) : un cadre avec width: 100% et des marges internes doit compter ses marges dedans ===== */
.unit-line, .unit-hero, .unit-body, .feat, .fold, .rf .room, .box, .next1, .stages, .stage, .empty-step, .keep, .rows, .bs-fin, .snack-session, .sess-mini, .sb, .buglist > div, .rf .mem, .pf, .idc { box-sizing: border-box; }
.fin-ligne b, .fin-total b, .toast-item .ti-t b { white-space: nowrap; flex: none; }
.toast-item .ti-t { min-width: 0; flex: 1; }
@media (max-width: 480px) {
  .v2-row.v2-static { flex-wrap: wrap; }
  .v2-row-t { flex: 1 1 140px; }
}
/* L'écran de fin du village : Aster passe au-dessus du texte quand la place manque */
.bs-fin-g { flex-wrap: wrap; }
.bs-fin-g > div { flex: 1 1 200px; min-width: 0; }
.bs-fin .fin-ligne span { min-width: 0; overflow-wrap: break-word; }

/* Barre de session : cachée quand une fenêtre (feuille, boîte de dialogue) est ouverte ; le contenu garde une marge basse de sa hauteur tant qu'elle est visible */
body:has(dialog[open]:modal) .sess-mini, body.onb-on .sess-mini { display: none; }
body:has(dialog[open]:modal).sess-on, body.onb-on.sess-on { padding-bottom: 0; }
/* Les blocs de code défilent dans leur cadre au lieu d'élargir la page */
.sl-code, .sl-erreur, pre, .code-bloc { max-width: 100%; overflow-x: auto; box-sizing: border-box; }
.sl-code code, pre code { white-space: pre; }
.parcours-unites, .parcours-unites > *, .unit-body > * { max-width: 100%; }

/* Bandeau discret de la bêta */
.beta-bandeau { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--inset); color: var(--muted); font-size: 13px; box-sizing: border-box; }
.beta-bandeau[hidden] { display: none; }
.beta-bandeau .tb-lien { color: var(--link); font: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* ===== Finitions (14 nov.) : espacements, largeur, journal, profil, village ===== */
/* 1. Tout conteneur qui porte un en-tête de page (.ph) empile ses blocs avec un vrai espace entre eux */
.view :is(div, section):has(> .ph) { display: flex !important; flex-direction: column; gap: var(--s3) !important; }
.ph { margin: 0; }
/* 2. Sur les grands écrans, le contenu s'élargit avec l'écran */
@media (min-width: 1600px) { .wrap { max-width: 1480px; } }
@media (min-width: 2200px) { .wrap { max-width: 1720px; } }
/* 3. Journal : du souffle autour des dates et des notes */
.jr { padding: 16px 18px; align-items: baseline; }
.jr:first-child { padding-top: 16px; }
.jr.quiet { padding: 12px 18px; align-items: center; }
.jr .when b { margin-bottom: 2px; }
.jr p { line-height: 1.5; }
/* 4. Profil : la carte d'identité ne flotte plus par-dessus la carte du dessous */
.idc { position: static; }
/* 5. Village : il prend toute la largeur et la scène s'agrandit */
.vt-defi { max-width: none; width: 100%; }
body:has(.vt-defi) .wrap { max-width: min(1480px, 100%); }
.sb { grid-template-columns: 220px minmax(0, 1fr) 320px; }
.bs-regles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.bs-regles li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; line-height: 1.45; }
.bs-regles li b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--panel); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.bs-repares { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bs-repares li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.45; }
.bs-repares li i { width: 22px; height: 22px; border-radius: 50%; background: var(--done); color: var(--bg); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 800; }
.bs-repares li small { display: block; color: var(--muted); font-size: 13px; }
@media (max-width: 1000px) { .bs-regles { grid-template-columns: 1fr; } .sb { grid-template-columns: 1fr; } }

/* ===== Finitions 2 (14 nov.) ===== */
/* La zone de réponse reste dans sa carte */
.pv-ta { box-sizing: border-box; width: 100%; max-width: 100%; }
/* Les messages passent à la ligne au lieu de déborder */
.toast-item { max-width: min(420px, calc(100vw - 32px)); box-sizing: border-box; }
.toast-item .ti-t b { white-space: normal; flex: initial; overflow-wrap: break-word; }
/* Pages « vitrine » ouvertes depuis l'appli (village, tarifs…) : la barre latérale reste, la page prend la largeur */
body.vt-on:not(.onb-on) .wrap { max-width: 1480px; }
body.vt-on:not(.onb-on) .vt-nav { display: none; }
@media (min-width: 1600px) { body.vt-on:not(.onb-on) .wrap { max-width: 1560px; } }
/* Mémoire : la fiche ouverte reste visible pendant qu'on fait défiler la liste, ses boutons sont en haut */
.rf .mem { align-items: start; min-height: 0; }
.rf .mem .read { position: sticky; top: 16px; }
.rf .mem .read .acts { order: -1; margin-top: 0; padding-top: 0; padding-bottom: var(--s2); border-top: 0; border-bottom: 1px solid var(--line); }
/* Village : les bugs à trouver sont annoncés dès le départ */
.buglist > div.todo b { color: var(--fg); }
.buglist > div.todo small { color: var(--muted); }

/* ===== Finitions 3 (test des personas, 14 nov.) ===== */
/* Boutons secondaires du village (« Un indice », « Recommencer ») : contour, jamais blancs pleins */
.btn.sec, .btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--ctl, var(--line-2)); box-shadow: none; }
.btn.sec:disabled, .btn.ghost:disabled, .btn.sec[aria-disabled="true"] { opacity: .45; background: transparent; color: var(--fg); }
/* Messages : en haut à droite, sous l'en-tête, deux au plus ; ils ne couvrent plus les boutons du bas */
.toast.pile { top: var(--s3); bottom: auto; }
.toast.pile .toast-item:not(:nth-last-child(-n+2)) { display: none; }   /* 2 messages au plus : on garde les plus récents */
@media (max-width: 699px) { .toast.pile { top: calc(8px + env(safe-area-inset-top, 0px)); right: 8px; left: 8px; width: auto; } }
/* Bandeaux (suivi anonyme, « La suite », retour après une pause) : neutres, un liseré orange à gauche, plus de violet */
.pause { background: var(--surface); border: 1px solid var(--line-2); border-left: 3px solid var(--reward); }
/* Onglets encore vides : lisibles (ils restent cliquables et expliquent quoi faire) */
.tabbar button.vide { opacity: .75; }

/* ---------- Finitions 4 ---------- */
/* Les zones de texte libres (Je bloque, idées, explications) en police normale, pas en police de code */
.jr-bloc textarea, .jr textarea, .pv-ta { font-family: inherit; line-height: 1.5; }
/* Salle ou défi ouvert par-dessus un écran : c'est le Parcours qui est allumé dans la barre */
body:has(#lessonDlg[open]) .tabbar button[aria-current="page"]:not(#tabPath) { color: var(--muted); font-weight: 400; background: none; box-shadow: none; }
body:has(#lessonDlg[open]) .tabbar #tabPath { color: var(--fg); font-weight: 600; }
@media (min-width: 900px) { body:has(#lessonDlg[open]) .tabbar #tabPath { background: var(--panel); box-shadow: inset 2px 0 0 var(--reward); } }
.rev-oubli { align-self: center; text-decoration: underline; text-underline-offset: 3px; }
.moi-carte .jeu-ligne + .jeu-ligne { border-top: 1px solid var(--line); padding-top: var(--s2); margin-top: var(--s2); }
.sj-unite { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

/* ---------- Premiers pas dans Unity (unité 0) ---------- */
.pp-carte { display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left; cursor: pointer; border-left: 3px solid var(--reward); color: var(--fg); font: inherit; }
.pp-carte:hover { background: var(--panel); }
.pp-n { flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; background: var(--panel); color: var(--reward); }
.pp-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pp-txt small, .pp-etat { color: var(--muted); font-size: 14px; }
.pp-etat { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pp-page { display: flex; flex-direction: column; gap: var(--s3); max-width: 820px; }
.pp-compte { color: var(--muted); font-size: 14px; white-space: nowrap; }
.pp-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.pp-etape { display: flex; flex-direction: column; gap: var(--s2); }
.pp-etape.fait { border-color: var(--done-line); }
.pp-tete { display: flex; gap: var(--s3); align-items: flex-start; }
.pp-tete h4 { margin: 0 0 2px; font-size: 17px; }
.pp-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--panel); }
.pp-etape.fait .pp-num { background: var(--done); color: var(--on-done); }
.pp-faire { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; }
.pp-res, .pp-piege { margin: 0; line-height: 1.5; }
.pp-piege { color: var(--muted); }
.pp-fin { border-left: 3px solid var(--done); display: flex; flex-direction: column; gap: var(--s2); }
.pp-carte.box { flex-direction: row; justify-content: flex-start; align-items: center; }
.pp-carte > *, .pp-etape > .pp-tete { margin: 0; }
.pp-etape > .pp-tete { justify-content: flex-start; align-self: stretch; width: auto; }
/* Village : une définition en clair sous Hiérarchie et Inspecteur (débutants, retour du test) */
.pane-def { margin: -4px 0 8px; font-size: 12px; color: var(--muted); }
/* Sous le pseudo : connecté ou non (on voyait « skeyo » alors que le menu proposait « Se connecter ») */
.side-etat { display: block; font-size: 11px; color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.side-etat.on { color: var(--done-text); }
.side-moi { height: auto !important; min-height: 44px; }
/* Profil épuré : 3 chiffres, une ligne pour compléter le profil */
.moi-d .kpis.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.moi-suite { margin: 0; padding: 0 var(--s2); font-size: 14px; color: var(--muted); }
.moi-suite b { color: var(--fg); font-weight: 600; }
.kpi-lien { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.kpi-lien:hover { color: var(--fg); }
.box > .bh > .btn { flex: none; white-space: nowrap; }

/* Journal sur téléphone : la pastille « bloqué : … » passe à la ligne au lieu de dépasser de la carte */
.jr > div { min-width: 0; }
.jr .tags .tagf, .jr .tags .tagn { height: auto; min-height: 22px; max-width: 100%; padding-top: 3px; padding-bottom: 3px; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
