/* Evolve — styles de l'app. Toutes les valeurs viennent de css/tokens.css. */
@font-face { font-family: Archivo; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(../fonts/archivo.woff2) format('woff2'); }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: var(--w-regular) var(--t-md)/1.45 var(--font); -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
main { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s-4); padding: calc(var(--s-4) + env(safe-area-inset-top)) var(--s-4) calc(var(--nav-h) + 136px + env(safe-area-inset-bottom)); }
main.enter { animation: rise var(--d-slow) var(--ease-out); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--t-xl); font-weight: var(--w-bold); font-stretch: var(--wide); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: var(--t-lg); font-weight: var(--w-bold); line-height: 1.25; }
h3 { font-size: var(--t-md); font-weight: var(--w-bold); line-height: 1.3; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; text-align: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.i { display: block; flex: none; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--s-2); }
.meta { color: var(--ink-2); font-size: var(--t-sm); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- En-têtes ---------- */
.head { display: flex; align-items: center; gap: var(--s-2); min-height: var(--tap); }
.head > .iconbtn:first-child { margin-left: calc(-1 * var(--s-2)); }
.sec { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: var(--tap); margin-top: var(--s-3); }
.sec .textbtn { margin-right: calc(-1 * var(--s-3)); color: var(--ink-2); gap: 2px; }
.sec + * { margin-top: calc(-1 * var(--s-2)); }

/* ---------- Boutons : principal, secondaire, texte, icône ---------- */
.btn { min-height: 48px; padding: 0 var(--s-5); border-radius: var(--r-full); background: var(--surface-2); color: var(--ink); font-size: var(--t-md); font-weight: var(--w-medium); display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); white-space: nowrap; transition: transform var(--d-fast) var(--ease-out); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.small { min-height: var(--tap); padding: 0 var(--s-4); font-size: var(--t-sm); }
.btn.wide { width: 100%; }
.btn.danger.solid { background: var(--danger); color: #fff; }
.btn:disabled { background: var(--surface-2); color: var(--ink-2); }
.card .btn:not(.primary), .list .btn:not(.primary) { background: var(--surface-2); }
.textbtn { min-height: var(--tap); padding: 0 var(--s-3); border-radius: var(--r-full); font-size: var(--t-sm); font-weight: var(--w-medium); display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); transition: transform var(--d-fast) var(--ease-out); }
.textbtn.danger { color: var(--danger); }
main > .textbtn { align-self: flex-start; }
.iconbtn { width: var(--tap); height: var(--tap); flex: none; border-radius: var(--r-full); color: var(--ink-2); display: grid; place-items: center; transition: transform var(--d-fast) var(--ease-out); }
.btn:active, .textbtn:active, .iconbtn:active, .rowlink:active, .menuitem:active, .chip-btn:active, .pick:active { transform: scale(.97); }

/* ---------- Champs ---------- */
input, select, textarea { width: 100%; min-height: 48px; padding: 0 var(--s-3); border: 1px solid transparent; border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--t-md); }
textarea { padding: var(--s-3); min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); background: var(--surface); }
input::placeholder, textarea::placeholder { color: var(--ink-2); opacity: .75; }
.field { display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--t-sm); font-weight: var(--w-medium); }
.field input, .field select, .field textarea { font-weight: var(--w-regular); }
.help { font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r-md); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.list { background: var(--surface); border-radius: var(--r-md); padding: 0 var(--s-4); display: flex; flex-direction: column; }
.rowlink { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 64px; padding: var(--s-3) 0; border-top: 1px solid var(--line); transition: transform var(--d-fast) var(--ease-out); }
.rowlink:first-child { border-top: 0; }
.rowlink > .grow { display: flex; flex-direction: column; gap: 2px; }
.rowlink b { font-weight: var(--w-medium); }
.rowlink > .i { color: var(--ink-2); }
.rowlink > .iconbtn { margin-right: calc(-1 * var(--s-2)); }
.rowlink .lead { color: var(--ink-2); }

/* Chiffres clés */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.stats.two { grid-template-columns: repeat(2, 1fr); row-gap: var(--s-4); }
.stats div { display: flex; flex-direction: column; min-width: 0; }
.stats span { font-size: var(--t-xs); color: var(--ink-2); }
.stats b { font-size: var(--t-xl); font-weight: var(--w-bold); font-stretch: var(--wide); line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats b small { font-size: var(--t-sm); font-weight: var(--w-medium); font-stretch: 100%; color: var(--ink-2); margin-left: 3px; }
.figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s-3); }
.figure b { font-size: var(--t-2xl); font-weight: var(--w-bold); font-stretch: var(--wide); line-height: 1.1; font-variant-numeric: tabular-nums; }
.figure .meta { flex-basis: 100%; }

/* La carte vedette : une seule par écran, pour l'action ou l'information principale */
.hero-card { position: relative; overflow: hidden; border-radius: var(--r-md); padding: var(--s-5) var(--s-4) var(--s-4); color: #fff; display: flex; flex-direction: column; gap: var(--s-1);
  background: linear-gradient(100deg, var(--ink) 10%, rgba(var(--night), .82) 55%, rgba(var(--night), .55)), var(--photo, url(../img/rack.jpg)) 85% 35% / cover no-repeat, var(--ink); }
