/* Piste 1.0 — reprend l'identité « Piste » de la v3 (papier, encre, un seul rouge pour « maintenant », Archivo). */
   Papier chaud, encre presque noire, une seule couleur signal (rouge piste) réservée à « maintenant ».
   Une seule famille, Archivo (variable, embarquée) : l'axe de chasse sert la hiérarchie
   (62 % = chiffres et titres, 100 % = lecture). */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: block;
}

:root {
  --paper: #f2f0ea;
  --paper-2: #e8e5dd;
  --paper-3: #dcd8ce;
  --card: #fffefb;
  --ink: #141210;
  --ink-2: #57534b;
  --ink-3: #6f6a61;
  --ink-4: #a9a397;
  --rule: rgba(20, 18, 16, .09);
  --rule-2: rgba(20, 18, 16, .16);
  --accent: #e0441b;
  --accent-ink: #b9330f;
  --accent-wash: rgba(224, 68, 27, .10);
  --good: #1e7f4f;
  --good-wash: rgba(30, 127, 79, .11);
  --over: #2b59c3;
  --over-wash: rgba(43, 89, 195, .10);
  --under: #b86500;
  --under-wash: rgba(224, 138, 0, .15);
  --danger: #b42318;
  --danger-wash: rgba(180, 35, 24, .08);
  --on-ink: #f2f0ea;
  --on-ink-2: rgba(242, 240, 234, .70);
  --on-ink-3: rgba(242, 240, 234, .46);
  --ink-rule: rgba(242, 240, 234, .14);
  --f: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --gut: 20px;
  --r-xl: 22px;
  --r-l: 16px;
  --r-m: 12px;
  --r-s: 8px;
  --tab-h: 58px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.2, .9, .1, 1.04);
  --lift: 0 1px 0 rgba(20, 18, 16, .04), 0 10px 30px -18px rgba(20, 18, 16, .28);
  --float: 0 18px 50px -18px rgba(20, 18, 16, .45), 0 4px 14px -6px rgba(20, 18, 16, .18);
  color-scheme: light;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--paper); color: var(--ink); }
body {
  font-family: var(--f); font-size: 15.5px; line-height: 1.45; font-weight: 420; font-stretch: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-synthesis: none;
  overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
input, select, textarea { font-size: 17px; } /* ≥ 16 px : pas de zoom au focus sur iOS */
button { touch-action: manipulation; cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 760; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
b, strong { font-weight: 680; }
ol, ul { margin: 0; padding: 0; list-style: none; }
.hidden { display: none !important; }
.num, .tab-num { font-variant-numeric: tabular-nums; }
.cond { font-stretch: 62%; }
.rnd { font-stretch: 70%; font-weight: 760; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 14px; }
.xsmall { font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.mt { margin-top: 12px; } .mt-l { margin-top: 20px; } .mt-s { margin-top: 6px; }
.ok-t { color: var(--good); } .warn-t { color: var(--under); } .danger-t { color: var(--danger); } .acc-t { color: var(--accent-ink); }

/* Étiquette de donnée : condensée, capitales, réservée aux libellés de chiffres */
.lab { font-size: 11.5px; line-height: 1.2; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .075em; color: var(--ink-3); }
.lab.acc { color: var(--accent-ink); }

/* ---------- Coquille ---------- */
#view { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.screen { padding: calc(var(--safe-top) + 6px) var(--gut) calc(var(--tab-h) + var(--safe-bottom) + 44px); max-width: 640px; margin: 0 auto; min-height: 100%; }
.screen.fade { animation: entree .32s var(--ease) both; }
@keyframes entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen.fade .stagger > * { animation: entree .42s var(--ease) both; }
.screen.fade .stagger > *:nth-child(2) { animation-delay: .04s; }
.screen.fade .stagger > *:nth-child(3) { animation-delay: .08s; }
.screen.fade .stagger > *:nth-child(4) { animation-delay: .12s; }
.screen.fade .stagger > *:nth-child(5) { animation-delay: .16s; }
.screen.fade .stagger > *:nth-child(n+6) { animation-delay: .2s; }

/* ---------- En-tête de page ---------- */
.ph { padding: 0 0 14px; }
.ph-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.ph-kick { font-size: 12px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); display: flex; align-items: center; gap: 8px; min-width: 0; }
.ph-kick i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.ph-title { font-size: 46px; line-height: .86; font-weight: 820; font-stretch: 62%; text-transform: uppercase; letter-spacing: -.012em; margin-top: 2px; }
.ph-sub { font-size: 15px; color: var(--ink-2); margin-top: 8px; }
.ph-bar { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.ph-bar .ph-title { font-size: 34px; margin: 0; }

/* Titre de section : sentence case, filet au-dessus (rythme éditorial) */
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 12px; padding-top: 14px; border-top: 1px solid var(--rule-2); }
.sec h2 { font-size: 20px; line-height: 1.15; font-weight: 760; font-stretch: 85%; letter-spacing: -.012em; }
.sec .aside { font-size: 13px; color: var(--ink-3); font-weight: 520; text-align: right; }
.sec .link { font-size: 14.5px; color: var(--ink); font-weight: 650; display: inline-flex; align-items: center; gap: 4px; }
.sec .link svg { width: 16px; height: 16px; }
.sec.flush { margin-top: 26px; }

/* ---------- Modules ---------- */
.mod { background: var(--card); border-radius: var(--r-l); box-shadow: var(--lift), inset 0 0 0 1px rgba(20, 18, 16, .045); }
.mod.pad { padding: 16px; }
.mod.pad-l { padding: 20px; }
.mod + .mod { margin-top: 12px; }
.mod-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.mod-title b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.mod-title span { font-size: 12.5px; color: var(--ink-3); text-align: right; }
.card { background: var(--card); border-radius: var(--r-l); padding: 16px; box-shadow: var(--lift), inset 0 0 0 1px rgba(20, 18, 16, .045); }
.card + .card { margin-top: 12px; }

/* Lignes de liste */
.list { background: var(--card); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--lift), inset 0 0 0 1px rgba(20, 18, 16, .045); }
.li { display: flex; align-items: center; gap: 14px; padding: 13px 16px; min-height: 62px; width: 100%; text-align: left; position: relative; transition: background .15s; }
.li + .li::before, .field + .field::before, .li + .field::before, .field + .li::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--rule); }
button.li:active { background: var(--paper); }
.li .t { font-weight: 620; letter-spacing: -.008em; font-size: 15.5px; line-height: 1.3; }
.li .s { font-size: 13.5px; color: var(--ink-2); line-height: 1.35; margin-top: 2px; }
.li .v { font-size: 19px; font-weight: 740; font-stretch: 68%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.li .tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chev { width: 18px; height: 18px; color: var(--ink-4); flex: none; }
.chev svg { width: 18px; height: 18px; display: block; }
.ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--paper); color: var(--ink-2); }
.ico svg { width: 19px; height: 19px; }
.ico.acc { background: var(--accent-wash); color: var(--accent-ink); }
.ico.ok { background: var(--good-wash); color: var(--good); }
.ico.warn { background: var(--under-wash); color: var(--under); }
.ico.danger { background: var(--danger-wash); color: var(--danger); }
.ico.ink { background: var(--ink); color: var(--on-ink); }

