/* FORME. — direction : une marque de sport lifestyle. Fond frais et clair,
   cartes blanches, un bleu cobalt de court de tennis, et le corps comme
   carte de chaleur : plus un muscle a travaillé, plus il est bleu profond.
   Bricolage Grotesque pour la voix, Hanken Grotesk pour tout le reste. */
:root {
  --fond: #eceef1;
  --surface: #ffffff;
  --surface-2: #f4f5f8;
  --trait: #dde0e7;
  --encre: #11141a;
  --doux: #5f6776;
  --accent: #3a55ff;
  --accent-encre: #ffffff;
  --accent-doux: #e4e8ff;
  --chaud: #f2643a;
  --chaud-doux: #ffe7df;
  --ok: #17a36b;
  /* le corps : neutre, puis l'échelle de volume */
  --peau: #dfe2e9;
  --m0: #cfd4de;
  --m1: #c5cdff;
  --m2: #8e9dff;
  --m3: #3a55ff;
  --m4: #7a35ee;
  --ombre: 0 1px 2px rgba(17, 20, 26, 0.04), 0 8px 24px rgba(17, 20, 26, 0.06);
  --ombre-haute: 0 24px 60px rgba(17, 20, 26, 0.18);
  --cadre: #15171c;
  --voix: 'Bricolage Grotesque', 'Arial Narrow', system-ui, sans-serif;
  --texte: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 22px;
  --tete: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --fond: #0d0f13; --surface: #161920; --surface-2: #1d212a; --trait: #2a2f3a; --encre: #eef1f6; --doux: #98a1b1;
    --accent: #6c82ff; --accent-encre: #0d0f13; --accent-doux: #1f2650; --chaud: #ff7a52; --chaud-doux: #3a1f17; --ok: #3fd18f;
    --peau: #252a34; --m0: #303644; --m1: #313d7d; --m2: #4a5fe0; --m3: #7d91ff; --m4: #b58cff; --cadre: #2b2f38;
    --ombre: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25); --ombre-haute: 0 24px 60px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --fond: #0d0f13; --surface: #161920; --surface-2: #1d212a; --trait: #2a2f3a; --encre: #eef1f6; --doux: #98a1b1;
  --accent: #6c82ff; --accent-encre: #0d0f13; --accent-doux: #1f2650; --chaud: #ff7a52; --chaud-doux: #3a1f17; --ok: #3fd18f;
  --peau: #252a34; --m0: #303644; --m1: #313d7d; --m2: #4a5fe0; --m3: #7d91ff; --m4: #b58cff; --cadre: #2b2f38;
  --ombre: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25); --ombre-haute: 0 24px 60px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--fond); color: var(--encre); font: 16px/1.5 var(--texte); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
svg { display: block; }
.rond svg, .onglets svg, .recherche svg, .chevron { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
kbd { font: 600 0.86em ui-monospace, 'SF Mono', Menlo, monospace; background: var(--surface-2); border: 1px solid var(--trait); border-radius: 7px; padding: 1px 6px; white-space: nowrap; }

/* ---------- En-tête ---------- */
body::before { content: ''; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--fond); }
.tete {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; height: var(--tete);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--fond) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.marque { font: 800 28px/1 var(--voix); letter-spacing: -0.045em; color: var(--encre); text-decoration: none; justify-self: start; }
.marque span { color: var(--accent); }
.semaine { display: flex; align-items: center; gap: 6px; }
.rond { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--ombre); display: grid; place-items: center; flex: none; transition: transform 0.15s; }
.rond svg { width: 18px; height: 18px; }
.rond:hover { color: var(--accent); }
.rond:active { transform: scale(0.92); }
#ouvrir-reglages { justify-self: end; }
.sem-titre { min-width: 150px; text-align: center; font-weight: 700; font-size: 15px; line-height: 1.15; }
.sem-titre small { display: block; font-weight: 500; color: var(--doux); font-size: 12.5px; margin-top: 2px; }

