/* MINOU FIT — jeu 16-bit : chat roux, pastèques, EXP, cœurs, étoiles. Sombre par défaut. */
:root {
  --bg: #181825;
  --surface: #242438;
  --surface2: #2c2e45;
  --line: #0e0e16;
  --text: #fff7eb;
  --muted: #b4b8d4;
  --melon: #ff3b5c;        /* chair de pastèque */
  --melon-deep: #b81d3a;
  --gold: #ffc824;
  --gold-deep: #d48806;
  --orange: #f27d24;
  --orange-deep: #c45112;
  --shadow-pixel: 4px 4px 0 #0e0e16;
  --rind: #34b357;         /* écorce */
  --rind-deep: #1e7538;
  --seed: #181825;
  --fire: #f27d24;
  --danger: #ff3b5c;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabs-h: 58px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 var(--sans); min-height: 100dvh;
  touch-action: manipulation; overscroll-behavior-y: none;
  -webkit-user-select: none; user-select: none;
}
input, textarea, select { -webkit-user-select: text; user-select: text; font: inherit; color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
svg.px { image-rendering: pixelated; shape-rendering: crispEdges; display: block; }

#app {
  max-width: 560px; margin: 0 auto;
  padding: calc(var(--sat) + 14px) 16px calc(var(--tabs-h) + var(--sab) + 110px);
}

/* ---------- Typo ---------- */
h2 { font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }
h2::before { content: ""; width: 8px; height: 8px; background: var(--melon); box-shadow: 4px 4px 0 var(--rind-deep); }
.title { font: 800 26px/1.1 var(--sans); letter-spacing: -.01em; text-transform: uppercase; margin: 0; }
.sub, .muted { color: var(--muted); font-size: 13px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- En-tête ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 6px 0 14px; border-bottom: 2px solid var(--line); }
.hero .date { font: 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 8px; }
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bar .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.back { width: 40px; height: 40px; border: 2px solid var(--line); background: var(--surface); font: 700 18px var(--mono); flex: none; }

