/* Design system — sobre, aéré, "haut de gamme". Une seule couleur d'accent, typographie système, mode sombre natif. */
:root {
  --bg: #fbfbfd; --surface: #ffffff; --surface-2: #f5f5f7; --surface-3: #ebebef;
  --text: #1d1d1f; --muted: #6e6e73; --line: rgba(0, 0, 0, .09);
  --accent: #0b7a5b; --accent-hover: #096649; --accent-ink: #ffffff; --accent-soft: #e5f3ee;
  --warn: #a85408; --warn-soft: #fdf0e1; --danger: #b3261e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 30px rgba(0, 0, 0, .06);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .05), 0 24px 60px rgba(0, 0, 0, .10);
  --r-sm: 12px; --r-md: 18px; --r-lg: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c; --text: #f5f5f7; --muted: #a1a1a6;
    --line: rgba(255, 255, 255, .12); --accent: #3ccf9f; --accent-hover: #5fdcb4; --accent-ink: #00261a; --accent-soft: #12342a;
    --warn: #ffb866; --warn-soft: #3a2a14; --danger: #ff8a80; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 30px rgba(0, 0, 0, .5); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6); }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--surface); padding: 8px 14px; border-radius: 10px; }

/* Navigation translucide */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { font-weight: 700; font-size: 19px; letter-spacing: -.03em; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand i { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7fe0bd)); display: inline-block; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { color: var(--text); text-decoration: none; font-size: 14px; padding: 7px 12px; border-radius: 999px; opacity: .8; transition: background .2s, opacity .2s; }
.nav-links a:hover, .nav-links a[aria-current] { background: var(--surface-2); opacity: 1; }
.nav-links a.pill { background: var(--accent); color: var(--accent-ink); opacity: 1; font-weight: 600; }
.nav-links a.pill:hover { background: var(--accent-hover); }

/* Boutons */
.btn { appearance: none; border: 0; cursor: pointer; border-radius: 999px; padding: 14px 26px; font-weight: 600; font-size: 17px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); transition: transform .25s var(--ease), background .2s, box-shadow .25s; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); } .btn:active { transform: scale(.98); }
.btn.ghost { background: var(--surface-2); color: var(--text); box-shadow: none; } .btn.ghost:hover { background: var(--surface-3); }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(28px, 5vw, 52px); text-align: center; }
.hero h1 { font-size: clamp(40px, 7.4vw, 82px); line-height: 1.02; letter-spacing: -.045em; font-weight: 700; margin: 14px auto 18px; max-width: 14ch; text-wrap: balance; }
.hero .lead { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 40em; margin-inline: auto; text-wrap: balance; }
.hero .actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero.left { text-align: left; padding-bottom: 24px; } .hero.left h1 { margin-inline: 0; max-width: 18ch; font-size: clamp(36px, 5.6vw, 60px); } .hero.left .lead { margin-inline: 0; }

/* Cartes & formulaires */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); }
.calc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: start; padding-bottom: 24px; }
.calc .result-col { position: sticky; top: 80px; }
.group { padding-block: 18px; border-top: 1px solid var(--line); } .group:first-child { border-top: 0; padding-top: 0; } .group:last-child { padding-bottom: 0; }
.group > h2 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field { display: block; } .field > span.l { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input { display: flex; align-items: center; background: var(--surface-2); border-radius: var(--r-sm); padding: 0 14px; transition: box-shadow .2s, background .2s; border: 1px solid transparent; }
.input:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.input input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 14px 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; outline: 0; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.input input::-webkit-outer-spin-button, .input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input b { color: var(--muted); font-weight: 500; font-size: 15px; margin-left: 6px; }
.input.invalid { border-color: var(--danger); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); padding: 3px; border-radius: 13px; gap: 2px; }
.seg label { position: relative; cursor: pointer; display: flex; } .seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 10px 8px; border-radius: 10px; font-size: 15px; font-weight: 500; line-height: 1.25; transition: background .25s var(--ease), box-shadow .25s, color .2s; }
.seg span small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.seg input:checked + span { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 .5px var(--line); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.stack { display: grid; gap: 14px; }
.range-row { display: flex; align-items: center; gap: 16px; } .range-row output { min-width: 5.5em; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: var(--surface-3); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--surface-3); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); border: 0; }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); border: 0; }
.stepper { display: inline-flex; align-items: center; gap: 14px; } .stepper button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; font-size: 20px; transition: background .2s, transform .2s; } .stepper button:hover { background: var(--surface-3); } .stepper button:active { transform: scale(.92); } .stepper output { min-width: 4.5em; text-align: center; font-weight: 600; }

