:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #6b6b6b;
  --card: #f2f2f2;
  --line: #d9d9d9;
  --inverse: #ffffff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* Place du badge « Powered by Netlify » ajouté en bas à droite sur l'hébergement gratuit. */
  --badge: 0px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #9a9a9a;
    --card: #1c1c1e;
    --line: #38383a;
    --inverse: #000000;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.screen {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 12px) 16px calc(var(--safe-bottom) + 32px);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 8px;
}
.bar .title { font-weight: 600; text-align: center; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar button, .link {
  background: none; border: 0; padding: 8px 0; color: var(--fg); font-size: 17px;
}
.bar .icon { font-size: 24px; width: 44px; height: 44px; padding: 0; }
.bar .right { text-align: right; }
h1 { font-size: 34px; line-height: 1.15; margin: 8px 0 16px; letter-spacing: -0.5px; }
h2 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.3px; }
.big { font-size: 44px; font-weight: 700; letter-spacing: -1px; margin: 0; }
.huge { font-size: 52px; font-weight: 700; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.spacer { flex: 1; }

.section-title {
  text-transform: uppercase; font-size: 13px; color: var(--muted);
  margin: 24px 4px 8px; letter-spacing: 0.3px;
}
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
}
.list { background: var(--card); border-radius: 14px; overflow: hidden; }
.list > .item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 0; background: none; width: 100%; text-align: left;
  border-bottom: 1px solid var(--line);
}
.list > .item:last-child { border-bottom: 0; }
.list > a.item { color: inherit; text-decoration: none; }
.item .time { font: 600 20px ui-monospace, "SF Mono", Menlo, monospace; }
.item .name { font-weight: 600; }
.item .chev { color: var(--muted); }
.item.selected { font-weight: 600; }
.item .check { margin-left: auto; }

.btn {
  display: block; width: 100%; padding: 16px 20px; border-radius: 14px;
  font-weight: 600; font-size: 17px; text-align: center; border: 1.5px solid var(--fg);
  background: var(--fg); color: var(--inverse);
}
.btn.secondary { background: transparent; color: var(--fg); }
.btn.danger { background: transparent; color: #d70015; border-color: #d70015; }
.btn:disabled { opacity: 0.35; cursor: default; }
.btn:active:not(:disabled) { opacity: 0.7; }
.btns { display: flex; gap: 12px; }
.btns .btn { flex: 1; }

.option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 16px; border-radius: 12px; border: 1.5px solid var(--fg); background: transparent;
  text-align: left; font-weight: 500; margin-bottom: 10px;
}
.option.on { background: var(--fg); color: var(--inverse); }
.pills { display: flex; gap: 10px; }
.pill {
  flex: 1; padding: 14px 6px; border-radius: 12px; border: 1.5px solid var(--fg);
  background: transparent; font-weight: 600;
}
.pill.on { background: var(--fg); color: var(--inverse); }
/* Choix segmenté (type d'engagement, format, complément ou médicament) : une ligne, colonnes égales. */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft, var(--card)); border: 1px solid var(--line); }
.seg button { padding: 11px 6px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button.on { background: var(--fg); color: var(--inverse); }

.progress { display: flex; gap: 6px; margin: 8px 0 24px; }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.progress span.on { background: var(--fg); }

.reg-bar { position: relative; height: 10px; border-radius: 5px; background: var(--line); margin: 10px 0 12px; }
.reg-bar .fill { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--fg); }
.reg-bar .target {
  position: absolute; top: -3px; width: 4px; height: 16px; margin-left: -2px;
  background: var(--bg); border: 1px solid var(--fg);
}

input[type=text], input[type=email], input[type=time], textarea {
  width: 100%; padding: 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--bg); font-size: 17px;
}
input:focus, textarea:focus { outline: none; border-color: var(--fg); }
textarea { min-height: 96px; resize: vertical; }
label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.days { display: flex; gap: 6px; }
.days button {
  flex: 1; aspect-ratio: 1; max-width: 48px; border-radius: 50%; border: 1.5px solid var(--fg);
  background: transparent; font-weight: 600; padding: 0;
}
.days button.on { background: var(--fg); color: var(--inverse); }

