/* La Méthode NeuroStep · app mobile. Couleurs : vert forêt, sauge, or, corail. */
:root {
  --bg: #FAF8F3; --card: #FFFFFF; --g: #1F3A33; --ink: #1E2A2F; --mut: #4A5A60;
  --sage: #6E8F84; --pale: #DCE5DE; --soft: #EEF2EC; --line: #E3E6DF;
  --gold: #D9A441; --coral: #B8553B;
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, -apple-system, sans-serif;
  --r: 18px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--g); line-height: 1.2; margin: 0 0 .45em; }
h1 { font-size: 27px; } h2 { font-size: 21px; } h3 { font-size: 18px; }
p { margin: 0 0 .7em; }
a { color: var(--g); }
img { max-width: 100%; display: block; }
.muted { color: var(--mut); } .small { font-size: 14px; }
.eyebrow { font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); margin-bottom: 6px; }
.splash { min-height: 100vh; display: grid; place-items: center; } .splash img { width: 180px; opacity: .9; }

/* En-tête et barre d'onglets */
header.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(8px + var(--safe-t)) 16px 8px; background: rgba(250,248,243,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .brand img { height: 38px; width: auto; }
header.top .me { width: 38px; height: 38px; border-radius: 50%; background: var(--g); color: #fff; display: grid; place-items: center; font-weight: 600; text-decoration: none; }
main { max-width: 640px; margin: 0 auto; padding-bottom: calc(88px + var(--safe-b)); }
.pad { padding: 16px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--mut); font-size: 11px; font-weight: 600; padding: 4px 0; min-height: 48px; justify-content: center; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--g); } .tabbar a.on svg { stroke: var(--coral); }