/* Résultat */
.result { background: linear-gradient(160deg, var(--surface), var(--surface-2)); }
.kcal { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 2px; }
.kcal strong { font-size: clamp(56px, 8vw, 84px); line-height: 1; letter-spacing: -.05em; font-weight: 700; font-variant-numeric: tabular-nums; }
.kcal span { color: var(--muted); font-size: 20px; }
.macros { display: grid; gap: 14px; margin: 24px 0; }
.macro .row { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; margin-bottom: 7px; }
.macro .row b { font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .macro .row span { color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--accent)); width: var(--w, 0); transition: width .6s var(--ease); }
.note { font-size: 14px; color: var(--muted); } .note.warn { background: var(--warn-soft); color: var(--warn); padding: 12px 14px; border-radius: var(--r-sm); }
details { border-top: 1px solid var(--line); padding: 14px 0; } details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; } details summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; transition: transform .3s var(--ease); } details[open] summary::after { transform: rotate(45deg); }
details summary::-webkit-details-marker { display: none; } details > :not(summary) { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* Sections de contenu */
section.block { padding: clamp(48px, 8vw, 96px) 0; } section.block > .wrap > h2 { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -.04em; line-height: 1.07; margin: 10px 0 14px; max-width: 20ch; text-wrap: balance; }
.steps, .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; } .tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px; box-shadow: var(--shadow); } .tile h3 { font-size: 21px; letter-spacing: -.02em; margin: 10px 0 8px; } .tile p { color: var(--muted); font-size: 16px; } .tile .n { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.band { background: var(--surface-2); } .prose { max-width: 720px; } .prose p + p, .prose h3 { margin-top: 14px; } .prose h3 { font-size: 20px; margin-top: 28px; } .prose p, .prose li { color: var(--muted); }
.cta-band { text-align: center; } .cta-band h2 { margin-inline: auto !important; } .cta-band .btn { margin-top: 22px; }
footer.foot { border-top: 1px solid var(--line); padding: 36px 0 52px; color: var(--muted); font-size: 14px; } footer.foot .wrap { display: grid; gap: 10px; }

/* Planificateur */
.planner-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; padding-bottom: 64px; }
.controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.controls .card { padding: 18px; border-radius: var(--r-md); } .controls h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.macro-inputs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .macro-inputs .input input { font-size: 17px; padding: 9px 0; } .macro-inputs .field > span.l { font-size: 12px; margin-bottom: 3px; }
.controls select { width: 100%; background: var(--surface-2); border: 0; border-radius: var(--r-sm); padding: 11px 12px; font-size: 15px; margin-top: 8px; }
.banner { background: var(--accent-soft); color: var(--text); border-radius: var(--r-md); padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 20px; font-size: 15px; flex-wrap: wrap; } .banner b { color: var(--accent); }
.hint { font-size: 14px; color: var(--muted); margin-top: 8px; }
.day-card { margin-top: 18px; } .day-card > header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; } .day-card h3 { font-size: 26px; letter-spacing: -.03em; }
.meal { padding: 18px 0; border-top: 1px solid var(--line); } .meal:first-of-type { border-top: 0; } .meal.skipped { opacity: .5; } .meal h4 { font-size: 18px; letter-spacing: -.01em; margin: 3px 0 8px; }
.meal .tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ings { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; } .chip { background: var(--surface-2); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-variant-numeric: tabular-nums; } .chip b { font-weight: 600; }
.macro-line { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.shop { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; padding: 22px; } .shop h2 { font-size: 24px; letter-spacing: -.03em; } .shop .prog { margin: 12px 0 4px; }
.aisle { margin-top: 20px; } .aisle h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.item { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; } .item:first-of-type { border-top: 0; }
.item input { appearance: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface-3); margin: 1px 0 0; cursor: pointer; display: grid; place-items: center; transition: background .2s, border-color .2s; } .item input:checked { background: var(--accent); border-color: var(--accent); } .item input:checked::after { content: "✓"; color: var(--accent-ink); font-size: 14px; font-weight: 700; }
.item .nm { line-height: 1.3; } .item .nm small { display: block; color: var(--muted); font-size: 13px; } .item .qty { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; } .item .qty small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.item.done .nm, .item.done .qty { opacity: .45; text-decoration: line-through; text-decoration-color: var(--muted); } .item .surplus { grid-column: 2 / -1; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); margin-left: 6px; vertical-align: middle; font-weight: 500; } .badge.store { background: var(--accent-soft); color: var(--accent); }
/* Compte : fenêtre de connexion, Mon espace */
.auth { border: 0; border-radius: var(--r-lg); padding: 32px; width: min(440px, calc(100% - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.auth::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(6px); }
.auth h2, h2.sm { font-size: 24px; letter-spacing: -.03em; margin: 0 0 12px; }
.auth-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 22px; cursor: pointer; }
.auth-form { display: grid; gap: 14px; } .auth-form .lead-sm { margin: 0; color: var(--muted); }
.auth-form input[type=email], .save-row input[type=text] { width: 100%; background: var(--surface-2); border: 0; border-radius: var(--r-sm); padding: 13px 14px; font-size: 17px; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.auth-form input[type=email]:focus-visible, .save-row input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; } .check input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.fine { font-size: 13px; color: var(--muted); margin: 0; } .sent h3 { margin: 0 0 8px; font-size: 22px; }
.save-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; padding: 16px 18px; border-radius: var(--r-md); } .save-row .grow { flex: 1 1 220px; }
.space { display: grid; gap: 22px; padding-bottom: 64px; max-width: 760px; } .space .card { padding: 22px; border-radius: var(--r-md); }
.week-list { display: grid; gap: 12px; } .week-card { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; } .week-card h3 { margin: 0 0 2px; font-size: 19px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; } .week-card .row { margin-top: 0; }
.btn.danger { color: #c0392b; }
.generate { display: flex; justify-content: flex-end; margin-top: 18px; } .generate .btn { min-width: 220px; }
.generate .btn:disabled { opacity: .45; cursor: not-allowed; }
.presence-days { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.presence-days .day-h { background: var(--surface-2); border: 0; cursor: pointer; font-weight: 600; color: var(--muted); font-size: 14px; padding: 8px 14px; border-radius: 999px; }
.presence-days .day-h[aria-pressed=true] { background: var(--accent-soft); color: var(--accent); }
.prefs { margin-bottom: 22px; padding: 20px; border-radius: var(--r-md); }
.pref-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pref-grid .seg span { padding: 9px 4px; font-size: 14px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { position: relative; cursor: pointer; } .toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.toggle span { display: block; padding: 11px 16px; border-radius: 999px; background: var(--surface-2); font-size: 14px; font-weight: 500; transition: background .25s var(--ease), color .2s, transform .2s; box-shadow: inset 0 0 0 1px var(--line); }
.toggle input:checked + span { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.toggle input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.meal .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.steps { border-top: 0; padding: 8px 0 0; } .steps summary { font-size: 14px; color: var(--accent); } .steps ol { margin: 8px 0 0; padding-left: 20px; font-size: 14px; } .steps li { margin-bottom: 4px; }
.tabs { display: none; } .toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-size: 15px; opacity: 0; pointer-events: none; transition: .35s var(--ease); z-index: 40; } .toast.show { opacity: 1; transform: translate(-50%, 0); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); } .reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .calc, .planner-grid { grid-template-columns: minmax(0, 1fr); } .calc .result-col { position: static; } .shop { position: static; max-height: none; }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); } .steps, .tiles { grid-template-columns: 1fr; } .pref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; } .wrap { width: min(1120px, 100% - 32px); } .fields { grid-template-columns: 1fr 1fr; } .fields .field:last-child { grid-column: 1 / -1; }
  .controls, .pref-grid { grid-template-columns: minmax(0, 1fr); } .controls .card { grid-column: auto !important; } .nav-links a:not(.pill) { display: none; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 16px; } .planner-grid[data-tab=week] .shop, .planner-grid[data-tab=shop] .week { display: none; }
  .seg span { padding: 10px 4px; font-size: 14px; }
}
@media print { .nav, .controls, .week, .tabs, .banner, .shop-actions, footer.foot { display: none !important; } .planner-grid { display: block; } .shop { position: static; box-shadow: none; border: 0; max-height: none; } body { background: #fff; color: #000; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }

/* Répartition des calories */
.meals-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.meals-total { font-weight: 600; margin-right: auto; }
.meals-total.ok { color: var(--accent); } .meals-total.warn { color: var(--warn); }
.field.supp { margin-top: 14px; }

/* Coût du panier */
.cost { margin: 14px 0 18px; padding: 16px 18px; border-radius: var(--r-md); background: var(--accent-soft); }
.cost h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.cost-total b { font-size: 32px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cost-total span { color: var(--muted); font-size: 14px; }
.cost-src { margin-top: 8px; font-size: 14px; } .cost-src summary { cursor: pointer; font-weight: 600; }
.cost-src p, .cost-src ul { margin: 8px 0; color: var(--muted); } .cost-src ul { padding-left: 18px; }
.cost-lines { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.cost-lines td { padding: 4px 6px 4px 0; border-top: 1px solid var(--line); } .cost-lines td:nth-child(2), .cost-lines td:nth-child(3) { text-align: right; white-space: nowrap; }

/* Espace coach et suivi du client */
.dots { display: inline-flex; gap: 6px; margin-top: 6px; }
.dots .dot { display: block; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--surface-3); box-sizing: border-box; }
.dot.full { background: var(--accent); border-color: var(--accent); }
.dot.partial { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); border-color: var(--accent); }
.dot.none { background: transparent; border-color: var(--warn); }
.dot.missing { background: transparent; border: 2px dashed var(--line); }
.client-row, .coach-card { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.client-row h3, .coach-card h3 { margin: 0 0 2px; font-size: 18px; overflow-wrap: anywhere; }
.client-row .row, .coach-card .row { margin-top: 0; }
.client-row.pending { opacity: .75; }
.coach-card { align-items: flex-start; flex-direction: column; }
.invite-form { display: grid; gap: 12px; }
.invite-form input, .space select, .space textarea { width: 100%; min-width: 0; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.space textarea { resize: vertical; margin-top: 12px; }
.space select { width: auto; flex: 1 1 180px; }
.client-detail h4 { margin: 18px 0 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.notes { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.today-list { display: grid; gap: 4px; margin-top: 8px; }
.today-item { padding: 10px 0; font-size: 17px; color: var(--text); align-items: center; }
@media (prefers-reduced-motion: no-preference) { .dot { transition: background .2s var(--ease); } }


/* ===== Planificateur : sections, repas, jours, goûts ===== */
.setup { display: grid; gap: 18px; padding-bottom: 28px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(22px, 3.4vw, 36px); box-shadow: var(--shadow); }
.panel-h { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.panel-h h2 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.035em; line-height: 1.15; }
.panel-h .hint { margin-top: 6px; max-width: 58ch; }
.step { flex: none; width: 30px; height: 30px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; }
.panel .field > span.l { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.panel .hint { margin-top: 10px; }
.panel select { width: 100%; appearance: none; -webkit-appearance: none; border: 0; border-radius: var(--r-sm); background-color: var(--surface-2); padding: 13px 40px 13px 14px; font-size: 16px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.panel .seg + select { margin-top: 12px; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.two-up .panel-h { margin-bottom: 16px; }
.setup .macro-inputs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.setup .macro-inputs .input input { font-size: 22px; padding: 13px 0; }
.setup .macro-inputs .field > span.l { font-size: 12px; margin-bottom: 8px; }
.preset-field { max-width: 340px; }
.pref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.pref-grid .seg span { padding: 10px 6px; }
.btn.big { padding: 18px 44px; font-size: 18px; }
.generate { justify-content: center; margin-top: 8px; }

.share-bar { display: flex; gap: 3px; height: 10px; margin: 22px 0 16px; }
.share-bar i { background: var(--accent); border-radius: 4px; min-width: 4px; transition: flex .4s var(--ease); }
.share-bar.warn i { background: var(--warn); }
.meal-rows { display: grid; gap: 10px; }
.meal-row { background: var(--surface-2); border-radius: 22px; padding: 16px 18px; display: grid; gap: 14px; }
.mr-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; }
.mr-title b { display: block; font-size: 18px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.mr-title .kc { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.stepper2 { display: inline-flex; align-items: center; background: var(--surface); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 1px var(--line); }
.step-btn, .icon-btn { width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: 20px; line-height: 1; color: var(--text); background: transparent; transition: background .2s, transform .2s var(--ease); }
.step-btn:hover:not(:disabled) { background: var(--surface-2); }
.step-btn:active:not(:disabled), .icon-btn:active:not(:disabled) { transform: scale(.92); }
.step-btn:disabled, .icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn:hover:not(:disabled) { color: var(--text); }
.pct { display: inline-flex; align-items: baseline; justify-content: center; gap: 2px; min-width: 66px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pct input { width: 36px; padding: 0; border: 0; background: transparent; text-align: right; font-size: 17px; font-weight: 600; -moz-appearance: textfield; outline-offset: 4px; }
.pct input::-webkit-outer-spin-button, .pct input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pct b { color: var(--muted); font-weight: 500; }
.mr-days { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.pills { display: grid; grid-template-columns: repeat(7, minmax(0, 40px)); gap: 8px; flex: 1 1 250px; }
.pills .pill { width: 100%; aspect-ratio: 1; border: 0; border-radius: 50%; cursor: pointer; font-size: 14px; font-weight: 600; background: var(--accent); color: var(--accent-ink); transition: transform .2s var(--ease), background .2s, color .2s; }
.pills .pill:active { transform: scale(.9); }
.pills .pill[aria-pressed=false] { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.mr-count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.meals-bar { margin-top: 16px; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.add-row:empty { display: none; }
.chip-btn { border: 0; border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 500; cursor: pointer; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s; }
.chip-btn:hover { background: var(--surface-3); }
.chip-btn.on { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.tastes-tile { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding: 18px 20px; border-radius: 22px; background: var(--accent-soft); }
.tastes-tile h3 { font-size: 17px; letter-spacing: -.02em; }
.tastes-tile .hint { margin-top: 2px; max-width: 46ch; }

/* Swipe des goûts */
.tastes { border: 0; padding: 0; width: min(460px, 100%); height: min(740px, 100dvh); max-height: 100dvh; border-radius: 34px; background: var(--bg); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.tastes::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tastes-in { height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 16px; padding: 22px 22px calc(18px + env(safe-area-inset-bottom)); }
.tastes-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tastes-top h2 { font-size: 24px; letter-spacing: -.03em; margin-top: 2px; }
.tastes-progress { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.tastes-progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .35s var(--ease); }
.deck { position: relative; margin-bottom: 46px; min-height: 0; }
.tcard { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; border-radius: 30px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  background: linear-gradient(165deg, color-mix(in srgb, var(--tint, var(--accent)) 18%, var(--surface)) 0%, var(--surface) 64%); transition: transform .3s var(--ease), opacity .3s; will-change: transform; }
.tcard.dragging { cursor: grabbing; }
.tcard[data-depth="1"] { transform: translateY(22px) scale(.94); opacity: .92; }
.tcard[data-depth="2"] { transform: translateY(44px) scale(.88); opacity: .7; }
.tcard[data-group=starch] { --tint: #c8922c; } .tcard[data-group=meat] { --tint: #c4524e; } .tcard[data-group=fish] { --tint: #3a86c8; }
.tcard[data-group=plant] { --tint: #5b9a47; } .tcard[data-group=dairy] { --tint: #8b80c8; } .tcard[data-group=veg] { --tint: #2f9e6e; }
.tcard-group { color: var(--tint); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.tcard h3 { font-size: clamp(38px, 11vw, 54px); letter-spacing: -.045em; line-height: 1.03; margin: 8px 0 10px; text-wrap: balance; }
.tcard-hint { color: var(--muted); font-size: 18px; }
.stamp { position: absolute; top: 24px; padding: 6px 14px; border: 2.5px solid; border-radius: 10px; font-size: 15px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; pointer-events: none; }
.stamp.no { left: 24px; color: var(--danger); transform: rotate(-8deg); opacity: var(--no, 0); }
.stamp.yes { right: 24px; color: var(--accent); transform: rotate(8deg); opacity: var(--yes, 0); }
.tastes-actions { display: flex; justify-content: center; align-items: center; gap: 22px; }
.round { width: 68px; height: 68px; border: 0; border-radius: 50%; display: grid; place-items: center; font-size: 30px; line-height: 1; cursor: pointer; background: var(--surface); box-shadow: var(--shadow); transition: transform .2s var(--ease), opacity .2s; }
.round:active:not(:disabled) { transform: scale(.92); }
.round:disabled { opacity: .35; cursor: default; }
.round.no { color: var(--danger); }
.round.yes { background: var(--accent); color: var(--accent-ink); }
.round.undo { width: 46px; height: 46px; font-size: 22px; color: var(--muted); }
.tastes .tastes-skip { justify-self: center; }
.tastes .tastes-later { justify-self: center; }
.tastes-done { overflow: auto; padding-top: 6px; }
.tastes-done h3 { font-size: 30px; letter-spacing: -.035em; }
.tastes-done .toggles { margin-top: 14px; }
.tastes-done .row { margin-top: 22px; }
.tastes-done .note.warn { margin-top: 14px; }
.avail { list-style: none; margin: 18px 0 0; padding: 0; }
.avail li { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); }
.avail li.warn b { color: var(--warn); }
.avail b { font-variant-numeric: tabular-nums; }

@media (max-width: 980px) { .two-up { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .setup .macro-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pref-grid { grid-template-columns: minmax(0, 1fr); }
  .mr-head { grid-template-columns: minmax(0, 1fr) auto; }
  .mr-head .stepper2 { grid-column: 1; grid-row: 2; justify-self: start; }
  .mr-head .icon-btn { grid-column: 2; grid-row: 1; }
  .tastes { width: 100%; max-width: 100%; height: 100dvh; border-radius: 0; }
  .panel { border-radius: 24px; }
}


/* ===== Résultats : jour par jour et courses ===== */
#results { margin-top: 36px; }
.save-row { border-radius: 24px; padding: 18px 22px; box-shadow: none; background: var(--surface-2); border-color: transparent; }
.save-row input[type=text] { background: var(--surface); }
.presence-days { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding: 4px; margin: 0 -4px 14px; scrollbar-width: none; }
.presence-days::-webkit-scrollbar { display: none; }
.presence-days .day-h { flex: 1 0 auto; min-width: 56px; border: 0; border-radius: 999px; padding: 10px 16px; font-size: 15px; font-weight: 500; cursor: pointer; background: var(--surface-2); color: var(--text); transition: background .25s var(--ease), color .2s, transform .2s var(--ease); }
.presence-days .day-h:hover { background: var(--surface-3); } .presence-days .day-h:active { transform: scale(.96); }
.presence-days .day-h[aria-pressed=true] { background: var(--text); color: var(--bg); font-weight: 600; }
.day-card { margin-top: 0; padding: clamp(20px, 3vw, 32px); border-radius: 28px; display: grid; gap: 18px; }
.day-card > header { margin: 0; align-items: baseline; } .day-card h3 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -.04em; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border-radius: 18px; padding: 12px 14px; }
.stat b { display: block; font-size: 22px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; } .stat b small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.meal { padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.meal:first-of-type { border-top: 1px solid var(--line); } .meal.skipped { opacity: .5; background: var(--surface-2); }
.meal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.meal h4 { font-size: 21px; letter-spacing: -.025em; line-height: 1.2; margin: 10px 0 8px; }
.meal .meta { gap: 6px 16px; margin-bottom: 12px; }
ul.ings { list-style: none; margin: 0 0 12px; padding: 0; display: block; }
ul.ings li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
ul.ings li:first-child { border-top: 0; } ul.ings li b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.meal .macro-line { font-size: 13px; }
.steps { padding: 10px 0 0; } .steps summary { color: var(--accent); }
.shop { border-radius: 28px; }
.shop .prog { margin: 14px 0 6px; } .shop .bar { height: 6px; }
.cost { border-radius: 22px; }
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meal { padding: 16px; border-radius: 20px; }
  .meal-head .btn { padding: 8px 12px; }
}
.meal-head .btn { white-space: nowrap; flex: none; }
.meal-head .tag { min-width: 0; }
@media (max-width: 640px) { .meal-head .tag { font-size: 11px; } .meal-head .btn { padding: 8px 12px; font-size: 13px; } }


/* ===== Journal alimentaire ===== */
.ico { flex: none; display: block; }
.journal { display: grid; gap: 18px; padding: 28px 0 40px; max-width: 760px; }
.j-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; text-align: center; }
.j-head h1 { font-size: clamp(26px, 5vw, 38px); letter-spacing: -.04em; line-height: 1.1; }
.j-head h1::first-letter { text-transform: uppercase; }
.j-head .icon-btn { width: 42px; height: 42px; }
.j-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px 32px; align-items: center; }
.ring-wrap { position: relative; width: clamp(150px, 34vw, 190px); aspect-ratio: 1; }
.ring { width: 100%; height: 100%; display: block; }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.ring-value { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease), stroke .3s; }
.ring.over .ring-value { stroke: var(--warn); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-center b { font-size: clamp(34px, 8vw, 44px); letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-center span { font-size: 13px; color: var(--muted); margin-top: 4px; }
.j-macros { display: grid; gap: 16px; }
.j-macro .row { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 7px; font-size: 15px; }
.j-macro .row span { color: var(--muted); }
.j-macro .row b { font-size: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.j-macro .row small { font-size: 13px; font-weight: 500; color: var(--muted); }
.j-macro .bar { height: 6px; }
.j-macro.over .bar i { background: var(--warn); }
.j-week { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }
.j-summary > .note { grid-column: 1 / -1; }
.streak { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.streak b { font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.streak.on { color: var(--accent); }
.week-strip { display: flex; gap: 6px; }
.wd { width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .2s var(--ease), background .2s; }
.wd.on { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.wd[aria-pressed=true] { box-shadow: inset 0 0 0 2px var(--text); color: var(--text); }
.wd:active { transform: scale(.9); }
.j-meals { display: grid; gap: 14px; }
.j-meal { padding: 18px 20px; border-radius: 24px; }
.j-meal-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.j-meal-h h2 { font-size: 19px; letter-spacing: -.025em; }
.j-meal-h .note { font-variant-numeric: tabular-nums; }
.j-meal-ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.j-entries { margin-top: 12px; border-top: 1px solid var(--line); }
.j-entry, .results .result { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; border-radius: 0; transition: background .2s; }
.j-entry:last-child, .results .result:last-child { border-bottom: 0; }
.j-entry:hover, .results .result:hover { background: var(--surface-2); }
.r-name { min-width: 0; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.r-name small, .r-kcal small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.r-kcal { flex: none; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.j-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.j-actions .btn { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
@media (max-width: 560px) { .j-actions .btn { width: 100%; } }
.j-actions:empty { display: none; }
.d-group + .d-group { margin-top: 24px; }
.d-group h3 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.d-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.d-row b { font-variant-numeric: tabular-nums; text-align: right; }
.d-row .bar { height: 5px; align-self: center; }
.d-row small { color: var(--muted); font-size: 12px; text-align: right; min-width: 9ch; font-variant-numeric: tabular-nums; }
.d-row.over .bar i { background: var(--warn); }
.d-row.over small { color: var(--warn); }
.j-foot { max-width: 68ch; }

/* Fenêtre d'ajout */
.sheet { border: 0; padding: 0; width: min(520px, 100%); height: min(720px, 100dvh); max-height: 100dvh; border-radius: 30px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.sheet[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.sheet::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sheet-top { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 10px; padding: 18px 18px 8px; text-align: center; }
.sheet-top h2 { font-size: 17px; letter-spacing: -.02em; }
.sheet-body { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 12px; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); min-height: 0; }
.search-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 14px; background: var(--surface-2); color: var(--muted); border: 1px solid transparent; }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 14px 0; font-size: 17px; color: var(--text); }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.results { overflow: auto; min-height: 0; overscroll-behavior: contain; }
.results-status:empty { display: none; }
.sheet-body.qty { grid-template-rows: none; align-content: start; gap: 18px; overflow: auto; }
.qty h3 { font-size: 24px; letter-spacing: -.03em; line-height: 1.15; }
.qty-field { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 14px; border-radius: 22px; background: var(--surface-2); border: 1px solid transparent; }
.qty-field:focus-within { border-color: var(--accent); }
.qty-field input { width: 4.2ch; border: 0; outline: 0; background: transparent; text-align: right; font-size: 52px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.qty-field input::-webkit-outer-spin-button, .qty-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-field b { font-size: 22px; color: var(--muted); font-weight: 500; }
.qty .add-row { margin-top: 0; justify-content: center; }
.sheet-body.search-body { grid-template-rows: auto minmax(0, 1fr); }
/* Colonne et non grille : une grille à hauteur fixe tassait les listes, qui se superposaient (D75). */
.results-scroll { overflow: auto; min-height: 0; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; }
.results-scroll > * { flex: none; }
.results-scroll .results { overflow: visible; min-height: auto; }
.results-scroll > [hidden], .results-scroll > .results:empty { display: none; }
.results-title { margin-top: 10px; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.results-title small { text-transform: none; font-weight: 400; letter-spacing: 0; }
.unit-panel { display: grid; gap: 14px; }
.unit-count { align-items: center; justify-content: space-between; }
.unit-count input { width: 3.2ch; text-align: center; }
.unit-count .icon-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); font-size: 26px; box-shadow: inset 0 0 0 1px var(--line); }
.unit-weight { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; color: var(--muted); }
.unit-weight input { width: 5.5em; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 16px; text-align: right; }
.unit-weight b { font-weight: 500; }
.unit-total { text-align: center; font-weight: 600; color: var(--text); }

/* Barre d'onglets (mobile) */
.tabbar { display: none; }
@media (max-width: 640px) {
  .has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 6px;
    background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border-top: 1px solid var(--line); }
  .tabbar a { text-align: center; padding: 11px 6px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
  .tabbar a[aria-current] { background: var(--surface-2); color: var(--text); font-weight: 600; }
  .has-tabbar .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .j-summary { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .j-macros { width: 100%; }
  .sheet { width: 100%; max-width: 100%; height: 100dvh; border-radius: 0; }
  .j-meal-h .btn { padding: 9px 14px; }
}


/* ===== Carnet d'entraînement ===== */
.training { padding-bottom: 120px; }
.t-tabs { max-width: 420px; width: 100%; justify-self: center; }
.t-head { margin-top: 4px; }
.t-week { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px 32px; align-items: center; }
.ring.on .ring-value { stroke: var(--accent); }
.t-week-side { display: grid; gap: 14px; }
.t-week-side h2 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.035em; line-height: 1.15; }
.t-goal, .w-rest { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.t-goal .pct, .w-rest .pct { color: var(--text); font-size: 17px; }
.t-muscles { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line); }
.t-muscles h3, .t-templates h3 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.t-muscles .d-row.zero { opacity: .45; }
.t-templates { margin-top: 24px; }
.t-template { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.t-template .row { margin-top: 0; flex-wrap: nowrap; align-items: center; }
.t-template .note { overflow-wrap: anywhere; }
.note.empty { text-align: center; padding: 28px 12px; }
.w-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.w-head h1 { font-size: clamp(26px, 5vw, 38px); letter-spacing: -.04em; line-height: 1.1; }
.w-clock { text-align: right; }
.w-clock b { display: block; font-size: clamp(34px, 8vw, 46px); letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.w-clock span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.w-ex { padding: 20px; border-radius: 24px; display: grid; gap: 14px; }
.w-ex-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.w-ex-h h2 { font-size: 20px; letter-spacing: -.025em; line-height: 1.2; }
.w-ex .row { margin-top: 0; }
.sets { display: grid; gap: 8px; }
.set-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 12px minmax(0, 1fr) minmax(0, .8fr) 46px; gap: 8px; align-items: center; padding: 8px; border-radius: 18px; background: var(--surface-2); transition: background .25s var(--ease); }
.set-row.done { background: var(--accent-soft); }
.set-n { text-align: center; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.set-x { color: var(--muted); text-align: center; }
.set-field { display: grid; background: var(--surface); border-radius: 12px; padding: 6px 8px 5px; border: 1px solid transparent; }
.set-field:focus-within { border-color: var(--accent); }
.set-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; text-align: center; font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; padding: 0; -moz-appearance: textfield; }
.set-field input::-webkit-outer-spin-button, .set-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.set-field small { text-align: center; font-size: 11px; color: var(--muted); }
.set-field.rir input { font-size: 17px; font-weight: 500; }
.set-check { width: 46px; height: 46px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .2s var(--ease), background .2s, color .2s; }
.set-check[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.set-check:active { transform: scale(.9); }
.set-rest { grid-column: 2 / -1; color: var(--muted); font-size: 12px; }
.w-end { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.rest-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 25; width: min(520px, calc(100% - 24px)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 14px 16px; border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.rest-info b { display: block; font-size: 30px; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.rest-info span { font-size: 13px; color: var(--muted); }
.rest-actions { display: flex; gap: 6px; }
.rest-actions .chip-btn { padding: 9px 12px; }
.rest-bar .bar { grid-column: 1 / -1; height: 5px; }
.rest-bar .bar i { transition: width .5s linear; }
.rest-bar.over { border-color: var(--accent); }
.rest-bar.over .rest-info b { color: var(--accent); font-size: 22px; }
.summary .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.summary h2 { font-size: 30px; letter-spacing: -.035em; }
.prs { list-style: none; margin: 0; padding: 0; }
.prs li { display: grid; padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); margin-bottom: 8px; }
.prs li span { font-size: 14px; color: var(--accent); }
.save-template { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.save-template input, .tpl-body .field input, .training select { width: 100%; background: var(--surface-2); border: 0; border-radius: var(--r-sm); padding: 13px 14px; font-size: 16px; color: var(--text); }
.t-session { padding: 18px 20px; border-radius: 24px; border-top: 1px solid var(--line); }
.t-session summary { gap: 12px; align-items: center; }
.t-session summary div { display: grid; }
.t-session summary .note { font-weight: 400; font-variant-numeric: tabular-nums; }
.t-ex { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text); }
.t-ex h3 { font-size: 16px; margin-bottom: 4px; }
.t-ex p { font-variant-numeric: tabular-nums; }
.chart { margin: 18px 0 6px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart-dot.top { fill: var(--accent); }
.training .stats { margin-top: 16px; }
.chips-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-scroll .chip-btn { flex: none; }
.results .result.create { color: var(--accent); }
@media (max-width: 640px) {
  .t-week { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .t-week-side, .t-muscles { width: 100%; }
  .rest-bar { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .set-row { grid-template-columns: 20px minmax(0, 1fr) 8px minmax(0, 1fr) minmax(0, .8fr) 42px; gap: 5px; padding: 6px; }
  .set-check { width: 42px; height: 42px; }
  .w-ex { padding: 16px; }
  .tabbar a { padding: 11px 2px; font-size: 13px; }
}
.rest-info { min-width: 0; }
.rest-info span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Espace coach : fiche client, programme, messages ===== */
.c-tabs { margin: 12px 0 6px; }
.client-detail { display: grid; gap: 10px; }
.client-detail .stats { margin-top: 6px; }
.client-detail select, .program-form input[type=text], .program-form input[type=number], .program-form textarea, .comment-form textarea { width: 100%; min-width: 0; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.wk-wrap { overflow-x: auto; }
.wk-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.wk-table th, .wk-table td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.wk-table thead th { border-top: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wk-table th:first-child { text-align: left; font-weight: 500; }
.client-detail .t-session { padding: 14px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.comment-form { display: grid; gap: 8px; margin-top: 12px; justify-items: start; }
.comment-form textarea, .program-form textarea { resize: vertical; }
.comments { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.comments li { padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); }
.comments li p { color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.comments .row { margin-top: 6px; justify-content: space-between; align-items: center; }
.comments .chip-btn { padding: 6px 12px; font-size: 13px; }
.program-form { display: grid; gap: 14px; }
.program-form .macro-inputs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.program-note { white-space: pre-line; overflow-wrap: anywhere; }
.share-item { align-items: flex-start; padding: 10px 0; color: var(--text); font-size: 15px; }
.share-item b { font-weight: 600; }
.today-item small { display: block; }


/* ===== Progrès : niveau, missions, trophées ===== */
.p-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px 32px; align-items: center; }
.p-hero-side { display: grid; gap: 8px; }
.p-hero h1 { font-size: clamp(32px, 6vw, 46px); letter-spacing: -.045em; line-height: 1.05; }
.p-hero .hint { margin-top: 0; }
.missions { display: grid; gap: 8px; }
.mission { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); transition: background .3s var(--ease); }
.mission.done { background: var(--accent-soft); }
.mission b { display: block; font-size: 16px; letter-spacing: -.01em; }
.mission small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 7px; }
.mission .bar { height: 5px; }
.mission-check { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line); }
.mission.done .mission-check { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.mission-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.p-headline { font-size: 20px; font-weight: 600; letter-spacing: -.025em; margin-bottom: 14px; }
.progress .stats { margin-top: 0; }
.stat .delta { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trophies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.trophy { display: grid; gap: 4px; align-content: start; padding: 16px 14px; border-radius: 20px; background: var(--surface-2); color: var(--muted); }
.trophy b { font-size: 15px; letter-spacing: -.015em; line-height: 1.2; }
.trophy small { font-size: 12px; line-height: 1.35; }
.trophy .bar { height: 4px; margin-top: 6px; }
.trophy-ico { width: 46px; height: 46px; margin-bottom: 6px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line); }
.trophy.on { background: var(--accent-soft); color: var(--text); }
.trophy.on .trophy-ico { color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.trophy.on small { color: var(--accent); }
.p-rules { padding: 18px 22px; border-radius: 24px; }

/* Célébration : un anneau qui se dessine */
.cele { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; pointer-events: none; opacity: 0; transition: opacity .24s var(--ease); }
.cele.in { opacity: 1; }
.cele-card { pointer-events: auto; display: grid; justify-items: center; gap: 5px; width: min(320px, 100%); padding: 30px 26px 26px; border: 1px solid var(--line); border-radius: 30px; color: var(--text); text-align: center; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.94); transition: transform .45s cubic-bezier(.2, 1.3, .4, 1); }
.cele.in .cele-card { transform: none; }
.cele-card b { font-size: 26px; letter-spacing: -.035em; line-height: 1.1; }
.cele-card small { font-size: 14px; color: var(--muted); }
.cele-mark { position: relative; width: 104px; height: 104px; margin-bottom: 10px; display: grid; place-items: center; color: var(--accent); }
.cele-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.cele-line, .cele-rays { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.cele.in .cele-line { transition: stroke-dashoffset .8s var(--ease) .08s; stroke-dashoffset: 0; }
.cele.in .cele-rays { transition: stroke-dashoffset .5s var(--ease) .7s; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .cele-line, .cele-rays { stroke-dashoffset: 0; } .cele-card { transform: none; } }

@media (max-width: 640px) {
  .p-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .p-hero .streak { justify-content: center; }
  .trophies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabbar { padding-inline: 4px; gap: 2px; }
  .tabbar a { font-size: 12.5px; padding: 11px 1px; }
}

/* Séance : respiration entre les blocs, aide sur la réserve, choix et création d'exercice */
.workout { display: grid; gap: 16px; }
.workout > .btn.block { margin-top: 2px; }
.w-head { margin-bottom: 4px; }
.rir-help { padding: 2px 6px; border-top: 0; font-size: 14px; color: var(--muted); }
.rir-help summary { font-weight: 500; color: var(--muted); }
.rir-help summary::after { font-size: 18px; }
.rir-help p { margin-top: 8px; font-size: 14px; }
.sheet-body.pick-body { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.result-wrap { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.result-wrap:last-child { border-bottom: 0; }
.results .result-wrap .result { flex: 1; min-width: 0; border-bottom: 0; }
.sheet-body.create-ex { grid-template-rows: none; align-content: start; gap: 18px; overflow: auto; }
.create-ex input[type=text] { width: 100%; padding: 14px; border: 1px solid transparent; border-radius: 14px; background: var(--surface-2); font-size: 17px; color: var(--text); }
.create-ex input[type=text]:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.create-ex .field > span.l { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.muscle-grid { display: flex; flex-wrap: wrap; gap: 8px; }


/* =====================================================================
   Direction artistique Leanlist : « encre et champagne » (decision.md, D32)
   Un titrage à empattements, un seul métal, des filets fins, des dessins au trait.
   ===================================================================== */
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
:root {
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --bg: #f7f3ea; --surface: #fffdf8; --surface-2: #f1ecdf; --surface-3: #e4dccb;
  --text: #191610; --muted: #6d6658; --line: rgba(40, 32, 16, .13);
  --accent: #7b6431; --accent-hover: #655125; --accent-ink: #fffdf8; --accent-soft: #efe7d3;
  --warn: #a4501a; --warn-soft: #f8e8d8; --danger: #a8321f;
  --shadow: 0 1px 1px rgba(40, 32, 16, .03), 0 12px 32px -18px rgba(40, 32, 16, .22);
  --shadow-lg: 0 2px 4px rgba(40, 32, 16, .05), 0 32px 70px -24px rgba(40, 32, 16, .34);
  --ease: cubic-bezier(.22, .8, .24, 1);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d0c0a; --surface: #171613; --surface-2: #221f1a; --surface-3: #322e26;
    --text: #f4efe4; --muted: #a59d8d; --line: rgba(240, 228, 200, .13);
    --accent: #d8c48f; --accent-hover: #e8d8ae; --accent-ink: #1a1608; --accent-soft: #2b2619;
    --warn: #eeb078; --warn-soft: #36251a; --danger: #ef9482;
    --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 14px 34px -20px rgba(0, 0, 0, .8);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 36px 80px -24px rgba(0, 0, 0, .9); }
}

/* Titrage */
.hero h1, section.block > .wrap > h2, .panel-h h2, .j-head h1, .w-head h1, .p-hero h1, .day-card h3, .meal h4, .shop h2, .auth h2, h2.sm, .tcard h3, .tastes-top h2, .cele-card b,
.summary h2, .tastes-done h3, .j-meal-h h2, .w-ex-h h2, .p-headline, .tile h3, .qty h3, .t-week-side h2, .tastes-tile h3, .mr-title b, .client-detail > h3, .coach-card h3, .week-card h3 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; }
.hero h1 { font-size: clamp(50px, 9vw, 104px); line-height: .98; max-width: 13ch; }
.hero h1 em { color: var(--accent); font-style: italic; }
.hero.left h1 { font-size: clamp(44px, 7vw, 76px); }
section.block > .wrap > h2 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.03; }
.panel-h h2 { font-size: clamp(28px, 3.2vw, 36px); line-height: 1.08; }
.j-head h1, .w-head h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.05; }
.p-hero h1 { font-size: clamp(44px, 7vw, 62px); }
.day-card h3 { font-size: clamp(38px, 5vw, 50px); }
.meal h4 { font-size: 27px; line-height: 1.1; }
.shop h2, h2.sm, .auth h2, .j-meal-h h2, .w-ex-h h2, .t-week-side h2, .tastes-top h2 { font-size: 28px; line-height: 1.1; }
.mr-title b { font-size: 24px; }
.tile h3, .tastes-tile h3, .coach-card h3, .week-card h3, .client-detail > h3 { font-size: 26px; }
.p-headline { font-size: 28px; line-height: 1.12; }
.qty h3 { font-size: 30px; }
.summary h2, .tastes-done h3 { font-size: 40px; line-height: 1.04; }
.eyebrow { font-size: 11.5px; letter-spacing: .16em; }
.lead, .hero .lead { color: var(--muted); }
.ring-center b, .kcal strong, .w-clock b, .rest-info b { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.ring-center b { font-size: clamp(42px, 9vw, 54px); }
.w-clock b { font-size: clamp(44px, 9vw, 58px); }
.rest-info b { font-size: 38px; }
.kcal strong { font-size: clamp(72px, 10vw, 104px); }

/* Marque : un trait, un mot */
.brand { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 27px; letter-spacing: -.01em; gap: 7px; }
.brand i { width: 19px; height: 25px; border-radius: 0; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 25' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M12.5 2C8 6 6 13 5 19c-.5 3 1.500 4 4 3 3-1 5.500-2.500 8-5'/%3E%3Cpath d='M2 15c3-1 6-1 9 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 25' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M12.5 2C8 6 6 13 5 19c-.5 3 1.500 4 4 3 3-1 5.500-2.500 8-5'/%3E%3Cpath d='M2 15c3-1 6-1 9 0'/%3E%3C/svg%3E") center / contain no-repeat; }
.nav-links a { opacity: .72; }
.nav-links a:hover { background: transparent; opacity: 1; }
.nav-links a[aria-current] { background: transparent; opacity: 1; color: var(--accent); box-shadow: inset 0 -1px 0 var(--accent); border-radius: 0; }

/* Surfaces : moins d'ombre, des filets */
.card, .panel, .tile { border-color: var(--line); }
.btn { box-shadow: none; font-weight: 500; letter-spacing: .005em; }
.btn:hover { transform: none; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.step { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-family: var(--serif); font-size: 18px; font-weight: 400; }
.tile .n { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-family: var(--serif); font-size: 18px; font-weight: 400; }
.chip-btn { background: transparent; }
.chip-btn:hover { background: var(--surface-2); }
.ring-track { stroke: var(--surface-3); stroke-width: 3; }
.ring-value { stroke-width: 5; }
.bar { background: var(--surface-3); }
.j-meal-ico, .trophy-ico { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.j-meal-ico { color: var(--accent); }

/* Dessins au trait */
.art { display: block; width: 100%; height: auto; overflow: visible; }
.art path { stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.tcard { padding: 24px 28px 28px; background: var(--surface); }
.tcard[data-group] { --tint: var(--accent); }
.tcard-art { position: relative; flex: 1; min-height: 0; margin: 14px 0 12px; color: var(--accent); }
.tcard-art .art { position: absolute; inset: 0; width: 100%; height: 100%; }
.tcard[data-depth="0"] .art path { stroke-dashoffset: 1; animation: draw .75s var(--ease) forwards; animation-delay: calc(var(--i) * 80ms + 60ms); }
.tcard[data-depth="1"] .tcard-art, .tcard[data-depth="2"] .tcard-art { opacity: .35; }
.tcard h3 { font-size: clamp(44px, 12vw, 58px); line-height: 1; margin: 6px 0 8px; }
.tcard-group { font-size: 11px; letter-spacing: .16em; }
.tcard-hint { font-size: 16px; }
.stamp { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 24px; letter-spacing: 0; text-transform: none; border-width: 1px; border-radius: 999px; padding: 3px 16px; background: var(--surface); }
.round { box-shadow: inset 0 0 0 1px var(--line); }
.round.yes { box-shadow: none; }

/* Photos de repas */
.meal { overflow: hidden; }
.meal-photo { display: block; width: calc(100% + 40px); height: auto; max-width: none; margin: -20px -20px 18px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); filter: saturate(.92) contrast(1.02); }
.editorial { display: grid; grid-template-columns: 1.25fr 1fr 1.25fr; gap: 14px; align-items: end; padding-block: clamp(12px, 3vw, 28px) clamp(36px, 6vw, 72px); }
.editorial figure { margin: 0; }
.editorial img { display: block; width: 100%; height: auto; object-fit: cover; border-radius: 4px; filter: saturate(.92) contrast(1.02); background: var(--surface-2); }
.editorial figure:nth-child(1) img { aspect-ratio: 4 / 5; }
.editorial figure:nth-child(2) img { aspect-ratio: 1; }
.editorial figure:nth-child(3) img { aspect-ratio: 4 / 5; }
.editorial figcaption { margin-top: 8px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--muted); }

/* Trait signature sous le titre */
.hero-line { display: block; width: min(560px, 100%); height: 34px; margin: 2px auto 18px; overflow: visible; color: var(--accent); }
.hero-line path { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) .25s forwards; }

/* Entrées de page */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.setup > *, main.journal:not(.training) > * { animation: rise .6s var(--ease) both; }
.setup > :nth-child(2), main.journal:not(.training) > :nth-child(2) { animation-delay: 70ms; }
.setup > :nth-child(3), main.journal:not(.training) > :nth-child(3) { animation-delay: 140ms; }
.setup > :nth-child(n+4), main.journal:not(.training) > :nth-child(n+4) { animation-delay: 200ms; }

@media (max-width: 640px) {
  .meal-photo { width: calc(100% + 32px); margin: -16px -16px 14px; }
  .editorial { grid-template-columns: 1fr 1fr; }
  .editorial figure:nth-child(2) { display: none; }
  .brand { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .art path, .hero-line path, .tcard[data-depth="0"] .art path { animation: none; stroke-dashoffset: 0; }
  .setup > *, main.journal:not(.training) > * { animation: none; }
}

/* « Préparation » : un dépliant, pas la grille de la page d'accueil */
details.steps { display: block; margin-top: 0; }
details.steps summary { width: 100%; }
/* Navigation compacte */
.nav-links a { white-space: nowrap; }
@media (max-width: 1040px) { .nav-links { gap: 0; } .nav-links a { padding: 7px 8px; font-size: 13px; } }
.macro .bar i { background: var(--accent) !important; }

/* Mes séances et comparaison à la dernière fois */
.t-templates { margin-top: 0; }
.t-template:first-child { border-top: 0; padding-top: 0; }
.t-template b { font-family: var(--serif); font-weight: 400; font-size: 25px; letter-spacing: -.012em; line-height: 1.1; }
.t-template .note { margin-top: 3px; }
.t-last { display: block; margin-top: 4px; font-size: 12.5px; color: var(--accent); }
.set-cmp { grid-column: 2 / -1; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.set-cmp.up { color: var(--accent); font-weight: 600; }
.set-row .set-rest { margin-top: -4px; }
@media (max-width: 640px) { .t-template { flex-direction: column; align-items: stretch; } .t-template .row { justify-content: space-between; } .t-template .row .btn { flex: 1; } }

/* Espace coach : une porte distinctive, réservée aux coachs (decision.md, D34) */
.nav-links a.coach-door, .nav-links a.coach-door[aria-current] { display: inline-flex; align-items: center; gap: .28em; margin-left: 8px; padding: 7px 15px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); opacity: 1; font-weight: 600; box-shadow: none; transition: background .2s var(--ease), transform .2s var(--ease); }
.nav-links a.coach-door:hover { background: var(--accent-hover); opacity: 1; }
.nav-links a.coach-door:active { transform: scale(.97); }
.nav-links a.coach-door:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.coach-door-long + span { text-transform: none; }
.coach-hall { --hall-ink: #0d0c0a; --hall-gold: #d8c48f; position: relative; display: grid; gap: 4px; padding: clamp(24px, 4vw, 36px); border-radius: 18px; background: var(--hall-ink); color: #f4efe4; text-decoration: none; box-shadow: inset 0 0 0 1px rgba(216, 196, 143, .42), var(--shadow); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.coach-hall:hover { box-shadow: inset 0 0 0 1px var(--hall-gold), var(--shadow-lg); transform: translateY(-1px); }
.coach-hall:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.coach-hall-kicker { font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--hall-gold); }
.coach-hall strong { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 6vw, 50px); line-height: 1.05; letter-spacing: -.012em; }
.coach-hall-meta { color: #b9b09e; font-size: 15px; }
.coach-hall-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--hall-gold); font-weight: 600; }
.coach-hall-go i { font-style: normal; transition: transform .25s var(--ease); }
.coach-hall:hover .coach-hall-go i { transform: translateX(4px); }
.coach-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--line); }
.coach-kpi { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: 16px clamp(10px, 2vw, 22px); }
.coach-kpi + .coach-kpi { border-left: 1px solid var(--line); }
.coach-kpi dd { margin: 0; font-family: var(--serif); font-size: clamp(36px, 6vw, 48px); line-height: 1; font-variant-numeric: tabular-nums; }
.coach-kpi dt { font-size: 13px; line-height: 1.25; color: var(--muted); }
.coach-kpi.alert dd { color: var(--warn); }
@media (max-width: 640px) {
  .nav-links a.coach-door, .nav-links a.coach-door[aria-current] { margin-left: 0; padding: 7px 13px; }
  .coach-door-long { display: none; }
  .coach-door-long + span::first-letter { text-transform: uppercase; }
  .nav-links a.coach-door span:last-child { display: inline-block; }
}
@media (prefers-reduced-motion: reduce) { .coach-hall, .coach-hall-go i, .nav-links a.coach-door { transition: none; } .coach-hall:hover { transform: none; } }

/* Cartes de Mon espace : un rythme unique entre titre, texte, champ et action (decision.md, D36) */
.space .space-stack { display: grid; gap: 16px; }
.space .space-stack > * { margin: 0; min-width: 0; }
.space .space-stack > .btn { justify-self: start; }
.space .space-stack > .today-list { gap: 2px; }
.space .space-stack > h2 + .note { margin-top: -6px; }
.space .space-stack > .row { gap: 10px; }
.today-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.today-status { margin: 0; color: var(--accent); font-size: 14px; }
.today-status:empty { display: none; }
.today-status::before { content: "✓"; margin-right: 7px; }
.share-item small { display: block; margin-top: 2px; }
.coach-stack { display: grid; gap: 14px; }
#messages { scroll-margin-top: 76px; }

/* Invitation à la bêta */
.invite-page .space { max-width: 560px; }
.invite-input { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); font: 600 18px/1.2 var(--font); letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.invite-input::placeholder { color: var(--muted); opacity: .5; }
.invite-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.invite-card .auth-form { display: grid; gap: 14px; }
.beta-stats { padding-top: 14px; border-top: 1px solid var(--line); }

/* Tableau de bord */
.pil-page .hero { padding-bottom: 12px; }
.pil-page .space { max-width: none; gap: 18px; }
.pil-panel { display: grid; gap: 16px; min-width: 0; }
.pil-panel > header { display: grid; gap: 3px; }
.pil-panel h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.12; letter-spacing: -.012em; }
.pil-verdict { display: grid; gap: 8px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.pil-verdict.ready { border-color: var(--accent); }
.pil-verdict .eyebrow, .pil-verdict p { margin: 0; }
.pil-verdict > strong { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5.4vw, 50px); line-height: 1.04; letter-spacing: -.012em; }
.pil-verdict > p:not(.eyebrow) { color: var(--muted); font-size: 15px; }
.pil-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px 30px; margin: 14px 0 0; padding: 0; list-style: none; }
.pil-goals li { display: grid; gap: 6px; min-width: 0; }
.pil-goal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; }
.pil-goal-top b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pil-goals small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.pil-goals li.met small { color: var(--accent); }
.pil-track { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pil-track i { display: block; height: 100%; min-width: 0; border-radius: 999px; background: var(--accent); }
.pil-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--line); }
.pil-kpis > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: 14px clamp(8px, 1.8vw, 18px); min-width: 0; }
.pil-kpis > div + div { border-left: 1px solid var(--line); }
.pil-kpis dd { margin: 0; font-family: var(--serif); font-size: clamp(30px, 4.6vw, 42px); line-height: 1; font-variant-numeric: tabular-nums; }
.pil-kpis dt { color: var(--muted); font-size: 12.5px; line-height: 1.25; }
.pil-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pil-chart { position: relative; margin: 0; touch-action: pan-y; }
.pil-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.pil-grid { stroke: var(--line); stroke-width: 1; }
.pil-axis { fill: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pil-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pil-area { fill: var(--accent); opacity: .1; }
.pil-end, .pil-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.pil-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.pil-tip { position: absolute; top: -8px; z-index: 2; display: grid; gap: 1px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); pointer-events: none; white-space: nowrap; font-size: 13px; box-shadow: var(--shadow); }
.pil-tip small { color: var(--muted); font-size: 11.5px; }
.pil-data summary { color: var(--muted); font-size: 13.5px; cursor: pointer; }
.pil-scroll { overflow-x: auto; margin-top: 8px; -webkit-overflow-scrolling: touch; }
.pil-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pil-panel table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pil-panel th, .pil-panel td { padding: 8px 9px; border-top: 1px solid var(--line); text-align: left; white-space: nowrap; }
.pil-panel thead th { border-top: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.pil-panel tbody th { font-weight: 500; }
.pil-bars { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.pil-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; font-size: 14px; }
.pil-bars b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pil-bars .pil-track { grid-column: 1 / -1; }
.pil-cohorts { min-width: 620px; border-collapse: separate !important; border-spacing: 2px; }
.pil-cohorts th, .pil-cohorts td { border-top: 0 !important; }
.pil-cohorts td:nth-child(n+3) { width: 9%; border-radius: 4px; background: color-mix(in srgb, var(--accent) var(--share, 0%), var(--surface-2)); text-align: center; font-size: 12.5px; }
.pil-cohorts td.strong { color: var(--accent-ink); font-weight: 600; }
.pil-cohorts td.empty { background: transparent; }
.pil-form { display: grid; grid-template-columns: minmax(0, 1fr) 120px 90px auto; gap: 8px; }
.pil-form input, .pil-form select { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 15px; flex: none; }
.pil-invites { min-width: 720px; }
.pil-invites tbody th b, .pil-invites tbody th small { display: block; }
.pil-invites tbody th small { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.pil-invites tr.off { opacity: .55; }
.pil-actions { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 760px) {
  .pil-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pil-kpis > div { border-left: 0 !important; border-top: 1px solid var(--line); }
  .pil-kpis > div:nth-child(-n+2) { border-top: 0; }
  .pil-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .pil-form { grid-template-columns: minmax(0, 1fr) 90px; }
  .pil-form input:first-child, .pil-form .btn { grid-column: 1 / -1; }
}

/* Réglages d'expérience */
html.calm .streak { display: none; }
.exp-card.panel { display: grid; gap: 14px; }
.exp-card.panel h2 { margin: 0; }

/* Pages légales */
.legal { max-width: 760px; padding-block: clamp(28px, 6vw, 60px) 72px; }
.legal h1 { margin: 6px 0 14px; font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 7vw, 64px); line-height: 1.02; letter-spacing: -.012em; }
.legal h2 { margin: 38px 0 10px; font-family: var(--serif); font-weight: 400; font-size: 29px; line-height: 1.12; letter-spacing: -.012em; }
.legal h3 { margin: 22px 0 6px; font-size: 16px; font-weight: 600; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 5px; }
.legal a { color: var(--accent); }
.legal-meta { color: var(--muted); font-size: 14px !important; }
.legal-draft { margin: 18px 0 8px; padding: 14px 16px; border-radius: 10px; background: var(--warn-soft); color: var(--text); font-size: 14.5px !important; }
.legal-todo { padding: 1px 6px; border-radius: 5px; background: var(--warn-soft); color: var(--warn); font-size: .92em; font-weight: 600; }
.legal-wrap { overflow-x: auto; margin: 0 0 16px; border-block: 1px solid var(--line); }
.legal table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14.5px; }
.legal th, .legal td { padding: 10px 10px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal thead th { border-top: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.legal-form { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--accent); }

/* Connexion par code */
.auth-flow { min-width: 0; }
.code-form { display: grid; gap: 14px; }
.code-form .sent { margin: 0; padding: 0; background: transparent; }
.code-form .sent h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 400; font-size: 27px; letter-spacing: -.012em; }
.code-form .sent p { margin: 0; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.code-input { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); font: 500 26px/1.2 var(--font); font-variant-numeric: tabular-nums; letter-spacing: .2em; text-align: center; }
.code-input::placeholder { color: var(--muted); opacity: .45; }
.code-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.code-actions { margin-top: 0; justify-content: center; }

/* Sauvegarde */
.backup-points { display: grid; gap: 7px; padding: 0; list-style: none; font-size: 15px; }
.backup-points li { position: relative; padding-left: 22px; }
.backup-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.backup-status.is-waiting { color: var(--muted); }
.backup-status.is-waiting::before { content: "·"; }

/* Accords */
.weeks-consent h2 { margin: 0 0 14px; font-size: clamp(27px, 6vw, 34px); line-height: 1.08; padding-right: 28px; }
.weeks-consent .backup-points { margin: 14px 0 16px; }
.weeks-consent-actions { margin-top: 20px; flex-wrap: wrap; }
.week-consent { margin-top: 18px; }
.pil-coverage { margin: 0; }

/* Notifications */
.notif-bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: 6px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease); }
.notif-bell:hover, .notif-bell[aria-expanded="true"] { background: var(--surface-2); }
.notif-bell:active { transform: scale(.94); }
.notif-bell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.notif-count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--bg); animation: notif-in .35s var(--ease); }
@keyframes notif-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.notif-panel { position: fixed; top: 62px; right: max(16px, calc((100vw - 1120px) / 2)); z-index: 60; width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .22s var(--ease); }
.notif-panel header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.notif-panel h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 25px; letter-spacing: -.012em; }
.notif-panel header span { color: var(--muted); font-size: 13px; }
.notif-panel ul { flex: 1; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.notif-panel li + li { border-top: 1px solid var(--line); }
.notif-panel li a { position: relative; display: grid; gap: 3px; padding: 13px 18px 13px 30px; color: var(--text); text-decoration: none; transition: background .15s; }
.notif-panel li a:hover, .notif-panel li a:focus-visible { background: var(--surface-2); outline: 0; }
.notif-panel li.new a::before { content: ""; position: absolute; left: 14px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.notif-panel li b { font-size: 14px; font-weight: 600; }
.notif-panel li span { font-size: 14.5px; line-height: 1.38; overflow-wrap: anywhere; }
.notif-panel li small { color: var(--muted); font-size: 12.5px; }
.notif-all { padding: 13px 18px; border-top: 1px solid var(--line); color: var(--accent); font-size: 14px; font-weight: 600; text-align: center; text-decoration: none; }
.notif-all:hover { background: var(--surface-2); }
.comments li.is-new { position: relative; }
.msg-new { display: inline-block; margin-bottom: 6px; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
@media (max-width: 640px) { .notif-bell { margin-left: 0; } .nav-links { gap: 4px; } .notif-panel { right: 16px; top: 60px; } }
@media (prefers-reduced-motion: reduce) { .notif-count, .notif-panel { animation: none; } .notif-bell { transition: none; } }

/* Page introuvable */
.not-found { min-height: calc(100vh - 57px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; padding-block: 48px; }
.not-found .eyebrow, .not-found .lead { margin: 0; }
.not-found h1 { margin: 0; max-width: 12ch; font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 8vw, 84px); line-height: 1; letter-spacing: -.012em; }
.not-found-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
@media (max-width: 640px) { .not-found-links .btn { flex: 1 1 100%; text-align: center; } }

/* Importer depuis une autre appli (decision.md, D35) */
.imp-page { max-width: 760px; }
#import { display: grid; gap: 26px; padding-bottom: 48px; }
.imp-error { margin: 0; }
.imp-drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: clamp(38px, 8vw, 64px) 24px; border: 1px dashed var(--accent); border-radius: 18px; background: var(--surface); text-align: center; cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease); }
.imp-drop:hover, .imp-drop.over { background: var(--accent-soft); }
.imp-drop.over { transform: scale(1.01); }
.imp-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.imp-drop strong { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 5vw, 40px); line-height: 1.08; letter-spacing: -.012em; }
.imp-drop span { color: var(--muted); font-size: 15px; }
.imp-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.imp-guides { display: grid; gap: 0; }
.imp-guides h2 { margin: 0 0 10px; }
.imp-guide { border-top: 1px solid var(--line); }
.imp-guide:last-child { border-bottom: 1px solid var(--line); }
.imp-guide summary { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 15px 2px; cursor: pointer; list-style: none; }
.imp-guide summary::-webkit-details-marker { display: none; }
.imp-guide summary b { font-family: var(--serif); font-weight: 400; font-size: 24px; }
.imp-guide summary span { margin-left: auto; margin-right: 10px; color: var(--accent); font-size: 13px; }
.imp-guide p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.imp-preview { display: grid; gap: 14px; }
.imp-preview h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 5vw, 40px); line-height: 1.08; letter-spacing: -.012em; outline: 0; }
.imp-preview .eyebrow, .imp-preview p { margin: 0; }
.imp-name { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.imp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.imp-stats > div { display: grid; gap: 2px; align-content: start; padding: 14px clamp(8px, 2vw, 18px); }
.imp-stats > div + div { border-left: 1px solid var(--line); }
.imp-stats b { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 6vw, 46px); line-height: 1; font-variant-numeric: tabular-nums; }
.imp-stats span { color: var(--muted); font-size: 13px; line-height: 1.25; }
.imp-unit { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.imp-unit legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.imp-unknown { display: grid; gap: 8px; }
.imp-unknown h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 25px; }
.imp-unknown ul, .imp-skipped { margin: 0; padding: 0; list-style: none; }
.imp-unknown li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.imp-unknown li > span { min-width: 0; display: grid; overflow-wrap: anywhere; }
.imp-unknown small { color: var(--muted); }
.imp-unknown select { flex: 0 0 170px; width: 170px; font: inherit; font-size: 15px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.imp-skipped { display: grid; gap: 2px; color: var(--muted); font-size: 13.5px; }
.imp-actions { margin-top: 4px; flex-wrap: wrap; }
.imp-link { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--accent); }
@media (max-width: 640px) { .imp-actions .btn { flex: 1 1 100%; text-align: center; } .imp-unknown select { flex-basis: 140px; width: 140px; } }
@media (prefers-reduced-motion: reduce) { .imp-drop { transition: none; } .imp-drop.over { transform: none; } }

/* Photos de progression (D48) */
.coach-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 4px; color: var(--muted); font-size: 14px; }
.ph-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .02em; vertical-align: 2px; }
.ph-session-head .ph-tag { margin-left: 8px; }
.ph-quota { display: grid; gap: 7px; }
.ph-quota-head { display: flex; align-items: baseline; gap: 10px; }
.ph-quota-head b { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.ph-quota-head span { color: var(--muted); font-size: 14px; }
.ph-bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.ph-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.ph-quota.over .ph-bar i { background: var(--warn); }
.ph-sessions { display: grid; gap: 14px; }
.ph-session { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.ph-session-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ph-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ph-frame { margin: 0; display: grid; gap: 6px; min-width: 0; }
.ph-frame figcaption { color: var(--muted); font-size: 13px; text-align: center; }
.ph-img { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; }
.ph-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-img > span { color: var(--muted); font-size: 12.5px; padding: 8px; text-align: center; }
.ph-img.loading { background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%) 0 0 / 300% 100%; animation: ph-shine 1.4s linear infinite; }
@keyframes ph-shine { to { background-position: -150% 0; } }
.ph-frame.empty .ph-img { background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, transparent 10px 20px); }
.ph-compare-zone { display: grid; gap: 12px; }
.ph-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ph-frame.lg figcaption { font-size: 14px; color: var(--text); font-weight: 600; }
.ph-add { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.ph-add h4 { margin: 0; }
.ph-add input[type=date] { font-size: 16px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.ph-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ph-pick { display: grid; gap: 6px; cursor: pointer; }
.ph-pick-img { aspect-ratio: 3 / 4; border-radius: var(--r-sm); display: grid; place-items: center; overflow: hidden; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--surface-2); color: var(--accent); font-size: 28px; transition: border-color .2s; }
.ph-pick:hover .ph-pick-img, .ph-pick:focus-within .ph-pick-img { border-color: var(--accent); }
.ph-pick.picked .ph-pick-img { border-style: solid; }
.ph-pick-img img { width: 100%; height: 100%; object-fit: cover; }
.ph-pick-l { text-align: center; font-size: 13px; color: var(--muted); }
.ph-consent { display: grid; gap: 10px; }
.ph-consent h3 { margin: 0; }
.ph-locked { position: relative; border-radius: var(--r-md); overflow: hidden; }
.ph-compare.blurred { filter: blur(7px); opacity: .55; pointer-events: none; user-select: none; }
.ph-frame.ghost .ph-img { background: linear-gradient(180deg, var(--surface-2), var(--surface-3)); }
.ph-silhouette { width: 42%; height: 78%; border-radius: 40% 40% 18% 18% / 22% 22% 10% 10%; background: color-mix(in srgb, var(--accent) 35%, var(--surface-3)); }
.ph-locked-msg { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 18px; text-align: center; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.ph-locked-msg > b { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 5vw, 32px); line-height: 1.05; }
.ph-plans { margin: 4px 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14.5px; }
@media (max-width: 480px) { .ph-row, .ph-picks { gap: 7px; } .ph-locked-msg { position: static; background: none; padding: 14px 0 0; } .ph-compare.blurred { max-height: 200px; } }
@media (prefers-reduced-motion: reduce) { .ph-img.loading { animation: none; } }
.ph-compare { max-width: 520px; }
.ph-row, .ph-picks { max-width: 440px; }
.ph-locked { max-width: 520px; }

/* Visio coach (D49) */
.visio { border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.visio > summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; }
.visio > summary::-webkit-details-marker { display: none; }
.visio > summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 20px; line-height: 1; }
.visio[open] > summary::after { content: "–"; }
.visio-ico { color: var(--accent); font-size: 13px; }
.visio-body { display: grid; gap: 12px; padding: 0 16px 16px; }
.visio-when { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.visio input[type=date], .visio input[type=time], .visio input[type=url], .visio select { width: 100%; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.visio-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 480px) { .visio-when { grid-template-columns: 1fr 1fr; } .visio-when .field:first-child { grid-column: 1 / -1; } .visio-actions .btn { flex: 1 1 100%; text-align: center; } }

/* Fiche client ouverte sous son client, une à la fois */
.client-item { display: grid; gap: 8px; scroll-margin-top: 84px; }
.client-slot:empty { display: none; }
.client-item.is-open > .client-row { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent), var(--shadow); }
.client-slot .client-detail { border-left: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
@media (prefers-reduced-motion: no-preference) { .client-slot > div { animation: slot-in .28s var(--ease); } }
@keyframes slot-in { from { opacity: 0; transform: translateY(-6px); } }

/* Notifications push (D51) */
.push-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
.push-on::before { content: "●"; color: var(--accent); margin-right: 8px; font-size: 10px; vertical-align: 2px; }
.push-time { padding-left: 34px; }
.push-time input { font: inherit; font-size: 16px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.push-time input:disabled { opacity: .5; }

/* Bilan mensuel (D52) : écran puis impression A4 */
.bilan-page { display: grid; gap: 18px; }
.report-tools { display: grid; gap: 10px; }
.report-tools .row { flex-wrap: wrap; align-items: center; gap: 10px; }
.report-tools select { font: inherit; font-size: 15px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.report { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: clamp(22px, 5vw, 56px); display: grid; gap: 30px; max-width: 860px; }
.rp-head { display: grid; gap: 8px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.rp-brand { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.rp-brand span:first-child { font-family: var(--serif); font-style: italic; font-size: 22px; letter-spacing: 0; text-transform: none; font-weight: 400; }
.rp-head h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 8vw, 72px); line-height: .95; letter-spacing: -.02em; }
.rp-meta { color: var(--muted); font-size: 14px; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.rp-kpi { display: grid; gap: 2px; align-content: start; padding: 14px clamp(8px, 2vw, 18px); min-width: 0; }
.rp-kpi + .rp-kpi { border-left: 1px solid var(--line); }
.rp-kpi b { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 5vw, 42px); line-height: 1; font-variant-numeric: tabular-nums; }
.rp-kpi span { font-size: 13px; line-height: 1.25; }
.rp-kpi small { color: var(--muted); font-size: 12px; }
.report section { display: grid; gap: 12px; break-inside: avoid; }
.report h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 28px; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rp-table th, .rp-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.rp-table thead th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.rp-table td.ok { color: var(--accent); font-weight: 600; }
.rp-table td.off { color: var(--warn); font-weight: 600; }
.rp-muted, .rp-foot-note { color: var(--muted); font-size: 14px; }
.rp-stack { display: grid; gap: 10px; }
.rp-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 520px; }
.rp-word .rp-note { font-family: var(--serif); font-size: 21px; line-height: 1.45; white-space: pre-wrap; }
.rp-note-input { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); resize: vertical; }
.print-only { display: none; }
.rp-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@media (max-width: 600px) { .rp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-kpi:nth-child(3) { border-left: 0; } .rp-kpi:nth-child(n+3) { border-top: 1px solid var(--line); } .rp-table { font-size: 13px; } .rp-table th, .rp-table td { padding: 8px 6px; } }

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f6f2e8; --text: #191610; --muted: #5e584b; --line: rgba(40, 32, 16, .18); --accent: #6b5626; --warn: #9a4716; color-scheme: light; }
  @page { size: A4; margin: 14mm 14mm 16mm; }
  body { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .nav, .tabbar, .foot, .skip, .report-tools, #demo-badge, #toast, .notif-bell, .rp-note-input { display: none !important; }
  .print-only { display: block; }
  main.wrap { width: auto; max-width: none; padding: 0; margin: 0; }
  .report { box-shadow: none; border-radius: 0; padding: 0; max-width: none; gap: 22px; }
  .rp-head h1 { font-size: 54px; }
  .rp-photos { max-width: 70%; }
  .ph-img { box-shadow: none; }
}
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-head h3 { margin: 0; }

/* Marque du coach (D53) */
.brand-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--coach) 12%, var(--surface)); box-shadow: inset 4px 0 0 var(--coach); width: 100%; }
.brand-id { display: grid; min-width: 0; }
.brand-id b { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.1; overflow-wrap: anywhere; }
.brand-id span { color: var(--muted); font-size: 13px; }
.brand-powered { margin-left: auto; align-self: flex-end; color: var(--muted); font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
.brand-mark { flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.brand-mark.md { width: 52px; height: 52px; }
.brand-mark.sm { width: 34px; height: 34px; border-radius: 10px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark.mono { background: var(--coach); color: var(--coach-ink); box-shadow: none; font-family: var(--serif); font-size: 22px; letter-spacing: .02em; }
.brand-mark.sm.mono { font-size: 15px; }
.brand-card > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.brand-card > summary::-webkit-details-marker { display: none; }
.brand-card > summary b { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.brand-card > summary .note { margin-left: auto; }
.brand-card[open] > summary { margin-bottom: 14px; }
.brand-form { display: grid; gap: 14px; }
.brand-form input[type=text] { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.brand-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15), 0 0 0 2px var(--surface); }
.swatch:focus-visible, .swatch:hover, .swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.swatch.on { transform: scale(1.08); }
.brand-swatches input[type=color] { width: 44px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: pointer; }
.brand-preview { display: flex; }
.report.branded .rp-head { border-bottom-color: color-mix(in srgb, var(--coach) 60%, transparent); }
.report.branded .rp-head h1 { color: var(--text); }
.rp-brand.coach { color: var(--muted); }
.rp-coach { display: inline-flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; }
.rp-coach b { font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--text); }
.report.branded .rp-kpis { border-top-color: var(--coach); border-top-width: 2px; }
@media (max-width: 480px) { .brand-powered { display: none; } }
.brand-form .warn:empty { display: none; }

/* Photo du repas (D54) */
.j-meal-actions { display: flex; gap: 8px; margin-left: auto; }
.scan-body { display: grid; gap: 14px; }
.scan-drop { display: grid; place-items: center; gap: 6px; padding: 34px 16px; border-radius: var(--r-md); border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--surface-2); color: var(--accent); cursor: pointer; text-align: center; }
.scan-drop b { color: var(--text); }
.scan-drop:hover, .scan-drop:focus-within { border-color: var(--accent); }
.scan-wait { display: grid; place-items: center; gap: 14px; padding: 30px 0; }
.scan-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: scan-spin 1s linear infinite; }
@keyframes scan-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .scan-spin { animation-duration: 3s; } }
.scan-list { display: grid; gap: 2px; }
.scan-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.scan-item.off { opacity: .5; }
.scan-item input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.scan-name { display: grid; min-width: 0; }
.scan-name b { font-weight: 600; overflow-wrap: anywhere; }
.scan-doubt { color: var(--warn); font-size: 12px; }
.scan-g { display: flex; align-items: center; gap: 4px; }
.scan-g input { width: 72px; font: inherit; font-size: 16px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-align: right; }
.scan-body { align-content: start; }
.scan-body > .btn.block { height: auto; min-height: 48px; align-self: start; }
.scan-body > * { align-self: start; }

/* Import : collage depuis un tableur et choix des colonnes (D55) */
.imp-paste { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); margin-top: 14px; border-top: 0; }
.imp-paste summary { display: flex; gap: 10px; align-items: baseline; }
.imp-paste summary span { color: var(--muted); font-size: 13px; font-weight: 400; }
.imp-paste textarea { width: 100%; min-width: 0; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); resize: vertical; }
.imp-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.imp-map select { width: 100%; font: inherit; font-size: 15px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.imp-sample { font-size: 13px; }
.imp-sample td, .imp-sample th { white-space: nowrap; }
/* Photo du repas : « C'est bien ça ? » (D54) */
.scan-check { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.scan-check.off .scan-name { opacity: .5; }
.scan-check.off .scan-name b { text-decoration: line-through; }
.scan-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.scan-picker { grid-column: 1 / -1; display: grid; gap: 6px; }
.scan-search { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.scan-search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.scan-results { display: grid; gap: 2px; max-height: 220px; overflow-y: auto; }
.scan-results:empty { display: none; }
.scan-choice { text-align: left; font: inherit; padding: 10px 12px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; overflow-wrap: anywhere; }
.scan-choice:hover, .scan-choice:focus-visible { background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.scan-add { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 420px) { .scan-check { grid-template-columns: 1fr; } .scan-actions { justify-content: flex-start; } }
.sheet-body.scan-body { grid-template-rows: none; overflow: auto; }
.scan-body > .chip-btn { justify-self: start; }
/* Séances créées à l'avance (D57) */
.sheet-body.tpl-body { grid-template-rows: none; align-content: start; gap: 16px; overflow: auto; }
.tpl-list { display: grid; gap: 10px; }
.tpl-row { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); display: grid; gap: 10px; }
.tpl-row-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tpl-row-h b { font-weight: 600; overflow-wrap: anywhere; }
.tpl-row-h .row { margin: 0; flex-wrap: nowrap; gap: 2px; }
.tpl-steps { display: grid; gap: 8px; }
.tpl-step { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tpl-step-l { color: var(--muted); font-size: 14px; }
.tpl-step .pct { min-width: 48px; text-align: center; }
.tpl-add { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
.tpl-body > .btn.block { min-height: 48px; }
.t-template-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.t-create { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 18px; }
.tpl-body .field { display: grid; gap: 6px; }
.tpl-body .field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Repas modifiables (D59) */
.meal-edit-btn { justify-self: start; margin-top: 4px; }
.sheet-body.me-body { grid-template-rows: none; align-content: start; gap: 14px; overflow: auto; }
.me-list { display: grid; gap: 10px; }
.me-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.me-row.fixed { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.me-name { display: grid; min-width: 0; }
.me-name b { font-weight: 600; overflow-wrap: anywhere; }
.me-g { display: flex; align-items: center; gap: 4px; }
.me-g input { width: 76px; font: inherit; font-size: 16px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: right; }
.me-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.me-select { font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); max-width: 100%; }
.me-body > .me-select { justify-self: start; }
.me-body > .chip-btn { justify-self: start; }
.me-body > .btn.block { min-height: 48px; }
.meal h4 .badge { margin-left: 8px; vertical-align: middle; }
/* Grades grecs (D61) */
.g-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: start; }
.g-emblem { color: var(--accent); }
.g-emblem .art path { stroke-width: 1.6; stroke-dashoffset: 1; animation: draw .75s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms + 80ms); }
.g-side { display: grid; gap: 10px; min-width: 0; }
.g-side h2 { margin: 0; }
.g-meter { display: grid; gap: 4px; }
.g-meter-h { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.g-meter-h b { color: var(--text); font-weight: 600; }
.g-ladder summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.g-list { list-style: none; padding: 0; margin: 12px 0 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.g-list li { display: grid; justify-items: center; text-align: center; gap: 2px; opacity: .38; }
.g-list li.done, .g-list li.now { opacity: 1; }
.g-list li.now { color: var(--accent); }
.g-list li b { font-size: 13px; font-weight: 600; }
.g-list li small { font-size: 11px; color: var(--muted); }
.g-mini { width: 56px; height: 56px; }
@media (max-width: 520px) { .g-card { grid-template-columns: 1fr; justify-items: start; } .g-emblem { width: 110px; } }
@media (prefers-reduced-motion: reduce) { .g-emblem .art path { animation: none; stroke-dashoffset: 0; } }
/* Goûts non bloquants (D62) */
.tastes-later { display: grid; justify-items: center; gap: 4px; text-align: center; }
.tastes-later .note { max-width: 32ch; font-size: 12px; }
.tastes-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); margin: 4px 0 12px; }
.tastes-nudge p { margin: 0; font-size: 14px; flex: 1 1 220px; }
.tcard[data-group=fruit] { --tint: #d07a3a; }
.legal-date { margin: 18px 0 8px; color: var(--muted); font-size: 14px !important; }
/* Pages de contenu : recettes et guides (D68) */
.content .lead { font-size: 18px; line-height: 1.55; color: var(--text); }
.content h3 { margin: 22px 0 6px; font-size: 17px; font-weight: 600; }
.recipe-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-md); margin: 12px 0 4px; }
.facts { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.facts li { display: grid; gap: 2px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); text-align: center; }
.facts b { font-size: 20px; font-weight: 600; }
.facts span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.content .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.content .cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
.rlist { padding-left: 1.1em; display: grid; gap: 8px; }
.rlist small { color: var(--muted); }

/* Vérification anti-robots (Turnstile, D69) : invisible le plus souvent, case à cocher en cas de doute. */
.auth-captcha:not(:empty) { margin-top: 14px; display: flex; justify-content: center; }

/* Repas types, reprise et copie d'un repas (D74) */
.j-meal-actions { align-items: center; }
.j-more { width: 38px; height: 38px; border-radius: 50%; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.j-more:hover { color: var(--text); background: var(--surface-2); }
.j-actions .btn .ico { margin-right: 6px; vertical-align: -3px; }
.menu-sheet { height: fit-content; max-height: min(760px, 100dvh); }
@media (max-width: 640px) { .menu-sheet { height: fit-content; max-height: 92dvh; margin-bottom: 0; border-radius: 26px 26px 0 0; } }
.sheet-body.menu-body { grid-template-rows: none; align-content: start; gap: 20px; overflow: auto; overscroll-behavior: contain; }
.menu-body section { display: grid; gap: 10px; }
.menu-body .results-title { margin-top: 0; }
.menu-body .results { overflow: visible; display: grid; gap: 8px; }
.menu-hint { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.menu-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.menu-del { width: 40px; height: 40px; border-radius: 50%; color: var(--muted); }
.menu-del:hover { color: var(--danger, #d64545); background: var(--surface-2); }
.menu-save .ico, .move-meals .ico { flex: none; }
.menu-save { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.saved-meal .r-name small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-meal { background: var(--accent-soft); }
.move-meals { justify-content: flex-start; }
.move-meals .chip-btn { display: inline-flex; align-items: center; gap: 6px; }
.seg.small span { padding: 6px 12px; font-size: 13px; }

/* Partage du journal avec le coach (D75) */
.coach-share.panel { display: grid; gap: 12px; padding: 16px 20px; border-radius: 22px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.coach-share.panel .row { display: flex; gap: 8px; flex-wrap: wrap; }
.coach-share.panel .note { margin-top: 4px; }
p.coach-share.on { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
p.coach-share.on .ico { color: var(--accent); flex: none; }

/* En-tête de repas sur téléphone : boutons sous le titre, plus de chevauchement (D75). */
@media (max-width: 560px) {
  .j-meal-h { grid-template-columns: auto minmax(0, 1fr); row-gap: 12px; }
  .j-meal-h .j-meal-actions { grid-column: 1 / -1; margin-left: 0; }
  .j-meal-h .j-meal-actions > :last-child { margin-left: auto; }
}

/* Copier ou déplacer vers un jour et un repas (D75) */
details.move-panel { display: block; border-top: 1px solid var(--line); padding-top: 14px; }
details.move-panel > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; cursor: pointer; padding: 6px 2px; font-weight: 600; }
details.move-panel > summary::-webkit-details-marker { display: none; }
details.move-panel > summary small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
details.move-panel > summary .ico:last-child { color: var(--muted); transition: transform .2s var(--ease); }
details.move-panel[open] > summary .ico:last-child { transform: rotate(90deg); }
details.move-panel[open] > * + * { margin-top: 14px; }
.dest { display: grid; gap: 10px; }
.dest-label { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin: 4px 0 0; }
.dest-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.dest-days::-webkit-scrollbar { display: none; }
.dest-days .chip-btn { flex: none; scroll-snap-align: start; }
.dest-date { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.dest-date input { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 15px; color-scheme: light dark; }
.qty .dest .add-row, .dest .add-row { justify-content: flex-start; margin-top: 0; }
.dest-meals .chip-btn { display: inline-flex; align-items: center; gap: 6px; }
.dest .btn .ico { margin-right: 8px; vertical-align: -3px; }
.menu-go { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.menu-go > .ico { color: var(--muted); }
details.move-panel > summary::after { content: none; }
details.move-panel > :not(summary) { color: var(--text); font-size: inherit; }

/* Guide d'installation sur téléphone (D75) */
.install-card { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 30; max-width: 480px; margin: 0 auto; padding: 16px 18px; border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); display: grid; gap: 12px; animation: install-in .35s var(--ease); }
@keyframes install-in { from { transform: translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .install-card { animation: none; } }
.install-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.install-top .note { margin-top: 2px; font-size: 14px; }
.install-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.install-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; }
.install-steps .ico { display: inline-block; vertical-align: -4px; color: var(--accent); }
.install-card .row { display: flex; gap: 8px; justify-content: flex-end; }

/* Aller à un jour (D76) */
.j-date-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; padding: 2px 8px; }
.j-date-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.j-date-btn .ico { color: var(--muted); transform: rotate(90deg); transition: color .2s; flex: none; }
.j-date-btn:hover .ico { color: var(--accent); }
.j-head .icon-btn:disabled { opacity: .3; }
.day-sheet { width: min(420px, 100%); }
.cal-kicker { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin: 0; }
.cal-jumps { justify-content: center; margin-top: 0; }
.cal-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; text-align: center; }
.cal-nav h2 { font-size: 20px; letter-spacing: -.02em; }
.cal-nav .icon-btn:disabled { opacity: .3; }
.cal-grid { display: grid; gap: 4px; }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head span { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .15s; }
.cal-day:hover:not(:disabled) { background: var(--surface-2); }
.cal-day:disabled { color: var(--muted); opacity: .35; cursor: default; }
.cal-day.future:not(:disabled) { color: var(--muted); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 600; }
.cal-day.on { background: var(--accent); color: var(--bg); font-weight: 700; }
.cal-day.logged::after, .cal-dot { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal-day.logged::after { position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%); }
.cal-day.on.logged::after { background: var(--bg); }
.cal-legend { text-align: center; font-size: 13px; }
.cal-dot { vertical-align: 2px; }
.j-today { all: unset; cursor: pointer; display: inline-block; margin-top: 6px; font-size: 13px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.j-today[hidden] { display: none; }
.j-today:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.j-date-btn { display: inline; padding: 0 4px; }
.j-date-btn .ico { display: inline-block; vertical-align: .25em; margin-left: 6px; }

/* Page « Installer l'appli » et bannière de Mon espace (D77) */
.install-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--text); text-decoration: none; }
.install-banner b { display: block; font-size: 16px; }
.install-banner small { display: block; font-size: 14px; color: var(--muted); }
.install-banner .install-go { font-size: 26px; color: var(--accent); }
.install-banner .install-ico, .install-banner img { border-radius: 10px; }
@media (display-mode: standalone) { .install-banner { display: none; } }
.install-page { max-width: 640px; }
.install-page .lead { color: var(--muted); font-size: 17px; max-width: 52ch; }
.install-status { margin: 8px 0 14px; }
.install-ok { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; }
.install-tabs { margin-bottom: 18px; }
.install-tabs span small { font-size: 12px; }
.install-guide { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; }
.install-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.install-step.direct { grid-template-columns: 1fr; }
.install-step.direct .btn { margin-top: 10px; }
.install-step b { font-size: 17px; letter-spacing: -.01em; }
.install-step .note { margin: 4px 0 12px; }
.install-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--bg); font-weight: 700; font-size: 15px; }
.mock { border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); max-width: 320px; }
.mock-bar { display: flex; align-items: center; justify-content: space-around; gap: 8px; padding: 10px 12px; }
.mock-text { font-size: 14px; }
.mock-hot { display: inline-grid; place-items: center; padding: 6px 10px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); animation: mock-pulse 1.8s ease-in-out infinite; }
@keyframes mock-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .mock-hot { animation: none; } }
.mock-sheet { padding: 6px; display: grid; gap: 2px; }
.mock-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.mock-row.on { color: var(--text); font-weight: 600; background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.mock-row.on .ico { color: var(--accent); }
.mock-home { display: grid; grid-template-columns: repeat(4, 44px); justify-content: space-around; padding: 14px 10px; }
.mock-home i { width: 44px; height: 44px; border-radius: 11px; background: var(--surface-3); }
.mock-home .mock-hot { padding: 3px; border-radius: 13px; }
.mock-app { display: block; border-radius: 10px; }
.install-help { margin-bottom: 30px; }
.install-step .btn .ico { vertical-align: -3px; }
.mock-title { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.mock-title .mock-app { width: 26px; height: 26px; border-radius: 7px; }

/* Écart avec la dépense estimée (D78) : couleurs neutres, ni rouge ni vert, on informe sans juger. */
.j-balance { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.j-balance[hidden] { display: none; }
.bal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.bal-diff { font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.bal-diff.under, .bal-diff.over { color: var(--accent); }
.bal-bar { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); }
.bal-fill { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: color-mix(in srgb, var(--accent) 55%, var(--surface-3)); transition: width .5s var(--ease); }
.bal-fill.over { background: var(--accent); }
.bal-mark { position: absolute; top: -5px; bottom: -5px; left: var(--x); width: 2px; margin-left: -1px; border-radius: 2px; background: var(--text); }
.bal-sub { margin: 0; font-size: 13px; }
.bal-week p { margin: 4px 0 0; font-size: 14px; }
.bal-warn { font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .bal-fill { transition: none; } }
.j-summary > .j-balance { grid-column: 1 / -1; }

/* Tableau de bord : audience, comptes et capacité (D79) */
.pil-kpis:has(> div:nth-child(6)) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 720px) { .pil-kpis:has(> div:nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pil-bar { fill: color-mix(in srgb, var(--accent) 70%, var(--surface-3)); }
.pil-signup { fill: var(--text); stroke: var(--surface); stroke-width: 2; }
.pil-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.pil-key { display: inline-block; width: 10px; height: 10px; }
.pil-key.bar { border-radius: 2px; background: color-mix(in srgb, var(--accent) 70%, var(--surface-3)); }
.pil-key.dot { border-radius: 50%; background: var(--text); margin-left: 10px; }
.pil-period-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 28px 0 12px; }
.pil-period-row h2, .pil-section { font-size: 26px; letter-spacing: -.02em; }
.pil-section { margin: 36px 0 12px; }
.pil-period { min-width: 280px; }
.pil-cap-state { display: grid; gap: 2px; padding: 12px 16px; margin: 12px 0 16px; border-radius: 16px; background: var(--surface-2); border-left: 4px solid var(--accent); }
.pil-cap-state.watch { border-left-color: var(--warn); background: var(--warn-soft); }
.pil-cap-state.act { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.pil-cap-state span { font-size: 14px; color: var(--muted); }
.pil-gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px 30px; margin: 0; padding: 0; list-style: none; }
.pil-gauges li { display: grid; gap: 6px; min-width: 0; }
.pil-gauges small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.pil-gauges .pil-track { position: relative; overflow: visible; height: 8px; }
.pil-gauges .pil-track i { position: relative; z-index: 0; }
.pil-gauges li.watch .pil-track i { background: var(--warn); }
.pil-gauges li.act .pil-track i { background: var(--danger); }
.pil-gauges li.act .pil-goal-top b { color: var(--danger); }
.pil-gauges li.watch .pil-goal-top b { color: var(--warn); }
.pil-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--muted); opacity: .6; border-radius: 1px; }
.pil-next { color: var(--text) !important; font-weight: 600; }
.pil-manual { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }

/* Écran de choix de la mesure d'usage (D80) : deux boutons de même poids */
.usage-body { gap: 14px; }
.usage-body h2 { font-size: 26px; letter-spacing: -.02em; }
.usage-points { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 15px; }
.usage-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pil-link-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.pil-link { flex: 1 1 260px; min-width: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; overflow-wrap: anywhere; }
.pil-panel .pil-form:has(> select:only-of-type) { grid-template-columns: minmax(0, 1fr) auto; } .pil-form select { min-width: 210px; }

/* Page Premium et carte d'abonnement (D83) */
.premium-page { max-width: 680px; }
.premium-page .lead { color: var(--muted); font-size: 17px; max-width: 52ch; }
.premium-body { display: grid; gap: 18px; margin-bottom: 36px; }
.premium-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.premium-features li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.premium-features b { font-size: 17px; }
.premium-features .note { margin: 2px 0 0; }
.premium-check { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.premium-offer { display: grid; gap: 14px; padding: 22px; border-radius: 26px; }
.premium-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.premium-plan { position: relative; cursor: pointer; }
.premium-plan input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.premium-plan > span { display: grid; gap: 4px; height: 100%; padding: 16px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, background .2s; }
.premium-plan input:checked + span { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.premium-plan input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.premium-plan b { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
.premium-plan em { font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.premium-plan strong { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1; }
.premium-plan strong small { font-family: inherit; font-size: 15px; color: var(--muted); }
.premium-plan > span > small { color: var(--muted); font-size: 13px; }
.premium-cta { font-size: 17px; padding: 16px; }
.premium-fine { margin: 0; }
.premium-coach .row, .premium-active .row { display: flex; gap: 8px; flex-wrap: wrap; }
.premium-active { display: grid; gap: 10px; padding: 22px; border-radius: 26px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.premium-soon { padding: 16px 18px; border-radius: 16px; background: var(--surface-2); }
.premium-ico { font-size: 20px; color: var(--accent); background: var(--accent-soft); width: 40px; height: 40px; display: grid; place-items: center; }
@media (max-width: 420px) { .premium-plans { grid-template-columns: 1fr; } }