/* ---------- Semaine d'exemple ---------- */
.demo {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px;
  margin: 4px max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  padding: 12px 14px 12px 18px; border-radius: 16px; background: var(--accent-doux); color: var(--encre); font-size: 14.5px;
}
.demo p { margin: 0; max-width: 62ch; }

/* ---------- Mise en page : pensée pour le téléphone ---------- */
.app {
  max-width: 600px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr);
  padding: 14px max(14px, env(safe-area-inset-right, 0px)) calc(120px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
}
.corps-vue, .journal, .progres { min-width: 0; }
body:not([data-vue='corps']) .corps-vue, body:not([data-vue='seance']) .journal, body:not([data-vue='progres']) .progres { display: none; }
.mini-corps { display: flex; }
.onglets { display: flex; }
.presentation { display: none; }

.titre-bloc { font: 800 26px/1.1 var(--voix); letter-spacing: -0.03em; margin: 40px 0 14px; text-wrap: balance; }
.journal .titre-bloc, .progres > .titre-bloc:first-child { margin-top: 0; }
.note { font-size: 13.5px; color: var(--doux); }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 13px 22px; font-weight: 700; background: var(--encre); color: var(--fond); transition: transform 0.15s, background 0.2s;
}
.bouton:active { transform: scale(0.97); }
.bouton.ghost { background: var(--surface); color: var(--encre); box-shadow: inset 0 0 0 1px var(--trait); }
.bouton.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--encre); }
.bouton.danger:hover { color: var(--chaud); box-shadow: inset 0 0 0 1.5px var(--chaud); }
.bouton.danger-plein { background: var(--chaud); color: #fff; }
.bouton.large { flex: 1; }
.petit-bouton { padding: 9px 16px; font-size: 14px; background: var(--accent); color: var(--accent-encre); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- Le corps ---------- */
.surtitre { margin: 6px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--doux); }
.verdict { margin: 4px 0 8px; font: 800 clamp(56px, 6.2vw, 92px)/0.95 var(--voix); letter-spacing: -0.035em; text-wrap: balance; }
.verdict .point { color: var(--accent); }
.verdict.manque .point { color: var(--chaud); }
.verdict-detail { margin: 0; color: var(--doux); font-size: 16px; max-width: 46ch; }
.verdict-detail b { color: var(--encre); }
.scene { position: relative; margin-top: 20px; padding: 22px 18px 16px; border-radius: 28px; background: var(--surface); box-shadow: var(--ombre); color: var(--encre); }
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-width: 420px; margin: 0 auto; }
.figures figure { margin: 0; text-align: center; }
.figures figcaption { margin-top: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--doux); }
.silhouette { width: 100%; height: auto; overflow: visible; }
.silhouette .corps { fill: var(--peau); }
.silhouette .muscles path { fill: var(--m0); stroke: var(--surface); stroke-width: 1.2; stroke-linejoin: round; transition: fill 0.7s cubic-bezier(.3,.7,.2,1), opacity 0.2s; cursor: pointer; transform-box: fill-box; transform-origin: center; }
.silhouette .reflet { pointer-events: none; mix-blend-mode: soft-light; }
.silhouette .traits { stroke: var(--surface); stroke-opacity: 0.55; stroke-width: 1.2; fill: none; pointer-events: none; }
.silhouette .sol { color: var(--encre); }
.silhouette .muscles path[data-v='peu'] { fill: var(--m1); }
.silhouette .muscles path[data-v='sous'] { fill: var(--m2); }
.silhouette .muscles path[data-v='bien'] { fill: var(--m3); }
.silhouette .muscles path[data-v='beaucoup'] { fill: var(--m4); }
.silhouette.survol .muscles path:not(.actif) { opacity: 0.28; }
.silhouette .muscles path.pulse { animation: pulse 0.9s cubic-bezier(.2,.8,.2,1); }
@keyframes pulse { 0% { transform: scale(1); filter: brightness(1); } 30% { transform: scale(1.09); filter: brightness(1.35) saturate(1.3); } 100% { transform: scale(1); filter: none; } }
.bulle {
  position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, calc(-100% - 12px));
  background: var(--encre); color: var(--fond); border-radius: 12px; padding: 7px 11px; font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: var(--ombre-haute);
}
.bulle small { display: block; font-weight: 500; opacity: 0.7; }
.echelle { max-width: 340px; margin: 16px auto 0; }
.echelle-barre { display: block; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--m0) 0%, var(--m1) 22%, var(--m2) 40%, var(--m3) 50%, var(--m3) 82%, var(--m4) 100%); }
.echelle-libelles { position: relative; display: block; height: 16px; margin-top: 6px; font-size: 11.5px; color: var(--doux); font-variant-numeric: tabular-nums; }
.echelle-libelles span { position: absolute; top: 0; transform: translateX(-50%); }
.echelle-libelles span:nth-child(1) { left: 0; transform: none; } .echelle-libelles span:nth-child(2) { left: 50%; } .echelle-libelles span:nth-child(3) { left: 82%; }
.echelle-titre { display: block; text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--doux); margin-bottom: 8px; }

