:root {
  --bg: #0B0B0C;
  --surface: #141415;
  --surface2: #1D1D1F;
  --line: #2A2A2D;
  --text: #F4F4F5;
  --muted: #8E8E93;
  --red: #E5251B;
  --red-press: #C41E15;
  --danger: #FF5A50;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --nav-h: 64px;
}
:root[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F4F4F5;
  --surface2: #E9E9EB;
  --line: #DCDCDE;
  --text: #0B0B0C;
  --muted: #6B6B70;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--body); font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
/* #app ne défile pas lui-même et n'a pas de "overflow" : c'est <main> (à l'intérieur) qui défile, en se limitant
   à sa propre hauteur. Important sur iPhone : #app, html et body n'ont ni "overflow: hidden" ni "position"
   particulière, pour ne pas piéger la barre de nav (#overlays, en dehors de #app) dans un mauvais conteneur —
   c'est ce qui causait un espace vide en bas de l'écran en mode "ajouté à l'écran d'accueil". */
#app { min-height: 100vh; min-height: 100dvh; min-height: var(--app-h, 100dvh); }
#app > main, #app > .welcome { max-height: 100vh; max-height: 100dvh; max-height: var(--app-h, 100dvh); overflow-y: auto; -webkit-overflow-scrolling: touch; }
#overlays:empty { display: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

main {
  max-width: 560px; width: 100%; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 22px) 18px calc(var(--nav-h) + env(safe-area-inset-bottom) + 44px);
}
.page-title { font-family: var(--display); font-size: 36px; font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: .5px; }
.sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.motivation { color: var(--red); font-size: 14px; font-weight: 600; margin-top: 8px; }
.section-label { font-family: var(--display); color: var(--muted); font-size: 15px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin: 28px 0 10px; }

.install-tip {
  position: relative; border: 1px solid var(--red); background: color-mix(in srgb, var(--red) 12%, var(--surface));
  border-radius: 10px; padding: 14px 38px 14px 14px; margin-bottom: 20px;
}
.install-tip p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text); }
.install-x {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border: none; background: none;
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}

.mark { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: 2px; display: inline-flex; align-items: baseline; }
.mark span { color: var(--red); }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.stats { display: flex; margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.stat { flex: 1; padding: 14px 16px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--display); font-size: 36px; font-weight: 700; line-height: 1; }
.stat span { color: var(--muted); font-size: 13px; }

/* Boutons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 15px 18px; border-radius: 8px; font-family: var(--display); font-size: 18px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; background: var(--surface2); border: 1px solid var(--line);
}
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:active { background: var(--red-press); }
.btn.danger { color: var(--danger); background: none; }
.btn:disabled { opacity: .5; }
.icon-btn { width: 42px; height: 42px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }

/* Calendrier */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; }
.cal-head h2 { font-family: var(--display); font-size: 26px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.cal-head .btns { display: flex; gap: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.dow { text-align: center; color: var(--muted); font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: 1px; padding-bottom: 4px; }
.day {
  height: 50px; border-radius: 8px; background: var(--surface); border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--display); font-size: 20px; font-weight: 600;
}
.day.blank { background: none; pointer-events: none; }
.day.today { color: var(--red); }
.day.sel { border-color: var(--text); background: var(--surface2); }
.day .dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }

/* Types de séance */
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-btn {
  text-align: left; padding: 16px 14px; border-radius: 8px; font-family: var(--display); font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); background: color-mix(in srgb, var(--c) 14%, var(--surface));
}
.type-btn:active { background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.type-btn.custom { border: 1px dashed var(--line); color: var(--muted); font-size: 16px; display: flex; align-items: center; background: var(--surface); }
.session-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); background: color-mix(in srgb, var(--c) 14%, var(--surface));
}
.session-card .grow { flex: 1; }
.session-card b { font-family: var(--display); font-size: 26px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.chev { color: var(--muted); font-size: 24px; }

/* Écran séance */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.topbar .grow { flex: 1; min-width: 0; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 4px; font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.ex-card { margin-bottom: 10px; }
.ex-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ex-head h3 { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.1; letter-spacing: .3px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 5px; }
.tag.pr { background: var(--red); color: #fff; margin-top: 8px; }
.sets { margin-top: 14px; display: grid; gap: 8px; }
.set-row { display: grid; grid-template-columns: 22px 1fr 1fr 40px 26px; gap: 6px; align-items: center; }
.set-row .n { color: var(--muted); font-family: var(--display); font-size: 20px; font-weight: 700; text-align: center; }
.field { position: relative; }
.field input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 34px 11px 10px; font-family: var(--display); font-size: 24px; font-weight: 700; outline: none;
}
.field input:focus { border-color: var(--red); }
.field span { position: absolute; right: 9px; font-size: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.x-btn { color: var(--muted); font-size: 22px; width: 26px; height: 34px; }
.add-set { margin-top: 12px; padding: 11px; font-size: 16px; }

/* Sélecteur d'exercices */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; background: var(--bg); border-radius: 14px 14px 0 0;
  border: 1px solid var(--line); display: flex; flex-direction: column; animation: up .2s ease-out;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-head { padding: 16px 18px 8px; }
.sheet-head .row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h3 { font-family: var(--display); font-size: 28px; font-weight: 800; text-transform: uppercase; }
.search { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 13px 14px; outline: none; }
.search:focus { border-color: var(--red); }
.sheet-body { overflow-y: auto; padding: 0 18px calc(env(safe-area-inset-bottom) + 20px); }
.group-label { font-family: var(--display); color: var(--muted); font-size: 15px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin: 18px 0 8px; }
.pick {
  width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 6px;
}
.pick.done { border-color: var(--red); background: rgba(229, 37, 27, .1); }
.pick.done span:last-child { color: var(--red); font-weight: 700; }
.link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; padding: 12px 0; }

/* Progrès */
.exo-row { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 14px 16px; }
.exo-row b { display: block; font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: .3px; }
.exo-row small { color: var(--muted); font-size: 13px; }
.val { font-family: var(--display); font-size: 26px; font-weight: 700; white-space: nowrap; }
.chart { width: 100%; height: auto; display: block; }
.hist { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.hist:last-child { border: 0; }
.hist span:first-child { color: var(--muted); white-space: nowrap; }
.hist span:last-child { text-align: right; }
.empty { text-align: center; color: var(--muted); padding: 32px 10px; }
.empty.small { padding: 18px 10px; font-size: 14px; }

/* Barre de navigation */
/* Barre flottante "en bulle" : posée au-dessus de la zone de geste iPhone plutôt que collée dessus,
   pour que cet espace se lise comme voulu (de l'air autour d'une bulle) plutôt que comme un trou. */
nav {
  position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 16px); z-index: 10;
  max-width: 560px; margin: 0 auto; height: var(--nav-h);
  background: var(--surface2); border: 1px solid var(--line); border-radius: 22px;
  display: flex; justify-content: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
nav .in { display: flex; width: 100%; }
nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted);
  font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
nav button svg { width: 21px; height: 21px; }
nav button.on { color: var(--red); }

/* Connexion */
.welcome { display: flex; flex-direction: column; justify-content: center; padding: 28px 22px; max-width: 460px; margin: 0 auto; box-sizing: border-box; }
.welcome .mark { margin-bottom: 44px; }
.welcome h1 { font-family: var(--display); font-size: 64px; line-height: .95; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.welcome h1 em { font-style: normal; color: var(--red); }
.welcome .lead { color: var(--muted); margin: 16px 0 28px; font-size: 17px; max-width: 320px; }
.seg { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.seg button { flex: 1; padding: 10px 0; font-family: var(--display); font-size: 19px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.seg button.on { color: var(--text); border-bottom-color: var(--red); }
.form { display: grid; gap: 10px; }
.form .search { font-size: 17px; padding: 15px 14px; }
.msg { font-size: 14px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.msg.err { border-color: var(--red); color: #FFB4AE; }
.fine { color: var(--muted); font-size: 13px; margin-top: 18px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); transform: translateX(-50%); background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 40; font-size: 14px; max-width: 90vw; }

/* Personnalisation */
.mini { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: var(--surface2); flex: none; }
.mini.dn { color: var(--danger); }
.mgroup { margin-bottom: 8px; padding: 0; overflow: hidden; }
.mhead { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 15px 16px; text-align: left; }
.mhead b { font-family: var(--display); font-size: 21px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.mhead small { color: var(--muted); font-size: 13px; }
.mrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 15px; }
.mrow > span:first-child { min-width: 0; }
.mrow .acts { display: flex; gap: 6px; flex: none; }
.mgroup .add-set { margin: 10px 16px 14px; width: calc(100% - 32px); }
.trow { display: flex; align-items: center; gap: 8px; border-left: 5px solid var(--c); margin-bottom: 8px; padding: 12px 14px; }
.trow.off { opacity: .45; }
.trow .grow { flex: 1; min-width: 0; }
.trow b { font-family: var(--display); font-size: 21px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.trow small { display: block; color: var(--muted); font-size: 12px; }
.overlay.center { align-items: center; padding: 18px; }
.dialog { width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 12px; }
.dialog h3 { font-family: var(--display); font-size: 28px; font-weight: 800; text-transform: uppercase; }
.dialog .search { font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: var(--surface); }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.drow { display: flex; gap: 8px; }
.drow .btn { padding: 13px; }


/* Validation des séries */
.chk { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface2); color: var(--muted); display: grid; place-items: center; }
.chk svg { width: 20px; height: 20px; }
.chk:active { transform: scale(.92); }
.set-row.done .chk { background: var(--red); border-color: var(--red); color: #fff; }
.set-row:not(.done) .field input { color: var(--muted); }
.tip { background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; padding: 11px 13px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.tip b { color: var(--red); }

/* Carte « refaire » */
.redo { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 10px; border-color: var(--red); background: rgba(229, 37, 27, .08); }
.redo .grow { flex: 1; min-width: 0; }
.redo small { display: block; color: var(--red); font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.redo b { display: block; font-family: var(--display); font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }

/* Fenêtre « refaire la dernière séance » (10 secondes) */
.dialog.rs { text-align: center; justify-items: center; border-top: 4px solid var(--c, var(--red)); }
.rs-ring { position: relative; width: 104px; height: 104px; }
.rs-ring svg { width: 100%; height: 100%; }
.rs-track { fill: none; stroke: var(--surface2); stroke-width: 7; }
.rs-prog { fill: none; stroke: var(--red); stroke-width: 7; stroke-linecap: round; }
.rs-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 48px; font-weight: 800; }
.dialog.rs .drow { width: 100%; }
.dialog.rs .drow .btn:first-child { flex: 0 0 34%; }

/* Grand pop-up record */
#confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 90; pointer-events: none; display: none; }
.win { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #7A0F09 0%, #2A0503 46%, #0B0B0C 82%); animation: fadein-bg .3s ease-out; }
.win-rays { position: absolute; inset: -60%; background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, .08) 0 7deg, transparent 7deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 55%); mask-image: radial-gradient(circle, #000 0, transparent 55%); animation: spin 26s linear infinite; }
.win-x { position: absolute; top: calc(env(safe-area-inset-top) + 14px); right: 14px; width: 46px; height: 46px; border-radius: 50%; z-index: 3;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); font-size: 28px; line-height: 1; display: grid; place-items: center; }
.win-card { position: relative; z-index: 2; width: 100%; max-width: 400px; text-align: center; animation: winpop .7s cubic-bezier(.2, 1.5, .4, 1) both; }
.win-bravo { font-family: var(--display); font-size: 88px; font-weight: 800; line-height: .9; letter-spacing: 3px; text-shadow: 0 4px 34px rgba(229, 37, 27, .9); }
.win-kicker { display: inline-block; margin: 14px 0 18px; padding: 6px 16px; background: var(--red); border-radius: 4px; font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; animation: pulse-s 1.3s ease-in-out infinite; }
.win-big { font-family: var(--display); font-size: 140px; font-weight: 800; line-height: .9; font-variant-numeric: tabular-nums; }
.win-big small { font-size: 42px; margin-left: 8px; color: #FFB0AA; }
.win-name { font-family: var(--display); font-size: 30px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-top: 8px; }
.win-delta { margin: 12px 0 28px; font-size: 17px; color: #FFD0CC; }
.win-delta span { color: rgba(255, 255, 255, .55); }
@keyframes fadein-bg { from { opacity: 0; } }
@keyframes winpop { from { transform: scale(.4); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-s { 50% { transform: scale(1.07); } }

/* Chrono */
.tm { position: relative; width: min(78vw, 300px); margin: 26px auto 24px; aspect-ratio: 1; }
.tm-svg { width: 100%; height: 100%; display: block; }
.tm-ticks { fill: none; stroke: #34343A; stroke-width: 7; stroke-dasharray: 1.6 11.2; }
.tm-track { fill: none; stroke: var(--surface2); stroke-width: 10; }
.tm-prog { fill: none; stroke: var(--red); stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(229, 37, 27, .75)); transition: stroke-dashoffset .25s linear; }
.tm-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tm-digits { font-family: var(--display); font-size: clamp(74px, 24vw, 104px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.tm-sub { color: var(--muted); font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; margin-top: 2px; }
.tm[data-state="idle"] .tm-digits { color: var(--muted); }
.tm[data-state="done"] .tm-prog { stroke: #fff; animation: flash .8s ease-in-out infinite; }
.tm[data-state="done"] .tm-digits { color: var(--red); animation: pulse-s .8s ease-in-out infinite; }
.tm[data-state="done"] .tm-sub { color: var(--text); }
@keyframes flash { 50% { opacity: .25; } }
.tm-ctl { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 24px; }
.tm-side { width: 62px; height: 62px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line); font-family: var(--display); font-size: 20px; font-weight: 700; }
.tm-go { min-width: 156px; height: 72px; border-radius: 40px; background: var(--red); color: #fff; font-family: var(--display); font-size: 26px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; box-shadow: 0 8px 30px rgba(229, 37, 27, .35); }
.tm-go:active, .tm-side:active { transform: scale(.95); }
.tm-presets { justify-content: center; margin-bottom: 10px; }
.tm-presets .chip { font-family: var(--display); font-size: 18px; font-weight: 700; padding: 8px 14px; }
.pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 16px); z-index: 15; display: flex; gap: 12px; align-items: center;
  padding: 12px 20px; background: var(--surface2); border: 1px solid var(--red); border-radius: 40px; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: .5px; box-shadow: 0 6px 24px rgba(0, 0, 0, .6); white-space: nowrap; }
.pill.above { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 28px); }
.pill em { font-style: normal; font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--muted); }
.pill.done { background: var(--red); animation: glow 1s ease-in-out infinite; }
.pill.done em { color: #fff; }
@keyframes glow { 50% { box-shadow: 0 0 0 8px rgba(229, 37, 27, .25), 0 6px 24px rgba(0, 0, 0, .6); } }

/* Progrès : comparaison des deux dernières séances + courbe animée */
.delta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.d-col small { display: block; color: var(--muted); font-size: 12px; }
.d-col b { font-family: var(--display); font-size: 30px; font-weight: 700; white-space: nowrap; }
.d-arrow { color: var(--red); font-size: 28px; animation: nudge 1.2s ease-in-out infinite; }
.d-badge { padding: 8px 12px; border-radius: 6px; background: var(--red); color: #fff; font-family: var(--display); font-size: 22px; font-weight: 800; text-align: center; line-height: 1.05; white-space: nowrap; }
.d-badge small { display: block; font-size: 13px; font-weight: 600; opacity: .85; }
.delta.down .d-badge, .delta.flat .d-badge { background: #3A3A3E; }
.delta.down .d-arrow, .delta.flat .d-arrow { color: var(--muted); animation: none; }
@keyframes nudge { 50% { transform: translateX(5px); } }
.c-line { fill: none; stroke: #E5251B; stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease-out .1s forwards; }
.c-seg { fill: none; stroke: #FF8A80; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .6s ease-out 1.1s forwards; filter: drop-shadow(0 0 5px rgba(229, 37, 27, .9)); }
.c-seg.down, .c-seg.flat { stroke: #8E8E93; filter: none; }
.c-dot { fill: var(--surface); stroke: #E5251B; stroke-width: 2.5; opacity: 0; animation: fadein .25s ease-out forwards; animation-delay: calc(.15s + var(--i) * .1s); }
.c-dot.last { fill: #E5251B; }
.c-pulse { fill: none; stroke: #E5251B; stroke-width: 2; transform-box: fill-box; transform-origin: center; opacity: 0; animation: pulse-dot 1.6s ease-out 1.7s infinite; }
.c-badge { opacity: 0; animation: badge-in .4s ease-out 1.6s forwards; }
.c-badge rect { fill: #E5251B; }
.c-badge.down rect, .c-badge.flat rect { fill: #3A3A3E; }
.c-badge text { fill: #fff; font: 700 13px var(--display); letter-spacing: .5px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes badge-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse-dot { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.4); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* retouches */
.dialog.rs h3 { font-size: 26px; text-wrap: balance; }
.tm-presets { gap: 5px; flex-wrap: nowrap; }
.tm-presets .chip { font-size: 17px; padding: 8px 10px; }


/* Boutons − / + pour les kilos */
.set-row { grid-template-columns: 20px 1fr 1.75fr 40px 24px; }
.set-head { display: grid; grid-template-columns: 20px 1fr 1.75fr 40px 24px; gap: 6px; margin-top: 12px; text-align: center;
  font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.set-head + .sets { margin-top: 6px; }
.set-row .field input { padding: 11px 2px; text-align: center; font-size: 23px; }
.kgwrap { display: grid; grid-template-columns: 34px 1fr 34px; gap: 4px; align-items: center; }
.stp { height: 48px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface2); font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1; display: grid; place-items: center; }
.stp:active { background: var(--red); border-color: var(--red); color: #fff; transform: scale(.94); }

/* Code de vérification */
.code-input { text-align: center; font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: 14px; padding-left: 26px; }
