/* Fonte — app shell mobile, une colonne, barre d'onglets en bas.
   Couleurs des macros = code couleur des disques olympiques. */
:root {
  --bg: #F1F2EF;
  --surface: #FFFFFF;
  --surface-2: #F7F8F5;
  --ink: #15171A;
  --ink-2: #5E636B;
  --ink-3: #8D929A;
  --line: #E2E4DF;
  --accent: #E8361E;       /* disque rouge */
  --accent-soft: #FDE9E5;
  --p: #E8361E;            /* protéines — rouge */
  --c: #2E62F0;            /* glucides — bleu */
  --f: #E9AE00;            /* lipides — jaune */
  --fib: #1F9D55;          /* fibres — vert */
  --water: #2BA3D8;
  --ok: #1F9D55;
  --ok-soft: #E3F4EA;
  --warn: #D97F00;
  --warn-soft: #FCF0DC;
  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 20px;
  --r-sm: 12px;
  --shadow: 0 0 0 1px rgba(21,23,26,.035), 0 1px 2px rgba(21,23,26,.04), 0 10px 28px -10px rgba(21,23,26,.12);
  --shadow-lg: 0 0 0 1px rgba(21,23,26,.04), 0 2px 4px rgba(21,23,26,.04), 0 24px 48px -18px rgba(21,23,26,.22);
  --tabbar: 64px;
  --tab-gap: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font: 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; border-radius: 6px; }
.num, .tab-num { font-variant-numeric: tabular-nums; }
.ic16 { width: 16px; height: 16px; vertical-align: -3px; margin-right: 3px; }
.card.row > svg, .li > svg, .day > svg, .ex-top > svg { width: 20px; height: 20px; flex: none; color: inherit; opacity: .7; }
.card-h > svg, .empty > svg { width: 22px; height: 22px; color: var(--ink-3); flex: none; }