.manque { margin-top: 16px; }
.manque:empty { display: none; }
.manque h3 { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--doux); }
.manque-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.manque button { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 9px 14px 9px 12px; background: var(--surface); box-shadow: var(--ombre); font-weight: 700; font-size: 14px; transition: transform 0.15s; }
.manque button::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--chaud); }
.manque button span { color: var(--doux); font-weight: 500; }
.manque button:hover { transform: translateY(-1px); color: var(--accent); }

/* mini corps (téléphone, onglet Séance) */
.mini-corps {
  width: 100%; align-items: center; gap: 14px; margin-bottom: 22px; padding: 10px 16px 10px 10px; border: 0; border-radius: 22px;
  background: var(--surface); box-shadow: var(--ombre); text-align: left;
}
.mini-figs { display: flex; gap: 2px; flex: none; }
.mini-figs > span { width: 34px; }
.mini-figs .silhouette .muscles path { stroke-width: 2; }
.mini-txt { flex: 1; min-width: 0; }
.mini-txt b { display: block; font: 800 24px/1 var(--voix); letter-spacing: -0.04em; }
.mini-txt small { display: block; color: var(--doux); font-size: 13.5px; margin-top: 4px; }
.chevron { width: 20px; height: 20px; color: var(--doux); flex: none; }