/* Cartes et boutons */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin: 0 0 14px; box-shadow: 0 6px 20px rgba(31,58,51,.05); }
.card.flush { padding: 0; overflow: hidden; } .card.flush video { width: 100%; display: block; aspect-ratio: 16/9; background: #000; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border: 0; border-radius: 999px; background: var(--g); color: #fff; font: 600 16px var(--sans); text-decoration: none; cursor: pointer; margin: 4px 6px 4px 0; }
.btn.alt { background: transparent; color: var(--g); border: 2px solid var(--g); }
.btn.gold { background: var(--gold); color: var(--g); }
.btn.danger { background: var(--coral); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
button.link { background: none; border: 0; color: var(--g); text-decoration: underline; font: inherit; padding: 8px 0; cursor: pointer; }
.chip { border: 1px solid var(--pale); background: var(--soft); color: var(--g); border-radius: 999px; padding: 6px 14px; font: 600 14px var(--sans); min-height: 36px; cursor: pointer; }
.note { background: var(--soft); border: 1px solid var(--pale); border-radius: 12px; padding: 10px 14px; }
.pill { display: inline-block; background: var(--soft); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: 14px; color: var(--g); }
.safety { border: 2px solid var(--coral); color: #8E3E2A; box-shadow: none; font-size: 15px; }
.safety ul { margin: 8px 0 0; padding-left: 20px; } .safety li { margin-bottom: 4px; }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid2 .card { margin: 0 0 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
label { font-weight: 600; font-size: 14px; color: var(--g); display: block; }
input:not([type=checkbox]), select { width: 100%; min-height: 48px; padding: 10px 14px; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; font: 16px var(--sans); background: #fff; color: var(--ink); }
input.code { font-size: 28px; letter-spacing: .4em; text-align: center; font-family: var(--serif); }

/* Connexion */
.login { padding: calc(32px + var(--safe-t)) 24px 40px; max-width: 440px; }
.login-logo { width: 190px; margin: 0 auto 24px; }
.lang-switch { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.lang-switch button, .seg button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font: 600 14px var(--sans); color: var(--mut); min-height: 40px; cursor: pointer; }
.lang-switch button.on, .seg button.on { background: var(--g); color: #fff; border-color: var(--g); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* Démo */
.demobar { background: var(--gold); color: var(--g); font-size: 12px; padding: calc(4px + var(--safe-t)) 10px 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.demobar button { border: 0; background: rgba(255,255,255,.6); border-radius: 999px; padding: 3px 9px; font: 600 12px var(--sans); color: var(--g); cursor: pointer; }

/* Semaine */
.hero, .whead { background: var(--g); color: #fff; padding: 22px 16px 26px; }
.hero h1, .whead h1 { color: #fff; } .hero .eyebrow, .whead .eyebrow { color: var(--gold); }
.whead p { margin: 0; opacity: .9; }
.hero + .card, .hero ~ .card { margin: 14px 16px; }
.subtabs { position: sticky; top: calc(55px + var(--safe-t)); z-index: 15; display: flex; gap: 6px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { flex: 0 0 auto; white-space: nowrap; text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px; background: var(--soft); border: 1px solid var(--pale); color: var(--g); }
.subtabs a.on { background: var(--g); color: #fff; border-color: var(--g); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 8px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border-radius: 12px; text-decoration: none; color: var(--g); font-size: 13px; font-weight: 600; background: #fff; border: 1px solid var(--line); min-height: 52px; }
.day.on { background: var(--g); color: #fff; border-color: var(--g); }
.day.today:not(.on) { border-color: var(--gold); border-width: 2px; }
.day.off { opacity: .35; }
.day i { width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.day i.part { background: var(--gold); } .day i.full { background: var(--sage); } .day.on i.full { background: #9FC2B4; }
.dayname { margin-top: 10px; }
.med h3 { margin-bottom: 4px; }
.btn.play { width: 100%; font-size: 18px; min-height: 56px; }
.script { font-family: var(--serif); font-size: 17px; line-height: 1.6; color: var(--g); }
details summary { cursor: pointer; font-weight: 600; color: var(--g); padding: 8px 0; }
.counter { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-weight: 600; color: var(--g); }
.dots { display: flex; gap: 6px; margin-top: 8px; } .dots i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); } .dots i.on { background: var(--gold); }
.checks .check { padding: 12px 0; border-bottom: 1px solid var(--line); } .checks .check:last-child { border: 0; }
.check label, .mission-done { display: flex; gap: 12px; align-items: center; font-size: 16px; color: var(--ink); cursor: pointer; }
input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--g); flex: 0 0 auto; margin: 0; }
.check p, .check a.small { margin: 6px 0 0 38px; display: block; }
ul.mini { margin: 4px 0 0 38px; padding-left: 18px; font-size: 14px; }
.metric { margin: 12px 0; }
.mrow { display: flex; justify-content: space-between; font-weight: 600; color: var(--g); margin-bottom: 6px; }
.mrow b { font-family: var(--serif); font-size: 20px; color: var(--coral); }
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
.scale button { min-height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 9px; font: 600 14px var(--sans); color: var(--mut); padding: 0; cursor: pointer; }
.scale button.on { background: var(--g); color: #fff; border-color: var(--g); }
.scale button:disabled { opacity: .5; }
.finish .btn { width: 100%; margin-top: 12px; } .finish .ok { font-weight: 700; color: var(--g); font-size: 18px; margin: 0; }
.lead { font-family: var(--serif); font-size: 19px; color: var(--g); line-height: 1.4; }
ol.goals { list-style: none; padding: 0; margin: 0; counter-reset: g; }
ol.goals li { counter-increment: g; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
ol.goals li::before { content: counter(g); flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--g); color: #fff; font-family: var(--serif); display: grid; place-items: center; font-size: 15px; }
ul.pts { padding-left: 20px; margin: 0; } ul.pts li { margin-bottom: 8px; }
.stat { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 10px; } .stat b { font-family: var(--serif); font-size: 44px; color: var(--gold); line-height: 1; } .stat span { font-weight: 600; color: var(--g); }
.card.mission { background: var(--g); color: #fff; } .card.mission .eyebrow { color: var(--gold); } .card.mission .lead { color: #fff; }
.card.rm { border-left: 5px solid var(--coral); } .card.keep { border-left: 5px solid var(--sage); }
.card.green { background: var(--soft); border-color: var(--pale); }
ul.meals { padding-left: 20px; margin: 0; } ul.meals li { margin-bottom: 8px; }
ul.shop { list-style: none; padding: 0; margin: 0; } ul.shop li { padding: 8px 0; border-bottom: 1px solid var(--line); } ul.shop label { display: flex; gap: 12px; align-items: center; font-weight: 500; color: var(--ink); font-size: 16px; }
.pdfpage { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; }
.timer { text-align: center; } .timer .big { font-family: var(--serif); font-size: 96px; line-height: 1; color: var(--g); margin: 8px 0; }
.timer.work { border: 3px solid var(--coral); } .timer.rest { border: 3px solid var(--sage); background: var(--soft); }
.timer .row { justify-content: center; } .bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 12px 0; } .bar i { display: block; height: 100%; background: var(--gold); }

/* Liste des semaines */
.progress { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; } .progress i { display: block; height: 100%; background: var(--gold); }
h2.phase { font-size: 15px; font-family: var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--coral); margin: 22px 0 10px; }
.wk { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; text-decoration: none; color: var(--ink); min-height: 64px; }
.wk .num { flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--soft); color: var(--g); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; }
.wk .txt { flex: 1; min-width: 0; } .wk .txt b { display: block; color: var(--g); } .wk .txt small { color: var(--mut); font-size: 13px; }
.wk .st { font-size: 20px; color: var(--g); }
.wk.done .num { background: var(--sage); color: #fff; } .wk.open .num { background: var(--g); color: #fff; } .wk.locked { opacity: .6; background: transparent; }

/* Progrès */
.chart { width: 100%; height: auto; } .chart text { font-size: 10px; fill: var(--mut); font-family: var(--sans); } .chart text.key { fill: var(--g); font-weight: 700; } .chart .grid { stroke: var(--line); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 5px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl th, .tbl td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: center; } .tbl th:first-child, .tbl td:first-child { text-align: left; }

/* Admin */
.client { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; text-decoration: none; color: var(--ink); }
.client small { display: block; color: var(--mut); font-size: 13px; } .client b { color: var(--g); }
.client .kpi { text-align: right; font-weight: 700; color: var(--g); white-space: nowrap; } .client.off { opacity: .55; }
.install { border: 2px dashed var(--gold); }

#toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--g); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; transition: .25s; pointer-events: none; z-index: 50; max-width: 90vw; text-align: center; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 700px) { h1 { font-size: 32px; } .hero, .whead { padding: 32px 24px 36px; } }
@media (max-width: 360px) { .scale button { font-size: 12px; min-height: 36px; } .grid2 { grid-template-columns: 1fr; } }

/* Les titres ne passent plus sous les barres collantes */
#timer, .card, h1, h2 { scroll-margin-top: 130px; }

/* Écouter (voix off) : tout se voit ET s'écoute */
.listen { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; margin: 8px 0 0; border-radius: 999px; border: 2px solid var(--g); background: #fff; color: var(--g); font: 600 15px var(--sans); cursor: pointer; }
.listen.sm { min-height: 40px; padding: 6px 14px; font-size: 14px; }
.listen.on { background: var(--g); color: #fff; }
.listen.big { min-height: 52px; padding: 10px 26px; font-size: 17px; background: var(--g); color: #fff; }
.listen.big.on { background: var(--gold); border-color: var(--gold); color: var(--g); }
.check .listen { display: flex; width: fit-content; }

/* Présentation diapo par diapo */
.slides .slide-frame { position: relative; margin: 6px -4px 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--soft); aspect-ratio: 16/9; }
.slides .slide-frame img { width: 100%; height: 100%; object-fit: contain; touch-action: pan-y; user-select: none; -webkit-user-drag: none; }
.slides .slide-num { position: absolute; right: 8px; bottom: 8px; background: rgba(31,58,51,.85); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.slide-ctrl { display: flex; align-items: center; justify-content: center; gap: 14px; }
.slide-ctrl .listen { margin: 0; }
.round { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--g); background: #fff; color: var(--g); font: 600 28px/1 var(--sans); cursor: pointer; display: grid; place-items: center; padding: 0 0 3px; }
.round:disabled { opacity: .3; cursor: default; }
.slide-dots { display: flex; justify-content: center; gap: 0; margin: 12px 0 6px; }
.slide-dots button { width: 22px; height: 28px; flex: 0 1 22px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.slide-dots button::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pale); }
.slide-dots button.on::after { width: 9px; background: var(--coral); box-shadow: 0 0 0 3px rgba(184,85,59,.2); }
.slides .auto { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; margin: 4px 0 8px; min-height: 40px; }
.slides .auto input { width: 20px; height: 20px; accent-color: var(--g); }
.slides details { margin-bottom: 8px; }