.hero-card.tall { min-height: 208px; justify-content: flex-end; padding-top: var(--s-5); background: linear-gradient(90deg, var(--ink) 0%, rgba(var(--night), .94) 48%, rgba(var(--night), .45) 76%, rgba(var(--night), .15)), var(--photo) var(--pos, right 25%) / auto 135% no-repeat, var(--ink); }
.ph-rack { --photo: url(../img/rack.jpg); } .ph-profil { --photo: url(../img/profil.jpg); } .ph-boxe { --photo: url(../img/boxe.jpg); --pos: 88% 15%; }
.hero-card.tall h2 { font-size: var(--t-xl); line-height: 1.1; letter-spacing: -.01em; }
.hero-card.tall .btn { min-height: var(--tap); padding: 0 var(--s-4); font-size: var(--t-sm); }
.hero-card.tall .eyebrow { align-self: flex-start; padding: 2px 8px; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent); margin: 0 0 var(--s-2); letter-spacing: .06em; }
.hero-card.plain { background: var(--ink); }
.hero-card .eyebrow { font-size: var(--t-xs); font-weight: var(--w-medium); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-1); }
.hero-card h2 { font-size: var(--t-xl); font-stretch: var(--wide); line-height: 1.15; margin-bottom: var(--s-1); text-wrap: balance; }
.hero-card p { font-size: var(--t-sm); color: rgba(255, 255, 255, .78); max-width: 34ch; }
.hero-card .actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-1) var(--s-2); margin-top: var(--s-4); }
.hero-card .textbtn { color: #fff; }
.hero-card :focus-visible { outline-color: #fff; }
.verdict { flex-direction: row; align-items: center; gap: var(--s-4); padding: var(--s-4); }
.verdict .badge { width: 48px; height: 48px; flex: none; border-radius: var(--r-full); display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; }
.verdict.good .badge { background: var(--accent); color: var(--on-accent); }
.verdict.bad .badge { background: #fff; color: var(--danger); }
.verdict h2 { font-size: var(--t-lg); margin: 0 0 2px; }

/* État vide : explique et propose la suite */
.blank { padding: var(--s-6) 0 var(--s-4); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.blank h2 { font-size: var(--t-xl); font-stretch: var(--wide); line-height: 1.15; text-wrap: balance; }
.blank p { color: var(--ink-2); max-width: 34ch; margin-bottom: var(--s-2); }
.blank .textbtn { margin-left: calc(-1 * var(--s-3)); }

/* ---------- Petits éléments ---------- */
.chip { display: inline-flex; align-items: center; gap: var(--s-1); padding: 3px 10px; border-radius: var(--r-full); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-xs); font-weight: var(--w-medium); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.good { background: var(--accent-soft); color: var(--success); }
.chip.bad { background: #FBE9E9; color: var(--danger); }
.delta { font-size: var(--t-sm); font-weight: var(--w-medium); white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.delta.good { color: var(--success); } .delta.bad { color: var(--danger); }
.seg { display: flex; padding: var(--s-1); gap: 2px; border-radius: var(--r-full); background: var(--surface-2); }
.seg button { flex: 1; min-height: 36px; border-radius: var(--r-full); font-size: var(--t-sm); font-weight: var(--w-medium); color: var(--ink-2); text-align: center; position: relative; transition: background var(--d-base) var(--ease-out); }
.seg button::after { content: ""; position: absolute; inset: -4px 0; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }
.chips { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--s-4)); padding: 0 var(--s-4); }
.chip-btn { flex: none; min-height: var(--tap); padding: 0 var(--s-4); border-radius: var(--r-full); background: var(--surface-2); font-size: var(--t-sm); font-weight: var(--w-medium); transition: transform var(--d-fast) var(--ease-out); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); }
.day { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); font-size: var(--t-xs); color: var(--ink-2); position: relative; padding-bottom: var(--s-2); }
.day b { width: 36px; height: 36px; border-radius: var(--r-full); display: grid; place-items: center; font-size: var(--t-sm); font-weight: var(--w-medium); color: var(--ink); }
.day.today b { box-shadow: inset 0 0 0 1.5px var(--ink); }
.day.today span { color: var(--ink); font-weight: var(--w-medium); }
.day.done b { background: var(--ink); color: var(--surface); }
.day.done.today b { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }
.day i { position: absolute; bottom: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-2); }
.meter { display: grid; grid-template-columns: 128px 1fr 28px; align-items: center; gap: var(--s-3); font-size: var(--t-sm); }
.meter div { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: var(--r-full); background: var(--ink); transform-origin: left; }
.meter b { text-align: right; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
details summary { min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); font-size: var(--t-sm); font-weight: var(--w-medium); cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary .i { color: var(--ink-2); transition: transform var(--d-base) var(--ease-move); }
details[open] summary .i { transform: rotate(90deg); }
details.card { gap: var(--s-3); padding-top: var(--s-2); padding-bottom: var(--s-2); }
details.card[open] { padding-bottom: var(--s-4); }
details.card > div { margin-top: var(--s-3); }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23565D4E' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.data th { text-align: left; font-weight: var(--w-regular); color: var(--ink-2); font-size: var(--t-xs); padding: var(--s-1) var(--s-2) var(--s-1) 0; }
.data td { padding: var(--s-2) var(--s-2) var(--s-2) 0; border-top: 1px solid var(--line); vertical-align: top; }

/* Rapport : une ligne par élément comparé */
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.cmp:first-of-type { border-top: 0; padding-top: 0; }
.cmp:last-child { padding-bottom: 0; }
.cmp b { font-weight: var(--w-medium); }
.cmp .now { text-align: right; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp .meta, .cmp .delta { grid-row: 2; }
.cmp .delta { text-align: right; }
.muscle > header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-2); }

/* ---------- Graphiques ---------- */
.chart { position: relative; }
.chart svg { display: block; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: #B9CDE2; stroke-width: 1; }
.chart .tick { fill: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .direct { fill: var(--ink); font-size: 12px; font-weight: 600; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; animation: fade var(--d-slow) var(--ease-out); }
.chart .dot { fill: var(--ink); animation: fade var(--d-slow) var(--ease-out); }
.chart .dot.ring { stroke: var(--surface); stroke-width: 2; }
.chart .cross { stroke: #B9CDE2; stroke-width: 1; }
.chart .bar { fill: var(--ink); transform-box: fill-box; transform-origin: 50% 100%; animation: grow var(--d-slow) var(--ease-out) both; }
.chart .bar.hot { opacity: .7; }
.chart .band { fill: var(--accent); opacity: .35; }
.tip { position: absolute; z-index: 2; pointer-events: none; display: flex; flex-direction: column; white-space: nowrap; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--ink); color: var(--surface); font-size: var(--t-xs); box-shadow: var(--shadow); }
.tip[hidden] { display: none; }
.tip b { font-size: var(--t-sm); }
.tip span { opacity: .75; }
.empty { color: var(--ink-2); font-size: var(--t-sm); padding: var(--s-4) 0; }

/* ---------- Coach ---------- */
#chat { display: flex; flex-direction: column; gap: var(--s-3); }
.msg { max-width: 90%; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); overflow-wrap: anywhere; animation: rise var(--d-base) var(--ease-out); }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--surface); }
.msg.assistant { align-self: flex-start; background: var(--surface); }
.msg.error { align-self: stretch; max-width: none; background: #FBE9E9; color: var(--danger); display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding-right: var(--s-2); }
.msg.error .textbtn { color: var(--danger); flex: none; }
.msg p + p, .msg ul, .msg ol, .msg h4 { margin: var(--s-2) 0 0; }
.msg ul, .msg ol { padding-left: var(--s-5); }
.msg h4 { font-size: var(--t-md); }
.msg code { background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }
.dots { display: inline-flex; gap: 5px; padding: 6px 0; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
.composer { display: flex; align-items: flex-end; gap: var(--s-2); }
.composer textarea { min-height: 48px; resize: none; border-radius: 24px; padding: var(--s-3) var(--s-4); background: var(--surface); border-color: var(--line); }
.composer .send { width: 48px; height: 48px; flex: none; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transition: transform var(--d-fast) var(--ease-out); }
.composer .send:disabled { background: var(--surface-2); color: var(--ink-2); }
.composer .send:active { transform: scale(.94); }

/* ---------- Séance en cours et éditeur de programme ---------- */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--s-1); background: var(--bg);
  margin: calc(-1 * var(--s-4) - env(safe-area-inset-top)) calc(-1 * var(--s-4)) 0; padding: calc(var(--s-3) + env(safe-area-inset-top)) var(--s-4) var(--s-3); }