/* ---------- La semaine ---------- */
.journal-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.journal-tete .titre-bloc { margin: 0; }
.resume { color: var(--doux); font-size: 14px; font-variant-numeric: tabular-nums; }
.seances { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.seance, .exo, .compo { min-width: 0; }
.etat-vide { padding: 36px 24px; border-radius: var(--r); background: var(--surface); box-shadow: var(--ombre); text-align: center; color: var(--doux); }
.etat-vide strong { display: block; color: var(--encre); font: 800 24px/1.15 var(--voix); letter-spacing: -0.03em; margin-bottom: 6px; }

.seance { background: var(--surface); border-radius: var(--r); box-shadow: var(--ombre); padding: 8px 18px 16px; }
.seance-tete { display: flex; align-items: center; gap: 10px; padding: 8px 0 10px; }
.seance-nom { flex: 1; min-width: 0; border: 0; background: transparent; font: 800 22px/1.2 var(--voix); letter-spacing: -0.03em; padding: 2px 0; border-bottom: 1.5px dashed transparent; }
.seance-nom:hover, .seance-nom:focus { outline: none; border-bottom-color: var(--trait); }
.repos { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--accent); background: var(--accent-doux); border-radius: 14px; padding: 10px 14px; font-variant-numeric: tabular-nums; }
.repos { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, var(--accent-doux)) var(--avance, 0%), var(--accent-doux) var(--avance, 0%)); }
.repos::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: clignote 1.6s infinite; }
.repos.pret { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.repos.pret::before { animation: none; }
@keyframes clignote { 50% { opacity: 0.25; } }
.seance:not(.ouverte) { padding-bottom: 14px; }
.seance:not(.ouverte) .seance-tete { padding-bottom: 4px; }
span.seance-nom { cursor: default; }
.replier svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s; }
.seance.ouverte .replier svg { transform: rotate(180deg); }
.icone.replier:hover { background: var(--surface-2); color: var(--encre); }
.seance-resume { display: flex; flex-wrap: wrap; gap: 6px 14px; width: 100%; border: 0; background: transparent; padding: 0; text-align: left; font-size: 13.5px; color: var(--doux); }
.seance-resume b { color: var(--encre); font-weight: 700; font-variant-numeric: tabular-nums; }
.seance-pied { display: flex; justify-content: flex-end; margin-top: 10px; }
.lien-danger { border: 0; background: transparent; color: var(--doux); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 6px 2px; }
.lien-danger:hover { color: var(--chaud); }
.seance-info { color: var(--doux); font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.icone { width: 36px; height: 36px; border: 0; border-radius: 12px; background: transparent; color: var(--doux); font-size: 20px; line-height: 1; flex: none; display: grid; place-items: center; }
.icone:hover { background: var(--surface-2); color: var(--chaud); }

.exo { padding: 16px 0 4px; border-top: 1px solid var(--trait); }
.exo-tete { display: flex; align-items: flex-start; gap: 10px; }
.exo-nom { flex: 1; min-width: 0; font-weight: 700; font-size: 16.5px; line-height: 1.25; }
.exo-nom small { display: block; margin-top: 3px; font-weight: 500; font-size: 12.5px; color: var(--doux); }
.exo-stats { text-align: right; font-size: 12.5px; color: var(--doux); line-height: 1.45; white-space: nowrap; font-variant-numeric: tabular-nums; }
.exo-stats b { color: var(--encre); }
.derniere { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; font-size: 13.5px; color: var(--doux); }
.derniere b { color: var(--encre); font-weight: 600; }
.puce { border: 0; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; background: var(--surface-2); }
.puce:hover { background: var(--accent-doux); color: var(--accent); }
.puce.plus { background: var(--accent-doux); color: var(--accent); }

/* séries faites : des jetons */
.jetons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.jeton {
  position: relative; display: inline-flex; align-items: baseline; gap: 4px; border: 0; border-radius: 14px; padding: 9px 13px 8px 13px;
  background: var(--surface-2); font-variant-numeric: tabular-nums; animation: pose 0.35s cubic-bezier(.2,.9,.3,1.3) both;
}
.jeton i { position: absolute; top: -6px; left: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--encre); color: var(--fond); font: 700 10.5px/17px var(--texte); font-style: normal; text-align: center; }
.jeton b { font: 800 19px/1 var(--voix); letter-spacing: -0.02em; }
.jeton span { color: var(--doux); font-size: 13px; }
.jeton:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.jeton.record { background: var(--accent-doux); }
.jeton.record::after { content: '★'; position: absolute; top: -7px; right: -5px; font-size: 13px; color: var(--accent); }
.precedente { margin: 8px 0 0; font-size: 13px; color: var(--doux); }
.precedente b { color: var(--encre); font-weight: 600; }
.toast.record { background: var(--accent); color: var(--accent-encre); white-space: normal; max-width: min(92%, 380px); border-radius: 20px; text-align: left; }
@keyframes pose { from { transform: scale(0.6) translateY(6px); opacity: 0; } }