/* Pastille de check (rappels, repas, courses) */
.tick { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 1.75px var(--ink-4); color: transparent; transition: background .2s var(--ease), box-shadow .2s; }
.tick svg { width: 15px; height: 15px; stroke-width: 2.6; }
.tick.on { background: var(--ink); box-shadow: none; color: var(--on-ink); }
.tick.on svg path { stroke-dasharray: 22; stroke-dashoffset: 0; animation: trace .32s var(--ease) both; }
@keyframes trace { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }
.tick.acc { box-shadow: inset 0 0 0 1.75px var(--accent); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 20px; border-radius: var(--r-m); font-weight: 650; font-size: 16px; letter-spacing: -.005em; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.25px var(--rule-2); transition: transform .12s var(--ease), background .15s, box-shadow .15s; user-select: none; -webkit-user-select: none; text-align: center; }
.btn:active { transform: scale(.975); background: rgba(20, 18, 16, .04); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.btn.primary:active { background: #000; }
.btn.accent { background: var(--accent); color: #fff; box-shadow: none; font-weight: 700; font-size: 17px; }
.btn.accent:active { background: #c93a14; }
.btn.soft { background: var(--paper-2); box-shadow: none; }
.btn.ghost { box-shadow: none; color: var(--ink-2); }
.btn.danger { color: var(--danger); }
.btn.danger-fill { background: var(--danger); color: #fff; box-shadow: none; }
.btn.block { width: 100%; }
.btn.big { min-height: 58px; font-size: 17px; border-radius: 14px; }
.btn.small { min-height: 40px; font-size: 14.5px; padding: 0 14px; border-radius: 10px; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); box-shadow: inset 0 0 0 1.25px var(--rule-2); flex: none; transition: transform .12s var(--ease), background .15s; }
.icon-btn:active { transform: scale(.94); background: rgba(20, 18, 16, .05); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn.plain { box-shadow: none; }
.icon-btn[disabled] { opacity: .28; pointer-events: none; }
.go { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.go svg { width: 18px; height: 18px; stroke-width: 2.2; }

/* Puces */
.chip, .pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 650; font-stretch: 88%; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; letter-spacing: 0; line-height: 1; }
.chip svg { width: 13px; height: 13px; }
.chip.accent { background: var(--accent-wash); color: var(--accent-ink); }
.chip.warn { background: var(--under-wash); color: #8a4b00; }
.chip.up { background: var(--over-wash); color: var(--over); }
.chip.ok { background: var(--good-wash); color: var(--good); }
.chip.danger { background: var(--danger-wash); color: var(--danger); }
.chip.line { background: transparent; box-shadow: inset 0 0 0 1px var(--rule-2); }

/* Onglets soulignés (remplacent les contrôles segmentés « iOS ») */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--rule-2); margin-top: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; padding: 10px 0 12px; font-size: 15.5px; font-weight: 620; color: var(--ink-3); white-space: nowrap; transition: color .15s; }
.tabs button.on { color: var(--ink); }
.tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; background: var(--accent); border-radius: 2px; animation: trait .3s var(--ease) both; }
@keyframes trait { from { transform: scaleX(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* Contrôle segmenté compact (choix de mesure, unités) */
.seg { display: flex; background: var(--paper-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { flex: 1; min-height: 34px; border-radius: 8px; font-size: 13.5px; font-weight: 620; color: var(--ink-2); padding: 0 8px; white-space: nowrap; transition: background .18s, color .18s; }
.seg button.on { background: var(--ink); color: var(--on-ink); }

/* Sélecteur à puces défilant */
.picker { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding: 2px var(--gut) 4px; scroll-padding: var(--gut); scroll-snap-type: x proximity; }
.picker::-webkit-scrollbar { display: none; }
.picker button { flex: none; min-height: 40px; padding: 0 15px; border-radius: 999px; font-size: 14.5px; font-weight: 620; color: var(--ink-2); box-shadow: inset 0 0 0 1.25px var(--rule-2); white-space: nowrap; scroll-snap-align: start; transition: background .15s, color .15s; }
.picker button.on { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.pick-sel { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 40px; border-radius: 999px; box-shadow: inset 0 0 0 1.25px var(--rule-2); color: var(--ink-2); scroll-snap-align: start; }
.pick-sel select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14.5px; font-weight: 620; height: 40px; padding: 0 34px 0 15px; max-width: 220px; text-overflow: ellipsis; border-radius: 999px; cursor: pointer; }
.pick-sel select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-sel svg { position: absolute; right: 12px; width: 16px; height: 16px; pointer-events: none; }
.pick-sel.on { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.pick-sel.on select option { color: var(--ink); background: var(--paper); }

/* ---------- Barre d'onglets ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 4px var(--safe-bottom); background: rgba(242, 240, 234, .9); backdrop-filter: saturate(160%) blur(22px); -webkit-backdrop-filter: saturate(160%) blur(22px); box-shadow: inset 0 1px 0 var(--rule); }
.tabbar button { position: relative; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-3); font-size: 10.5px; font-weight: 640; font-stretch: 88%; letter-spacing: .005em; min-width: 0; transition: color .2s; }
.tabbar button span { white-space: nowrap; }
.tabbar button .ti { display: grid; place-items: center; transition: transform .2s var(--ease); }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button:active .ti { transform: scale(.9); }
.tabbar button.on { color: var(--ink); }
.tabbar button.on::before { content: ""; position: absolute; top: 0; left: 50%; width: 22px; height: 3px; margin-left: -11px; background: var(--accent); border-radius: 0 0 3px 3px; animation: trait .3s var(--ease) both; }

/* ---------- Aujourd'hui : ruban de la semaine ---------- */
.ribbon { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: 16px -4px 0; }
.ribbon button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 9px; border-radius: 12px; position: relative; transition: background .2s; }
.ribbon .wd { font-size: 11px; font-weight: 700; font-stretch: 75%; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }
.ribbon .wn { font-size: 22px; line-height: 1; font-weight: 760; font-stretch: 62%; font-variant-numeric: tabular-nums; }
.ribbon .wc { font-size: 10px; font-weight: 700; font-stretch: 75%; letter-spacing: .05em; color: var(--ink-3); height: 13px; display: flex; align-items: center; }
.ribbon .wc svg { width: 13px; height: 13px; }
.ribbon .wb { width: 22px; height: 3px; border-radius: 2px; background: transparent; margin-top: 2px; }
.ribbon .wb.afaire { background: var(--rule-2); }
.ribbon .wb.fait { background: var(--ink); }
.ribbon .wb.partiel, .ribbon .wb.encours { background: linear-gradient(90deg, var(--ink) 50%, var(--rule-2) 50%); }
.ribbon .wb.manque { background: var(--danger); opacity: .7; }
.ribbon button.today { background: var(--ink); }
.ribbon button.today .wd, .ribbon button.today .wc { color: var(--on-ink-3); }
.ribbon button.today .wn { color: var(--on-ink); }
.ribbon button.today .wb.afaire, .ribbon button.today .wb { background: var(--accent); }
.ribbon button.today .wb.fait { background: var(--on-ink); }
.ribbon button.passe .wn { color: var(--ink-3); }

/* ---------- Tableau d'affichage (séance du jour) ---------- */
.board { position: relative; margin-top: 16px; background: var(--ink); color: var(--on-ink); border-radius: var(--r-xl); padding: 18px 20px 14px; overflow: hidden; isolation: isolate; box-shadow: 0 24px 50px -30px rgba(20, 18, 16, .7); }
.board::before { content: ""; position: absolute; left: 20px; top: 0; width: 36px; height: 4px; background: var(--accent); border-radius: 0 0 3px 3px; }
/* Numéro de couloir peint en fond (rang de la séance dans la semaine) */
.board-num { position: absolute; right: -10px; top: -34px; z-index: -1; font-size: 250px; line-height: 1; font-weight: 900; font-stretch: 62%; color: transparent; -webkit-text-stroke: 1.5px rgba(242, 240, 234, .09); pointer-events: none; user-select: none; font-variant-numeric: tabular-nums; }
.board-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.board-top .lab { color: var(--on-ink-3); }
.board-st { font-size: 11.5px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .08em; color: var(--on-ink-2); display: inline-flex; align-items: center; gap: 6px; }
.board-st i { width: 7px; height: 7px; border-radius: 50%; background: var(--on-ink-3); }
.board-st.encours i, .board-st.partiel i { background: var(--accent); box-shadow: 0 0 0 4px rgba(224, 68, 27, .25); animation: pouls 1.6s ease-in-out infinite; }
.board-st.fait i { background: #3fbf7f; }
@keyframes pouls { 50% { box-shadow: 0 0 0 7px rgba(224, 68, 27, 0); } }
.board-title { font-size: 78px; line-height: .84; font-weight: 850; font-stretch: 62%; text-transform: uppercase; letter-spacing: -.012em; margin-top: 16px; }
.board-title.long { font-size: 60px; }
.board-sub { font-size: 17.5px; color: var(--on-ink-2); margin-top: 8px; font-weight: 500; letter-spacing: -.005em; }
.board-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--ink-rule); }
.board-stats.two { grid-template-columns: repeat(2, 1fr); }
.board-stats > div { min-width: 0; }
.board-stats > div + div { border-left: 1px solid var(--ink-rule); padding-left: 14px; }
.board-stats b { display: block; font-size: 32px; line-height: 1; font-weight: 760; font-stretch: 62%; letter-spacing: -.01em; white-space: nowrap; }
.board-stats b small { font-size: 18px; color: var(--on-ink-3); font-weight: 700; }
.board-stats span { display: block; margin-top: 5px; font-size: 11px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .08em; color: var(--on-ink-3); }
.board-list { margin-top: 16px; counter-reset: ex; }
.board-list li { display: grid; grid-template-columns: 22px 1fr auto; align-items: first baseline; gap: 8px; padding: 8px 0; border-top: 1px solid var(--ink-rule); font-size: 14.5px; }
.board-list li .n { font-size: 13px; font-weight: 750; font-stretch: 70%; color: var(--on-ink-3); font-variant-numeric: tabular-nums; }
.board-list li .t { color: var(--on-ink); font-weight: 520; line-height: 1.3; min-width: 0; }
.board-list li .v { font-size: 15px; font-weight: 700; font-stretch: 70%; color: var(--on-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-list li.ok .t { color: var(--on-ink-3); text-decoration: line-through; text-decoration-color: rgba(242, 240, 234, .3); }
.board-list li.ok .n { color: #3fbf7f; }
.board-note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(242, 240, 234, .07); font-size: 14px; color: var(--on-ink-2); line-height: 1.45; }
.board-note b { color: var(--on-ink); font-weight: 650; }
.board .btn-hero { width: 100%; margin-top: 18px; min-height: 58px; border-radius: 14px; background: var(--accent); color: #fff; font-weight: 700; font-size: 17.5px; letter-spacing: -.005em; display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .12s var(--ease), background .15s; }
.board .btn-hero svg { width: 20px; height: 20px; stroke-width: 2.1; transition: transform .2s var(--ease); }
.board .btn-hero:active { transform: scale(.98); background: #c93a14; }
.board .btn-hero:active svg { transform: translateX(3px); }
.board .btn-ghost { width: 100%; margin-top: 4px; min-height: 46px; border-radius: 12px; color: var(--on-ink-2); font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.board .btn-ghost svg { width: 18px; height: 18px; }
.board .btn-ghost:active { background: rgba(242, 240, 234, .06); }
/* Variante claire (repos) */
.board.calme { background: var(--card); color: var(--ink); box-shadow: var(--lift), inset 0 0 0 1px rgba(20, 18, 16, .045); }
.board.calme::before { background: var(--ink-4); }
.board.calme .lab, .board.calme .board-st { color: var(--ink-3); }
.board.calme .board-sub { color: var(--ink-2); }
.board.calme .board-stats { border-top-color: var(--rule); }
.board.calme .board-stats > div + div { border-left-color: var(--rule); }
.board.calme .board-stats span, .board.calme .board-stats b small { color: var(--ink-3); }
.board.calme .btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1.25px var(--rule-2); margin-top: 18px; }
.board.calme .board-note { background: var(--paper); color: var(--ink-2); }
.board.calme .board-note b { color: var(--ink); }

/* ---------- Aujourd'hui : repas du jour ---------- */
.meals { display: block; width: 100%; text-align: left; padding: 16px; }
.meals-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.meals-top .cnt { font-size: 13.5px; color: var(--ink-2); }
.meals-top .cnt b { font-size: 20px; font-weight: 760; font-stretch: 62%; color: var(--ink); margin-right: 1px; }
.mtrack { display: flex; gap: 3px; margin-top: 14px; }
.mtrack > span { min-width: 50px; display: flex; flex-direction: column; gap: 6px; }
.mtrack i { display: block; height: 8px; border-radius: 4px; background: var(--paper-2); transition: background .3s var(--ease); }
.mtrack .on i { background: var(--ink); }
.mtrack .next i { background: var(--accent); }
.mtrack em { font-style: normal; font-size: 10.5px; font-weight: 700; font-stretch: 72%; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtrack .next em { color: var(--accent-ink); }
.mtrack .on em { color: var(--ink); }
.meals-next { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); display: flex; align-items: center; gap: 12px; }
.meals-next .lab { display: block; }
.meals-next b { display: block; font-size: 16px; font-weight: 660; letter-spacing: -.01em; line-height: 1.3; margin-top: 2px; }
.meals-nums { display: flex; gap: 16px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meals-nums b { color: var(--ink); font-weight: 700; }

/* ---------- Alertes ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; position: relative; }
.notice + .notice::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--rule); }
.notice .ni { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--paper); color: var(--ink-2); }
.notice .ni svg { width: 17px; height: 17px; }
.notice.warn .ni { background: var(--under-wash); color: var(--under); }
.notice.danger .ni { background: var(--danger-wash); color: var(--danger); }
.notice.info .ni { background: var(--paper-2); color: var(--ink); }
.notice .t { font-weight: 660; letter-spacing: -.008em; line-height: 1.3; }
.notice .s { font-size: 14px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }
.notice .btn { margin-top: 10px; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-m); background: var(--paper-2); font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ink); }
.callout b { color: var(--ink); font-weight: 660; }
.callout.warn { background: var(--under-wash); color: #5e3a00; }
.callout.warn svg, .callout.warn b { color: #8a4b00; }
.callout.danger { background: var(--danger-wash); color: #5c140e; }
.callout.danger svg, .callout.danger b { color: var(--danger); }
.callout + .callout { margin-top: 8px; }

/* ---------- Semaine ---------- */
.wk { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 8px; }
.wk .c { text-align: center; min-width: 0; }
.wk .c h1, .wk .c b { display: block; font-size: 40px; line-height: .9; font-weight: 820; font-stretch: 62%; text-transform: uppercase; letter-spacing: -.01em; }
.wk .c span { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.wk .c span em { font-style: normal; color: var(--ink-3); }
.days { margin-top: 0; }
.day { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; min-height: 68px; width: 100%; text-align: left; position: relative; }
.day + .day::before { content: ""; position: absolute; left: 72px; right: 0; top: 0; height: 1px; background: var(--rule); }
button.day:active { background: var(--paper); }
.day .d { text-align: center; }
.day .d span { display: block; font-size: 11px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.day .d b { display: block; font-size: 26px; line-height: 1; font-weight: 780; font-stretch: 62%; font-variant-numeric: tabular-nums; margin-top: 2px; }
.day .t { font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
.day .s { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.35; }
.day.repos { min-height: 54px; }
.day.repos .t { color: var(--ink-2); font-weight: 560; }
.day.repos .s { color: var(--ink-3); }
.day.repos .d b { color: var(--ink-3); }
.day.today::after { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.day.today .d b, .day.today .d span { color: var(--accent-ink); }
.st { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; font-size: 12px; font-weight: 680; font-stretch: 85%; border-radius: 7px; white-space: nowrap; }
.st svg { width: 13px; height: 13px; stroke-width: 2.4; }
.st.fait { background: var(--good-wash); color: var(--good); }
.st.partiel, .st.encours { background: var(--under-wash); color: #8a4b00; }
.st.afaire { background: var(--paper-2); color: var(--ink-2); }
.st.manque { background: var(--danger-wash); color: var(--danger); }
.st.repos { background: transparent; color: var(--ink-3); padding: 0; }

/* Couloirs de volume : une graduation par série */
.lanes { padding: 6px 16px 14px; }
.lane { display: grid; grid-template-columns: 86px 1fr 52px; align-items: center; gap: 12px; padding: 9px 0; position: relative; }
.lane + .lane { border-top: 1px solid var(--rule); }
.lane .g { font-size: 14px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em; }
.lane .v { text-align: right; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lane .v b { font-size: 19px; font-weight: 760; font-stretch: 62%; color: var(--ink); margin-right: 1px; }
.ticks { display: flex; align-items: flex-end; gap: 2px; height: 22px; position: relative; }
.ticks i { position: relative; flex: 0 1 8px; min-width: 2px; height: 14px; border-radius: 2px; background: var(--paper-2); transition: background .35s var(--ease), height .35s var(--ease); }
.ticks i.f { background: var(--ink); height: 18px; }
.ticks i.x { background: var(--over); height: 18px; }
.ticks i.r::after { content: ""; position: absolute; left: 0; right: -2px; bottom: -6px; height: 2px; background: var(--good); opacity: .85; }
.ticks i.r.re::after { right: 0; border-radius: 0 2px 2px 0; }
.ticks i.r:first-child::after { border-radius: 2px 0 0 2px; }
.lane.sous .ticks i.f { background: var(--ink); }
.lane.ok .v b { color: var(--good); }
.lane.dessus .v b { color: var(--over); }
.meter { position: relative; height: 10px; border-radius: 5px; background: var(--paper-2); overflow: visible; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--ink); transition: width .6s var(--ease); }
.meter > u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--good); border-radius: 2px; }
.meter > s { position: absolute; top: 0; bottom: 0; background: var(--good-wash); border-radius: 5px; }
.lanes-foot { font-size: 12.5px; color: var(--ink-3); padding: 0 16px 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.lanes-foot span { display: inline-flex; align-items: center; gap: 6px; }
.lanes-foot i { display: inline-block; width: 8px; height: 12px; border-radius: 2px; background: var(--ink); }
.lanes-foot i.e { background: var(--paper-2); }
.lanes-foot i.r { width: 14px; height: 2px; background: var(--good); }

/* Tableau de chiffres (box score) */
.box { display: grid; grid-template-columns: 1fr 1fr; }
.box > div { padding: 14px 16px 15px; position: relative; min-width: 0; }
.box > div:nth-child(even) { border-left: 1px solid var(--rule); }
.box > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
.box .l { font-size: 11.5px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .075em; color: var(--ink-3); }
.box .v { font-size: 34px; line-height: 1; font-weight: 780; font-stretch: 62%; margin-top: 8px; letter-spacing: -.01em; white-space: nowrap; }
.box .v small { font-size: 15px; font-weight: 650; font-stretch: 75%; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.box .d { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.35; }
.box .d.ok { color: var(--good); } .box .d.warn { color: var(--under); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--card); border-radius: var(--r-l); box-shadow: var(--lift), inset 0 0 0 1px rgba(20, 18, 16, .045); overflow: hidden; }
.kpi { padding: 14px 16px 15px; min-width: 0; }
.kpi:nth-child(even) { border-left: 1px solid var(--rule); }
.kpi:nth-child(n+3) { border-top: 1px solid var(--rule); }
.kpi .l { font-size: 11.5px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .075em; color: var(--ink-3); }
.kpi .v { font-size: 30px; font-weight: 780; font-stretch: 62%; margin-top: 8px; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.kpi .v small { font-size: 14px; color: var(--ink-3); font-weight: 650; font-stretch: 75%; margin-left: 3px; letter-spacing: 0; }
.kpi .d { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.35; }

/* ---------- Séance ---------- */
.session { position: fixed; inset: 0; z-index: 40; background: var(--paper); display: flex; flex-direction: column; animation: monte .36s var(--ease); }
@keyframes monte { from { transform: translateY(26px); opacity: 0; } to { transform: none; opacity: 1; } }
.session-head { padding: calc(var(--safe-top) + 4px) 10px 10px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px; background: rgba(242, 240, 234, .94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); position: relative; z-index: 2; }
.session-head .ttl { min-width: 0; text-align: center; }
.session-head .ttl b { display: block; font-size: 21px; line-height: 1.05; font-weight: 800; font-stretch: 62%; text-transform: uppercase; letter-spacing: .005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-head .ttl > span { display: block; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-head .icon-btn { box-shadow: none; }
.saved { display: inline-flex; align-items: center; gap: 4px; color: var(--good); font-weight: 650; animation: entree .4s var(--ease) both; }
.saved svg { width: 13px; height: 13px; stroke-width: 2.6; }
.segbar { display: flex; gap: 2px; margin: 0 20px; height: 5px; }
.segbar i { flex: 1; border-radius: 2px; background: var(--paper-3); transition: background .35s var(--ease); }
.segbar i.f { background: var(--ink); }
.segbar i.s { background: var(--ink-4); }
.segbar i.c { background: var(--accent); }
.segbar i.gap { margin-left: 4px; }
.session-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 14px 250px; overscroll-behavior-y: contain; }
.sbrief { margin: 0 2px 14px; }

/* Bloc exercice */
.ex-card { position: relative; border-radius: var(--r-l); transition: background .25s, box-shadow .25s; }
.ex-card + .ex-card { margin-top: 6px; }
.ex-card:not(.current) .ex-head { border-top: 1px solid var(--rule); }
.ex-card:first-of-type .ex-head, .ex-card.current + .ex-card .ex-head { border-top-color: transparent; }
.ex-card.current { background: var(--card); box-shadow: var(--lift), inset 0 0 0 1px rgba(20, 18, 16, .05); margin: 10px 0; }
.ex-card.open:not(.current) { background: var(--card); box-shadow: inset 0 0 0 1px rgba(20, 18, 16, .06); margin: 10px 0; }
.ex-head { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; padding: 14px 14px 14px 10px; width: 100%; text-align: left; }
.ex-num { font-size: 26px; line-height: 1; font-weight: 820; font-stretch: 62%; color: var(--ink-4); text-align: center; font-variant-numeric: tabular-nums; padding-top: 1px; }
.ex-num svg { width: 22px; height: 22px; stroke-width: 2.4; color: var(--good); }
.ex-card.current .ex-num { color: var(--accent); }
.ex-name { font-weight: 680; font-size: 17px; line-height: 1.25; letter-spacing: -.012em; }
.ex-card.done .ex-name { color: var(--ink-2); font-weight: 600; }
.ex-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ex-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ex-tags:empty { display: none; }
.ex-body { padding: 0 14px 14px 14px; }
/* Fiche : libellés à gauche, texte à droite */
.brief { display: grid; grid-template-columns: 78px 1fr; gap: 0 12px; margin: 0 0 4px; }
.brief dt, .brief dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.45; }
.brief dt { font-size: 11px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding-top: 11px; }
.brief dd { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.brief dd b { color: var(--ink); font-weight: 660; }
.brief dt.acc { color: var(--accent-ink); }
.brief dd.acc { color: var(--ink); }
.brief dt.warn { color: var(--under); }
.brief dd.warn { color: #6b4100; }
.brief .faint { color: var(--ink-3); }
/* Séries */
.sets { margin-top: 8px; }
.sets-head { display: grid; grid-template-columns: 30px 1fr auto 26px; gap: 10px; padding: 0 10px 6px; }
.sets-head span { font-size: 10.5px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.sets-head span:nth-child(3) { text-align: right; }
.set-row { display: grid; grid-template-columns: 30px 1fr auto 26px; align-items: center; gap: 10px; min-height: 58px; padding: 6px 10px; border-radius: 12px; width: 100%; text-align: left; position: relative; transition: background .2s; }
.set-row + .set-row { margin-top: 2px; }
.set-row:active { background: var(--paper); }
.set-row .n { font-size: 20px; font-weight: 800; font-stretch: 62%; color: var(--ink-4); text-align: center; font-variant-numeric: tabular-nums; }
.set-row .obj { font-size: 12.5px; color: var(--ink-3); line-height: 1.3; min-width: 0; }
.set-row .obj b { display: block; color: var(--ink-2); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.set-row .real { text-align: right; font-variant-numeric: tabular-nums; line-height: 1.15; }
.set-row .real b { display: block; font-size: 21px; font-weight: 780; font-stretch: 66%; letter-spacing: -.005em; white-space: nowrap; }
.set-row .real span { font-size: 12px; color: var(--ink-2); }
.set-row .real.vide { color: var(--ink-4); font-size: 14px; }
.set-row.next { background: var(--accent-wash); }
.set-row.next::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.set-row.next .n { color: var(--accent-ink); }
.set-row.next .obj b { color: var(--ink); }
.set-row.next .real.vide { color: var(--accent-ink); font-weight: 700; font-size: 14.5px; display: inline-flex; align-items: center; gap: 4px; }
.set-row.next .real.vide svg { width: 16px; height: 16px; stroke-width: 2.2; }
.set-row.fait .n { color: var(--ink); }
.set-row.fait.flash { animation: flash .9s var(--ease); }
@keyframes flash { 0% { background: rgba(30, 127, 79, .18); } 100% { background: transparent; } }
.ev { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; justify-self: end; }
.ev svg { width: 13px; height: 13px; stroke-width: 2.6; color: #fff; }
.ev.atteint { background: var(--good); }
.ev.dessus { background: var(--over); }
.ev.dessous { background: var(--under); }
.ev.saute { box-shadow: inset 0 0 0 1.75px var(--ink-4); }
.ev.saute svg { color: var(--ink-4); }
.ex-actions { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 10px; border-top: 1px solid var(--rule); padding-top: 4px; }
.ex-actions button { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12.5px; font-weight: 620; color: var(--ink-2); border-radius: 10px; }
.ex-actions button svg { width: 19px; height: 19px; color: var(--ink); }
.ex-actions button:active { background: var(--paper); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; margin: 18px 6px 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .ev { width: 16px; height: 16px; }
.legend .ev svg { width: 10px; height: 10px; }
/* Pied : chrono + action principale */
.session-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px calc(var(--safe-bottom) + 12px); background: linear-gradient(180deg, rgba(242, 240, 234, 0) 0%, rgba(242, 240, 234, .96) 32%); z-index: 3; }
.cta { width: 100%; min-height: 70px; border-radius: 18px; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 20px; text-align: left; box-shadow: 0 16px 34px -18px rgba(20, 18, 16, .75); transition: transform .12s var(--ease); }
.cta:active { transform: scale(.985); }
.cta .cta-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.cta .cta-n { font-size: 13px; font-weight: 560; color: var(--on-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta .cta-o { font-size: 25px; font-weight: 800; font-stretch: 64%; white-space: nowrap; letter-spacing: -.005em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.cta .go { width: 48px; height: 48px; }
.cta .go svg { width: 22px; height: 22px; }
.cta.fin { justify-content: center; text-align: center; font-size: 17.5px; font-weight: 700; }
.cta.fin .go { background: var(--good); }
.timer { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; background: var(--card); color: var(--ink); border-radius: 18px; padding: 12px 10px 14px 18px; margin-bottom: 10px; box-shadow: var(--float), inset 0 0 0 1px rgba(20, 18, 16, .05); overflow: hidden; animation: entree .3s var(--ease) both; }
.timer .tl { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 560; }
.timer .tl b { font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--accent-ink); margin-right: 6px; }
.timer .tv { font-size: 54px; line-height: .95; font-weight: 820; font-stretch: 62%; font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin-top: 2px; }
.timer .ta { display: flex; gap: 6px; }
.timer .ta button { min-width: 50px; height: 46px; border-radius: 12px; font-size: 15px; font-weight: 700; font-stretch: 85%; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1.25px var(--rule-2); padding: 0 10px; }
.timer .ta button:active { background: var(--paper); }
.timer .ta button.pass { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.timer .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--paper-2); }
.timer .bar div { height: 100%; background: var(--accent); transition: width .25s linear; }
.timer.fini { background: var(--accent); color: #fff; box-shadow: var(--float); }
.timer.fini .tl, .timer.fini .tl b { color: rgba(255, 255, 255, .88); }
.timer.fini .ta button { box-shadow: inset 0 0 0 1.25px rgba(255, 255, 255, .4); color: #fff; }
.timer.fini .ta button.pass { background: #fff; color: var(--accent-ink); }
.timer.fini .bar { background: rgba(255, 255, 255, .25); }
.timer.fini .bar div { background: #fff; }
.timer.fini .tv { animation: bat 1s ease-in-out 3; }
@keyframes bat { 50% { opacity: .55; } }

/* Aperçu en lecture seule */
.lecture { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); height: 28px; padding: 0 10px; border-radius: 8px; box-shadow: inset 0 0 0 1.25px var(--rule-2); }
.lecture svg { width: 15px; height: 15px; }
.ap-ex { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 16px 16px 16px 10px; position: relative; }
.ap-ex + .ap-ex::before { content: ""; position: absolute; left: 60px; right: 0; top: 0; height: 1px; background: var(--rule); }
.ap-grid { display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: 10px; }
.ap-grid > div { padding-right: 14px; margin-right: 14px; border-right: 1px solid var(--rule); min-width: 0; }
.ap-grid > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.ap-grid b { display: block; font-size: 18px; line-height: 1.05; font-weight: 760; font-stretch: 64%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ap-grid span { display: block; font-size: 10.5px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-top: 4px; }
.ap-cons { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; line-height: 1.45; }

/* ---------- Feuilles ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(20, 18, 16, .42); z-index: 60; opacity: 0; transition: opacity .25s ease; }
.backdrop.on { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: var(--paper); border-radius: 24px 24px 0 0; padding: 8px 16px calc(var(--safe-bottom) + 16px); max-height: 92dvh; overflow-y: auto; transform: translateY(100%); transition: transform .38s var(--spring); box-shadow: var(--float); max-width: 640px; margin: 0 auto; overscroll-behavior: contain; }
.sheet.on { transform: none; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--rule-2); margin: 0 auto 14px; }
.sheet h3 { font-size: 24px; line-height: 1.1; font-weight: 780; font-stretch: 82%; letter-spacing: -.015em; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 16px; padding: 0 2px; }
.sheet-head .lab { margin-bottom: 6px; }
.sheet .list, .sheet .card, .sheet .mod { box-shadow: inset 0 0 0 1px rgba(20, 18, 16, .05); }
.sheet .sec { margin-top: 24px; }

/* Pavé de saisie */
.pad-block { background: var(--card); border-radius: var(--r-l); padding: 14px; box-shadow: inset 0 0 0 1px rgba(20, 18, 16, .05); }
.pad-block + .pad-block { margin-top: 10px; }
.pad-label { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 12px; }
.pad-label > span:first-child { font-size: 11.5px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.pad-label .tgt { font-size: 13px; color: var(--accent-ink); font-weight: 650; }
button.tgt { height: 28px; padding: 0 10px; border-radius: 8px; background: var(--accent-wash); }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; align-items: center; }
.stepper button { height: 64px; border-radius: 16px; background: var(--paper); font-size: 32px; font-weight: 380; color: var(--ink); line-height: 1; display: grid; place-items: center; transition: transform .1s var(--ease), background .15s; }
.stepper button svg { width: 26px; height: 26px; stroke-width: 2; }
.stepper button:active { background: var(--paper-3); transform: scale(.95); }
.stepper input { width: 100%; height: 64px; text-align: center; font-size: 58px; font-weight: 820; font-stretch: 62%; background: transparent; border: 0; outline: none; font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: -.01em; padding: 0; }
.stepper .unit, .pad-block > .unit { font-size: 13px; color: var(--ink-3); text-align: center; margin-top: 2px; font-weight: 520; }
.choices { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.choices button { display: grid; place-items: center; height: 50px; border-radius: 12px; background: var(--paper); font-size: 22px; font-weight: 760; font-stretch: 64%; font-variant-numeric: tabular-nums; color: var(--ink); transition: background .15s, color .15s, transform .1s; }
.choices button:active { transform: scale(.94); }
.choices button.in { background: var(--accent-wash); color: var(--accent-ink); }
.choices button.on { background: var(--ink); color: var(--on-ink); }
.more { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.more span { flex: 1; text-align: center; font-size: 13px; color: var(--ink-3); }
.more .btn { min-width: 56px; }
.more .btn svg { width: 18px; height: 18px; }
.hint { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; padding: 0 4px; line-height: 1.45; }
.hint.acc { color: var(--accent-ink); font-weight: 560; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; background: var(--accent-wash); border-radius: 12px; }
.hint.acc svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

/* ---------- Formulaires ---------- */
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; min-height: 62px; position: relative; }
.field label { font-weight: 600; letter-spacing: -.008em; line-height: 1.3; }
.field label small { display: block; font-weight: 450; color: var(--ink-3); font-size: 13px; letter-spacing: 0; margin-top: 2px; }
.field input, .field select { width: 124px; height: 44px; text-align: right; background: var(--paper); border: 1.5px solid transparent; border-radius: 10px; padding: 0 12px; outline: none; font-size: 19px; font-weight: 700; font-stretch: 72%; font-variant-numeric: tabular-nums; transition: border-color .15s, background .15s; }
.field select { font-size: 16px; font-weight: 560; font-stretch: 100%; -webkit-appearance: none; appearance: none; text-align: right; text-align-last: right; }
.field input:focus, .field select:focus { border-color: var(--ink); background: var(--card); }
.field input::placeholder { color: var(--ink-4); font-weight: 560; font-size: 16px; font-stretch: 100%; }
.field input[type="date"] { width: 160px; -webkit-appearance: none; appearance: none; font-size: 16px; font-stretch: 100%; font-weight: 600; }
.field.col { flex-direction: column; align-items: stretch; }
.field b.num { font-size: 19px; font-weight: 760; font-stretch: 72%; }
textarea.note { width: 100%; min-height: 92px; background: var(--paper); border: 1.5px solid transparent; border-radius: 12px; padding: 12px; outline: none; resize: vertical; margin-top: 8px; line-height: 1.45; }
textarea.note:focus { border-color: var(--ink); background: var(--card); }
.scale { display: grid; gap: 5px; margin-top: 10px; }
.scale button { display: grid; place-items: center; height: 44px; border-radius: 10px; background: var(--paper); font-size: 18px; font-weight: 760; font-stretch: 66%; font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.scale button.on { background: var(--ink); color: var(--on-ink); }
.scale.s5 { grid-template-columns: repeat(5, 1fr); }
.scale.s11, .scale.s12 { grid-template-columns: repeat(6, 1fr); }
.scale button.haut.on { background: var(--danger); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--paper-3); border-radius: 99px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; width: 26px; height: 26px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform .25s var(--spring); box-shadow: 0 2px 6px rgba(20, 18, 16, .2); }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ---------- Graphiques ---------- */
.chart-wrap { position: relative; margin-top: 8px; touch-action: pan-y; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.c-grid { stroke: var(--rule); stroke-width: 1; }
.c-base { stroke: var(--rule-2); stroke-width: 1; }
.c-tick { fill: var(--ink-3); font-size: 10.5px; font-family: var(--f); font-stretch: 85%; font-variant-numeric: tabular-nums; }
.c-area { fill: var(--ink); opacity: .07; }
.c-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-line2 { fill: none; stroke: var(--under); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: .9; }
.c-dot { fill: var(--ink); stroke: var(--card); stroke-width: 2; }
.c-dot.last { fill: var(--accent); }
.c-dot2 { fill: var(--under); stroke: var(--card); stroke-width: 2; }
.c-val { fill: var(--ink); font-size: 12.5px; font-weight: 760; font-family: var(--f); font-stretch: 75%; }
.c-bande { fill: var(--good); opacity: .1; }
.c-bande-l { fill: var(--good); font-size: 10px; font-weight: 700; font-family: var(--f); font-stretch: 75%; letter-spacing: .06em; }
.c-bar { fill: var(--ink); }
.c-bar.cur { fill: var(--accent); }
.c-target { stroke: var(--good); stroke-width: 2; stroke-linecap: round; }
.c-cross { stroke: var(--ink); stroke-width: 1; opacity: .35; }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 6px 9px; border-radius: 8px; font-size: 12.5px; line-height: 1.2; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; box-shadow: var(--float); opacity: 0; transition: opacity .12s; }
.chart-tip.on { opacity: 1; }
.chart-tip b { font-weight: 760; font-stretch: 75%; font-size: 15px; display: block; }
.chart-vide { padding: 10px 0 4px; text-align: center; color: var(--ink-3); font-size: 14px; line-height: 1.4; }
.chart-vide > svg, .ghost > svg { display: block; width: 100%; height: auto; margin: 0 0 12px; overflow: visible; }
.g-grid { stroke: var(--rule-2); stroke-width: 1; fill: none; }
.g-line { stroke: var(--ink-4); stroke-width: 2.25; stroke-dasharray: .5 6.5; stroke-linecap: round; fill: none; }
.g-bar { fill: none; stroke: var(--ink-4); stroke-width: 1.25; stroke-dasharray: 3 4; }
.g-dot { fill: var(--card); stroke: var(--accent); stroke-width: 2; }
.ghost { padding: 22px 20px 20px; margin-top: 16px; }
.ghost > svg { margin-bottom: 18px; }
.ghost-t { font-size: 25px; line-height: 1; font-weight: 820; font-stretch: 62%; text-transform: uppercase; letter-spacing: .005em; }
.ghost-s { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; text-wrap: pretty; }
.ghost .btn { margin-top: 18px; }
.ring-bg { fill: none; stroke: var(--paper-2); }
.ring-fg { fill: none; stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring-txt { font-weight: 760; fill: var(--ink); }
.metric { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.metric .mv { font-size: 50px; line-height: .9; font-weight: 820; font-stretch: 62%; letter-spacing: -.01em; white-space: nowrap; }
.metric .mv small { font-size: 20px; font-weight: 700; font-stretch: 70%; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.metric .ml { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.delta { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 7px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.delta.up { background: var(--good-wash); color: var(--good); }
.delta.down { background: var(--under-wash); color: #8a4b00; }
.delta svg { width: 13px; height: 13px; stroke-width: 2.4; }
.chart-mod { padding: 16px 16px 12px; margin-top: 12px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chart-mod .metric { margin-top: 10px; }
.chart-mod .foot-note { margin-top: 8px; }
.chart-leg { margin: 8px 0 2px; }
.chart-leg i { display: inline-block; width: 9px; height: 11px; border-radius: 2px; background: var(--ink); }
.chart-leg i.cur { background: var(--accent); }
.chart-leg i.tgt { width: 14px; height: 2px; border-radius: 1px; background: var(--good); }
.chart-head .ct { font-size: 15px; font-weight: 680; letter-spacing: -.01em; }
.chart-head .cs { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.chart-head .cv { font-size: 30px; line-height: 1; font-weight: 800; font-stretch: 62%; text-align: right; white-space: nowrap; }
.chart-head .cv small { font-size: 14px; font-weight: 700; font-stretch: 75%; color: var(--ink-3); margin-left: 2px; }

/* ---------- Tableaux ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 10.5px; color: var(--ink-3); font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .07em; padding: 6px 6px 8px; white-space: nowrap; }
.tbl td { padding: 10px 6px; border-top: 1px solid var(--rule); vertical-align: top; }
.tbl tr:first-child td { border-top: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl td b { font-weight: 700; }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl.vol td, .tbl.vol th { white-space: nowrap; }
.tbl.dense td { padding: 8px 6px; }
.tbl.kv td:first-child { color: var(--ink-2); }
.tbl td.ok b { color: var(--good); }
.tbl td.dessus b { color: var(--over); }
.tbl td.sous b { color: var(--under); }
.tbl th.now { color: var(--accent-ink); }

/* ---------- Bilan ---------- */
.export { padding: 18px; }
.export-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.exp-big { font-size: 52px; line-height: .9; font-weight: 820; font-stretch: 62%; letter-spacing: -.01em; margin-top: 8px; white-space: nowrap; text-transform: uppercase; }
.exp-big small { font-size: 18px; font-weight: 700; font-stretch: 72%; color: var(--ink-3); margin-left: 6px; letter-spacing: 0; text-transform: none; }
.exp-st { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; background: var(--paper-2); font-size: 12px; font-weight: 700; font-stretch: 85%; color: var(--ink-2); white-space: nowrap; }
.exp-st i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.exp-st.ok { background: var(--good-wash); color: var(--good); }
.exp-st.ok i { background: var(--good); }
.exp-st.late { background: var(--danger-wash); color: var(--danger); }
.exp-st.late i { background: var(--danger); }
.exp-sub { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.exp-per { font-size: 16px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.export .when { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin-top: 14px; justify-content: center; }
.export .when i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.export .when.late i { background: var(--danger); }
.md-preview { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; background: var(--paper); border-radius: 12px; padding: 14px; max-height: 420px; overflow: auto; color: var(--ink-2); margin: 0; }
.point { display: flex; gap: 12px; padding: 12px 0; font-size: 14.5px; line-height: 1.45; }
.point + .point { border-top: 1px solid var(--rule); }
.point .pdot { width: 20px; height: 20px; border-radius: 6px; margin-top: 0; flex: none; background: var(--paper-2); display: grid; place-items: center; }
.point .pdot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.point.alerte .pdot { background: var(--under-wash); }
.point .pdot.ok { background: var(--good-wash); }
.point .pdot.ok::after { background: var(--good); }
.points .point:first-child { padding-top: 0; }
.points .point:last-child { padding-bottom: 0; }
.point.alerte .pdot::after { background: var(--under); width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); }

/* ---------- Nutrition ---------- */
.days7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: 16px -4px 0; }
.days7 button { padding: 8px 0 9px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; transition: background .2s; }
.days7 button span { font-size: 11px; font-weight: 700; font-stretch: 75%; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.days7 button b { font-size: 22px; line-height: 1; font-weight: 760; font-stretch: 62%; font-variant-numeric: tabular-nums; }
.days7 button.auj::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-top: 2px; }
.days7 button.on { background: var(--ink); color: var(--on-ink); }
.days7 button.on span { color: var(--on-ink-3); }
.fuel { padding: 18px 18px 16px; }
.fuel-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.fuel .kc { font-size: 58px; line-height: .86; font-weight: 820; font-stretch: 62%; letter-spacing: -.01em; }
.fuel .kc small { font-size: 18px; font-weight: 700; font-stretch: 72%; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.fuel .kl { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.fuel .tg { text-align: right; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.fuel .tg b { display: block; font-size: 15px; color: var(--ink); font-weight: 680; }
.split { display: flex; gap: 3px; margin-top: 16px; height: 10px; }
.split i { display: block; height: 100%; border-radius: 3px; background: var(--paper-2); min-width: 6px; transition: background .3s var(--ease); }
.split i.on { background: var(--ink); }
.split-l { display: flex; gap: 3px; margin-top: 6px; }
.split-l span { font-size: 10.5px; font-weight: 700; font-stretch: 72%; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: clip; min-width: 50px; }
.split i { min-width: 50px; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); gap: 0; }
.macros > div { min-width: 0; }
.macros > div + div { border-left: 1px solid var(--rule); padding-left: 12px; }
.macros .l { font-size: 11px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.macros .v { font-size: 26px; line-height: 1; font-weight: 780; font-stretch: 62%; margin-top: 6px; white-space: nowrap; }
.macros .v small { font-size: 13px; font-weight: 650; font-stretch: 75%; color: var(--ink-3); margin-left: 2px; }
.macros .c { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.macros .meter { height: 4px; margin-top: 8px; margin-right: 12px; }
.fuel-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-2); }
.fuel-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }
/* Fil de la journée */
.timeline { position: relative; }
.meal { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding-bottom: 14px; }
.meal::before { content: ""; position: absolute; left: 14px; top: 34px; bottom: 2px; width: 2px; background: var(--rule-2); border-radius: 1px; }
.meal:last-child::before { display: none; }
.meal.mange::before { background: var(--ink); }
.meal-check { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink-4); background: var(--paper); display: grid; place-items: center; color: transparent; margin-top: 12px; transition: background .2s var(--ease), box-shadow .2s; position: relative; z-index: 1; }
.meal-check svg { width: 16px; height: 16px; stroke-width: 2.6; }
.meal-check.on { background: var(--ink); box-shadow: none; color: var(--on-ink); }
.meal-check.on svg path { stroke-dasharray: 22; animation: trace .32s var(--ease) both; }
.meal-check.next { box-shadow: inset 0 0 0 2px var(--accent); }
.meal-card { background: var(--card); border-radius: var(--r-l); box-shadow: var(--lift), inset 0 0 0 1px rgba(20, 18, 16, .045); min-width: 0; overflow: hidden; }
.meal.mange .meal-card { box-shadow: inset 0 0 0 1px rgba(20, 18, 16, .07); background: transparent; }
.meal-head { display: block; padding: 14px 16px; width: 100%; text-align: left; }
.meal-time { font-size: 11px; font-weight: 700; font-stretch: 75%; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; display: flex; justify-content: space-between; gap: 8px; }
.meal-time em { font-style: normal; color: var(--accent-ink); }
.meal-name { display: block; font-size: 17px; font-weight: 680; letter-spacing: -.012em; line-height: 1.25; margin-top: 4px; }
.meal.mange .meal-name { color: var(--ink-2); }
.meal-macro { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); margin-top: 6px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.meal-macro b { color: var(--ink); font-weight: 700; }
.meal-macro .open { margin-left: auto; color: var(--ink); font-weight: 650; display: inline-flex; align-items: center; gap: 3px; }
.meal-macro .open svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.meal-macro .open.on svg { transform: rotate(180deg); }
.meal-body { padding: 0 16px 16px; animation: entree .3s var(--ease) both; }
.ingr { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.ingr:first-child { border-top: 1px solid var(--rule); }
.ingr b { font-size: 18px; font-weight: 760; font-stretch: 66%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ingr small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 1px; }
.recipe { margin-top: 14px; background: var(--paper); border-radius: 14px; padding: 14px; }
.recipe-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.recipe ol { counter-reset: st; }
.recipe li { counter-increment: st; position: relative; padding: 0 0 12px 34px; font-size: 15px; line-height: 1.45; }
.recipe li:last-child { padding-bottom: 0; }
.recipe li::before { content: counter(st, decimal-leading-zero); position: absolute; left: 0; top: 1px; font-size: 16px; font-weight: 800; font-stretch: 62%; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.recipe .astuce { font-size: 13.5px; color: var(--ink-2); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
/* Courses */
.cart { padding: 18px; }
.cart-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cart .big { font-size: 52px; line-height: .86; font-weight: 820; font-stretch: 62%; letter-spacing: -.01em; }
.cart .big small { font-size: 22px; color: var(--ink-3); font-weight: 760; }
.cart .money { text-align: right; }
.cart .money b { display: block; font-size: 26px; line-height: 1; font-weight: 780; font-stretch: 62%; }
.cart .money span { font-size: 12.5px; color: var(--ink-3); }
.ticks.full i { flex: 1 1 0; }
.cart .ticks { margin-top: 16px; height: 18px; }
.cart .ticks i { flex: 1 1 0; height: 12px; }
.cart .ticks i.f { height: 16px; }
.cart-foot { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; line-height: 1.45; }
.aisle { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 8px; }
.aisle b { font-size: 12px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .09em; color: var(--ink); }
.aisle span { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.shop-row { display: flex; align-items: center; gap: 13px; padding: 12px 16px; min-height: 58px; width: 100%; text-align: left; position: relative; }
.shop-row + .shop-row::before { content: ""; position: absolute; left: 55px; right: 0; top: 0; height: 1px; background: var(--rule); }
.shop-row:active { background: var(--paper); }
.shop-row .box { width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 1.75px var(--ink-4); display: grid; place-items: center; flex: none; color: transparent; transition: background .2s var(--ease), box-shadow .2s; }
.shop-row.on .box { background: var(--ink); box-shadow: none; color: var(--on-ink); }
.shop-row .box svg { width: 15px; height: 15px; stroke-width: 2.6; }
.shop-row.on .box svg path { stroke-dasharray: 22; animation: trace .3s var(--ease) both; }
.shop-row .t { display: block; font-weight: 620; letter-spacing: -.008em; transition: color .2s; }
.shop-row.on .t { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: var(--ink-4); }
.shop-row .q { display: block; font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.shop-row.on .q { color: var(--ink-3); }
.shop-row .p { font-size: 17px; font-weight: 740; font-stretch: 66%; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.shop-row.on .p { color: var(--ink-4); }
/* Repères : frise des phases */
.phases { padding: 6px 16px; }
.phase { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 12px 0; position: relative; }
.phase::before { content: ""; position: absolute; left: 8px; top: 30px; bottom: -12px; width: 2px; background: var(--rule-2); }
.phase:last-child::before { display: none; }
.phase .pn { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink-4); background: var(--card); margin-top: 2px; position: relative; z-index: 1; }
.phase.on .pn { box-shadow: none; background: var(--accent); }
.phase.on .pn::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; box-shadow: 0 0 0 2px var(--accent-wash); }
.phase .t { font-weight: 680; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.phase .s { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.4; }
.phase .dt { font-size: 12px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-top: 6px; }
.p0 { display: grid; gap: 14px; }
.p0 .ticks { margin-top: 8px; height: 18px; }
.p0v { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.p0v b { font-size: 18px; font-weight: 760; font-stretch: 62%; color: var(--ink); }
.textblock { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.textblock b { color: var(--ink); }

/* ---------- Six chiffres (Suivi) ---------- */
.six li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: baseline; padding: 13px 16px 13px 12px; position: relative; }
.six li + li::before { content: ""; position: absolute; left: 56px; right: 0; top: 0; height: 1px; background: var(--rule); }
.six .k { font-size: 22px; line-height: 1; font-weight: 820; font-stretch: 62%; color: var(--accent-ink); text-align: center; font-variant-numeric: tabular-nums; }
.six .t { font-weight: 620; letter-spacing: -.008em; }
.six .s { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; font-weight: 450; }
.six .v { text-align: right; font-size: 14px; color: var(--ink-2); line-height: 1.5; font-variant-numeric: tabular-nums; }
.six .v b { font-size: 19px; font-weight: 760; font-stretch: 66%; color: var(--ink); }
.six .v.multi { font-size: 13px; }
.six .v.multi b { font-size: 14px; font-stretch: 85%; }

/* ---------- Toast, bandeau, vide ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-bottom) + 14px); transform: translate(-50%, 14px); background: var(--ink); color: var(--on-ink); padding: 12px 16px 12px 14px; border-radius: 14px; font-weight: 600; font-size: 14.5px; z-index: 90; opacity: 0; transition: opacity .25s var(--ease), transform .3s var(--spring); max-width: calc(100% - 32px); pointer-events: none; box-shadow: var(--float); display: flex; align-items: center; gap: 10px; line-height: 1.3; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
body.en-seance .toast { bottom: calc(var(--safe-bottom) + 96px); }
.empty { text-align: center; padding: 30px 16px; color: var(--ink-2); }
.banner-update { position: fixed; top: calc(var(--safe-top) + 8px); left: 12px; right: 12px; z-index: 95; background: var(--ink); color: var(--on-ink); border-radius: 16px; padding: 12px 12px 12px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--float); animation: entree .35s var(--ease) both; }
.banner-update .muted { color: var(--on-ink-2); }
.banner-update .btn.primary { background: var(--accent); color: #fff; }
.foot-note { font-size: 12.5px; color: var(--ink-3); margin-top: 14px; line-height: 1.5; padding: 0 2px; }
.colophon { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 26px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 700px) { .session-body > *, .session-foot > div { max-width: 640px; margin-left: auto; margin-right: auto; } }

/* ---------- Démarrage : le motif de l'icône (4 graduations, la 3e en signal) ---------- */
.boot { height: 62vh; display: grid; place-items: center; }
.boot::before { content: ""; width: 72px; height: 5px; border-radius: 2px; background: linear-gradient(90deg, var(--ink) 0 22%, transparent 22% 26%, var(--ink) 26% 48%, transparent 48% 52%, var(--accent) 52% 74%, transparent 74% 78%, var(--paper-3) 78% 100%); animation: boot 1.1s var(--ease) infinite alternate; }
@keyframes boot { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boot::before { animation: none; } }

/* =========================================================================
   Ajouts Piste 1.0
   ========================================================================= */
.center { text-align: center; }
.link-in { color: var(--accent-ink); font-weight: 650; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sec .link { background: none; }
.onboard .ph { padding-top: 12vh; }

/* Barre de retour vers la séance en cours (au-dessus des onglets) */
.resume-bar { position: fixed; left: 10px; right: 10px; bottom: calc(var(--tab-h) + var(--safe-bottom) + 8px); z-index: 29; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px 8px 16px; border-radius: 16px; background: var(--ink); color: var(--on-ink); box-shadow: var(--float); text-align: left; animation: entree .3s var(--ease) both; max-width: 620px; margin: 0 auto; }
.resume-bar > i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 4px rgba(224, 68, 27, .25); animation: pouls 1.6s ease-in-out infinite; }
.resume-bar b { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.resume-bar .grow > span { display: block; font-size: 13px; color: var(--on-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-go { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 10px 0 14px; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14.5px; flex: none; }
.rb-go svg { width: 17px; height: 17px; stroke-width: 2.2; }
body.avec-reprise .screen { padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 110px); }
body.avec-reprise .toast { bottom: calc(var(--tab-h) + var(--safe-bottom) + 76px); }

/* Ruban : jour consulté */
.ribbon button.sel { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* Planning : un jour peut porter plusieurs séances */
.pday { display: grid; grid-template-columns: 44px 1fr 36px; gap: 8px; align-items: start; padding: 10px 8px 10px 10px; position: relative; }
.pday + .pday::before { content: ""; position: absolute; left: 62px; right: 0; top: 0; height: 1px; background: var(--rule); }
.pday .d { text-align: center; padding-top: 8px; }
.pday .d span { display: block; font-size: 11px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.pday .d b { display: block; font-size: 26px; line-height: 1; font-weight: 780; font-stretch: 62%; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pday.today::after { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.pday.today .d b, .pday.today .d span { color: var(--accent-ink); }
.pday.repos .d b { color: var(--ink-3); }
.pitems { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pses { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; text-align: left; background: var(--paper); transition: background .15s; }
.pses:active { background: var(--paper-2); }
.pses .t { display: block; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.pses .s { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 1px; line-height: 1.3; }
.pses.annulee { background: transparent; box-shadow: inset 0 0 0 1px var(--rule-2); }
.pses.annulee .t { color: var(--ink-3); text-decoration: line-through; }
.prepos { display: block; padding: 14px 2px; color: var(--ink-3); font-weight: 560; }
.padd { width: 36px; height: 36px; margin-top: 6px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); }
.padd svg { width: 18px; height: 18px; }
.padd:active { background: var(--paper); color: var(--ink); }
.ticks i.p { background: var(--paper-3); height: 14px; box-shadow: inset 0 0 0 1px var(--ink-4); }
.lanes-foot i.p { background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--ink-4); }

/* Choix d'un jour (déplacement) */
.dpick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dpick button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 9px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); min-width: 0; }
.dpick span { font-size: 10.5px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.dpick b { font-size: 21px; line-height: 1; font-weight: 760; font-stretch: 62%; font-variant-numeric: tabular-nums; }
.dpick em { font-style: normal; font-size: 9.5px; line-height: 1.15; color: var(--ink-2); text-align: center; height: 22px; overflow: hidden; word-break: break-word; padding: 0 2px; }
.dpick button.passe { opacity: .45; }
.dpick button.on { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.dpick button.on span, .dpick button.on em { color: var(--on-ink-2); }

/* Recherche et bibliothèque */
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule-2); }
.search svg { width: 19px; height: 19px; color: var(--ink-3); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; height: 100%; font-size: 17px; }
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); }
.li.exo { min-height: 64px; padding: 8px 14px 8px 10px; }
.thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: var(--paper-2); filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; }
.thumb.vide { display: grid; place-items: center; color: var(--ink-3); filter: none; mix-blend-mode: normal; }
.thumb.vide svg { width: 22px; height: 22px; }
.li .s b { color: var(--ink); font-weight: 620; }

/* Fiche : deux images en alternance */
.demo { position: relative; margin: 0; border-radius: var(--r-l); overflow: hidden; background: #fff; aspect-ratio: 4 / 3; box-shadow: inset 0 0 0 1px var(--rule); }
.demo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) contrast(1.04); }
.demo img + img { animation: alterne 2.4s steps(1, end) infinite; }
@keyframes alterne { 0% { opacity: 0; } 50% { opacity: 1; } }
.demo figcaption { position: absolute; left: 10px; bottom: 8px; font-size: 11px; color: var(--ink-3); background: rgba(255, 254, 251, .85); padding: 2px 7px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .demo img + img { animation: none; opacity: 0; } }

/* Champs compacts (séances perso, blocs de course) */
.mini { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.mini input { width: 74px; height: 40px; border-radius: 10px; border: 1.5px solid transparent; background: var(--paper); text-align: center; font-size: 17px; font-weight: 700; font-stretch: 75%; text-transform: none; letter-spacing: 0; color: var(--ink); outline: none; }
.mini input:focus { border-color: var(--ink); background: var(--card); }

/* Repas : actions */
.meal-acts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.meal-acts button { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 13px; font-weight: 640; color: var(--ink-2); position: relative; }
.meal-acts button + button::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--rule); }
.meal-acts button svg { width: 15px; height: 15px; }
.meal-acts button.on { color: var(--ink); background: var(--paper); }
.meal-acts button:active { background: var(--paper); }
.meal-check:not(.on) { color: transparent; }

/* Divers */
.sheet .tabs { margin-top: 0; }
.scale.s10 { grid-template-columns: repeat(10, 1fr); gap: 4px; }
.scale.s10 button { height: 42px; font-size: 17px; }
.fuel-foot { cursor: pointer; }
.fuel-foot .xsmall { color: var(--ink-3); line-height: 1.4; display: inline-block; margin-top: 2px; }
.board-list li .t em { font-style: normal; font-size: 12.5px; }
.field > span:first-child { min-width: 0; }
.ex-tags .chip svg { margin-left: -2px; }
.chip.line svg { width: 13px; height: 13px; }
button.chip { cursor: pointer; }
.hint { display: flex; gap: 8px; align-items: flex-start; }
.hint:not(.acc) { padding: 0 4px; margin-top: 0; margin-bottom: 4px; }
.session-body .callout + .callout { margin-top: 8px; }
.ex-name, .ex-sub { display: block; }
.timer > div:first-child { min-width: 0; }
.seg button { text-align: center; }
input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1) brightness(.4); }

/* 1.0.1 : titre de séance cliquable, résumé de la semaine */
.board-tap { display: block; width: 100%; text-align: left; color: inherit; padding: 0; }
.board-tap:active { opacity: .7; }
.wk-sum { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 11px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--lift), inset 0 0 0 1px rgba(20, 18, 16, .045); text-align: left; font-size: 14.5px; color: var(--ink-2); }
.wk-sum .lab { display: block; font-size: 11px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 3px; }
.wk-sum b { color: var(--ink); font-weight: 760; }
.wk-sum .chev { color: var(--ink-3); }
.wk-sum .chev svg { width: 18px; height: 18px; }
.wk-sum:active { transform: scale(.99); }
.field select.wide, .field input.wide { width: 200px; text-align: right; text-overflow: ellipsis; }