.bar > .iconbtn:first-child { margin-left: calc(-1 * var(--s-2)); }
.bar .btn { min-height: var(--tap); padding: 0 var(--s-4); }
input.title { font-size: var(--t-lg); font-weight: var(--w-bold); font-stretch: var(--wide); background: none; border: 0; border-radius: var(--r-sm); min-height: var(--tap); padding: 0; margin: -6px 0 -10px; text-overflow: ellipsis; }
input.title:focus { background: none; outline: 2px solid var(--ink); outline-offset: 4px; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.progress i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform var(--d-slow) var(--ease-move); }
.ex { background: var(--surface); border-radius: var(--r-md); padding: var(--s-4) var(--s-3) var(--s-2) var(--s-4); display: flex; flex-direction: column; gap: var(--s-1); }
.ex > header { display: flex; align-items: flex-start; gap: var(--s-3); margin-bottom: var(--s-2); }
.ex h3 { font-size: var(--t-lg); line-height: 1.2; margin-bottom: 2px; }
.ex > header .iconbtn { margin: -8px -4px 0 0; }
.hint { margin: 0 var(--s-1) var(--s-3) 0; font-size: var(--t-sm); color: var(--ink-2); }
.hint b { display: block; color: var(--ink); font-weight: var(--w-medium); }
.set { display: grid; grid-template-columns: 36px minmax(0, 1fr) 72px 60px 44px; gap: var(--s-2); align-items: center; margin-left: calc(-1 * var(--s-2)); padding: 2px var(--s-1) 2px var(--s-2); border-radius: var(--r-sm); transition: background var(--d-base) var(--ease-out); }
.set.head { font-size: var(--t-xs); color: var(--ink-2); padding-bottom: var(--s-1); }
.set.head span:first-child, .set.head span:nth-child(n+3) { text-align: center; }
.stype { width: 36px; height: var(--tap); border-radius: var(--r-sm); font-weight: var(--w-bold); text-align: center; }
.stype.t-w { color: var(--warning); } .stype.t-d { color: var(--ink-2); } .stype.t-f { color: var(--danger); }
.set .prev { font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set input { min-height: var(--tap); padding: 0 var(--s-1); text-align: center; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.check { width: var(--tap); height: var(--tap); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; transition: transform var(--d-fast) var(--ease-out), background var(--d-base) var(--ease-out); }
.check:active { transform: scale(.92); }
.set.done { background: var(--accent-soft); }
.set.done input { background: transparent; border-color: transparent; }
.set.done .check { background: var(--accent); color: var(--on-accent); }
.set.pop .check { animation: pop var(--d-slow) var(--ease-out); }
.ex.ss { box-shadow: inset 4px 0 var(--ink); }
.ex.ss-open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.ex.ss-join { margin-top: calc(-1 * var(--s-4) + 1px); border-top-left-radius: 0; border-top-right-radius: 0; }
.ss-tag { font-size: var(--t-xs); font-weight: var(--w-medium); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: var(--s-1); }
.ex > .textbtn { align-self: center; margin-top: var(--s-1); color: var(--ink-2); }
.adj { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-2); padding: var(--s-1) var(--s-1) var(--s-2) 0; animation: fade var(--d-base) var(--ease-out); }
.adj span { font-size: var(--t-xs); color: var(--ink-2); margin-right: auto; }
.adj button { min-width: 56px; min-height: var(--tap); border-radius: var(--r-full); background: var(--surface-2); font-size: var(--t-sm); font-weight: var(--w-medium); text-align: center; transition: transform var(--d-fast) var(--ease-out); }
.adj button:active { transform: scale(.94); }

/* ---------- Ce qui flotte : barre du bas, minuteur, message, feuilles ---------- */
nav.tabs { position: fixed; z-index: 10; left: var(--s-4); right: var(--s-4); bottom: calc(var(--s-3) + env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto; height: 64px; padding: 0 var(--s-2);
  display: flex; align-items: center; justify-content: space-between; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
nav.tabs a { flex: 1; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: var(--r-full); font-size: var(--t-xs); color: var(--ink-2); text-decoration: none; transition: background var(--d-base) var(--ease-out), color var(--d-base) var(--ease-out); }
nav.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
nav.tabs a[aria-current="page"] { color: var(--ink); background: var(--surface-2); font-weight: var(--w-medium); }
nav.tabs a[data-tab="workout"] { flex: none; width: 52px; height: 52px; margin: 0 var(--s-1); border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 0; gap: 0; position: relative; }
nav.tabs a[data-tab="workout"] svg { width: 26px; height: 26px; stroke-width: 2; }
nav.tabs a[data-tab="workout"][aria-current="page"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
nav.tabs a.live::after { content: ""; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
#rest { position: fixed; z-index: 9; left: var(--s-4); right: var(--s-4); bottom: calc(64px + var(--s-5) + env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 0 var(--s-2) var(--s-1) var(--s-4); animation: sheet var(--d-slow) var(--ease-out); }
#rest[hidden] { display: none; }
#rest { display: flex; flex-direction: column-reverse; padding-top: var(--s-1); }
#rest .track { height: 4px; margin: 0 var(--s-2) var(--s-2) 0; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
#rest .track i { display: block; height: 100%; border-radius: var(--r-full); background: var(--accent); transform-origin: left; transition: transform 1s linear; }
#rest .row { justify-content: space-between; gap: 0; }
#rest span { font-size: var(--t-sm); color: var(--ink-2); }
#rest b { font-size: var(--t-xl); font-weight: var(--w-bold); font-stretch: var(--wide); color: var(--ink); margin-left: var(--s-2); font-variant-numeric: tabular-nums; }
#rest.soon b { color: var(--danger); }
#toast { position: fixed; z-index: 40; left: var(--s-4); right: var(--s-4); bottom: calc(64px + var(--s-5) + env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto; min-height: 52px; padding: var(--s-1) var(--s-2) var(--s-1) var(--s-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); border-radius: var(--r-md); background: var(--ink); color: var(--surface); font-size: var(--t-sm); font-weight: var(--w-medium); box-shadow: var(--shadow); animation: sheet var(--d-base) var(--ease-out); }
#toast[hidden] { display: none; }
#toast .textbtn { color: var(--accent); font-weight: var(--w-bold); flex: none; }
#rest:not([hidden]) ~ #toast { bottom: calc(64px + 100px + env(safe-area-inset-bottom)); }
#modal, #dialog { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(var(--night), .4); animation: fade var(--d-base) var(--ease-out); }
#dialog { z-index: 30; }
#modal[hidden], #dialog[hidden] { display: none; }
.sheet { width: 100%; max-width: 640px; height: 90dvh; display: flex; flex-direction: column; gap: var(--s-3); background: var(--surface); border-radius: var(--r-md) var(--r-md) 0 0; padding: var(--s-4) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom)); box-shadow: var(--shadow); animation: sheet var(--d-slow) var(--ease-out); }
.sheet.small { height: auto; padding-top: var(--s-5); gap: var(--s-2); }
.sheet.small > p { color: var(--ink-2); margin-bottom: var(--s-3); }
.sheet > header { display: flex; align-items: center; min-height: var(--tap); }
.sheet > header .iconbtn { margin-right: calc(-1 * var(--s-2)); }
.menuitem { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 52px; font-weight: var(--w-medium); border-radius: var(--r-sm); transition: transform var(--d-fast) var(--ease-out); }
.menuitem .i { color: var(--ink-2); }
.menuitem.danger, .menuitem.danger .i { color: var(--danger); }
.menu .btn { margin-top: var(--s-2); }
#pick-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; margin: 0 calc(-1 * var(--s-2)); }
#pick-list > h2 { font-size: var(--t-xs); font-weight: var(--w-medium); color: var(--ink-2); padding: var(--s-3) var(--s-2) var(--s-1); }
#pick-list > .textbtn { align-self: flex-start; margin-top: var(--s-2); }
#pick-list .blank { padding: var(--s-5) var(--s-2); }
input[type="search"]::-webkit-search-cancel-button { display: none; }
.pick { display: grid; grid-template-columns: 44px 1fr 28px; align-items: center; column-gap: var(--s-3); min-height: 56px; padding: var(--s-2); border-radius: var(--r-sm); transition: transform var(--d-fast) var(--ease-out), background var(--d-base) var(--ease-out); }
.pick .extile { grid-column: 1; grid-row: 1 / span 2; }
.pick b { font-weight: var(--w-medium); grid-column: 2; }
.pick .meta { grid-column: 2; }
.pick i { grid-column: 3; grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; }
.pick[aria-pressed="true"] { background: var(--accent-soft); }
.pick[aria-pressed="true"] i { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Mouvement : transform et opacity uniquement ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes sheet { from { opacity: 0; transform: translateY(24px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
/* ---------- Éléments visuels ---------- */
.extile { width: 44px; height: 44px; flex: none; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); display: grid; place-items: center; }
.ss-link { align-self: center; margin: calc(-1 * var(--s-4)) 0; color: var(--ink-2); font-size: var(--t-xs); }
.spark { flex: none; fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.spark circle { fill: var(--ink); stroke: none; }
.bodymap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); max-width: 300px; margin: 0 auto; width: 100%; }
.bodymap figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.bodymap svg { width: 100%; height: auto; display: block; }
.bodymap figcaption { font-size: var(--t-xs); color: var(--ink-2); }
.bodymap .n { fill: var(--line); stroke: var(--line); stroke-width: .8; }
.bodymap .l0 { fill: var(--surface-2); }
.bodymap .l0, .bodymap .l1, .bodymap .l2 { stroke: var(--surface); stroke-width: 1.5; stroke-linejoin: round; }
.bodymap .d { fill: none; stroke: var(--surface); stroke-width: 1.5; stroke-linecap: round; }
.bodymap .l1 { fill: var(--accent); }
.bodymap .l2 { fill: var(--ink); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-3); font-size: var(--t-xs); color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: var(--s-2); }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.legend .l0 { background: var(--surface-2); }
.legend .l1 { background: var(--accent); }
.legend .l2 { background: var(--ink); }
.activity .cells { display: grid; grid-template-columns: repeat(var(--weeks), 1fr); gap: 4px; flex: 1; }
.activity .months { display: grid; grid-template-columns: 16px repeat(var(--weeks), 1fr); gap: 4px; }
.activity .rows { display: flex; gap: 4px; }
.activity .days { width: 16px; display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; font-size: var(--t-xs); line-height: 1; color: var(--ink-2); align-items: center; }
.activity .months { font-size: var(--t-xs); color: var(--ink-2); margin-bottom: var(--s-2); white-space: nowrap; }
.activity .months span { overflow: visible; width: 0; }
.activity .cells { grid-template-rows: repeat(7, auto); grid-auto-flow: column; }
.activity .cells i { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); }
.activity .cells i.on { background: var(--ink); }
.activity .cells i.future { background: none; }
.activity .cells i.today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.weekblock { display: flex; flex-direction: column; }
.weekline { display: flex; align-items: center; gap: var(--s-3); min-height: 64px; margin-top: var(--s-2); padding: var(--s-2) var(--s-3) var(--s-2) var(--s-2); border-radius: var(--r-md); background: var(--surface); transition: transform var(--d-fast) var(--ease-out); }
.weekline:active { transform: scale(.97); }
.weekline .grow { display: flex; flex-direction: column; gap: 2px; }
.weekline b { font-weight: var(--w-medium); }
.weekline > .i { color: var(--ink-2); }
.ring { flex: none; }
.ring circle { fill: none; stroke-width: 5; }
.ring .track { stroke: var(--surface-2); }
.ring .fill { stroke: var(--ink); stroke-linecap: round; }
.ring text { font-size: 16px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; }
.ring.full .track { fill: var(--accent); stroke: var(--accent); }
.ring.full .fill { stroke: var(--ink); }
.bodymini { width: 64px; height: 68px; flex: none; border-radius: var(--r-sm); background: var(--surface-2); display: flex; justify-content: center; gap: 3px; padding: 5px 4px; }
.bodymini svg { height: 100%; width: auto; display: block; }
.bodymini .n { fill: #C3D4E8; stroke: #C3D4E8; stroke-width: .8; }
.bodymini .l0 { fill: var(--surface); }
.bodymini .l1 { fill: var(--ink); }
.bodymini .d { display: none; }
body.setup .bodymini .n { fill: #3A4C6B; stroke: #3A4C6B; }
body.setup .bodymini .l0 { fill: var(--surface); }
body.setup .bodymini .l1 { fill: var(--accent); }
.card.lime { background: var(--accent); color: var(--on-accent); }
.card.lime .meta, .card.lime .delta { color: var(--on-accent); }
.card.lime .chart .grid { stroke: rgba(var(--night), .14); }
.card.lime .chart .axis { stroke: rgba(var(--night), .4); }
.card.lime .chart .tick { fill: var(--on-accent); }
.card.lime .chart .dot.ring { stroke: var(--accent); }

/* ---------- Carte photo : états vides et verdict du rapport ---------- */
.hero-card.void { min-height: 320px; }
.hero-card.void h2 { font-size: var(--t-xl); }
.hero-card.verdict { flex-direction: column; align-items: stretch; gap: var(--s-1); padding: var(--s-5) var(--s-4) var(--s-4); min-height: 300px; }
.hero-card.verdict h2 { font-size: var(--t-2xl); line-height: 1; letter-spacing: -.02em; margin: var(--s-1) 0; font-variant-numeric: tabular-nums; }
.hero-card.verdict .eyebrow { background: #fff; }
.hero-card.verdict.good .eyebrow { background: var(--accent); }
.hero-card .stats.four { grid-template-columns: repeat(4, auto); justify-content: space-between; margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid rgba(255, 255, 255, .18); }
.hero-card .stats.four b { font-size: var(--t-lg); }
.hero-card .stats.four b small { color: rgba(255, 255, 255, .72); }
.rowlink.won .medal, .rowlink.won .seal { animation: pop var(--d-slow) var(--ease-out) both; animation-delay: calc(var(--k, 0) * 60ms); }

/* ---------- Séance, un exercice à la fois ---------- */
.focus { gap: var(--s-3); padding: var(--s-4); }
.focus .f-set { font-size: var(--t-lg); font-weight: var(--w-bold); margin-top: var(--s-2); }
.f-field { display: flex; flex-direction: column; gap: var(--s-1); }
.f-step { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: var(--s-2); }
.f-step .iconbtn { width: 56px; height: 56px; background: var(--surface-2); color: var(--ink); }
.f-step input { min-height: 72px; text-align: center; font-size: var(--t-2xl); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.focus .f-last { text-align: center; }
.focus .f-go { min-height: 56px; margin-top: var(--s-2); }
.f-sets { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.f-chip { min-height: var(--tap); padding: 0 var(--s-3); border-radius: var(--r-full); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-sm); font-weight: var(--w-medium); display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; }
.f-chip.done { background: var(--accent-soft); color: var(--ink); }
.f-chip.now { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.f-chip.add { width: var(--tap); padding: 0; justify-content: center; }
.f-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.f-add { align-self: center; color: var(--ink-2); }
.bar .iconbtn[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }

/* ---------- Succès ---------- */
.seal { flex: none; display: block; }
.seal .edge { fill: var(--surface-2); }
.seal .core { fill: var(--surface); }
.seal text { fill: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.seal.on .edge { fill: var(--accent); }
.seal.on .core { fill: var(--ink); }
.seal.on text { fill: var(--accent); }
.trophy { gap: var(--s-3); }
.t-head { display: flex; align-items: flex-start; gap: var(--s-3); }
.t-head .grow { display: flex; flex-direction: column; gap: 2px; }
.t-head b { font-weight: var(--w-medium); }
.seals { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.medal { width: 44px; height: 44px; flex: none; border-radius: var(--r-full); display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.medal.on { background: var(--accent); color: var(--on-accent); }
.trophy .prog { display: block; height: 6px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
.trophy .prog i { display: block; height: 100%; border-radius: var(--r-full); background: var(--ink); transform-origin: left; }
.trophy .lvl { font-size: var(--t-sm); font-weight: var(--w-medium); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hero-card .stats { margin-top: var(--s-2); }
.hero-card .stats span { color: rgba(255, 255, 255, .72); }
.hero-card .stats b { color: #fff; }
.rowlink.won .medal { animation: pop var(--d-slow) var(--ease-out); }

/* ---------- Progression physique ---------- */
.measure { gap: var(--s-1); }
.m-head { display: flex; align-items: baseline; gap: var(--s-3); }
.m-head b { font-size: var(--t-lg); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.measure > .meta { margin-bottom: var(--s-2); }
.m-row { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); font-size: var(--t-sm); border-top: 1px solid var(--line); }
.m-row b { font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.m-row .iconbtn { margin-right: calc(-1 * var(--s-2)); }
.sheet-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-4); padding: 2px; margin: -2px; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }

/* ---------- Première configuration ----------
   Seul endroit de l'app sur fond sombre : des photos plein écran, puis les questions sur fond encre.
   Les couleurs sont redéfinies ici, localement, pour que les composants habituels s'adaptent. */
html:has(body.setup) { background: #0F1B2D; }
body.setup { background: #0F1B2D; }
body.setup nav.tabs, body.setup #rest { display: none; }
body.setup main { --bg: #0F1B2D; --surface: #1A2940; --surface-2: #25364F; --line: #31445F; --ink: #FFFFFF; --ink-2: #B4C3D6;
  color: var(--ink); min-height: 100dvh; padding-bottom: calc(var(--s-5) + env(safe-area-inset-bottom)); }
body.setup main.enter { animation: none; }
.onb { flex: 1; display: flex; flex-direction: column; gap: var(--s-4); position: relative; }
.onb > * { position: relative; animation: rise var(--d-slow) var(--ease-out); }
.onb > .head { margin-bottom: var(--s-4); animation: none; }
.onb h1 { font-size: var(--t-xl); line-height: 1.15; }
.onb h1 em { font-style: normal; color: var(--accent); }
.onb > .meta { max-width: 36ch; }
.onb .eyebrow { font-size: var(--t-xs); font-weight: var(--w-medium); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: calc(-1 * var(--s-2)); }
.onb-logo { display: block; }
.onb-bg { position: fixed !important; inset: 0; background: #0F1B2D 50% 20% / cover no-repeat; animation: fade var(--d-slow) var(--ease-out) !important; }
.onb-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--night), .55), rgba(var(--night), .05) 22%, rgba(var(--night), .1) 40%, rgba(var(--night), .88) 64%, #0F1B2D 80%); }
.onb.long .onb-bg::after { background: linear-gradient(180deg, rgba(var(--night), .6), rgba(var(--night), .35) 20%, rgba(var(--night), .92) 46%, #0F1B2D 62%); }
.onb.photo h1 { font-size: var(--t-2xl); line-height: 1.05; letter-spacing: -.02em; }
.onb.photo .onb-foot { align-items: stretch; gap: var(--s-3); }
.onb.photo .onb-foot > .meta { font-size: var(--t-md); max-width: 32ch; margin-bottom: var(--s-3); }
.onb.photo .textbtn { align-self: center; }
.onb-steps { list-style: none; margin: var(--s-2) 0 var(--s-4); padding: 0; display: flex; flex-direction: column; gap: var(--s-3); counter-reset: n; }
.onb-steps span, .onb-steps b { display: block; }
.onb-steps b { font-weight: var(--w-medium); }
.onb-steps li { counter-increment: n; position: relative; padding-left: 44px; }
.onb-steps li::before { content: counter(n); position: absolute; left: 0; top: 2px; width: 28px; height: 28px; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: var(--t-sm); font-weight: var(--w-bold); }
.onb-foot { margin-top: auto; padding-top: var(--s-5); display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.onb-dots { display: flex; justify-content: center; gap: var(--s-2); padding: var(--s-2) 0; }
.onb-dots i { width: 6px; height: 6px; border-radius: var(--r-full); background: rgba(255, 255, 255, .35); }
.onb-dots i.on { width: 20px; background: var(--accent); }
.onb-progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s-1); padding: 0 var(--s-2); }
.onb-progress i { height: 4px; border-radius: var(--r-full); background: var(--line); }
.onb-progress i.on { background: var(--accent); }
.onb-choices { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
.choice { display: flex; align-items: center; gap: var(--s-3); min-height: 76px; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface); transition: transform var(--d-fast) var(--ease-out); }
.choice:active { transform: scale(.97); }
.choice b { display: block; font-weight: var(--w-medium); }
.choice > i { width: 28px; height: 28px; flex: none; border-radius: var(--r-full); border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; }
.choice[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.choice[aria-pressed="true"] .meta { color: var(--on-accent); }
.choice[aria-pressed="true"] > i { background: var(--on-accent); border-color: var(--on-accent); color: var(--accent); }
.onb-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-2); margin-top: var(--s-2); }
.onb-days .choice { justify-content: center; padding: 0; min-height: 72px; }
.onb-days .choice b { font-size: var(--t-lg); font-weight: var(--w-bold); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

@media (min-width: 560px) { .stats.two { grid-template-columns: repeat(4, 1fr); } }

/* Petits écrans : les rangées passent à la ligne plutôt que de déborder */
.card > .row { flex-wrap: wrap; }
.card > .row > label { flex: 1 1 130px; }

/* Première fois sur un exercice : pas de colonne « Précédent » vide */
.ex.nolast .set { grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr) 44px; }
.ex.nolast .set .prev, .ex.nolast .set.head span:nth-child(2) { display: none; }
/* Coach : la zone de saisie reste à portée, au-dessus de la barre du bas */
.composer { position: sticky; bottom: calc(64px + var(--s-5) + env(safe-area-inset-bottom)); padding: var(--s-2) 0; background: var(--bg); }
.rowlink b .chip { margin-left: var(--s-1); vertical-align: 1px; }

/* =====================================================================
   Habillage « bleu clair et lime »
   Le ciel en fond, des cartes blanches très arrondies, le bleu nuit pour
   le texte et les boutons, le lime réservé aux détails.
   ===================================================================== */
html { background: var(--bg); }
body { background: linear-gradient(180deg, var(--sky-1) 0, var(--sky-2) 300px, var(--bg) 720px) no-repeat, var(--bg); }
h1 { letter-spacing: -.02em; }
h1:has(b) { font-weight: var(--w-light); }
h1 b { font-weight: var(--w-bold); }
.card, .list, .ex { box-shadow: 0 10px 24px rgba(50, 100, 160, .08); }
.glass { background: var(--glass); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .7); }

/* Boutons : le principal est bleu nuit ; son icône, s'il en a une, porte le lime */
.btn { background: var(--surface); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary > .i { box-sizing: content-box; padding: 7px; margin-left: calc(-1 * var(--s-3)); border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.btn:disabled { background: var(--glass); color: var(--ink-2); }
.head > .iconbtn, .bar > .iconbtn { background: var(--glass); border: 1px solid rgba(255, 255, 255, .7); color: var(--ink); }
.head > .iconbtn:first-child, .bar > .iconbtn:first-child { margin-left: 0; margin-right: var(--s-1); }
.bar .iconbtn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: transparent; }
.bar { margin-left: calc(-1 * var(--s-4)); margin-right: calc(-1 * var(--s-4)); padding-left: var(--s-4); padding-right: var(--s-4); background: rgba(198, 224, 250, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.sec .textbtn, .textbtn { color: var(--ink-2); }
.hero-card .textbtn { color: #fff; }

/* Cartes photo : la photo est teintée en bleu, le bouton est blanc avec un rond lime */
.hero-card { box-shadow: 0 18px 36px rgba(50, 100, 160, .26); }
.hero-card.tall { min-height: 232px; border-radius: 30px;
  background: linear-gradient(90deg, rgba(var(--night), .78), rgba(var(--night), .34) 55%, rgba(var(--night), .06)), linear-gradient(180deg, rgba(var(--night), .18), transparent 40%, rgba(var(--night), .6)),
    var(--photo) var(--pos, right 25%) / cover no-repeat, linear-gradient(160deg, #6C97C8, #9CC4EC);
  background-blend-mode: normal, normal, luminosity, normal; }
.hero-card.tall h2 { font-weight: var(--w-bold); }
.hero-card.tall .eyebrow { padding: 4px 10px; }
.hero-card .btn.primary { background: #fff; color: var(--ink); padding-left: 6px; min-height: 48px; gap: var(--s-3); }
.hero-card .btn.primary::before { content: ""; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F1B2D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 20px no-repeat; }
.hero-card .actions .textbtn { background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .38); min-height: 48px; padding: 0 var(--s-4); }
.hero-card.verdict .eyebrow { background: #fff; }
.hero-card.verdict.good .eyebrow { background: var(--accent); }

/* Accueil */
.hello h1 { font-size: 24px; white-space: nowrap; }
.week { gap: 6px; }
.day { padding: 9px 0 5px; gap: 7px; border-radius: var(--r-full); background: var(--glass); border: 1px solid rgba(255, 255, 255, .7); }
.day b { width: 34px; height: 34px; background: #fff; }
.day.today { background: var(--ink); border-color: transparent; box-shadow: 0 10px 20px rgba(var(--night), .25); }
.day.today span { color: #fff; }
.day.today b, .day.done.today b { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.day.done b { background: var(--ink); color: #fff; position: relative; }
.day.done:not(.today) b::after { content: ""; position: absolute; right: -1px; top: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff; }
.day i { bottom: 3px; background: var(--blue); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.tile { position: relative; background: var(--surface); border-radius: var(--r-md); padding: var(--s-4); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 136px; box-shadow: 0 10px 24px rgba(50, 100, 160, .08); transition: transform var(--d-fast) var(--ease-out); }
.tile:active { transform: scale(.97); }
.tile .ic { width: 38px; height: 38px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-text); display: grid; place-items: center; margin-bottom: var(--s-2); }
.tile .ic.pop { background: var(--accent); color: var(--on-accent); }
.tile b { font-size: var(--t-xl); font-weight: var(--w-bold); letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile b small { font-size: var(--t-sm); font-weight: var(--w-medium); color: var(--ink-2); letter-spacing: 0; }
.tile .bars { position: absolute; right: var(--s-4); top: var(--s-4); display: flex; align-items: flex-end; gap: 4px; height: 38px; }
.tile .bars i { width: 6px; border-radius: 3px; background: var(--blue-soft); }
.tile .bars i.on { background: var(--accent); box-shadow: 0 0 0 1.5px var(--ink); }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent); font-size: var(--t-xs); font-weight: var(--w-bold); white-space: nowrap; }
.tile .pill { margin-top: var(--s-1); }
.pcards { display: flex; gap: var(--s-3); overflow-x: auto; margin: 0 calc(-1 * var(--s-4)); padding: 0 var(--s-4) var(--s-2); scrollbar-width: none; scroll-snap-type: x proximity; }
.pcards::-webkit-scrollbar { display: none; }
.pcard { position: relative; width: 158px; height: 150px; flex: none; border-radius: var(--r-md); overflow: hidden; color: #fff; padding: var(--s-3); display: flex; flex-direction: column; justify-content: space-between; scroll-snap-align: start; transition: transform var(--d-fast) var(--ease-out);
  background: linear-gradient(180deg, rgba(var(--night), .12), rgba(var(--night), .1) 40%, rgba(var(--night), .7)), var(--photo) var(--pos, center 20%) / cover no-repeat, linear-gradient(160deg, #6C97C8, #9CC4EC); background-blend-mode: normal, luminosity, normal; }
.pcard:active { transform: scale(.97); }
.pcard span { align-self: flex-start; min-height: 26px; padding: 0 9px; border-radius: var(--r-full); background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .4); font-size: var(--t-xs); font-weight: var(--w-medium); display: inline-flex; align-items: center; }
.pcard b { font-size: var(--t-md); font-weight: var(--w-medium); }
.delta.good { background: var(--accent); color: var(--on-accent); padding: 2px 9px; border-radius: var(--r-full); font-weight: var(--w-bold); }
.card.lime { background: var(--surface); color: var(--ink); }

/* Sélecteurs à pastilles : la pastille active est bleu nuit, avec un point lime */
.seg { background: var(--glass); border: 1px solid rgba(255, 255, 255, .7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 5px; }
.card .seg { background: var(--surface-2); border-color: transparent; }
.seg button { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; padding: 0 var(--s-1); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg button[aria-pressed="true"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.chip-btn { background: var(--surface); }
.chip.good { background: var(--accent-soft); }

/* Séance */
.extile { border-radius: 16px; }
.ss-tag, .hint { color: var(--blue-text); }
.check { border-radius: 50%; }
.set.done { border-radius: var(--r-full); }
.ex.ss { box-shadow: inset 4px 0 var(--blue), 0 10px 24px rgba(50, 100, 160, .08); }
.progress i { background: var(--ink); }
.f-step .iconbtn { background: var(--blue-soft); }
.f-step input { background: var(--surface); border-radius: 22px; box-shadow: inset 0 0 0 1.5px var(--line); }
.f-chip { background: var(--surface-2); }
.f-chip.done { background: var(--ink); color: #fff; gap: 6px; }
.f-chip.done::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.f-chip.now { box-shadow: inset 0 0 0 1.5px var(--blue); }
.f-nav .btn { background: var(--glass); border: 1px solid rgba(255, 255, 255, .7); }
#rest { border-radius: var(--r-md); background: rgba(255, 255, 255, .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, .8); }
#rest .textbtn { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

/* Progrès */
.spark circle { fill: var(--accent); stroke: var(--ink); stroke-width: 1.5; }
.chart .dot.ring { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.bodymap .n { fill: #CBDCEE; stroke: #CBDCEE; }
.bodymap .l0 { fill: #EDF4FB; }
.bodymap .l1, .legend .l1 { fill: var(--blue); background: var(--blue); }
.bodymap .l2 { fill: var(--accent); stroke: var(--ink); stroke-width: 1.2; }
.legend .l2 { background: var(--accent); box-shadow: 0 0 0 1.2px var(--ink); }
.legend .l0 { background: #EDF4FB; box-shadow: 0 0 0 1px var(--line); }
.bodymini { background: var(--blue-soft); }
.bodymini .l0 { fill: #fff; }
.activity .cells i { background: var(--surface-2); }
.medal { background: var(--blue-soft); color: var(--blue-text); }
.medal.on { background: var(--accent); color: var(--on-accent); }
.seal .edge { fill: var(--surface-2); }
.trophy .prog-bar i, .trophy .prog i { background: var(--ink); }
.meter i { background: var(--blue); }

/* Barre du bas : une pastille bleu nuit, l'onglet actif dans un rond lime */
nav.tabs { left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: none; margin: 0; height: 64px; padding: 0 7px; gap: 6px; background: var(--ink); border: 0; box-shadow: 0 16px 32px rgba(var(--night), .3); }
nav.tabs a, nav.tabs a[data-tab="workout"] { flex: none; width: 50px; height: 50px; margin: 0; border-radius: 50%; background: none; color: rgba(255, 255, 255, .74); font-size: 0; gap: 0; }
nav.tabs svg, nav.tabs a[data-tab="workout"] svg { width: 23px; height: 23px; stroke-width: 1.75; }
nav.tabs a[aria-current="page"], nav.tabs a[data-tab="workout"][aria-current="page"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
nav.tabs a.live::after { top: 6px; right: 6px; background: var(--accent); box-shadow: 0 0 0 2px var(--ink); }
nav.tabs a[aria-current="page"].live::after { background: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
#toast { background: var(--ink); }
.sheet { border-radius: 30px 30px 0 0; }
.msg.user { background: var(--ink); color: #fff; }
.composer .send { background: var(--ink); color: var(--accent); }

/* Première configuration : photos teintées, titres fin et gras, bouton blanc */
.onb-bg { background-color: #7FA8D8; background-blend-mode: luminosity; }
.onb.photo h1 { font-weight: var(--w-light); }
.onb h1 em { color: inherit; font-weight: var(--w-bold); }
body.setup .btn.primary { background: #fff; color: #0F1B2D; }
body.setup .head > .iconbtn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; }
body.setup .textbtn { color: #fff; }
.onb .onb-foot .btn.primary { min-height: 56px; }

/* Interrupteur (Réglages) : une vraie case à cocher, dessinée en bascule */
.switch { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); cursor: pointer; position: relative; }
.switch .grow { display: flex; flex-direction: column; gap: 2px; }
.switch b { font-weight: var(--w-medium); }
.switch input { position: absolute; right: 0; top: 50%; width: 52px; height: var(--tap); min-height: 0; margin: calc(var(--tap) / -2) 0 0; padding: 0; opacity: 0; cursor: pointer; }
.switch i { width: 52px; height: 32px; flex: none; border-radius: var(--r-full); background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); position: relative; transition: background var(--d-base) var(--ease-out); }
.switch i::after { content: ""; position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 6px rgba(var(--night), .25); transition: transform var(--d-base) var(--ease-out); }
.switch input:checked + i { background: var(--ink); box-shadow: none; }
.switch input:checked + i::after { transform: translateX(20px); background: var(--accent); }
.switch input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Premium et liste d'attente */
.premium-link { align-self: flex-start; margin-left: calc(-1 * var(--s-3)); color: var(--ink-2); }
.pill.soon { align-self: flex-start; background: var(--blue-soft); color: var(--blue-text); }
.formules { display: flex; flex-direction: column; gap: var(--s-2); }
.formule { display: flex; align-items: center; gap: var(--s-3); min-height: 76px; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface); box-shadow: 0 10px 24px rgba(50, 100, 160, .08); transition: transform var(--d-fast) var(--ease-out); }
.formule:active { transform: scale(.97); }
.formule .grow { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.formule b { font-weight: var(--w-medium); }
.formule .pill { margin-top: var(--s-1); white-space: normal; padding: 3px 10px; text-align: left; }
.formule .prix { font-size: var(--t-lg); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.formule[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink), 0 10px 24px rgba(50, 100, 160, .08); }
.erreur { color: var(--danger); font-size: var(--t-sm); font-weight: var(--w-medium); }
.card a { color: var(--blue-text); font-weight: var(--w-medium); display: inline-block; padding: var(--s-3) 0; margin: calc(-1 * var(--s-3)) 0; }

/* Les textes légaux sont sur le site : dans les réglages, ce sont des liens. */
a.rowlink { color: inherit; text-decoration: none; }

/* Compte */
input.code { font-size: var(--t-xl); font-weight: var(--w-bold); letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; min-height: 64px; }

/* Premier lancement : compte et tutoriel */
.onb-form { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-2); }
.onb-liens { justify-content: center; flex-wrap: wrap; gap: 0 var(--s-2); }
.onb-note { text-align: center; font-size: var(--t-xs); max-width: 40ch; }
.onb-note a { display: block; padding: var(--s-4) 0 var(--s-3); color: var(--ink); text-decoration: underline; }
.onb-recap { list-style: none; margin: 0 0 var(--s-2); padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.onb-recap li { position: relative; padding-left: 36px; color: var(--ink-2); }
.onb-recap li b { color: var(--ink); font-weight: var(--w-medium); }
.onb-recap li::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: var(--r-full); background: var(--accent)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F1B2D' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-8'/%3E%3C/svg%3E") center / 16px no-repeat; }
.onb.photo .onb-recap { margin: var(--s-2) 0 var(--s-4); }
body.setup .erreur { color: #FFB8B8; }
body.setup .onb-form input { background: var(--surface); border-color: var(--line); color: var(--ink); }
body.setup .onb-form input::placeholder { color: var(--ink-2); opacity: .7; }

/* La carte d'exemple du tutoriel reprend les couleurs claires de l'app, sur le fond nuit. */
.tuto-card { --surface: #FFFFFF; --surface-2: #E4EFFA; --line: #D3E2F2; --ink: #0F1B2D; --ink-2: #47576F;
  background: var(--surface); color: var(--ink); border-radius: var(--r-md); padding: var(--s-5); margin: auto 0; min-height: 212px;
  display: flex; flex-direction: column; justify-content: center; gap: var(--s-2); box-shadow: var(--shadow); animation: rise var(--d-slow) var(--ease-out); }
.tuto-card .eyebrow { color: var(--blue-text); margin: 0; }
.tuto-card .meta { color: var(--ink-2); }
.t-titre { font-size: var(--t-lg); font-weight: var(--w-bold); line-height: 1.2; }
.t-bouton { align-self: flex-start; margin-top: var(--s-3); display: inline-flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: 0 var(--s-2) 0 var(--s-5);
  border-radius: var(--r-full); background: var(--ink); color: #fff; font-weight: var(--w-medium); }
.t-bouton i { width: 32px; height: 32px; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.t-serie { display: grid; grid-template-columns: 32px 1fr 1fr var(--tap); align-items: center; gap: var(--s-2); margin-top: var(--s-3); padding: var(--s-1) var(--s-1) var(--s-1) var(--s-2);
  border-radius: var(--r-full); background: var(--surface-2); transition: background var(--d-base) var(--ease-out); }
.t-serie.done { background: var(--accent-soft); }
.t-serie .check { background: var(--surface); }
.t-serie.done .check { background: var(--accent); color: var(--on-accent); animation: pop var(--d-slow) var(--ease-out); }
.t-num { width: 28px; height: 28px; border-radius: var(--r-full); background: var(--surface); display: grid; place-items: center; font-size: var(--t-sm); font-weight: var(--w-medium); }
.t-val { text-align: center; color: var(--ink-2); font-size: var(--t-sm); }
.t-val b { color: var(--ink); font-size: var(--t-lg); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.t-aide { margin-top: var(--s-1); min-height: 1.5em; }
.t3, .t4 { align-items: center; text-align: center; }
.t-chrono { font-size: var(--t-2xl); font-weight: var(--w-bold); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.t-jauge { width: 100%; height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; margin: var(--s-2) 0; }
.t-jauge i { display: block; width: 62%; height: 100%; border-radius: var(--r-full); background: var(--accent); }
.t-pastilles { display: flex; gap: var(--s-2); }
.t-pastilles i { font-style: normal; padding: var(--s-2) var(--s-4); border-radius: var(--r-full); background: var(--surface-2); font-size: var(--t-sm); font-weight: var(--w-medium); }
.t-chiffres { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin-top: var(--s-2); font-size: var(--t-xs); color: var(--ink-2); }
.t-chiffres span { padding: var(--s-2); border-radius: var(--r-sm); background: var(--surface-2); }
.t-chiffres b { display: block; color: var(--ink); font-size: var(--t-md); font-weight: var(--w-bold); }
.t-courbe { width: 100%; height: 44px; margin-top: var(--s-2); }
.t-courbe path { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tuto .onb-foot { align-items: stretch; gap: var(--s-3); padding-top: var(--s-4); }
.tuto .onb-foot .eyebrow { margin: 0; }
.tuto .onb-foot > .meta { max-width: 34ch; margin-bottom: var(--s-2); }
@media (max-height: 640px) { .tuto-card { min-height: 0; padding: var(--s-4); } .tuto h1 { font-size: var(--t-lg); } }

/* S'identifier : Apple, Google, e-mail */
body.setup .btn:not(.primary) { border: 1px solid var(--line); }
.fournisseur { gap: var(--s-3); text-decoration: none; }
.onb-ou { display: flex; align-items: center; gap: var(--s-3); margin: 0; color: var(--ink-2); font-size: var(--t-sm); }
.onb-ou::before, .onb-ou::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.onb-attente { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: var(--s-5); text-align: center; }
.spin { width: 40px; height: 40px; border-radius: var(--r-full); border: 3px solid var(--line); border-top-color: var(--accent); animation: tourne .9s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* Questions du premier lancement : zones à privilégier, résumé du programme sur mesure */
.onb-zones { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin-top: var(--s-2); }
.onb-zones .choice { min-height: 60px; }
.onb-zones .choice:disabled { opacity: .4; }
.onb-notes { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; }
.onb-notes .chip { white-space: normal; padding: var(--s-1) var(--s-3); }

/* Accueil : les zones prioritaires de la semaine */
.prio { display: flex; flex-direction: column; gap: var(--s-4); }
.prio-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: var(--s-1) var(--s-3); }
.prio-row b { font-weight: var(--w-medium); }
.prio-row .prog { grid-column: 1 / -1; display: block; height: 6px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
.prio-row .prog i { display: block; height: 100%; border-radius: var(--r-full); background: var(--ink); }

/* Profil */
.ident { flex-direction: row; align-items: center; gap: var(--s-4); }
.ident .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ident b { font-weight: var(--w-bold); overflow-wrap: anywhere; }
.avatar { width: 56px; height: 56px; flex: none; border-radius: var(--r-full); background: var(--ink); color: var(--accent); display: grid; place-items: center; font-size: var(--t-lg); font-weight: var(--w-bold); }
.reponses { gap: 0; padding-top: var(--s-2); padding-bottom: var(--s-2); }
.reponses .rep { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.reponses .rep:last-child { border-bottom: 0; }
.reponses .rep b { font-weight: var(--w-medium); text-align: right; }

/* Premium */
.premium-link { display: inline-flex; gap: var(--s-2); }
.pill.soon { vertical-align: middle; margin-left: var(--s-1); }
.compare { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.compare th, .compare td { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); text-align: center; font-weight: var(--w-medium); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { font-size: var(--t-xs); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.compare thead th:last-child { color: var(--blue-text); }
.compare tbody th { text-align: left; font-weight: var(--w-regular); color: var(--ink-2); padding-right: var(--s-3); }
.compare td { width: 26%; }
.compare .oui { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent); }
.compare .non { color: var(--ink-2); }
.formule { text-align: left; }
.formule .coche { width: 24px; height: 24px; flex: none; border-radius: var(--r-full); border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; }
.formule[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--ink), 0 10px 24px rgba(50, 100, 160, .08); }
.formule[aria-checked="true"] .coche { background: var(--ink); border-color: var(--ink); color: var(--accent); }
.formule .prix { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.formule .prix small { font-size: var(--t-xs); font-weight: var(--w-regular); color: var(--ink-2); }
.meta.centre { text-align: center; }
.rowlink.verrou { width: 100%; text-align: left; color: var(--ink); }
.rowlink.verrou > .i:last-child { color: var(--ink-2); }
.seg button .i { vertical-align: -2px; margin-right: 3px; opacity: .7; }

/* Premium : un écran plein, sur le bleu nuit du premier lancement, avec une lueur bleue et lime */
.paywall { flex: 1; display: flex; flex-direction: column; gap: var(--s-5); position: relative; }
.paywall > * { position: relative; }
.paywall > .head { margin-bottom: calc(-1 * var(--s-5)); }
.pw-fond { position: fixed !important; inset: 0; background: #0F1B2D url(../img/rack.jpg) 50% 0 / cover no-repeat; background-blend-mode: luminosity; }
.pw-fond::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 45% at 105% 18%, rgba(157, 252, 56, .42), transparent 70%), radial-gradient(60% 40% at -10% 8%, rgba(61, 155, 234, .55), transparent 70%),
    linear-gradient(180deg, rgba(var(--night), .55), rgba(var(--night), .82) 32%, #0F1B2D 52%); }
.pw-haut { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-3); padding-top: var(--s-5); animation: rise var(--d-slow) var(--ease-out); }
.pw-badge { display: inline-flex; align-items: center; gap: var(--s-2); padding: 6px 14px; border-radius: var(--r-full); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); font-size: var(--t-xs); font-weight: var(--w-medium); letter-spacing: .04em; }
.pw-badge .i { color: var(--accent); }
.paywall h1 { font-size: var(--t-2xl); line-height: 1.05; letter-spacing: -.02em; font-weight: var(--w-light); max-width: 14ch; }
.paywall h1 b { font-weight: var(--w-bold); }
.pw-chapo { color: var(--ink-2); max-width: 32ch; }
.pw-puces { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); }
.pw-puces li { display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-4); border-radius: var(--r-full); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); font-size: var(--t-sm); }
.pw-puces .i { color: var(--accent); }
.pw-bas { margin-top: auto; display: flex; flex-direction: column; gap: var(--s-3); }
.pw-formules { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); padding-top: var(--s-3); }
.pw-formule { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--s-4) var(--s-1) var(--s-3); border-radius: var(--r-md);
  background: rgba(255, 255, 255, .05); border: 1.5px solid rgba(255, 255, 255, .14); color: var(--ink); text-align: center; transition: transform var(--d-fast) var(--ease-out); }
.pw-formule:active { transform: scale(.97); }
.pw-formule[aria-checked="true"] { border: 2px solid var(--accent); background: rgba(157, 252, 56, .08); }
.pw-formule b { font-size: var(--t-lg); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pw-nom { font-size: var(--t-xs); font-weight: var(--w-medium); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.pw-formule[aria-checked="true"] .pw-nom { color: var(--accent); }
.pw-par { font-size: var(--t-xs); color: var(--ink-2); }
.pw-mois { margin-top: var(--s-1); font-size: var(--t-xs); color: var(--ink-2); }
.pw-remise { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 2px 10px; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent); font-size: var(--t-xs); font-weight: var(--w-bold); white-space: nowrap; }
.pw-conditions { text-align: center; color: var(--accent); font-size: var(--t-sm); font-weight: var(--w-medium); max-width: 34ch; margin: 0 auto; }
.pw-bientot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-2); color: var(--ink-2); font-size: var(--t-sm); }
.pw-bientot .pill { margin: 0; }
/* Le bouton reste visible en bas de l'écran, même sur un petit téléphone. */
.pw-cta { position: sticky; bottom: var(--s-3); z-index: 2; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); min-height: 58px; justify-content: space-between; padding-left: var(--s-5); padding-right: var(--s-2); }
.pw-cta:only-child, .pw-ok + .pw-bas .pw-cta { justify-content: center; }
.pw-cta .rond { width: 42px; height: 42px; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.pw-note { text-align: center; color: var(--ink-2); font-size: var(--t-sm); }
.pw-note .i { vertical-align: -3px; margin-right: var(--s-1); }
.pw-detail { border-top: 1px solid var(--line); }
.pw-detail summary { min-height: var(--tap); display: flex; align-items: center; justify-content: center; gap: var(--s-1); cursor: pointer; list-style: none; font-size: var(--t-sm); font-weight: var(--w-medium); }
.pw-detail summary::-webkit-details-marker { display: none; }
.pw-detail summary .i { transform: rotate(90deg); transition: transform var(--d-base) var(--ease-out); }
.pw-detail[open] summary .i { transform: rotate(-90deg); }
.pw-detail .list { margin: var(--s-2) 0 var(--s-4); }
.pw-detail .compare { margin-bottom: var(--s-3); }
.pw-liens { display: flex; justify-content: center; gap: var(--s-5); font-size: var(--t-xs); }
.pw-liens a { color: var(--ink-2); text-decoration: underline; min-height: var(--tap); display: inline-flex; align-items: center; }
.pw-ok { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-4); }
.pw-rond { width: 72px; height: 72px; border-radius: var(--r-full); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }

/* Planifier : chaque semaine, ou une seule fois */
.planif .sous-titre { font-size: var(--t-sm); font-weight: var(--w-medium); margin-top: var(--s-1); }
.planif .jours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.planif .jours .chip-btn { display: flex; align-items: center; justify-content: center; padding: 0; min-width: 0; background: var(--surface-2); font-size: var(--t-sm); }
.planif .jours .chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
@media (max-width: 359px) { .planif .jours { grid-template-columns: repeat(4, 1fr); } }
.planif .plan-date { align-items: center; }
.rowlink .prevu { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--blue-text); font-weight: var(--w-medium); }
/* Choisir des exercices : créer le sien, en tête de liste */
.creer-ex { width: 100%; text-align: left; background: var(--surface-2); border-radius: var(--r-md); border-top: 0; padding: var(--s-3) var(--s-4); gap: var(--s-4); }
.creer-ex .lead { width: 40px; height: 40px; flex: none; border-radius: var(--r-full); background: var(--surface); color: var(--ink); display: grid; place-items: center; }
.creer-ex > .i:last-child { margin-right: calc(-1 * var(--s-1)); }