/* ---------- Boutons (touches d'arcade) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 16px; font: 700 13px var(--mono); letter-spacing: .08em; text-transform: uppercase;
  background: var(--surface2); border: 2px solid var(--line); box-shadow: 0 3px 0 #000; color: var(--text);
}
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn.primary { background: linear-gradient(#ffe047, #f27d24); border-color: #0e0e16; color: #181825; box-shadow: 0 3px 0 var(--orange-deep); }
.btn.green { background: var(--rind); border-color: var(--rind); color: #04210f; box-shadow: 0 3px 0 var(--rind-deep); }
.btn.ghost { background: none; box-shadow: none; }
.btn.danger { color: var(--danger); }
.btn.block { display: flex; width: 100%; }
.btn.small { min-height: 36px; padding: 0 10px; font-size: 11px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 2px solid var(--line); padding: 14px; box-shadow: var(--shadow-pixel); }
.card + .card { margin-top: 12px; }
.list, .stat, .ex { box-shadow: var(--shadow-pixel); }
.card.melon { border-color: var(--gold); }
.card.rind { border-color: var(--rind-deep); }
.card h3 { margin: 0; font: 800 17px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .01em; }
.banner { display: flex; gap: 12px; align-items: center; background: var(--surface2); border: 2px dashed var(--line); padding: 12px; margin-top: 12px; font-size: 14px; }
.banner.warn { border-color: var(--fire); }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 14px; }
.empty svg { margin: 0 auto 12px; }

/* ---------- Trackers ---------- */
.tick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; }
.tick .box { width: 34px; height: 34px; border: 2px solid var(--line); background: var(--bg); display: grid; place-items: center; font: 800 18px var(--mono); color: transparent; flex: none; }
.tick.on .box { background: var(--rind); border-color: var(--rind); color: #04210f; }
.hearts { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0; }
.water-bar { height: 16px; background: var(--bg); border: 2px solid var(--line); margin: 10px 0; position: relative; }
.water-bar i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--melon) 0 10px, #ff6f88 10px 12px); max-width: 100%; }
.water-bar.full i { background: var(--rind); }
.big { font: 800 24px/1 var(--mono); font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 2px solid var(--line); padding: 10px 8px; text-align: center; }
.stat b { display: block; font: 800 18px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.stat span { font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- Listes ---------- */
.list { border: 2px solid var(--line); background: var(--surface); }
.item { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 2px solid var(--line); width: 100%; text-align: start; }
.item:first-child { border-top: 0; }
.item .name { font-weight: 650; }
.item .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chev { color: var(--muted); font: 700 16px var(--mono); }
.star { width: 40px; height: 40px; font-size: 20px; color: #4a4d70; flex: none; }
.star.on { color: var(--gold); }
.list-head { font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; background: var(--surface2); border-top: 2px solid var(--line); }
.list-head:first-child { border-top: 0; }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 8px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrapped { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip { flex: none; min-height: 38px; padding: 0 12px; border: 2px solid var(--line); background: var(--surface2); font: 600 13px var(--sans); white-space: nowrap; }
.chip.on { background: linear-gradient(#ffe047, #f27d24); border-color: #0e0e16; color: #181825; }
.chip.big-chip { min-height: 52px; font-size: 15px; flex: 1 1 40%; }
.chip.emoji { font-size: 26px; min-height: 60px; flex: 1; }

.field { width: 100%; min-height: 46px; padding: 0 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 0; outline: none; font-size: 16px; -webkit-appearance: none; appearance: none; }
.field:focus { border-color: var(--gold); }
label.lbl { display: block; font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }

/* ---------- Séance en cours ---------- */
.sess-head {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  margin: calc(-1 * (var(--sat) + 14px)) -16px 12px; padding: calc(var(--sat) + 10px) 16px 10px;
  border-bottom: 2px solid var(--line); display: flex; align-items: center; gap: 10px;
}
.sess-head .clock { font: 800 22px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--gold); }
.sess-head .nm { font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.ex { background: var(--surface); border: 2px solid var(--line); margin-top: 10px; }
.ex.open { border-color: var(--gold); }
.ex.linked { margin-top: 0; border-top-style: dashed; }
.ss-tag { font: 700 10px var(--mono); letter-spacing: .14em; color: var(--rind); margin: 12px 0 4px; text-transform: uppercase; }
.ex-head { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 12px; }
.ex-name { font: 750 16px/1.2 var(--sans); }
.ex-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ex-prog { font: 700 13px var(--mono); color: var(--muted); white-space: nowrap; }
.ex-prog.done { color: var(--rind); }
.ex-body { padding: 0 12px 12px; }
.ex-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tool { min-height: 32px; padding: 0 9px; background: var(--surface2); border: 2px solid var(--line); font: 600 11px var(--mono); letter-spacing: .04em; color: var(--muted); }
.tool.on { color: var(--rind); border-color: var(--rind-deep); }

.set { padding: 9px 0; border-top: 2px dotted #4a4d70; }
.set-main { display: grid; grid-template-columns: 38px 1fr 1fr 50px; gap: 8px; align-items: center; }
.set-n { height: 46px; background: var(--surface2); border: 2px solid var(--line); font: 800 15px var(--mono); color: var(--muted); }
.set.warm .set-n { border-style: dashed; color: var(--fire); border-color: var(--fire); }
.cell { position: relative; }
.cell input { width: 100%; height: 46px; padding-block: 0; padding-inline: 8px 34px; text-align: center; background: var(--bg); border: 2px solid var(--line); border-radius: 0; outline: none; font: 800 19px var(--mono); font-variant-numeric: tabular-nums; -webkit-appearance: none; }
.cell input::placeholder { color: var(--text); opacity: .28; }
.cell input:focus { border-color: var(--gold); }
.cell span { position: absolute; inset-inline-end: 7px; top: 50%; transform: translateY(-50%); font: 10px var(--mono); color: var(--muted); pointer-events: none; text-transform: uppercase; }
.set-ok { height: 46px; background: var(--surface2); border: 2px solid var(--line); font: 800 20px var(--mono); color: var(--muted); box-shadow: 0 3px 0 #000; }
.set-ok:active { transform: translateY(3px); box-shadow: none; }
.set.done .set-ok { background: var(--rind); border-color: var(--rind); color: #04210f; box-shadow: 0 3px 0 var(--rind-deep); }
.set.done .cell input { border-color: var(--rind-deep); }
.rir { display: flex; align-items: center; gap: 4px; margin-top: 7px; }
.rir em { font: normal 700 10px var(--mono); color: var(--muted); letter-spacing: .1em; width: 38px; flex: none; margin-inline-end: 4px; text-align: center; }
.rir button { flex: 1; height: 30px; background: var(--surface2); border: 2px solid var(--line); font: 700 12px var(--mono); color: var(--muted); }
.rir button.f { flex: 1.9; }
.rir button.on { color: #14060a; border-color: transparent; }
.rir button.on[data-rir="F"] { background: #ff3b4e; }
.rir button.on[data-rir="0"] { background: #ff6a4d; }
.rir button.on[data-rir="1"] { background: #ffa531; }
.rir button.on[data-rir="2"] { background: #ffd84d; }
.rir button.on[data-rir="3"] { background: #a6e36a; }
.rir button.on[data-rir="4"] { background: #3ecf7a; }
.pr { display: inline-block; font: 800 11px var(--mono); color: #1a0d00; background: var(--fire); padding: 2px 6px; margin-inline-start: 6px; white-space: nowrap; }
.set-foot { display: flex; gap: 8px; margin-top: 10px; }
.hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

/* ---------- Détail ---------- */
.sets-line { font: 14px/1.7 var(--mono); font-variant-numeric: tabular-nums; }
.sets-line .w { color: var(--fire); }
.tagline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font: 600 11px var(--mono); border: 2px solid var(--line); padding: 3px 7px; color: var(--muted); }

/* ---------- Minuteur de repos ---------- */
#rest {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + var(--sab)); z-index: 20;
  background: var(--surface2); border-top: 2px solid var(--gold); overflow: hidden;
}
#rest .rest-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 154, 31, .3); transition: width .25s linear; }
#rest .rest-row { position: relative; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
#rest .rest-info { flex: 1; display: flex; align-items: baseline; gap: 10px; }
#rest .rest-label { font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#rest .rest-time { font: 800 30px/1 var(--mono); font-variant-numeric: tabular-nums; }
#rest .rest-btns { display: flex; gap: 6px; }
#rest button { min-width: 46px; height: 40px; padding: 0 8px; border: 2px solid var(--line); background: var(--bg); font: 700 12px var(--mono); }
#rest.over { background: var(--rind); border-color: var(--rind); color: #04210f; }
#rest.over .rest-label { color: #04210f; }
#rest.over .rest-fill { display: none; }
body.flash::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; background: var(--rind); animation: flash 1.2s steps(6) forwards; }
@keyframes flash { 0%, 40%, 80% { opacity: .55; } 20%, 60%, 100% { opacity: 0; } }

/* ---------- Onglets ---------- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; height: calc(var(--tabs-h) + var(--sab)); padding-bottom: var(--sab);
  background: var(--surface); border-top: 2px solid var(--line); display: flex; justify-content: center;
}
#tabs button { flex: 1; max-width: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font: 600 10px var(--mono); letter-spacing: .04em; }
#tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
#tabs button.on { color: var(--gold); }

/* ---------- Feuilles (modales) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .66); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto; background: var(--surface); border: 2px solid var(--line); border-bottom: 0; padding: 18px 16px calc(var(--sab) + 18px); -webkit-overflow-scrolling: touch; }
.sheet.tall { height: 90dvh; display: flex; flex-direction: column; overflow: hidden; }
.sheet.tall .scroll { flex: 1; overflow-y: auto; margin: 8px -16px 0; padding: 0 16px; -webkit-overflow-scrolling: touch; }
.sheet h3 { margin: 0 0 6px; font: 800 18px/1.2 var(--sans); text-transform: uppercase; }
.sheet p { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }

#toast { position: fixed; left: 50%; top: calc(var(--sat) + 12px); transform: translate(-50%, -260%); z-index: 95; background: var(--text); color: #14060a; padding: 10px 14px; font: 700 13px var(--mono); width: max-content; max-width: 92vw; text-align: center; transition: transform .2s steps(4); box-shadow: 4px 4px 0 var(--gold-deep); pointer-events: none; }
#toast.show { transform: translate(-50%, 0); }

/* ---------- Chat animé (planche de sprites 40x36, 2 images par mouvement) ---------- */
.pose {
  --s: 2; flex: none; width: calc(40px * var(--s)); height: calc(36px * var(--s));
  background: url(../icons/poses.png) no-repeat; background-size: calc(1120px * var(--s)) calc(36px * var(--s));
  background-position-x: calc(var(--f) * -40px * var(--s)); image-rendering: pixelated;
}
.pose.anim { animation: rep 1.3s steps(1) infinite; }
@keyframes rep { 0% { background-position-x: calc(var(--f) * -40px * var(--s)); } 50% { background-position-x: calc((var(--f) + 1) * -40px * var(--s)); } }
/* Images personnalisées (poses/<mouvement>-1.png et -2.png) : remplacent le chat par défaut */
.pose.custom { background: none; position: relative; image-rendering: auto; animation: none; }
.pose.custom img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pose.custom img.b { opacity: 0; }
.pose.custom.anim img.a { animation: frameA 1.3s steps(1) infinite; }
.pose.custom.anim img.b { animation: frameB 1.3s steps(1) infinite; }
@keyframes frameA { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes frameB { 0% { opacity: 0; } 50% { opacity: 1; } }
.ex-foot { display: flex; align-items: flex-end; gap: 12px; margin-top: 10px; }
.ex-foot .col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.stage { display: flex; justify-content: center; align-items: flex-end; height: 150px; padding-bottom: 6px; margin-top: 12px; background: linear-gradient(var(--surface2) 0 78%, #383b59 78%); border: 2px solid var(--line); box-shadow: var(--shadow-pixel); }

/* ---------- HUD ---------- */
.hud { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.hud-l { font: 800 13px var(--mono); color: var(--gold); letter-spacing: .06em; text-shadow: 1px 1px 0 var(--gold-deep); }
.exp { flex: 1; height: 14px; background: #0e0e16; border: 2px solid var(--text); position: relative; }
.exp i { position: absolute; inset: 0 auto 0 0; max-width: 100%; background: linear-gradient(#ffe047, #f27d24); }
.exp.green i { background: linear-gradient(#7be88a, #2fae56); }
.stars { display: flex; gap: 3px; }
.sess-head { flex-wrap: wrap; }
.sess-head .hud { flex: 1 0 100%; margin-top: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .pose.anim, .pose.custom.anim img, body.flash::after { animation: none; } }

#rest-cat:empty { display: none; }
#rest.over #rest-cat { display: none; }

/* ---------- Calendrier ---------- */
.cal-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-title { font: 800 17px var(--sans); text-transform: uppercase; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head div { text-align: center; font: 700 11px var(--mono); color: var(--muted); padding: 4px 0; }
.cal-d { aspect-ratio: 1; background: var(--surface); border: 2px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 700 14px var(--mono); color: var(--text); }
.cal-d.off { background: none; border-color: transparent; }
.cal-d.future { color: #6d7094; }
.cal-d.has { background: #3a3320; }
.cal-d.has .n { color: var(--gold); }
.cal-d.today { border-color: var(--gold); }
.cal-d.sel { outline: 2px solid var(--text); outline-offset: -4px; }
.cal-d .marks { display: flex; gap: 2px; height: 6px; }
.m-s, .m-c, .m-w { display: inline-block; width: 6px; height: 6px; }
.m-s { background: var(--gold); } .m-c { background: var(--rind); } .m-w { background: var(--melon); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.cal-legend i { margin-inline-end: 5px; }
.bar .chip { min-height: 34px; padding: 0 9px; font-size: 12px; }

/* ---------- Historique : onglets, graphiques ---------- */
.seg { display: grid; grid-template-columns: repeat(5, 1fr); border: 2px solid var(--line); background: var(--surface); margin-bottom: 14px; box-shadow: var(--shadow-pixel); }
.seg button { min-height: 42px; font: 700 12px var(--mono); letter-spacing: .02em; color: var(--muted); border-inline-start: 2px solid var(--line); }
.seg button:first-child { border-inline-start: 0; }
.seg button.on { background: linear-gradient(#ffe047, #f27d24); color: #181825; }
.chart { background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow-pixel); padding: 12px 12px 6px; margin-top: 12px; }
.chart-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15px; }
.chart-top b { text-transform: uppercase; font-weight: 800; }
.chart-top span { font-size: 13px; color: var(--muted); }
.chart-read { font-size: 13px; color: var(--text); margin-top: 4px; min-height: 18px; }
.chart svg { display: block; width: 100%; height: auto; margin-top: 4px; touch-action: pan-y; }
.chart .g { stroke: #3d4063; stroke-width: 1; }
.chart .gl { font: 10px ui-monospace, Menlo, monospace; fill: #b4b8d4; }
.chart .cross { stroke: #fff7eb; stroke-width: 1; stroke-dasharray: 2 3; opacity: .7; }
.spark { width: 64px; height: 24px; flex: none; }
.warn { color: var(--fire); }
.stats { row-gap: 8px; }
.m-b { background: #5ce1e6; }
input[type="date"].field { display: block; min-width: 0; text-align: start; }

/* ---------- Calendrier : prévu, cardio ---------- */
.m-p, .m-k { display: inline-block; width: 6px; height: 6px; }
.m-p { border: 2px solid var(--gold); box-sizing: border-box; }
.m-k { background: #b98cff; }
.cal-d .marks { gap: 1px; }
.cal-legend { gap: 6px 12px; }
.sheet .chip.emoji { min-height: 48px; font-size: 22px; }

/* ---------- Le chat parle ---------- */
.say { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 12px; background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow-pixel); font-size: 14px; }
.say span { flex: 1; }
#rest.over .rest-time { font-size: 19px; }
#rest.over .rest-btns button:not(.rest-skip) { display: none; }

/* ---------- Muscles, coach, profil ---------- */
.seg button { font-size: 11px; letter-spacing: 0; }
.bodies { display: flex; gap: 4px; }
.body { width: 50%; height: auto; display: block; }
.mz { cursor: pointer; }
.mz:active { stroke: #fff7eb; stroke-width: 3; }
.lv { display: inline-block; width: 10px; height: 10px; margin-inline-end: 5px; }
.lv.big { width: 18px; height: 18px; margin: 0; flex: none; border: 2px solid var(--line); }
.coach { background: var(--surface); border: 2px solid var(--gold); box-shadow: var(--shadow-pixel); padding: 10px 12px 12px; margin-top: 12px; }
.coach-h { display: flex; align-items: center; gap: 10px; font: 800 13px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.coach ul { margin: 8px 0 0; padding: 0; list-style: none; }
.coach li { font-size: 14px; line-height: 1.45; padding-block: 7px; padding-inline: 16px 0; position: relative; border-top: 2px dotted #4a4d70; }
.coach li:first-child { border-top: 0; }
.coach li::before { content: ""; position: absolute; inset-inline-start: 0; top: 14px; width: 7px; height: 7px; background: var(--melon); }
.coach b { color: var(--text); }
.tool.danger { color: var(--danger); border-color: var(--melon-deep); }
.tick.grow { width: auto; }

/* carte du corps (planche anatomie) et fiche « ce que ça travaille » */
.bodycv { width: 50%; height: auto; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mlist { margin-top: 10px; display: grid; gap: 10px; }
.mrow { display: flex; gap: 10px; align-items: flex-start; }
.mrow .name { font-weight: 700; }
.list-head .lv { vertical-align: -1px; }

/* séries au temps : bouton chrono dans la case des secondes */
.cell .hold { position: absolute; inset-inline-end: 3px; top: 50%; transform: translateY(-50%); min-width: 30px; height: 38px; padding: 0 6px; font: 700 10px var(--mono); color: var(--gold); background: var(--surface2); border: 2px solid var(--line); text-transform: uppercase; }
.cell .hold.on { color: #181825; background: var(--gold); }
.cell .hold b { font: 800 13px var(--mono); }

/* v2.13 : charge proposée, chat, trophées */
.advice { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin: 0 0 10px; padding: 8px 10px; border: 2px dashed var(--line); font-size: 13px; }
.advice b { color: var(--gold); }
.catbtn { background: none; border: 0; padding: 0; cursor: pointer; }
.catline { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 10px 12px; background: var(--surface2); border: 2px solid var(--line); color: var(--text); font: inherit; font-size: 14px; text-align: start; cursor: pointer; }
.catline b { color: var(--gold); font-family: var(--mono); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; background: var(--surface2); border: 2px solid var(--line); text-align: center; font-size: 11px; color: var(--muted); opacity: .45; }
.badge.on { opacity: 1; border-color: var(--gold); }
.badge .ic { width: 56px; height: 56px; object-fit: contain; image-rendering: pixelated; filter: grayscale(1); }
.badge.on .ic { filter: none; }
.badge span.ic.em { width: auto; font-size: 36px; line-height: 56px; }
.badge b { font-size: 12px; color: var(--text); }

.thumb { width: 44px; height: 44px; object-fit: contain; flex: none; }

/* Feuille des fourchettes de reps (2.19) */
.rr-row { margin-bottom: 6px; }
.field.rr-in { width: 76px; flex: none; text-align: center; padding: 0 4px; min-height: 42px; }
.cell .tgt { position: absolute; inset-inline-end: 3px; top: 50%; transform: translateY(-50%); min-width: 30px; height: 38px; padding: 0 4px; font: 700 10px var(--mono); color: var(--muted); background: var(--surface2); border: 2px solid var(--line); }
.cell .tgt.on { color: var(--gold); }
.set.done .cell .tgt { background: none; border-color: transparent; }
.cell:has(.tgt) input { padding-inline-end: 44px; }

/* série dégressive : palier enchaîné sans repos, en retrait sous la série qui précède */
.set.drop { margin-inline-start: 18px; border-inline-start: 3px solid var(--gold); padding-inline-start: 6px; }
.set.drop .set-n { color: var(--gold); font: 800 18px var(--mono); }

/* ---------- 2.28 : vue de l'année, défis perso, minous ---------- */
.seg.two { grid-template-columns: repeat(2, 1fr); }
.seg.two button { min-height: 36px; }
.yg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ym { background: var(--surface); border: 2px solid var(--line); padding: 8px 7px 9px; color: var(--text); font: inherit; text-align: start; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: 6px 4px; cursor: pointer; min-width: 0; }
.ym-t { font: 800 12px var(--sans); text-transform: uppercase; }
.ym-n { font: 700 11px var(--mono); color: var(--gold); }
.ym-g { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; min-width: 0; }
.ym-g i, .yl { display: block; aspect-ratio: 1; background: #4a4d6e; }
.ym-g i.x { background: none; }
.ym-g i.s, .yl.s { background: var(--gold); }
.ym-g i.k, .yl.k { background: #b98cff; }
.ym-g i.f, .yl.f { background: none; box-shadow: inset 0 0 0 1px #34364f; }
.ym-g i.t { outline: 2px solid var(--text); outline-offset: 1px; }
.yl { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; }
.card.defi { margin-top: 10px; }
.pp { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 2px solid var(--line); }
.pp.head { border-top: 0; padding-top: 0; font: 700 11px var(--mono); color: var(--muted); text-transform: uppercase; }
.pp .name { font-weight: 650; min-width: 0; }
.pc { width: 78px; flex: none; text-align: center; font: 700 12px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc.ok { color: var(--rind); font-size: 16px; }
.pc.dim { opacity: .5; }

/* Club Minou */
.cl-av { object-fit: contain; image-rendering: pixelated; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.cl-dot { background: var(--melon); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; font-family: var(--mono); }
.cl-rank { width: 22px; text-align: center; color: var(--gold); flex: none; }
.cl-me { color: var(--gold); font-size: 11px; font-family: var(--mono); margin-inline-start: 4px; }
.cl-feed { flex-direction: column; align-items: stretch; gap: 8px; }
.cl-ft b { display: block; }
.cl-ex { border-inline-start: 3px solid var(--line); padding-inline-start: 10px; display: grid; gap: 2px; }
.cl-rx { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cl-st { background: var(--surface2); border: 2px solid var(--line); border-radius: 10px; padding: 4px 8px; font-size: 15px; min-height: 34px; color: var(--text); font-family: var(--mono); }
button.cl-st.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-deep) inset; }
.cl-code { text-align: center; margin: 14px 0 6px; }
.cl-code .big { color: var(--gold); letter-spacing: 1px; word-break: break-all; }
.cl-qr { width: 168px; margin: 6px auto 12px; background: #fff; padding: 6px; border-radius: 8px; }
.cl-qr svg { display: block; width: 100%; height: auto; }
.cl-show { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.cl-show img { width: 56px; height: 56px; object-fit: contain; image-rendering: pixelated; }
.cl-new { box-shadow: inset 4px 0 0 var(--gold); }
.cl-card { border-color: var(--gold-deep); }
.btn.cl-apple { background: #000; color: #fff; }

/* Club Minou · étape 3 */
.cl-tier { font-size: 40px; line-height: 1; flex: none; width: 52px; text-align: center; }
.item.cl-up { box-shadow: inset 4px 0 0 var(--rind); }
.item.cl-down { box-shadow: inset 4px 0 0 var(--melon); }
.cl-z { width: 18px; text-align: center; font-size: 13px; flex: none; }
.cl-up .cl-z { color: var(--rind); } .cl-down .cl-z { color: var(--melon); }
.cl-good { color: var(--rind); } .cl-bad { color: var(--melon); }
.badge[data-act] { cursor: pointer; }

/* Arabe (html[dir=rtl], posé par js/i18n.js) : les lettres arabes sont liées, l'espacement les casserait ;
   les petites étiquettes en capitales gagnent un peu de taille ; nombres, champs de saisie et graphiques restent de gauche à droite. */
html[dir="rtl"] body, html[dir="rtl"] body * { letter-spacing: 0 !important; }
html[dir="rtl"] body { font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, Arial, sans-serif; }
html[dir="rtl"] h2, html[dir="rtl"] .list-head, html[dir="rtl"] label.lbl, html[dir="rtl"] .sess-head .nm, html[dir="rtl"] .ss-tag, html[dir="rtl"] .rest-label { font-size: 13px; }
html[dir="rtl"] .stat span, html[dir="rtl"] #tabs button, html[dir="rtl"] .rir em, html[dir="rtl"] .cell span { font-size: 11px; }
html[dir="rtl"] .btn, html[dir="rtl"] .seg button { font-family: inherit; font-weight: 700; }
html[dir="rtl"] input[type="number"], html[dir="rtl"] input[inputmode="numeric"], html[dir="rtl"] input[inputmode="decimal"], html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="date"] { direction: ltr; }
html[dir="rtl"] svg, html[dir="rtl"] canvas, html[dir="rtl"] .mono.num { direction: ltr; }

/* Pass Fondateur et vidéos récompensées (2.34) */
.pay-badge { display: inline-block; font: 800 11px var(--mono); color: #1a0d00; background: var(--gold); padding: 3px 8px; white-space: nowrap; box-shadow: 0 2px 0 var(--gold-deep, #b06000); }
.card h3 + .pay-badge { margin-top: 4px; }
.pay-hero h3 { font-size: 20px; }
.pay-perk { gap: 10px; }
.pay-ok { color: var(--rind, #34b357); font-weight: 900; width: 18px; flex: none; text-align: center; }
.pay-price { text-align: center; }
.pay-price .big { color: var(--gold); font-size: 34px; }
.pay-x2 { color: var(--gold); font-family: var(--mono); margin-top: 6px; }
.pay-shop { margin-bottom: 10px; }