/* ---------- Shell ---------- */
#app { max-width: 560px; margin: 0 auto; min-height: 100%; position: relative; }
.view {
  padding: calc(env(safe-area-inset-top, 0px) + 14px) max(16px, env(safe-area-inset-right, 0px)) calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 28px) max(16px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 14px;
}
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 6px; }
.eyebrow { font: 600 11.5px/1 var(--body); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.title {
  font: 800 34px/0.95 var(--display); font-stretch: 78%; letter-spacing: -.01em;
  margin: 6px 0 0; text-wrap: balance;
}
.h2 { font: 750 19px/1.1 var(--display); font-stretch: 88%; margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grid2 > *, .grid3 > *, .grid4 > *, .sheet-b > *, .view > * { min-width: 0; }
.sheet-b > *, .view > * { flex-shrink: 0; }
.ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 0 max(8px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(8px, env(safe-area-inset-left, 0px));
}
.tabbar-inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabbar); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-3); font: 600 11px/1 var(--body); position: relative; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--ink); }
.tab.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tab .dot { position: absolute; top: 10px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.ink { background: var(--ink); color: #fff; }
.card.ink .muted { color: #A9AEB6; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-label { font: 650 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 8px 2px -2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 650;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  transition: transform .08s ease, background .15s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--accent); }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 12px; border-radius: 11px; font-size: 13.5px; }
.btn.lg { height: 54px; font-size: 16px; border-radius: 16px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.plain { background: transparent; border: 0; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick button { background: var(--surface); border-radius: 16px; padding: 12px 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 7px; font: 600 12px/1.1 var(--body); box-shadow: var(--shadow); }
.quick .qi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); }
.quick .qi svg { width: 21px; height: 21px; }
.quick button:first-child .qi { background: var(--accent); color: #fff; }

/* ---------- Chips / segmented ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; margin: 0 -16px; padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 600 13px/1 var(--body); color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #E4E6E1; border-radius: 13px; padding: 3px; gap: 3px; }
.seg button { height: 36px; border-radius: 10px; font: 650 13.5px/1 var(--body); color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font: 650 12px/1 var(--body); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.red { background: var(--accent-soft); color: var(--accent); }
.pill svg { width: 13px; height: 13px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font: 600 12.5px/1 var(--body); color: var(--ink-2); }
.input, select.input, textarea.input {
  height: 48px; width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--surface);
  border-radius: 13px; padding: 0 14px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea.input { height: auto; padding: 12px 14px; min-height: 80px; resize: vertical; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21,23,26,.08); }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 44px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: #D5D8D2; border-radius: 99px; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(20px); }

/* ---------- Calorie ring & macros ---------- */
.hero-cal { display: grid; grid-template-columns: 148px 1fr; gap: 18px; align-items: center; }
.ring-wrap { position: relative; width: 148px; height: 148px; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-center b { font: 800 36px/1 var(--display); font-stretch: 80%; font-variant-numeric: tabular-nums; }
.ring-center span { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.macro { display: flex; flex-direction: column; gap: 5px; }
.macro + .macro { margin-top: 11px; }
.macro-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.macro-top b { font-weight: 700; }
.macro-top .num { color: var(--ink-2); }
.bar { height: 8px; border-radius: 99px; background: #EBEDE8; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.bar.over > i { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 4px, transparent 4px 8px) !important; }
.mdot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: 0; }
.macros-inline { display: flex; gap: 10px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.macros-inline b { font-weight: 650; }
.mp { color: var(--p); } .mc { color: var(--c); } .mf { color: #B88900; }

.stat { display: flex; flex-direction: column; gap: 3px; }
.stat b { font: 800 26px/1 var(--display); font-stretch: 82%; font-variant-numeric: tabular-nums; }
.stat b small { font: 600 13px var(--body); color: var(--ink-2); margin-left: 2px; }
.stat span { font-size: 12px; color: var(--ink-2); }
.delta-down { color: var(--ok); } .delta-up { color: var(--accent); }

.coach { display: flex; gap: 12px; align-items: flex-start; }
.coach-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.coach-ic svg { width: 19px; height: 19px; }
.coach p { margin: 0; font-size: 14px; }
.coach p + p { margin-top: 6px; }

.water { display: flex; gap: 5px; flex-wrap: wrap; }
.water button { width: 30px; height: 38px; border-radius: 8px 8px 11px 11px; border: 1.5px solid #CFE6F2; background: #F3FAFD; position: relative; overflow: hidden; }
.water button.on { border-color: var(--water); background: var(--water); }
.week-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.week-dots div { display: flex; flex-direction: column; align-items: center; gap: 6px; font: 600 11px/1 var(--body); color: var(--ink-3); }
.week-dots i { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); border: 1px dashed #D3D6D0; display: grid; place-items: center; color: #fff; }
.week-dots i svg { width: 17px; height: 17px; }
.week-dots .done i { background: var(--ink); border: 0; }
.week-dots .today { color: var(--ink); }
.week-dots .today i { border-color: var(--ink); border-style: solid; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); min-height: 56px; text-align: left; width: 100%; }
.li:first-child { border-top: 0; }
.li .t { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.li .s { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.li .r { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.li .r b { font-weight: 700; }
.thumb { width: 52px; height: 52px; border-radius: 12px; background: var(--surface-2) center/cover no-repeat; flex: none; border: 1px solid var(--line); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.meal-h { display: flex; align-items: center; justify-content: space-between; }
.meal-h .h2 { font-size: 18px; }
.empty { text-align: center; padding: 18px 10px; color: var(--ink-2); font-size: 13.5px; }
.empty svg { width: 30px; height: 30px; color: var(--ink-3); margin-bottom: 6px; }

/* ---------- Date nav ---------- */
.datenav { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-radius: 14px; padding: 4px; box-shadow: var(--shadow); }
.datenav b { font-weight: 700; text-transform: capitalize; }

/* ---------- Sheets ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15,17,20,.42); z-index: 60; opacity: 0; transition: opacity .22s; }
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 560px; margin: 0 auto;
  background: var(--bg); border-radius: 24px 24px 0 0; max-height: calc(100% - env(safe-area-inset-top, 0px) - 24px);
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.85,.25,1);
  box-shadow: 0 -10px 40px rgba(0,0,0,.15);
}
.sheet.show { transform: none; }
.sheet.full { top: 0; max-height: none; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); }
.sheet-grab { width: 40px; height: 5px; border-radius: 9px; background: #CDD0CA; margin: 9px auto 0; flex: none; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); flex: none; }
.sheet-h .h2 { font-size: 22px; font-stretch: 80%; font-weight: 800; }
.sheet-b { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 22px) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.sheet-f { padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 12px) max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); background: var(--bg); flex: none; }

/* ---------- Scanner ---------- */
.scanner { position: relative; border-radius: var(--r); overflow: hidden; background: #0E0F11; aspect-ratio: 4 / 3.4; max-width: 100%; }
.scanner #reader { width: 100%; height: 100%; }
.scanner #reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scanner .frame { position: absolute; inset: 22% 10%; border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.scanner .frame::before, .scanner .frame::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: scanline 1.8s ease-in-out infinite; }
.scanner .frame::after { display: none; }
@keyframes scanline { 0%,100% { transform: translateY(-38px); } 50% { transform: translateY(38px); } }
.scanner .hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: #fff; font-size: 13px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.scanner .status { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-align: center; padding: 20px; font-size: 14px; }

.food-head { display: flex; gap: 14px; align-items: center; }
.food-head .thumb { width: 64px; height: 64px; background-color: #fff; }
.food-head .thumb img { object-fit: contain; }
.nutri { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nutri div { background: var(--surface); border-radius: 14px; padding: 10px 8px; text-align: center; border-top: 4px solid var(--line); }
.nutri b { display: block; font: 800 22px/1 var(--display); font-stretch: 82%; font-variant-numeric: tabular-nums; }
.nutri span { font-size: 11.5px; color: var(--ink-2); }
.nutri .np { border-color: var(--p); } .nutri .nc { border-color: var(--c); } .nutri .nf { border-color: var(--f); } .nutri .nk { border-color: var(--ink); }
.nscore { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: #fff; font: 800 13px/1 var(--display); text-transform: uppercase; }
.qty { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Training ---------- */
.prog-card { position: relative; overflow: hidden; }
.prog-card .plate { position: absolute; right: -36px; top: -36px; width: 140px; height: 140px; border-radius: 50%; border: 18px solid rgba(255,255,255,.06); }
.prog-card .plate::after { content: ""; position: absolute; inset: 30px; border-radius: 50%; border: 6px solid rgba(255,255,255,.07); }
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 12px 12px 14px; box-shadow: var(--shadow); text-align: left; width: 100%; }
.day .n { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font: 800 15px/1 var(--display); flex: none; }
.day.next { outline: 2px solid var(--ink); }
.day.next .n { background: var(--accent); color: #fff; }
.day .go { width: 38px; height: 38px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.day .go svg { width: 17px; height: 17px; }

.wo-head { display: flex; align-items: center; gap: 10px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); flex: none; }
.wo-clock { font: 800 22px/1 var(--display); font-stretch: 80%; font-variant-numeric: tabular-nums; }
.ex-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ex-top { display: flex; gap: 12px; padding: 12px 12px 8px; align-items: center; }
.ex-top .thumb { width: 56px; height: 56px; }
.ex-name { font: 750 17px/1.15 var(--display); font-stretch: 90%; }
.ex-meta { padding: 0 12px 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.sets { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sets th { font: 650 10.5px/1 var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 6px 4px; text-align: center; }
.sets td { padding: 4px; text-align: center; }
.sets tr.done td { background: var(--ok-soft); }
.sets tr.done .set-n { background: var(--ok); color: #fff; }
.set-n { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; font: 750 13px/1 var(--body); background: var(--surface-2); }
.set-n.w { color: var(--warn); }
.prev { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.sets input { width: 100%; max-width: 76px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); text-align: center; font: 700 16px/1 var(--body); font-variant-numeric: tabular-nums; outline: none; }
.sets input:focus { border-color: var(--ink); background: #fff; }
.sets tr.done input { background: transparent; border-color: transparent; }
.chk { width: 40px; height: 40px; border-radius: 11px; border: 1.5px solid var(--line); display: inline-grid; place-items: center; color: var(--ink-3); background: #fff; }
.chk svg { width: 20px; height: 20px; }
tr.done .chk { background: var(--ok); color: #fff; border-color: var(--ok); }
.ex-actions { display: flex; gap: 6px; padding: 8px 12px 12px; }
.pr-flash { animation: prflash .9s ease; }
@keyframes prflash { 0% { box-shadow: 0 0 0 0 rgba(233,174,0,.7); } 100% { box-shadow: 0 0 0 16px rgba(233,174,0,0); } }

.restbar {
  position: absolute; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); z-index: 5;
  background: var(--ink); color: #fff; border-radius: 18px; padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); overflow: hidden;
}
.restbar .prog { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }
.restbar b { font: 800 28px/1 var(--display); font-stretch: 80%; font-variant-numeric: tabular-nums; min-width: 72px; }
.restbar button { height: 38px; min-width: 44px; border-radius: 11px; background: rgba(255,255,255,.12); color: #fff; font-weight: 700; font-size: 13px; padding: 0 10px; }

/* ---------- Exercise bank ---------- */
.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-tile { background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); text-align: left; display: flex; flex-direction: column; }
.ex-tile .img { aspect-ratio: 4/3; background: #fff center/cover no-repeat; position: relative; border-bottom: 1px solid var(--line); }
.ex-tile .img img { width: 100%; height: 100%; object-fit: cover; }
.ex-tile .img .pill { position: absolute; left: 8px; top: 8px; background: rgba(255,255,255,.92); }
.ex-tile .img .sel { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.ex-tile .img .sel svg { width: 16px; height: 16px; }
.ex-tile .cap { padding: 9px 10px 11px; }
.ex-tile .cap b { font-size: 13.5px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ex-tile .cap span { font-size: 11.5px; color: var(--ink-2); }
.ex-tile.picked { outline: 2.5px solid var(--ink); }
.ex-hero { border-radius: var(--r); overflow: hidden; background: #fff; aspect-ratio: 4/3; position: relative; box-shadow: var(--shadow); }
.ex-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }
.ex-hero .phase { position: absolute; right: 10px; bottom: 10px; }
.muscles { display: flex; gap: 6px; flex-wrap: wrap; }
.cue { background: var(--surface); border-left: 4px solid var(--accent); border-radius: 0 14px 14px 0; padding: 12px 14px; font-size: 14.5px; }
.steps { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
details summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details summary::-webkit-details-marker { display: none; }

/* ---------- Timer ---------- */
.big-clock { font: 800 clamp(64px, 22vw, 108px)/1 var(--display); font-stretch: 72%; font-variant-numeric: tabular-nums; text-align: center; letter-spacing: -.02em; }
.big-clock small { font-size: .45em; color: var(--ink-3); }
.timer-ring { position: relative; width: min(290px, 78vw); aspect-ratio: 1; margin: 6px auto; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring .inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-ring .inner .big-clock { font-size: clamp(56px, 18vw, 84px); }
.phase-lbl { font: 800 15px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.timer-ctrl { display: flex; justify-content: center; gap: 14px; align-items: center; }
.round-btn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.round-btn svg { width: 24px; height: 24px; }
.round-btn.main { width: 84px; height: 84px; background: var(--ink); color: #fff; border: 0; }
.round-btn.main svg { width: 32px; height: 32px; }
.round-btn.main.run { background: var(--accent); }
.laps .li { min-height: 44px; }
.interval-bg-work { --phase: var(--accent); }
.interval-bg-rest { --phase: var(--ok); }

/* ---------- Progress ---------- */
.chart-box { position: relative; height: 220px; }
.chart-box.sm { height: 160px; }
.meas-table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.meas-table { border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13.5px; min-width: 100%; }
.meas-table th, .meas-table td { padding: 9px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.meas-table th:first-child, .meas-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.meas-table th { font: 650 11px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.meas-table td small { display: block; font-size: 11px; }
.goalbar { height: 12px; border-radius: 99px; background: #EBEDE8; overflow: hidden; position: relative; }
.goalbar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 99px; }
.pr-row .medal { width: 38px; height: 38px; border-radius: 50%; background: #FFF4D1; color: #B88900; display: grid; place-items: center; flex: none; }
.pr-row .medal svg { width: 19px; height: 19px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px); transform: translate(-50%, -140%); z-index: 100; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .3s cubic-bezier(.2,.85,.25,1); display: flex; gap: 9px; align-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast { opacity: 0; visibility: hidden; transition: transform .3s cubic-bezier(.2,.85,.25,1), opacity .2s, visibility .3s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.gold { background: #1E1A0C; }
.toast.gold svg { color: #F2C230; }

.confirm-box { background: var(--surface); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (min-width: 600px) {
  .tabbar { border-radius: 20px 20px 0 0; }
}

/* =========================================================
   Passe UX/UI v2 : hiérarchie, héros, aperçu de séance, gestes
   ========================================================= */
.view.enter { animation: viewIn .28s cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
button.card, .day, .ex-tile { transition: transform .12s ease, box-shadow .15s; }
button.card:active, .day:active, .ex-tile:active { transform: scale(.985); }
button.li:active { background: var(--surface-2); }

/* En-tête */
.avatar { width: 42px; height: 42px; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; font: 800 17px/1 var(--display); flex: none; }
.avatar svg { width: 20px; height: 20px; }
.streak { display: inline-flex; align-items: center; gap: 5px; font: 650 12.5px/1 var(--body); color: var(--accent); }
.streak svg { width: 15px; height: 15px; }

/* Héros séance (carte encre + disque) */
.hero-wo { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: 22px; padding: 18px 18px 16px; box-shadow: 0 14px 30px rgba(21,23,26,.18); }
.hero-wo .disc { position: absolute; right: -54px; top: -54px; width: 190px; height: 190px; border-radius: 50%; border: 26px solid var(--accent); }
.hero-wo .disc::before { content: ""; position: absolute; inset: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.22); }
.hero-wo .disc::after { content: ""; position: absolute; inset: 56px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 7px rgba(255,255,255,.1); }
.hero-wo > * { position: relative; }
.hero-wo .eyebrow { color: #A9AEB6; }
.hero-wo h2 { font: 800 30px/1 var(--display); font-stretch: 76%; margin: 8px 0 10px; max-width: 72%; text-wrap: balance; }
.hero-wo .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; max-width: 80%; }
.hero-wo .tags span { height: 24px; padding: 0 9px; border-radius: 99px; background: rgba(255,255,255,.1); font: 600 12px/24px var(--body); color: #E6E8EC; }
.hero-wo .meta { display: flex; gap: 16px; font-size: 12.5px; color: #A9AEB6; margin-bottom: 14px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.hero-wo .meta b { color: #fff; font-weight: 650; }
.hero-wo .actions { display: flex; gap: 8px; }
.hero-wo .btn.ghosty { background: rgba(255,255,255,.1); color: #fff; border: 0; }
.hero-prog { height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; margin: 4px 0 14px; }
.hero-prog i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* Nutrition : tuiles macros */
.macro-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.mt { background: var(--surface-2); border-radius: 14px; padding: 10px 10px 9px; display: flex; flex-direction: column; gap: 6px; }
.mt .lbl { display: flex; align-items: center; gap: 6px; font: 650 12px/1 var(--body); color: var(--ink-2); }
.mt b { font: 800 20px/1 var(--display); font-stretch: 82%; font-variant-numeric: tabular-nums; }
.mt b small { font: 600 11.5px var(--body); color: var(--ink-3); margin-left: 1px; }
.mt .bar { height: 5px; }
.mt .left { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.kcal-line { display: flex; align-items: center; gap: 16px; }
.kcal-line .ring-wrap { width: 96px; height: 96px; flex: none; }
.kcal-line .ring-center b { font-size: 25px; }
.kcal-line .ring-center span { font-size: 10.5px; margin-top: 1px; }
.kcal-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; flex: 1; }
.kcal-stats div { display: flex; flex-direction: column; gap: 3px; }
.kcal-stats b { font: 800 20px/1 var(--display); font-stretch: 84%; font-variant-numeric: tabular-nums; }
.kcal-stats span { font-size: 11.5px; color: var(--ink-2); }

/* Coach */
.coach-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; }
.coach-card .hd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.coach-card .hd .coach-ic { width: 30px; height: 30px; border-radius: 9px; }
.coach-card .hd .coach-ic svg { width: 16px; height: 16px; }
.coach-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.coach-card li { display: grid; grid-template-columns: 8px 1fr; gap: 10px; font-size: 14px; line-height: 1.45; }
.coach-card li::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--accent); margin-top: 6px; }
.coach-card li:nth-child(2)::before { background: var(--c); }
.coach-card li:nth-child(3)::before { background: var(--f); }

/* Bande de semaine (nutrition) */
.weekstrip { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 6px 6px 8px; }
.weekstrip .wh { display: flex; align-items: center; justify-content: space-between; padding: 0 0 4px; }
.weekstrip .wh b { font-weight: 700; font-size: 14px; }
.weekstrip .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 0 6px; border-radius: 12px; font: 600 11px/1 var(--body); color: var(--ink-3); }
.wd .r { position: relative; width: 36px; height: 36px; }
.wd .r svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.wd .r b { position: absolute; inset: 0; display: grid; place-items: center; font: 750 13px/1 var(--body); color: var(--ink); font-variant-numeric: tabular-nums; }
.wd.on { background: var(--ink); color: #A9AEB6; }
.wd.on .r b { color: #fff; }
.wd:disabled { opacity: .35; }

/* Bouton flottant */
.fab { position: fixed; z-index: 35; right: max(18px, calc(50% - 262px)); bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 16px);
  height: 54px; padding: 0 20px 0 16px; border-radius: 18px; background: var(--accent); color: #fff; display: flex; align-items: center; gap: 8px;
  font: 700 15px/1 var(--body); box-shadow: 0 10px 24px rgba(232,54,30,.35); transition: transform .12s; }
.fab:active { transform: scale(.96); }
.fab svg { width: 22px; height: 22px; }

/* Repas */
.meal-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.meal-ic svg { width: 19px; height: 19px; color: var(--ink-2); }
.meal-share { height: 3px; border-radius: 9px; background: #EBEDE8; margin-top: 12px; overflow: hidden; }
.meal-share i { display: block; height: 100%; background: var(--ink); border-radius: 9px; }

/* Jour de programme */
.day .mus { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.day .last { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.week-group { font: 650 11.5px/1 var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 14px 0 6px; border-top: 1px solid var(--line); }
.week-group:first-child { border-top: 0; padding-top: 2px; }

/* Aperçu de séance */
.pv-ex { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pv-ex:first-child { border-top: 0; }
.pv-ex .n { font: 800 13px/1 var(--display); color: var(--ink-3); width: 16px; text-align: center; flex: none; }
.pv-ex .thumb { width: 56px; height: 56px; }
.pv-ex .t { font-weight: 650; line-height: 1.2; }
.pv-ex .s { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.pv-ex .sug { font-size: 12px; color: var(--ok); margin-top: 2px; font-weight: 600; }

/* Séance : progression et cartes repliées */
.wo-progress { height: 4px; background: var(--line); flex: none; }
.wo-progress i { display: block; height: 100%; background: var(--ok); transition: width .4s cubic-bezier(.2,.8,.2,1); }
.ex-card.collapsed { background: #FBFCFA; box-shadow: none; border: 1px solid var(--line); }
.ex-card.collapsed .ex-top { padding-bottom: 12px; }
.ex-card.collapsed .ex-name { font-size: 15.5px; }
.ex-card .done-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.ex-card .done-badge svg { width: 17px; height: 17px; }
.ex-card.current { outline: 2px solid var(--ink); }
.plates { display: flex; align-items: center; gap: 5px; padding: 2px 12px 4px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.plates .pl { height: 22px; min-width: 24px; padding: 0 6px; border-radius: 5px; display: inline-grid; place-items: center; color: #fff; font: 750 11px/1 var(--body); }
.pl-45 { background: #2E62F0; } .pl-35 { background: #E9AE00; color: #15171A !important; } .pl-25 { background: #1F9D55; }
.pl-10 { background: #F4F5F2; color: #15171A !important; border: 1px solid #D5D8D2; } .pl-5 { background: #15171A; } .pl-2 { background: #8D929A; }

/* Glisser pour fermer */
.sheet.dragging { transition: none; }
.sheet-grab { touch-action: none; }
.sheet:not(.full) .sheet-h { touch-action: none; }

/* ---------- Photos de progression ---------- */
.ph-slot { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; border: 1.5px dashed #CDD1CA; background: var(--surface); cursor: pointer; display: block; }
.ph-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.ph-slot.has { border-style: solid; border-color: transparent; }
.ph-slot.has img { display: block; }
.ph-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink-3); }
.ph-empty svg { width: 24px; height: 24px; }
.ph-empty b { font: 650 12.5px/1 var(--body); color: var(--ink-2); }
.ph-slot.has .ph-empty { display: none; }
.ph-name { position: absolute; left: 6px; bottom: 6px; height: 20px; padding: 0 7px; border-radius: 99px; background: rgba(21,23,26,.7); color: #fff; font: 650 11px/20px var(--body); display: none; }
.ph-slot.has .ph-name { display: block; }
.ph-x { position: absolute; right: 5px; top: 5px; width: 28px; height: 28px; border-radius: 50%; background: rgba(21,23,26,.7); color: #fff; display: none; place-items: center; }
.ph-x svg { width: 15px; height: 15px; }
.ph-slot.has .ph-x { display: grid; }
.ph-slot.busy::after { content: "Traitement…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.85); font: 600 12px var(--body); color: var(--ink-2); }

.ph-thumb { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ph-thumb i { position: absolute; left: 8px; bottom: 8px; height: 22px; padding: 0 9px; border-radius: 99px; background: rgba(21,23,26,.72); color: #fff; font: 650 11.5px/22px var(--body); font-style: normal; }
.ph-thumb.sm { width: 64px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-3); }
.ph-thumb.sm svg { width: 22px; height: 22px; }
.ph-thumb.tall { aspect-ratio: 3 / 4.2; }
.ph-thumb.missing img { visibility: hidden; }
.ph-pair { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; border-radius: 16px; overflow: hidden; }
.ph-go { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 40px; padding: 0 14px; border-radius: 99px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; gap: 7px; font: 700 13.5px/1 var(--body); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.ph-go svg { width: 17px; height: 17px; }
.ph-strip { display: flex; gap: 10px; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
.ph-strip::-webkit-scrollbar { display: none; }
.ph-day { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); }
.ph-day b { font: 650 12px/1 var(--body); color: var(--ink); }
.ph-day.add .ph-thumb { border: 1.5px dashed #CDD1CA; background: transparent; }

.cmp { position: relative; aspect-ratio: 3 / 4; max-height: 62vh; margin: 0 auto; width: 100%; border-radius: 18px; overflow: hidden; background: #0E0F11; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.cmp-a { position: absolute; inset: 0; }
.cmp-line { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 10px rgba(0,0,0,.35); pointer-events: none; }
.cmp-line span { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.cmp-line span svg { width: 20px; height: 20px; }
.cmp-lbl { position: absolute; top: 10px; height: 26px; padding: 0 10px; border-radius: 99px; background: rgba(21,23,26,.72); color: #fff; font: 700 11.5px/26px var(--body); letter-spacing: .04em; text-transform: uppercase; pointer-events: none; }
.cmp-lbl.l { left: 10px; } .cmp-lbl.r { right: 10px; background: var(--accent); }
.cmp-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; text-align: center; }
.cmp-stats div { display: flex; flex-direction: column; gap: 3px; }
.cmp-stats b { font: 800 22px/1 var(--display); font-stretch: 82%; font-variant-numeric: tabular-nums; }
.cmp-stats span { font-size: 11.5px; color: var(--ink-2); }

/* =========================================================
   v3 · finition « grande app » : verre, profondeur, mouvement
   ========================================================= */
body { background: radial-gradient(120% 60% at 50% -10%, #FFFFFF 0%, var(--bg) 55%) fixed, var(--bg); }
.view { padding-bottom: calc(var(--tabbar) + var(--tab-gap) + env(safe-area-inset-bottom, 0px) + 30px); gap: 16px; }
.title { font-size: 38px; font-weight: 850; letter-spacing: -.015em; }
.eyebrow { font-size: 11px; letter-spacing: .12em; }
.h2 { letter-spacing: -.005em; }
.card, .coach-card, .weekstrip, .quick button, .day, .ex-card, .ex-tile, .datenav { box-shadow: var(--shadow); }
.card { border-radius: 22px; padding: 18px; }
.card.flat { box-shadow: 0 0 0 1px var(--line); border: 0; }

/* Boutons : relief subtil */
.btn { font-weight: 680; letter-spacing: -.005em; box-shadow: 0 1px 1px rgba(21,23,26,.04); }
.btn.primary { background: linear-gradient(180deg, #2A2D32 0%, #15171A 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 16px -6px rgba(21,23,26,.5); }
.btn.accent { background: linear-gradient(180deg, #F24B2E 0%, #DC2F16 100%); border-color: #DC2F16; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 18px -8px rgba(232,54,30,.7); }
.btn:disabled { opacity: .45; }
.icon-btn { box-shadow: var(--shadow); border: 0; }
.icon-btn.plain { box-shadow: none; }
.avatar { background: linear-gradient(160deg, #2E3238, #121417); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 6px 16px -6px rgba(21,23,26,.5); }

/* Barre d'onglets flottante en verre */
.tabbar {
  left: max(12px, calc(50% - 268px)); right: max(12px, calc(50% - 268px)); bottom: calc(env(safe-area-inset-bottom, 0px) + var(--tab-gap));
  padding: 0 4px; border-radius: 26px; border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.72); backdrop-filter: blur(22px) saturate(1.8); -webkit-backdrop-filter: blur(22px) saturate(1.8);
  box-shadow: 0 0 0 1px rgba(21,23,26,.05), 0 18px 40px -12px rgba(21,23,26,.28);
}
.tabbar-inner { height: var(--tabbar); }
.tab { z-index: 0; font-size: 10.5px; gap: 3px; transition: color .2s; }
.tab svg { width: 23px; height: 23px; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.tab.on::before { display: none; }
.tab.on::after { content: ""; position: absolute; inset: 7px 4px; border-radius: 19px; background: rgba(21,23,26,.07); z-index: -1; animation: tabPop .3s cubic-bezier(.3,1.5,.5,1); }
.tab.on svg { transform: translateY(-1px) scale(1.06); stroke-width: 2.3; }
@keyframes tabPop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.tab .dot { top: 9px; }
.fab { bottom: calc(env(safe-area-inset-bottom, 0px) + var(--tabbar) + var(--tab-gap) + 14px); background: linear-gradient(180deg, #F24B2E, #DC2F16); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 14px 28px -10px rgba(232,54,30,.75); }

/* En-tête compact au défilement */
#minihead {
  position: fixed; left: 0; right: 0; top: 0; z-index: 30; pointer-events: none;
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  background: rgba(243,244,241,.78); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(21,23,26,.06); opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s;
}
#minihead.show { opacity: 1; transform: none; }
#minihead div { max-width: 528px; margin: 0 auto; height: 48px; display: flex; align-items: center; justify-content: center; font: 750 16px/1 var(--display); font-stretch: 90%; }

/* Feuilles : fond flouté */
.scrim { background: rgba(15,17,20,.32); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { border-radius: 28px 28px 0 0; }
.sheet.full { border-radius: 0; }
.toast { background: rgba(21,23,26,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 16px; padding: 12px 16px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.45); }

/* Photos d'exercices uniformisées (duotone) */
img[src*="free-exercise-db"] { filter: grayscale(1) contrast(1.12) brightness(1.06); mix-blend-mode: multiply; }
.thumb:has(img[src*="free-exercise-db"]), .ex-tile .img, .ex-hero { background: linear-gradient(160deg, #EEF0EB, #E2E5DF); }

/* Héros séance plus riche */
.hero-wo { background: radial-gradient(130% 120% at 0% 0%, #2B2F35 0%, #15171A 55%, #0F1012 100%); border-radius: 26px; padding: 20px; box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 24px 44px -20px rgba(21,23,26,.6); }
.hero-wo .disc { border-color: transparent; background: conic-gradient(from 200deg, #FF6A47, #E8361E 40%, #B9200B 70%, #FF6A47) border-box; -webkit-mask: radial-gradient(circle, transparent 68px, #000 69px); mask: radial-gradient(circle, transparent 68px, #000 69px); border: 0; animation: discSpin 24s linear infinite; }
.hero-wo .disc::before, .hero-wo .disc::after { display: none; }
@keyframes discSpin { to { transform: rotate(360deg); } }
.hero-wo h2 { font-size: 34px; }

/* Anneaux : bout arrondi + halo léger */
.ring-wrap svg circle:last-child { filter: drop-shadow(0 2px 4px rgba(21,23,26,.12)); }

/* Quick actions */
.quick button { border-radius: 20px; padding: 14px 4px 12px; }
.quick .qi { border-radius: 14px; width: 44px; height: 44px; }
.quick button:first-child .qi { background: linear-gradient(180deg, #F24B2E, #DC2F16); box-shadow: 0 8px 16px -8px rgba(232,54,30,.8); }

/* Écran de lancement */
#splash { position: fixed; inset: 0; z-index: 200; background: #121417; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; transition: opacity .45s ease, visibility .45s; }
#splash.out { opacity: 0; visibility: hidden; }
#splash .sp-disc { width: 108px; height: 108px; border-radius: 50%; background: conic-gradient(from 0deg, #FF6A47, #E8361E 40%, #B9200B 70%, #FF6A47); -webkit-mask: radial-gradient(circle, transparent 24px, #000 25px, #000 38px, transparent 39px, transparent 42px, #000 43px); mask: radial-gradient(circle, transparent 24px, #000 25px, #000 38px, transparent 39px, transparent 42px, #000 43px); animation: spIn .9s cubic-bezier(.2,.9,.2,1) both, discSpin 3s linear infinite; }
#splash b { color: #fff; font: 850 30px/1 var(--display); font-stretch: 72%; letter-spacing: .32em; padding-left: .32em; animation: spText .9s .15s cubic-bezier(.2,.9,.2,1) both; }
#splash span { color: #8D929A; font: 600 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; animation: spText .9s .3s cubic-bezier(.2,.9,.2,1) both; }
@keyframes spIn { from { transform: scale(.6) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spText { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Accueil en étapes */
.ob { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.ob-top { display: flex; align-items: center; gap: 12px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); max-width: 560px; width: 100%; margin: 0 auto; }
.ob-prog { flex: 1; height: 5px; border-radius: 9px; background: #E2E4DF; overflow: hidden; }
.ob-prog i { display: block; height: 100%; background: var(--ink); border-radius: 9px; transition: width .4s cubic-bezier(.2,.8,.2,1); }
.ob-body { flex: 1; overflow-y: auto; padding: 14px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px)); max-width: 560px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.ob-body > * { flex-shrink: 0; min-width: 0; }
.ob-step { animation: obIn .35s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; gap: 14px; }
.ob-step.back { animation-name: obBack; }
@keyframes obIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes obBack { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.ob-q { font: 850 34px/1 var(--display); font-stretch: 76%; letter-spacing: -.015em; margin: 6px 0 0; text-wrap: balance; }
.ob-sub { color: var(--ink-2); margin: 0; font-size: 15px; }
.ob-foot { padding: 12px max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 16px) max(20px, env(safe-area-inset-left, 0px)); max-width: 560px; width: 100%; margin: 0 auto; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); transition: transform .12s, box-shadow .15s; }
.choice:active { transform: scale(.985); }
.choice .ci { width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.choice .ci svg { width: 22px; height: 22px; }
.choice b { display: block; font-size: 16px; font-weight: 700; }
.choice span { font-size: 13px; color: var(--ink-2); }
.choice .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; color: #fff; }
.choice .tick svg { width: 14px; height: 14px; }
.choice.on { box-shadow: 0 0 0 2px var(--ink), var(--shadow); }
.choice.on .ci { background: var(--ink); color: #fff; }
.choice.on .tick { background: var(--ink); border-color: var(--ink); }
.ob-hero { position: relative; min-height: 46vh; border-radius: 28px; overflow: hidden; background: radial-gradient(120% 100% at 0% 0%, #2B2F35, #121417 60%); color: #fff; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; }
.ob-hero .disc { position: absolute; right: -70px; top: -70px; width: 260px; height: 260px; border-radius: 50%; background: conic-gradient(from 200deg, #FF6A47, #E8361E 40%, #B9200B 70%, #FF6A47); -webkit-mask: radial-gradient(circle, transparent 92px, #000 93px); mask: radial-gradient(circle, transparent 92px, #000 93px); animation: discSpin 24s linear infinite; }
.ob-hero h1 { position: relative; font: 850 46px/.92 var(--display); font-stretch: 72%; margin: 0 0 10px; letter-spacing: -.02em; }
.ob-hero p { position: relative; margin: 0; color: #C3C7CD; font-size: 15px; max-width: 30ch; }
.ob-feats { display: flex; flex-direction: column; gap: 12px; }
.ob-feats div { display: flex; gap: 12px; align-items: center; font-size: 14.5px; }
.ob-feats i { width: 36px; height: 36px; border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; flex: none; }
.ob-feats i svg { width: 18px; height: 18px; }
.ob-plan { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 22px 18px; text-align: center; }
.ob-plan .big { font: 850 64px/1 var(--display); font-stretch: 74%; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ob-plan .unit { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.num-in { display: flex; align-items: baseline; gap: 8px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 6px 16px; }
.num-in input { border: 0; outline: 0; background: none; font: 850 40px/1.3 var(--display); font-stretch: 78%; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.num-in span { color: var(--ink-2); font-weight: 650; }
.num-in label { display: block; font: 600 12px/1 var(--body); color: var(--ink-2); padding-top: 8px; }

/* ---------- Aliments : vignettes, photos, chargement ---------- */
.fthumb { position: relative; width: 52px; height: 52px; border-radius: 14px; flex: none; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); box-shadow: inset 0 0 0 1px rgba(21,23,26,.05); }
.fthumb svg { width: 22px; height: 22px; display: none; }
.fthumb.noimg svg { display: block; }
.fthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fthumb.pack { background: #fff; }
.fthumb.pack img { object-fit: contain; padding: 4px; }
.food-li { align-items: center; }
.food-li .brand { font-weight: 650; color: var(--ink); }
.fmac { display: flex; gap: 8px; margin-top: 3px; font: 600 11.5px/1 var(--body); font-variant-numeric: tabular-nums; }
.ca-tag { margin-top: 4px; display: inline-block; font: 750 9.5px/16px var(--body); letter-spacing: .06em; padding: 0 5px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); }
.food-hero { height: 190px; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: var(--shadow); flex-shrink: 0; }
.food-hero img { width: 100%; height: 100%; object-fit: cover; }
.food-hero.pack img { object-fit: contain; padding: 14px; }
.sk { background: linear-gradient(90deg, #ECEEEA 0%, #F6F7F4 50%, #ECEEEA 100%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; border-radius: 6px; }
.sk-row .fthumb.sk { border-radius: 14px; box-shadow: none; }
.sk-l { height: 13px; width: 70%; } .sk-s { height: 10px; width: 45%; margin-top: 8px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Mes produits, étiquette, détails nutritifs ---------- */
.icon-btn.fav-on { background: #FFF4D1; color: #B88900; }
.icon-btn.fav-on svg { fill: currentColor; }
.chip .ic16 { margin-right: 5px; vertical-align: -3px; }
.food-li.loading { opacity: .55; pointer-events: none; }
.food-li.loading::after { content: "Chargement de l\2019 étiquette…"; position: absolute; right: 12px; font-size: 11px; color: var(--ink-2); }
.food-li { position: relative; }
.new-unit { background: var(--surface); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.label-card { background: #fff; border: 2px solid var(--ink); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.lc-title { font: 850 22px/1 var(--display); font-stretch: 80%; border-bottom: 6px solid var(--ink); padding-bottom: 8px; }
.lc-rows { display: flex; flex-direction: column; }
.lc-row { display: grid; grid-template-columns: 1fr 90px 26px; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--ink); font-weight: 700; }
.lc-row.big { border-top: 3px solid var(--ink); font: 850 18px/1.1 var(--display); font-stretch: 88%; }
.lc-row.sub { font-weight: 500; padding-left: 14px; }
.lc-row input { height: 38px; border: 1px solid var(--line); border-radius: 10px; text-align: right; padding: 0 10px; font: 700 16px var(--body); font-variant-numeric: tabular-nums; background: var(--surface-2); min-width: 0; width: 100%; }
.lc-row input:focus { outline: none; border-color: var(--ink); background: #fff; }
.lc-row i { font-style: normal; color: var(--ink-2); font-size: 13px; }
.micro-list { display: flex; flex-direction: column; }
.mi { display: grid; grid-template-columns: 1fr auto 46px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.mi:first-child { border-top: 0; }
.mi b { font-weight: 650; }
.mi i { font-style: normal; color: var(--ink-3); font-size: 12px; text-align: right; }
.bar-mi { grid-template-columns: 1fr auto 46px; row-gap: 6px; }
.bar-mi .bar { grid-column: 1 / -1; height: 5px; }
details.card > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.card > summary > svg { width: 18px; height: 18px; transition: transform .2s; flex: none; }
details.card[open] > summary > svg { transform: rotate(180deg); }

/* ---------- Photo d'un produit perso ---------- */
.prod-photo { position: relative; display: block; height: 170px; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1.5px dashed #CDD1CA; cursor: pointer; flex-shrink: 0; }
.prod-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prod-photo.has { border: 0; box-shadow: var(--shadow); }
.pp-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink-3); }
.pp-empty svg { width: 30px; height: 30px; }
.pp-empty b { color: var(--ink); font-size: 15px; }
.pp-empty i { font-style: normal; font-size: 12.5px; }
.prod-photo.has .pp-empty { display: none; }
.pp-change { position: absolute; right: 10px; bottom: 10px; height: 32px; padding: 0 12px; border-radius: 99px; background: rgba(21,23,26,.75); color: #fff; display: none; align-items: center; gap: 6px; font: 650 12.5px/1 var(--body); }
.pp-change svg { width: 15px; height: 15px; }
.prod-photo.has .pp-change { display: inline-flex; }
.prod-photo.busy::after { content: "Traitement de la photo…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.85); font: 600 13px var(--body); color: var(--ink-2); }
.ca-tag.us { background: #E6ECFD; color: var(--c); }
.cnf-ic { background: #E8F4EC; color: var(--fib); }
.mi.nodata { opacity: .45; }
.hero-wo .cyc { font-size: 12px; color: #D9DCE1; background: rgba(255,255,255,.08); border-radius: 10px; padding: 7px 10px; margin: -4px 0 14px; display: flex; align-items: center; gap: 6px; }
.hero-wo .cyc.dl { background: rgba(31,157,85,.25); }

/* ---------- Plan de repas, combler le manque, bilan, feuille de route ---------- */
.plan-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.plan-row:first-child { border-top: 0; }
.plan-row .pr-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; }
.plan-row .eyebrow { font-size: 10px; }
.plan-row .t { font-weight: 650; line-height: 1.2; margin-top: 2px; }
.plan-row .s { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.plan-row .pr-act { display: flex; gap: 6px; flex: none; }
.plan-row .icon-btn { width: 36px; height: 36px; border-radius: 11px; }
.plan-row .icon-btn.eat { background: var(--ink); color: #fff; }
.plan-row.eaten { opacity: .6; }
.gap-card { border: 1.5px solid rgba(233,174,0,.45); }
.gap-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.plan-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border-radius: 14px; padding: 11px 14px; box-shadow: var(--shadow); font-size: 13.5px; text-align: left; width: 100%; }
.plan-strip .ic16 { margin: 0; }
.alert-card { border: 1.5px solid rgba(217,127,0,.35); }
.review-hero h2 { max-width: 85%; }
.review-action { border: 2px solid var(--ink); }
.big-adj { font: 850 34px/1.05 var(--display); font-stretch: 78%; margin: 6px 0 4px; }
.road .road-phases { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.road-ph { border-radius: 14px; background: var(--surface-2); padding: 10px 12px; }
.road-ph > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.road-ph > summary::-webkit-details-marker { display: none; }
.road-ph > summary > svg { width: 16px; height: 16px; color: var(--ink-3); }
.rp-dot { width: 28px; height: 28px; border-radius: 9px; background: #fff; display: grid; place-items: center; font: 800 13px/1 var(--display); flex: none; box-shadow: inset 0 0 0 1px var(--line); }
.rp-dot svg { width: 15px; height: 15px; }
.road-ph.on { background: #fff; box-shadow: 0 0 0 2px var(--ink); }
.road-ph.on .rp-dot { background: var(--accent); color: #fff; box-shadow: none; }
.road-ph.done .rp-dot { background: var(--ok); color: #fff; box-shadow: none; }
button.link { color: var(--c); text-decoration: underline; font-size: inherit; }
.fab { width: 58px; height: 58px; padding: 0; border-radius: 50%; justify-content: center; }
.fab svg { width: 25px; height: 25px; }
.review-hero .disc { width: 130px; height: 130px; right: -48px; top: -48px; -webkit-mask: radial-gradient(circle, transparent 46px, #000 47px); mask: radial-gradient(circle, transparent 46px, #000 47px); }
.review-hero .meta { max-width: 100%; }
/* disques en kg (15 / 10 / 5 / 2,5 kg) */
.pl-33 { background: #E9AE00; color: #15171A !important; } .pl-22 { background: #1F9D55; } .pl-11 { background: #F4F5F2; color: #15171A !important; border: 1px solid #D5D8D2; }

/* ---------- Mosaïque des recettes ---------- */
.fthumb.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1px; background: #fff; }
.fthumb.mosaic img { position: static; width: 100%; height: 100%; object-fit: cover; }
.fthumb.mosaic img:first-child { grid-row: span 2; }
.food-hero.mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; background: #fff; height: 210px; }
.food-hero.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.food-hero.mosaic img:first-child { grid-row: span 2; }

/* ---------- Santé : suppléments, pression, prises de sang ---------- */
.supp-li .supp-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.supp-li .supp-ic svg { width: 20px; height: 20px; }
.supp-li .supp-ic.hormone { background: var(--accent-soft); color: var(--accent); }
.supp-li .tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; transition: background .2s, border-color .2s; }
.supp-li .tick svg { width: 16px; height: 16px; stroke-width: 3; }
.supp-li.on .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.supp-li.on .t { color: var(--ink-2); }
.supp-li .s.warn-t { color: var(--warn); font-weight: 600; }
.pill > svg:last-child { width: 12px; height: 12px; margin-right: -3px; }
button.pill { border: 0; cursor: pointer; }
.bp-big { font: 800 44px/1 var(--display); font-stretch: 82%; font-variant-numeric: tabular-nums; }
.bp-big small { font: 600 14px var(--body); color: var(--ink-2); margin-left: 4px; }
.bp-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.bp-inputs .input { height: 64px; font: 800 30px var(--display); text-align: center; }
.lab-in { cursor: text; }
.lab-in .input { width: 84px; height: 42px; text-align: right; font-weight: 700; flex: none; }
.lab-in .unit { width: 44px; flex: none; }
.health-intro { gap: 12px; align-items: center; padding: 2px 2px 0; }
.health-intro .coach-ic { flex: none; }
.health-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); line-height: 1.45; }
#pg-tabs button { font-size: 12.5px; }
/* ---------- Marche ---------- */
.goalbar.sm { height: 7px; margin-top: 8px; }
.walk-card .stat b { font-size: 24px; }
.walk-bars { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 82px; margin-top: 14px; }
.walk-bars div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.walk-bars i { width: 100%; max-width: 26px; border-radius: 7px 7px 4px 4px; background: #DADDD7; }
.walk-bars .done i { background: var(--ink); }
.walk-bars .today i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.walk-bars span { font: 600 11px/14px var(--body); color: var(--ink-3); }
.walk-bars .today span { color: var(--ink); }
.walk-bars em { position: absolute; left: 0; right: 0; border-top: 1.5px dashed rgba(31,157,85,.55); pointer-events: none; }
.walk-btns { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; margin-top: 12px; }

/* ---------- Compte et Garmin ---------- */
.sheet.over-ob { z-index: 96; }
.supp-ic.garmin { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #E8F1FB; color: #1F6FD1; flex: none; }
.supp-ic.garmin svg { width: 20px; height: 20px; }
.garmin-card .grid3 .stat b { font-size: 22px; }
.btn.plain { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }

/* ---------- Proportions ---------- */
.prop-row .goalbar.sm { margin: 6px 0 3px; }

.invite-code { font: 850 44px/1 var(--display); letter-spacing: .12em; text-align: center; padding: 18px 0; background: var(--surface-2); border-radius: 16px; }

/* jours de la semaine dans la liste des séances */
.day .n.wd { font: 800 12px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; }

.prep-list { list-style: disc; padding-left: 20px; }
.prep-list li::before { display: none; }

.back-link { display: inline-flex; align-items: center; gap: 4px; font: 600 13px var(--body); color: var(--ink-2); margin-bottom: 6px; padding: 0; }

/* ---------- Carte calories (Aujourd'hui) ---------- */
.fuel { display: flex; flex-direction: column; gap: 14px; }
.fuel-top { display: flex; align-items: center; gap: 14px; }
.fuel-big { font: 850 46px/1 var(--display); font-stretch: 80%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin: 6px 0 4px; }
.fuel-big small { font: 650 14px var(--body); color: var(--ink-2); margin-left: 5px; letter-spacing: 0; }
.fuel-big.over { color: var(--accent); }
.fuel .ring-wrap { width: 96px; height: 96px; flex: none; }
.fuel .ring-center b { font-size: 24px; }
.fuel .ring-center b small { font-size: 12px; margin-left: 1px; }
.fuel .ring-center span { font-size: 10px; }
.fuel-bar { display: flex; height: 10px; border-radius: 99px; background: #EBEDE8; overflow: hidden; gap: 2px; }
.fuel-bar i { height: 100%; border-radius: 2px; transition: width .5s; }
.fuel .macro-tiles { margin-top: 0; }
.fuel-foot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 11px; }
.fuel-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Carte des muscles ---------- */
.mm-card { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; }
.muscle-map { width: 100%; height: auto; max-height: 340px; }
.pill.sec { background: #FDE6E0; color: #C2412A; }

/* remplaçants (équipement manquant) */
.ne-row { display: flex; align-items: center; gap: 12px; padding: 10px; text-align: left; width: 100%; }
.ne-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--line, #eee); flex: none; }
.ne-row .grow { display: flex; flex-direction: column; gap: 2px; }
.ne-row > svg { width: 18px; height: 18px; flex: none; color: var(--muted, #8D929A); }
.ne-row img { font-size: 0; }

/* lampe du scanner */
.scanner .torch { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; }
.scanner .torch.on { background: #fff; color: #0E0F11; }
.scanner .torch svg { width: 20px; height: 20px; }
.scanner:has(.status:not([hidden])) .frame { display: none; }