.pending { border: 1.5px solid var(--fg); background: var(--bg); }
.pending .label { font-size: 14px; font-weight: 600; }

.verif { list-style: none; padding: 0; margin: 16px 0; }
.verif li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.verif .dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 700; margin-top: 1px; }
.verif .ok { background: var(--fg); color: var(--inverse); }
.verif .ko { background: var(--fg); color: var(--inverse); }
.verif .na { border: 1.5px dashed var(--muted); }
.verif .na + span { color: var(--muted); }

.camera {
  position: fixed; inset: 0; background: #000; color: #fff; z-index: 30;
  display: flex; flex-direction: column;
}
.camera video, .camera img { width: 100%; flex: 1; object-fit: cover; min-height: 0; }
.camera .top { position: absolute; top: calc(var(--safe-top) + 8px); left: 16px; right: 16px; display: flex; justify-content: space-between; z-index: 2; }
.camera .top button { background: rgba(0,0,0,.45); color: #fff; border: 0; border-radius: 18px; padding: 8px 14px; }
.camera .shutter-zone { padding: 20px 0 calc(var(--safe-bottom) + 24px); display: grid; place-items: center; background: #000; }
.shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: #fff; box-shadow: inset 0 0 0 4px #000; }
.shutter:disabled { opacity: .4; }

.photo { width: 100%; max-height: 46vh; object-fit: cover; border-radius: 16px; display: block; }
.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }

.modal-backdrop {
  position: fixed; inset: 0; background: var(--bg); z-index: 20; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.chart { width: 100%; height: 200px; display: block; }
.chart .line { fill: none; stroke: var(--fg); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .target { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }

#toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--safe-bottom) + 20px); z-index: 50;
  max-width: 528px; margin: 0 auto; padding: 14px 16px; border-radius: 14px;
  background: var(--fg); color: var(--inverse); font-weight: 500;
  transform: translateY(20px); opacity: 0; visibility: hidden; transition: transform .25s ease, opacity .25s ease, visibility .25s;
}
#toast.show { transform: translateY(0); opacity: 1; visibility: visible; }

.alarm {
  position: fixed; inset: 0; z-index: 40; background: var(--fg); color: var(--inverse);
  display: flex; flex-direction: column; justify-content: center; padding: 32px 24px;
}
.alarm .btn { background: var(--inverse); color: var(--fg); border-color: var(--inverse); }
.alarm .btn.secondary { background: transparent; color: var(--inverse); }

.install { border: 1.5px dashed var(--fg); background: transparent; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--fg);
  animation: spin .8s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; padding: 0; margin: 24px 0; }
.steps li { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.steps .n { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--fg); display: grid; place-items: center; font-weight: 600; flex: none; }

/* Fenêtre d'installation (inspirée de Klubizz) */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.35); animation: fade .2s ease; }
.sheet {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 12px); z-index: 61;
  max-width: 536px; margin: 0 auto; padding: 22px 22px 20px; border-radius: 22px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0,0,0,.25); animation: rise .28s cubic-bezier(.2,.8,.2,1);
}
.sheet-title { font-size: 20px; margin: 0; }
.sheet-close { background: none; border: 0; font-size: 20px; width: 40px; height: 40px; margin: -8px -10px -8px 0; }
.sheet-sub { color: var(--muted); margin: 6px 0 18px; }
.sheet-steps { list-style: none; padding: 0; margin: 0 0 16px; }
.sheet-steps li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.sheet-steps .n { width: 32px; height: 32px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-weight: 600; flex: none; }
.sheet-steps .ic { width: 22px; display: grid; place-items: center; flex: none; margin-top: 5px; font-weight: 700; }
.sheet-steps li > span:last-child { padding-top: 4px; }
.sheet-note { color: var(--muted); font-size: 14px; margin: 0; }
@keyframes rise { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Badge « Powered by Netlify » désactivé le 1/11/2026 (Netlify › Configuration › General) : plus d'espace réservé. */
html.has-badge { --badge: 64px; }
.screen { padding-bottom: calc(var(--safe-bottom) + 32px + var(--badge)); }
.camera .shutter-zone { padding-bottom: calc(var(--safe-bottom) + 24px + var(--badge)); }
.alarm { padding-bottom: calc(32px + var(--badge)); }
.sheet { bottom: calc(var(--safe-bottom) + 12px + var(--badge)); }
#toast { bottom: calc(var(--safe-bottom) + 20px + var(--badge)); }
html, .modal-backdrop { scroll-padding-bottom: calc(var(--badge) + 16px); }
html.has-badge .photo { max-height: 38vh; }

/* ---------- V1.1 : onglets, accueil « Action d'abord », assistant ---------- */
.label { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.field-title { font-weight: 600; margin: 22px 0 10px; }
.field-label { display: block; font-weight: 600; margin-bottom: 8px; }
.error { color: #d70015; }
.danger-text { color: #d70015 !important; }
.screen.with-tabs { padding-bottom: calc(var(--safe-bottom) + 96px + var(--badge)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around;
  background: var(--bg); border-top: 1px solid var(--line);
  padding: 6px max(8px, calc((100% - 560px) / 2)) calc(var(--safe-bottom) + 6px + var(--badge));
}
.tabbar button { flex: 1; background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; padding: 4px 0; }
.tabbar button.on { color: var(--fg); font-weight: 700; }
.hero { background: var(--fg); color: var(--inverse); border-radius: 18px; padding: 16px; }
.hero .label { color: var(--inverse); opacity: .65; }
.hero-title { font-size: 28px; font-weight: 700; letter-spacing: -.5px; line-height: 1.15; margin: 4px 0 4px; }
.hero-sub { opacity: .8; margin-top: 2px; }
.hero-sub b { opacity: 1; }
.btn.inv { background: var(--inverse); color: var(--fg); border-color: var(--inverse); margin-top: 14px; }
.hero .btns .btn.inv { margin-top: 0; }
.hero-link { color: var(--inverse) !important; width: 100%; opacity: .75; margin-top: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { border: 0; text-align: left; width: 100%; display: block; color: var(--fg); }
.tile .huge { font-size: 40px; margin-top: 4px; }
.huge small { font-size: .5em; font-weight: 600; }
.tile .reg-bar { height: 8px; margin: 8px 0 6px; }
.tile .reg-bar .target { top: -4px; height: 16px; }
.add-gym { border: 1.5px dashed var(--line); background: transparent; }
.week { display: flex; gap: 6px; margin: 10px 0 10px; }
.week span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.week .d { display: block; height: 24px; border-radius: 7px; margin-bottom: 3px; background: var(--bg); border: 1.5px solid var(--line); }
.week .d.ok { background: var(--fg); border-color: var(--fg); }
.week .d.part { background: linear-gradient(to top, var(--fg) 50%, var(--bg) 50%); border-color: var(--fg); }
.week .d.ko { background: repeating-linear-gradient(45deg, var(--bg) 0 3px, var(--muted) 3px 5px); border-color: var(--muted); }
.week .d.today { border: 2px dashed var(--fg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { border: 1.5px solid var(--fg); background: transparent; border-radius: 18px; padding: 8px 14px; font-size: 15px; }
.chip:disabled { opacity: .4; }
.action-box { border: 1.5px solid var(--fg); border-radius: 12px; padding: 12px; }
.checkbox { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--fg); display: grid; place-items: center; flex: none; font-weight: 700; font-size: 14px; }
.checkbox.on { background: var(--fg); color: var(--inverse); }
label.check { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-weight: 500; }
label.check input { width: 20px; height: 20px; accent-color: var(--fg); }
input[type=email], input[type=tel] { width: 100%; padding: 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); font-size: 17px; }
label.field small, div.field small { display: block; margin-top: 6px; line-height: 1.4; }
div.field { margin-bottom: 16px; }
.section-title.q { text-transform: none; font-size: 15px; color: var(--fg); }
.problems { margin: 8px 0 0; padding-left: 18px; }
.cam-hint { position: absolute; left: 16px; right: 16px; bottom: calc(var(--safe-bottom) + 140px + var(--badge)); text-align: center; background: rgba(0,0,0,.55); color: #fff; padding: 8px 12px; border-radius: 12px; font-size: 14px; }
.bar .icon svg { display: block; margin: auto; }
/* Le message temporaire ne doit jamais bloquer un toucher (barre d'onglets en dessous). */
#toast { pointer-events: none; }
body:has(.tabbar) #toast { bottom: calc(var(--safe-bottom) + 76px + var(--badge)); }

/* ---------- Direction retenue après l'essai Sleek (design/sleek/) : cartes claires à filet fin, gros chiffres, bouton pilule ---------- */
:root { --fg: #111111; --card: #ffffff; --line: #e3e3e3; --soft: #f3f3f3; }
@media (prefers-color-scheme: dark) { :root { --fg: #f5f5f5; --card: #0b0b0b; --line: #2e2e30; --soft: #1c1c1e; } }
.card, .list { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.add-gym { border: 1px dashed var(--line); }
h1 { font-size: 28px; font-weight: 650; letter-spacing: -0.6px; margin: 2px 0 10px; }
.eyebrow, .section-title, .label { text-transform: uppercase; letter-spacing: .16em; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.eyebrow { margin-top: 6px; }
.section-title { margin: 26px 4px 10px; }
.btn { border-radius: 999px; border-width: 1px; }
.btn.secondary { border-color: var(--line); }
.btn.cta { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }
.btn.cta svg { width: 20px; height: 20px; }
.hero { background: var(--card); color: var(--fg); padding: 18px; }
.hero .label { color: var(--muted); opacity: 1; }
.hero-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hero-main { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.hero-title { font-size: 22px; font-weight: 650; letter-spacing: -.3px; margin: 0 0 2px; }
.hero-sub { color: var(--muted); opacity: 1; font-size: 15px; }
.hero-sub b { color: var(--fg); font-weight: 600; }
.hero-clock { font-size: 40px; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; flex: none; }
.hero-link { color: var(--muted) !important; opacity: 1; margin-top: 6px; }
.ring { position: relative; width: 76px; height: 76px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .ring-bg { stroke: var(--line); }
.ring .ring-fg { stroke: var(--fg); stroke-linecap: round; }
.ring span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ring small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.tile .huge { font-size: 38px; font-weight: 600; }
.tile .reg-bar { height: 4px; }
.tile .reg-bar .target { top: -5px; height: 14px; width: 2px; margin-left: -1px; border: 0; background: var(--fg); }
.week { gap: 8px; margin: 12px 0 8px; }
.week span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.week .d, .legend .d { width: 100%; max-width: 38px; aspect-ratio: 1; height: auto; border-radius: 6px; border: 1px solid var(--line); background: var(--card); margin: 0; }
.week .d.ok, .legend .d.ok { background: var(--fg); border-color: var(--fg); }
.week .d.part, .legend .d.part { background: linear-gradient(to top, var(--fg) 50%, var(--card) 50%); border-color: var(--fg); }
.week .d.ko, .legend .d.ko { background: linear-gradient(to top right, transparent calc(50% - .8px), var(--fg) 50%, transparent calc(50% + .8px)); border-color: var(--line); }
.week .d.today { border: 1.5px dashed var(--fg); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 2px 0 12px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend .d { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.item .time { font: 600 16px -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; font-variant-numeric: tabular-nums; min-width: 52px; }
.list > .item { padding: 16px; align-items: flex-start; }
.list > .item .chev { align-self: center; }
.verdict { display: flex; align-items: center; gap: 12px; }
.verdict h2 { margin: 0; font-size: 22px; font-weight: 650; }
.item.food { gap: 12px; }
.item.food .checkbox { margin-top: 1px; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.food-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.photo { border-radius: 16px; border: 1px solid var(--line); }
.chip { border-width: 1px; border-color: var(--line); }
.action-box { border-width: 1px; border-color: var(--line); }

/* Quantités annoncées et validation partielle */
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.qty-row { gap: 8px; }
.qty-row input { width: 72px; text-align: right; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); font: inherit; font-variant-numeric: tabular-nums; }
.qty-row select { padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); font: inherit; }
.p-note { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); font: inherit; }

/* Photo en grand (export) : image entière, sans recadrage. */
.photo.full { object-fit: contain; max-height: 62vh; background: var(--card); }
.consent .btns .btn { padding-top: 10px; padding-bottom: 10px; }

/* ---------- Direction « Instrument de précision » (27/10/2026) : sombre façon cadran, couleurs à sens ----------
   vert = validé · bleu = en attente · ambre = partiel / sous l'objectif · rouge = manqué */
:root {
  --bg: #0A0C0F; --fg: #F2F4F6; --muted: #858D97; --card: #13171C; --soft: #1A1F25; --line: #232A31; --inverse: #0A0C0F;
  --ok: #22D163; --wait: #3D8FF0; --part: #F2A93B; --ko: #FF5A52; --idle: #2A3139;
  color-scheme: dark;
}
body { background: radial-gradient(120% 60% at 50% -10%, #14202B 0%, var(--bg) 60%) fixed, var(--bg); }
.t-idle { --tone: var(--idle); } .t-ok { --tone: var(--ok); } .t-wait { --tone: var(--wait); } .t-part { --tone: var(--part); } .t-ko { --tone: var(--ko); } .t-idle { --tone: var(--idle); }

h1 { font-size: 30px; font-weight: 700; letter-spacing: -.6px; margin: 2px 0 0; }
.eyebrow, .section-title, .label { letter-spacing: .14em; font-size: 11px; font-weight: 600; color: var(--muted); }
.card, .list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.list > .item { border-bottom-color: var(--line); }
.btn { background: var(--fg); color: var(--inverse); border-color: var(--fg); font-weight: 700; letter-spacing: .02em; }
.btn.secondary { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.danger { color: var(--ko); border-color: var(--ko); }
.error, .danger-text { color: var(--ko) !important; }
input[type=text], input[type=time], input[type=email], input[type=tel], textarea { background: var(--soft); border-color: var(--line); }
.tabbar { background: rgba(10,12,15,.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.tabbar button.on { color: var(--fg); }

/* En-tête */
.today-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.day-chip { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.day-chip b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.day-chip small { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Jauges */
.gauge { position: relative; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.gauge circle { fill: none; stroke-width: 7; }
.gauge .g-bg { stroke: var(--idle); opacity: .55; }
.gauge .g-fg { stroke: var(--tone); stroke-linecap: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tone) 70%, transparent)); }
.gauge span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; text-align: center; }
.gauge b { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.gauge b i { font-style: normal; font-size: .5em; font-weight: 600; margin-left: 1px; }
.gauge small { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 600; margin-top: 8px; }
.gauge.lg { width: 210px; height: 210px; margin: 22px auto 18px; }
.gauge.lg circle { stroke-width: 5; }
.gauge.lg b { font-size: 60px; }
.gauge.lg.t-wait::before { content: ""; position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tone) 22%, transparent), transparent); pointer-events: none; }
.gauge.md { width: 104px; height: 104px; }
.gauge.md b { font-size: 30px; }
.gauge.md small { font-size: 8.5px; margin-top: 5px; }
.gauge.sm { width: 54px; height: 54px; }
.gauge.sm circle { stroke-width: 9; }
.gauge.sm b { font-size: 16px; letter-spacing: -.3px; }

/* Carte d'action */
.hero { background: linear-gradient(180deg, #151B22, var(--card)); border: 1px solid var(--line); border-radius: 22px; padding: 18px 18px 14px; color: var(--fg); text-align: center; }
.hero-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; text-align: left; }
.hero .label { color: var(--muted); }
.hero-title { font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin: 0; }
.hero-sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.hero-hint { color: var(--muted); font-size: 12px; margin-top: 10px; }
.hero .btn.cta { margin-top: 18px; }
.hero-link { width: 100%; margin-top: 2px; }

/* Scores */
.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tile { display: flex; align-items: center; gap: 10px; padding: 12px; min-width: 0; }
.tile > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.tile .label { color: var(--fg); }
.tile-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.add-gym { border: 1px dashed var(--line); background: transparent; }

/* Semaine */
.week .d, .legend .d { background: var(--soft); border: 1px solid var(--line); border-radius: 7px; }
.week .d.ok, .legend .d.ok { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 10px color-mix(in srgb, var(--ok) 45%, transparent); }
.week .d.part, .legend .d.part { background: var(--part); border-color: var(--part); }
.week .d.ko, .legend .d.ko { background: var(--ko); border-color: var(--ko); }
.week .d.today, .legend .d.today { border: 1.5px solid var(--wait); }
.legend { flex-wrap: wrap; gap: 8px 14px; }
.wk-row { display: flex; align-items: baseline; gap: 10px; padding: 10px 0 2px; border-top: 1px solid var(--line); font-size: 14px; }
.wk-row b { font-size: 18px; font-variant-numeric: tabular-nums; margin-right: auto; margin-left: 4px; }
.wk-row b small { color: var(--muted); font-weight: 600; font-size: 13px; }
.wk-row em { font-style: normal; font-size: 12px; color: var(--muted); }
.wk-row em.t-ko { color: var(--ko); }

/* Points d'état dans les listes */
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; align-self: center; background: var(--tone); box-shadow: 0 0 8px var(--tone); }

/* Bilan */
.card .row .grow .label { margin-bottom: 2px; }
.chart .line { stroke: var(--tone, var(--fg)); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--tone, var(--fg)) 60%, transparent)); }
.reg-bar .fill { background: var(--ok); }
.chart .pt { fill: var(--tone, var(--fg)); }
.chart.bars { height: 96px; }
.chart .bar.ok { fill: var(--ok); } .chart .bar.part { fill: var(--part); } .chart .bar.ko { fill: var(--ko); }
.chart .bar-empty { fill: var(--line); }

/* Résultat de la photo */
.checkbox.on { background: var(--tone, var(--fg)); border-color: var(--tone, var(--fg)); color: var(--inverse); }
.verdict h2 { color: var(--tone); }
.verif .ok { background: var(--ok); color: var(--inverse); }
.verif .ko { background: var(--ko); color: var(--inverse); }
.chip.on { background: var(--fg); color: var(--inverse); }

/* Plein écran de rappel : bleu « en attente » */
.alarm { background: radial-gradient(120% 70% at 50% 0%, #133056, var(--bg) 70%); color: var(--fg); }
.alarm .btn { background: var(--fg); color: var(--inverse); border-color: var(--fg); }
.alarm .btn.secondary { background: transparent; color: var(--fg); border-color: var(--line); }
#toast { background: var(--fg); color: var(--inverse); }

/* Barre d'onglets collée en bas de l'écran. Le badge Netlify (obligatoire sur l'offre gratuite) flotte juste au-dessus au lieu de la repousser. */
.tabbar { padding-bottom: calc(var(--safe-bottom) + 6px); }
body:has(.tabbar) #nl-badge-frame { bottom: calc(var(--safe-bottom) + 50px) !important; }

/* Écran d'abonnement : les boutons secondaires ne se touchent pas. */
.paywall .btn.secondary { margin-top: 10px; }