/* la série suivante : − / + et une coche */
.compo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: center; gap: 8px; margin-top: 12px; max-width: 440px; }
.pas-mini { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; height: 52px; background: var(--surface-2); border-radius: 16px; padding: 0 3px; }
.pas-mini button { height: 44px; border: 0; border-radius: 12px; background: transparent; font-size: 20px; font-weight: 700; color: var(--doux); }
.pas-mini button:hover { background: var(--surface); color: var(--encre); }
.pas-mini button:active { color: var(--accent); }
.pas-mini label { display: flex; flex-direction: column; align-items: center; min-width: 0; cursor: text; }
.pas-mini input { width: 100%; min-width: 0; border: 0; background: transparent; text-align: center; font: 800 22px/1.05 var(--voix); letter-spacing: -0.02em; padding: 0; font-variant-numeric: tabular-nums; }
.pas-mini input:focus { outline: none; color: var(--accent); }
.pas-mini small { font-size: 10.5px; line-height: 1; color: var(--doux); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.valider {
  width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-encre); display: grid; place-items: center;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform 0.15s;
}
.valider svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.valider:active { transform: scale(0.88); }
.rapide { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--doux); }
.rapide input { flex: 1; min-width: 0; border: 0; border-bottom: 1.5px dashed var(--trait); background: transparent; padding: 6px 2px; font-size: 15px; }
.rapide input:focus { outline: none; border-bottom-color: var(--accent); }
.rapide input.erreur { border-bottom-color: var(--chaud); animation: secoue 0.3s; }
@keyframes secoue { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ajouter-exo { width: 100%; margin-top: 14px; padding: 13px; border: 1.5px dashed var(--trait); border-radius: 16px; background: transparent; color: var(--doux); font-weight: 700; }
.ajouter-exo:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Progrès ---------- */
.muscles { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; background: var(--surface); border-radius: var(--r); box-shadow: var(--ombre); }
.muscle { display: grid; grid-template-columns: minmax(110px, 150px) 1fr 58px; gap: 3px 14px; align-items: center; padding: 10px 12px; border-radius: 16px; cursor: pointer; }
.muscle:hover, .muscle.actif { background: var(--surface-2); }
.muscle-nom { font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.muscle-nom small { display: block; font-weight: 500; font-size: 12px; color: var(--doux); margin-top: 2px; }
.jauge { position: relative; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.jauge .cible { position: absolute; inset: 0 auto; background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 1.5px 0 0 color-mix(in srgb, var(--accent) 45%, transparent), inset -1.5px 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
.jauge .rempli { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--m0); transition: width 0.5s cubic-bezier(.2,.8,.2,1); }
.jauge .rempli[data-v='peu'] { background: var(--m1); } .jauge .rempli[data-v='sous'] { background: var(--m2); } .jauge .rempli[data-v='bien'] { background: var(--m3); } .jauge .rempli[data-v='beaucoup'] { background: var(--m4); }
.muscle-val { text-align: right; font: 800 21px/1 var(--voix); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.muscle-val small { display: block; font: 500 11px var(--texte); color: var(--doux); margin-top: 3px; letter-spacing: 0; }
.muscle-sous { grid-column: 2 / 4; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--doux); font-variant-numeric: tabular-nums; }
.hausse { color: var(--ok); font-weight: 600; } .baisse { color: var(--chaud); font-weight: 600; }

.equilibres { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.carte { background: var(--surface); border-radius: var(--r); box-shadow: var(--ombre); padding: 16px 18px; }
.carte h3 { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--doux); }
.balance { position: relative; height: 6px; border-radius: 99px; background: var(--surface-2); margin: 16px 0 12px; }
.balance .zone { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: color-mix(in srgb, var(--ok) 25%, transparent); }
.balance .point { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--encre); box-shadow: 0 0 0 3px var(--surface); transition: left 0.5s cubic-bezier(.2,.8,.2,1); }
.carte.e-bas .balance .point, .carte.e-haut .balance .point { background: var(--chaud); }
.carte .gros { font: 800 30px/1 var(--voix); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.carte p { margin: 6px 0 0; font-size: 13.5px; color: var(--doux); }

.historique { background: var(--surface); border-radius: var(--r); box-shadow: var(--ombre); padding: 14px 16px; overflow-x: auto; }
.historique table { border-collapse: separate; border-spacing: 4px; font-size: 12.5px; }
.historique th { font-weight: 600; color: var(--doux); text-align: left; padding-right: 10px; white-space: nowrap; }
.historique thead th { text-align: center; font-size: 11.5px; padding: 0 0 4px; }
.historique thead th.ici { color: var(--accent); }
.historique td { width: 32px; min-width: 32px; height: 20px; border-radius: 6px; background: var(--m0); cursor: pointer; transition: transform 0.15s; }
.historique td[data-v='peu'] { background: var(--m1); } .historique td[data-v='sous'] { background: var(--m2); } .historique td[data-v='bien'] { background: var(--m3); } .historique td[data-v='beaucoup'] { background: var(--m4); }
.historique td.creux { background: transparent; box-shadow: inset 0 0 0 1px var(--trait); }
.historique td:hover { transform: scale(1.15); }

.charges { background: var(--surface); border-radius: var(--r); box-shadow: var(--ombre); padding: 6px 18px 14px; overflow-x: auto; }
.charges table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.charges th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--doux); padding: 12px 10px 8px 0; }
.charges td { padding: 11px 10px 11px 0; border-top: 1px solid var(--trait); }
.charges td:not(:first-child), .charges th:not(:first-child) { text-align: right; white-space: nowrap; }
.charges .note { margin: 12px 0 0; }

.methode { margin-top: 36px; padding: 16px 18px; border-radius: var(--r); background: var(--surface-2); color: var(--doux); font-size: 14.5px; }
.methode summary { cursor: pointer; color: var(--encre); font-weight: 700; }
.methode p { max-width: 68ch; }
.methode strong { color: var(--encre); }

/* ---------- Onglets (téléphone et tablette) ---------- */
.onglets {
  position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; justify-content: center; gap: 4px;
  padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  box-shadow: 0 -1px 0 var(--trait);
}
.onglets button { flex: 1; max-width: 150px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; border-radius: 14px; background: transparent; padding: 7px 4px 6px; font-size: 12px; font-weight: 700; color: var(--doux); position: relative; }
.onglets svg { width: 24px; height: 24px; }
.onglets button[aria-pressed='true'] { color: var(--accent); }
.pastille-score { position: absolute; top: 2px; left: calc(50% + 10px); padding: 1px 6px; border-radius: 99px; background: var(--accent); color: var(--accent-encre); font-size: 10.5px; }
.pastille-score:empty { display: none; }

/* ---------- Feuilles (panneaux) ---------- */
.voile { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, #05070a 45%, transparent); backdrop-filter: blur(3px); animation: fondu 0.18s ease-out; }
@keyframes fondu { from { opacity: 0; } }
.feuille { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 28px; padding: 20px; box-shadow: var(--ombre-haute); animation: arrive 0.28s cubic-bezier(.2,.9,.3,1.1); }
@keyframes arrive { from { transform: translateY(16px) scale(0.98); opacity: 0; } }
.feuille-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.feuille-tete h2 { margin: 0; font: 800 26px/1.1 var(--voix); letter-spacing: -0.035em; }
.feuille-tete h2 small { display: block; font: 500 14px var(--texte); color: var(--doux); letter-spacing: 0; margin-top: 3px; }
.fermer { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2); font-size: 24px; line-height: 1; flex: none; }
.voile { place-items: end center; padding: 0; }
.feuille { width: 100%; max-height: 94vh; border-radius: 28px 28px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); animation: monte 0.3s cubic-bezier(.2,.9,.3,1); }
.feuille::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--trait); margin: -8px auto 12px; }
@keyframes monte { from { transform: translateY(60px); } }
.choix { display: flex; flex-direction: column; height: min(760px, calc(100vh - 32px)); }
.choix { height: 94vh; }
.recherche { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 16px; background: var(--surface-2); }
.recherche svg { width: 20px; height: 20px; color: var(--doux); flex: none; }
.recherche input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 14px 0; font-size: 16px; }
.recherche input:focus { outline: none; }
.recherche:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.filtres { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 8px; flex: none; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.filtres::-webkit-scrollbar { display: none; }
.filtre { flex: none; border: 0; border-radius: 999px; padding: 7px 14px; background: var(--surface-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.filtre[aria-pressed='true'] { background: var(--encre); color: var(--fond); }
.filtre.mat { background: transparent; box-shadow: inset 0 0 0 1px var(--trait); }
.filtre.mat[aria-pressed='true'] { background: var(--encre); box-shadow: none; }
.choix-liste { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.choix-groupe { position: sticky; top: 0; background: var(--surface); padding: 14px 8px 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--doux); }
.choix-item button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-radius: 14px; background: transparent; padding: 11px 10px; text-align: left; }
.choix-item button:hover, .choix-item button.focus { background: var(--surface-2); }
.choix-item .nom { font-weight: 600; }
.choix-item .muscles-exo { display: block; font-size: 12.5px; color: var(--doux); margin-top: 1px; }
.choix-item small { flex: none; font-size: 12px; color: var(--doux); padding: 3px 9px; border-radius: 99px; background: var(--surface-2); }
.choix-item em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); margin-left: 6px; }

.serie-feuille { width: min(440px, 100%); }
.pas-duo { display: grid; gap: 14px; }
.pas-nom { display: block; font-size: 13px; font-weight: 700; color: var(--doux); margin-bottom: 6px; }
.pas-ligne { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; }
.pas-ligne button { height: 60px; border: 0; border-radius: 18px; background: var(--surface-2); font-size: 28px; font-weight: 700; }
.pas-ligne button:active { background: var(--accent-doux); color: var(--accent); }
.pas-ligne input { height: 60px; width: 100%; border: 0; border-radius: 18px; background: var(--surface-2); text-align: center; font: 800 32px/1 var(--voix); letter-spacing: -0.03em; }
.pas-ligne input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }

.refaire-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.refaire-liste button { width: 100%; text-align: left; border: 0; border-radius: 18px; background: var(--surface-2); padding: 14px 16px; }
.refaire-liste button:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.refaire-liste b { display: block; font: 800 19px/1.2 var(--voix); letter-spacing: -0.02em; }
.refaire-liste small { color: var(--doux); }

.champ { display: block; margin-bottom: 14px; font-weight: 700; font-size: 14px; }
.champ input { display: block; width: 100%; margin-top: 6px; border: 0; border-radius: 14px; background: var(--surface-2); padding: 12px 14px; font-weight: 500; }
.champ input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.champ small { display: block; margin-top: 4px; font-weight: 500; color: var(--doux); }
.champ-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.confirmer { width: min(420px, 100%); }
.synchro { margin: 22px 0 6px; padding: 16px; border-radius: 20px; background: var(--surface-2); }
.synchro h3 { margin: 0 0 4px; font: 800 19px/1.2 var(--voix); letter-spacing: -0.02em; }
.synchro .note { margin: 6px 0 0; }
.synchro .actions { margin-top: 12px; }
.code-champ { margin: 16px 0 0; }
.ligne-code { display: flex; gap: 8px; margin-top: 6px; }
.ligne-code input { margin: 0; flex: 1; min-width: 0; background: var(--surface); text-transform: uppercase; letter-spacing: 0.08em; font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.code-actif { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.code-actif code { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); font: 800 18px ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 0.06em; text-align: center; white-space: nowrap; user-select: all; }
.bouton.positif { background: var(--accent); color: var(--accent-encre); }
.etat-sync { margin: 10px 0 0; font-size: 13.5px; font-weight: 600; color: var(--doux); }
.etat-sync.ok { color: var(--ok); }
.etat-sync.erreur { color: var(--chaud); }
.synchro .lien-danger { margin-top: 8px; }
.confirmer p { margin: 4px 0 0; font-size: 17px; font-weight: 600; }

.toast {
  position: fixed; z-index: 35; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 18px; border-radius: 999px; background: var(--encre); color: var(--fond);
  font-weight: 600; font-size: 14.5px; box-shadow: var(--ombre-haute); white-space: nowrap; animation: toast 0.3s cubic-bezier(.2,.9,.3,1.2);
}
.toast button { border: 0; border-radius: 999px; padding: 5px 12px; background: color-mix(in srgb, var(--fond) 18%, transparent); color: var(--fond); font-weight: 700; font-size: 13.5px; }
@keyframes toast { from { transform: translate(-50%, 14px); opacity: 0; } }

/* ---------- Téléphone (base) ---------- */
:root { --tete: 58px; }
.tete { padding-inline: max(14px, env(safe-area-inset-left, 0px)) max(14px, env(safe-area-inset-right, 0px)); gap: 6px; }
.marque { font-size: 23px; }
.rond { width: 36px; height: 36px; }
.sem-titre { min-width: 0; font-size: 14px; }
.app { padding-inline: max(14px, env(safe-area-inset-left, 0px)) max(14px, env(safe-area-inset-right, 0px)); padding-top: 14px; }
.demo { margin-inline: max(14px, env(safe-area-inset-left, 0px)) max(14px, env(safe-area-inset-right, 0px)); }
.seance { padding: 6px 14px 14px; }
.verdict { font-size: 54px; }
.scene { padding: 16px 10px 14px; margin-top: 16px; }
.figures { max-width: 250px; }
.verdict-detail { font-size: 15px; }
body:not([data-vue='seance']) .demo { display: none; }
.demo { font-size: 13.5px; padding: 10px 10px 10px 14px; gap: 8px 12px; }
.demo .petit-bouton { padding: 7px 13px; font-size: 13px; }
.titre-bloc { font-size: 24px; }
.muscle { grid-template-columns: 1fr 52px; }
.muscle .jauge { grid-column: 1 / 3; grid-row: 2; }
.muscle-sous { grid-column: 1 / 3; }
.pas-mini button { width: 34px; }
/* ---------- Grand écran : la version ordinateur viendra plus tard ---------- */
@media (min-width: 900px) {
  body {
    height: 100vh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 520px) auto; justify-content: center; align-items: center; gap: clamp(40px, 7vw, 120px);
    padding: 24px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px));
    background: radial-gradient(900px 600px at 78% 40%, var(--accent-doux), transparent 70%), var(--fond);
  }
  body::before { display: none; }
  .presentation { display: block; }
  .appareil {
    width: 404px; height: min(860px, calc(100vh - 48px)); padding: 11px; border-radius: 58px; background: var(--cadre);
    box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--cadre) 60%, var(--trait)), 0 40px 90px rgba(17, 20, 26, 0.28); transform: translateZ(0); overflow: hidden;
  }
  .ecran { height: 100%; overflow-y: auto; overscroll-behavior: contain; border-radius: 47px; background: var(--fond); scrollbar-width: none; }
  .ecran::-webkit-scrollbar { display: none; }
  .tete { top: 0; height: calc(var(--tete) + 16px); padding-top: 16px; }
}
.presentation-texte { max-width: 520px; }
.marque.grande { font-size: 34px; margin: 0 0 40px; }
.accroche { margin: 0; font: 800 clamp(44px, 4.6vw, 68px)/0.98 var(--voix); letter-spacing: -0.04em; text-wrap: balance; }
.pitch { margin: 20px 0 0; font-size: 18px; color: var(--doux); max-width: 46ch; }
.sur-mobile { margin-top: 32px; padding: 18px 20px; border-radius: var(--r); background: var(--surface); box-shadow: var(--ombre); }
.sur-mobile p { margin: 0 0 12px; font-size: 15px; }
.adresse { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adresse code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 600 14px ui-monospace, 'SF Mono', Menlo, monospace; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); }
.accroche span { color: var(--accent); }
.essai { margin: 28px 0 0; font-weight: 700; color: var(--accent); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
