/* YESMAN Move & Cook — feuille de style.
   Les couleurs de marque viennent de variables, remplacées par celles de la franchise connectée. */
:root {
  --move: #1EA7FF; --cook: #F5A623; --fond: #011021; --coach2: #C084FC;
  --ink: #FFFFFF; --ink-2: rgba(255,255,255,.78); --ink-3: rgba(255,255,255,.68);
  --card: rgba(255,255,255,.06); --line: rgba(255,255,255,.12);
  --good: #4ADE80; --bad: #F87171; --warn: #F59E0B;
  --r: 18px; --font: Inter, system-ui, -apple-system, Segoe UI, sans-serif; --display: Poppins, Inter, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.2; }
h1 { font-size: 28px; font-weight: 800; }
h2, .h2 { font-size: 17px; font-weight: 700; }
h1:focus { outline: none; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cook); color: #011021; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--move); outline-offset: 2px; }

/* Utilitaires */
.muted { color: var(--ink-2); } .small { font-size: 13px; } .strong { font-weight: 700; }
.good { color: var(--good); } .bad { color: var(--bad); }
.stack { display: flex; flex-direction: column; gap: 16px; } .stack-sm { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; } .gap { gap: 12px; } .gap-sm { gap: 8px; } .wrap { flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.self-end { align-self: flex-end; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.big { font-family: var(--display); font-weight: 800; font-size: 24px; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--move); }
.hint { font-size: 12.5px; color: var(--ink-3); }
.req { color: var(--bad); }

/* Cartes et éléments */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.notice { border-color: var(--cook); background: rgba(245,166,35,.08); }
.alert-card { border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.07); }
.alert-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.25); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.1); white-space: nowrap; }
.pill-good { background: rgba(74,222,128,.16); color: var(--good); }
.pill-bad { background: rgba(248,113,113,.16); color: var(--bad); }
.pill-cook { background: rgba(245,166,35,.18); color: var(--cook); }
.pill-move { background: rgba(30,167,255,.16); color: var(--move); }
.sq-hors { border: 1px solid rgba(255,255,255,.12); }
.avatar { width: 56px; height: 56px; flex-shrink: 0; border-radius: 28px; display: grid; place-items: center; font: 800 22px var(--display); color: #011021; background: linear-gradient(135deg, var(--move), var(--cook)); }
.bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 4px; }
.bar-grad { background: linear-gradient(90deg, var(--move), var(--cook)); }
.kv { display: flex; justify-content: space-between; gap: 4px 12px; font-size: 14px; }
.kv > span { color: var(--ink-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; flex-shrink: 0; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font: 700 14px var(--font); cursor: pointer; text-decoration: none; background: rgba(255,255,255,.1); color: var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-cook { background: var(--cook); color: #011021; }
.btn-move { background: var(--move); color: #011021; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.28); }
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: transparent; color: var(--ink); font: 600 13px var(--font); cursor: pointer; }
.chip.on { background: var(--move); border-color: var(--move); color: #011021; }

/* Formulaires */
.field { display: flex; flex-direction: column; gap: 6px; }
label, .label { font-size: 13px; font-weight: 600; display: flex; align-items: center; }
input, select, textarea { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.25); color: var(--ink); font: 15px var(--font); color-scheme: dark; }
textarea { padding: 10px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.5); }
.fs { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.fs > legend { font: 700 16px var(--display); padding: 0 6px; }
.radios { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.radios label, .check { gap: 8px; font-weight: 500; font-size: 14px; min-height: 36px; }
.radios input, .check input, .check-card input { width: 20px; height: 20px; min-height: 0; accent-color: var(--move); flex-shrink: 0; }
.check-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font-weight: 500; }
.check-card.on { border-color: var(--move); }
.check-card > span { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.form-msg:empty { display: none; }
.code-input { font: 800 26px var(--display); letter-spacing: .3em; text-align: center; }
.form-msg { font-size: 14px; }
.form-msg.error { color: var(--bad); font-weight: 600; }
.compact label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.kcal-box { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.06); }
.kcal-total { font: 800 24px var(--display); }
.macro-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: rgba(255,255,255,.12); }
.macro-bar span { display: block; height: 100%; transition: width .2s; }

/* Pages */
.center-page { min-height: 100vh; max-width: 440px; margin: 0 auto; padding: 48px 20px 32px; display: flex; flex-direction: column; gap: 18px; justify-content: center; text-align: left; }
.logo-lg { width: 280px; align-self: center; }
.logo-md { width: 180px; display: block; }
.logo-sm { height: 40px; }
.tagline { text-align: center; color: var(--cook); font-weight: 700; }
.narrow { max-width: 520px; margin: 0 auto; padding: 40px 20px; }
.phone-shell { max-width: 520px; margin: 0 auto; min-height: 100vh; }
.topbar { padding: 18px 20px 6px; }
.pad { padding: 8px 20px 32px; }

/* Espace coach */
.coach-shell { display: flex; flex-wrap: wrap; align-items: flex-start; min-height: 100vh; }
.sidebar { flex: 1 1 220px; max-width: 100%; padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav-item.active { background: rgba(255,255,255,.1); color: var(--move); font-weight: 700; }
.nav-item.disabled { opacity: .55; }
.nav-item { white-space: nowrap; }
.nav-item small { margin-left: auto; font-size: 11px; }
.who { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--card); }
.coach-main { flex: 999 1 560px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.head-actions .field { width: 260px; max-width: 100%; }
.back { align-self: flex-start; color: var(--move); text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi-v { font: 800 30px var(--display); }
.kpi-v.good { color: var(--good); } .kpi-v.bad { color: var(--bad); } .kpi-v.cook { color: var(--cook); }
.empty { align-items: flex-start; }
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
.table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--card); padding: 12px 14px; }
.table td { padding: 10px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.squares { display: inline-flex; gap: 3px; }
.sq { display: inline-block; width: 16px; height: 16px; border-radius: 4px; box-sizing: border-box; }
.sq-vert { background: #22C55E; } .sq-orange { background: #F59E0B; } .sq-rouge { background: #DC2626; }
.sq-libre { background: #000; border: 1px solid rgba(255,255,255,.4); } .sq-vide { border: 1px dashed rgba(255,255,255,.4); }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(18px, 1fr)); gap: 4px; }
.strip .sq { width: 100%; height: 26px; }
.sheet-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.sheet-grid > :first-child { flex: 999 1 520px; min-width: 0; }
.sheet-grid > :last-child { flex: 1 1 320px; min-width: 0; }
.undo { padding: 8px 10px 8px 12px; border-radius: 10px; background: rgba(74,222,128,.12); border: 1px solid rgba(74,222,128,.4); }
.history { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.history strong { color: var(--ink); }
.note { padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 4px; }
.note p { white-space: pre-wrap; font-size: 14px; }

/* ---------- Espace coaché ---------- */
.stack-xs { display: flex; flex-direction: column; gap: 4px; }
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }
.self-center { align-self: center; } .self-start { align-self: flex-start; }
.center-text { text-align: center; align-items: center; }
.cap::first-letter { text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.huge { font: 800 48px/1.05 var(--display); letter-spacing: -.01em; }
.h1 { font-size: 26px; font-weight: 800; }
.cook { color: var(--cook); }
.link { color: var(--move); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; }
.bar.thin { height: 6px; }
.pill-free { background: #000; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.sep { padding-top: 10px; border-top: 1px solid var(--line); }
.list-lines { list-style: none; margin: 0; padding: 0; }
.list-lines li { min-height: 48px; border-bottom: 1px solid rgba(255,255,255,.08); }
.avatar.sm { width: 40px; height: 40px; font-size: 17px; }
.danger { color: var(--bad); border-color: rgba(248,113,113,.5); }
.danger-solid { background: var(--bad); color: #1b0505; }

.phone-shell.with-tabs { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.card-link { text-decoration: none; color: inherit; transition: border-color .15s; }
.card-link:hover { border-color: rgba(255,255,255,.3); }
.card-link.row { align-items: center; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 0;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(1,16,33,.94); border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tab { flex: 1 1 0; max-width: 104px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--ink-3); font-size: 11.5px; font-weight: 600; border-radius: 12px; }
.tab.on { color: var(--move); }
.tab-main { color: var(--ink); }
.tab-plus { position: relative; width: 44px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--move); color: #011021; }
.tab-plus .badge { position: absolute; top: -7px; right: -9px; margin: 0; box-shadow: 0 0 0 2px var(--fond); }
.tab-main.on .tab-plus { box-shadow: 0 0 0 3px rgba(30,167,255,.35); }

.page-top { display: flex; align-items: flex-start; gap: 10px; padding-top: 14px; }
.page-top h1 { font-size: 24px; }
.icon-btn { flex-shrink: 0; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; padding: 0; }
.icon-btn.sm { width: 36px; height: 36px; border-color: transparent; background: transparent; color: var(--ink-3); }
.icon-btn.sm:hover { color: var(--bad); }
.icon-btn.ghost { visibility: hidden; }

.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x .chip { flex-shrink: 0; display: inline-flex; align-items: center; text-decoration: none; }
.segs-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.seg { min-height: 42px; display: grid; place-items: center; border-radius: 10px; text-decoration: none; font-weight: 700; color: var(--ink-2); }
.seg.on { background: var(--move); color: #011021; }
.segs { display: flex; gap: 4px; margin-top: 4px; }
.segs span { flex: 1; max-width: 26px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.16); }
.segs span.on { background: var(--move); }

.badge-sm { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.badge-sm.locked, .badge-sm.dim { filter: grayscale(1); opacity: .55; }
.badge-xl { width: 180px; height: 180px; object-fit: contain; align-self: center; }
.logo-club { width: 240px; max-width: 80%; margin: 14px auto 0; display: block; }

.free-card.dashed { border-style: dashed; }
.big-sq { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.entries li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.07); }
.entries li .grow { display: flex; flex-direction: column; gap: 2px; }

/* Fenêtre d'ajout d'aliment */
dialog.sheet { margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92vh; padding: 0; border: 1px solid var(--line); border-radius: 22px 22px 0 0; background: #071A30; color: var(--ink); overflow: auto; }
dialog.sheet::backdrop, dialog.celebrate::backdrop { background: rgba(0,0,0,.6); }
.sheet-body { padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 22px; } }
.picks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pick { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; min-height: 56px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 500 14px var(--font); cursor: pointer; }
.pick:hover { border-color: var(--move); }
.pick svg { color: var(--move); flex-shrink: 0; }
.scan-box { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #000; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: var(--cook); box-shadow: 0 0 12px var(--cook); }

/* Célébration */
dialog.celebrate { width: min(420px, calc(100% - 32px)); padding: 28px 22px; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(circle at 50% 20%, #12335a, #071A30 70%); color: var(--ink); overflow: hidden; }
.cel-body { position: relative; z-index: 1; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: ymc-fall 2.4s ease-in infinite; }
.pop { animation: ymc-pop .6s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes ymc-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ymc-fall { 0% { transform: translateY(-40px) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(260px) rotate(220deg); opacity: 0; } }

/* Badges */
.badge-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.badge-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font-family: var(--font); }
.badge-tile img { width: 100%; max-width: 72px; aspect-ratio: 1; object-fit: contain; filter: grayscale(1); opacity: .45; }
.badge-tile.won img { filter: none; opacity: 1; }
.badge-tile.current img { filter: grayscale(.4); opacity: .85; }
.badge-tile.sel { border: 2px solid #fff; }
.badge-tile .lock { position: absolute; top: 6px; right: 6px; color: var(--ink-3); }
.badge-tile:not(.won) .small { color: var(--ink-3); }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rank li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; border-radius: 10px; }
.rank li.me { background: rgba(30,167,255,.14); }
.rank .gap-row { justify-content: center; color: var(--ink-3); min-height: 20px; }
.pos { width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: rgba(255,255,255,.1); flex-shrink: 0; }
.pos.gold { background: #F5C542; color: #2a1d00; } .pos.silver { background: #C9D2DC; color: #111; } .pos.bronze { background: #C98A4B; color: #1d0f00; }

/* Calendrier */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.cal-dow.we { color: var(--move); }
.cal-cell { position: relative; aspect-ratio: 1; border-radius: 12px; border: 0; display: grid; place-items: center; font: 700 15px var(--font); color: var(--ink); background: rgba(255,255,255,.05); cursor: pointer; padding: 0; }
.cal-cell.blank { background: none; cursor: default; }
.st-vert { background: #22C55E; color: #011021; } .st-orange { background: #F59E0B; color: #011021; } .st-rouge { background: #DC2626; color: #fff; }
.st-libre { background: #000; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.st-vide { background: transparent; color: var(--ink-3); border: 1px dashed rgba(255,255,255,.4); }
.st-futur { background: rgba(255,255,255,.04); color: var(--ink-3); }
.st-hors, .st-hors-data { background: transparent; color: rgba(255,255,255,.4); }
.st-hors-data { box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--move); }
.cal-cell.sel { outline: 2px solid #fff; outline-offset: 1px; }
.cal-mark { position: absolute; right: 4px; bottom: 2px; font-size: 11px; line-height: 1; }
.cal-cell .dots { position: absolute; top: 3px; right: 3px; display: flex; gap: 2px; }
.rdv-dot { display: inline-block; width: 9px; height: 9px; border-radius: 5px; background: #fff; box-shadow: 0 0 0 2px #011021; }
.help-dot { margin: 4px 4px 0 4px; flex-shrink: 0; }
.sq-hors-help { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); }
.sq-today-help { box-shadow: inset 0 0 0 2px var(--move); }
.sq-sel-help { box-shadow: inset 0 0 0 2px #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sq { width: 12px; height: 12px; }
.legend .rdv-dot { box-shadow: none; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; }
.rdv-line { display: flex; flex-direction: column; gap: 4px; padding-left: 10px; border-left: 3px solid var(--move); }
.rdv-line.k-cuisine { border-color: var(--coach2); } .rdv-line.k-visio_individuelle, .rdv-line.k-visio_groupe { border-color: #fff; }
.rdv-card { border-left: 3px solid var(--move); }
.rdv-card.k-cuisine { border-left-color: var(--coach2); }

.chart { width: 100%; height: auto; display: block; }
.chart-labels { font: 600 11px var(--font); fill: var(--ink-3); }
.chart-vals { font: 700 12px var(--font); fill: var(--ink); }
.chart-grid { stroke: rgba(255,255,255,.08); stroke-width: 1; stroke-dasharray: 3 4; }
.spark-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }

.macros-today { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.help summary { cursor: pointer; font-weight: 700; min-height: 28px; display: flex; align-items: center; color: var(--move); }
.help[open] summary { margin-bottom: 10px; }
.help-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.help-list li { display: flex; gap: 10px; align-items: flex-start; }
.help-list .sq { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; }

.journal-wrap { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.journal { width: 100%; border-collapse: collapse; font-size: 14px; }
.journal th { position: sticky; top: 0; background: #0B1F38; text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 8px 10px; z-index: 1; }
.journal td { padding: 8px 10px; border-top: 1px solid rgba(255,255,255,.07); }
.journal .num { text-align: right; font-variant-numeric: tabular-nums; }
.journal tbody tr { cursor: pointer; }
.journal tbody tr:hover { background: rgba(255,255,255,.05); }
.journal tbody tr.sel { background: rgba(30,167,255,.16); }
.journal tbody tr:focus-visible { outline: 2px solid var(--move); outline-offset: -2px; }
.journal .sq { width: 14px; height: 14px; display: block; }
.meal-block { padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.2); }

.sub summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--move); min-height: 36px; display: flex; align-items: center; }
.sub[open] summary { margin-bottom: 8px; }

.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font: 800 11px var(--font); margin-left: auto; }
.badge[hidden] { display: none; }
.mail-btn { position: relative; }
.mail-btn .badge { position: absolute; top: -6px; right: -6px; margin: 0; }

/* Planning */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-day { display: flex; flex-direction: column; gap: 6px; min-height: 140px; padding: 10px 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.week-day.today { border-color: var(--move); }
.week-day.past { opacity: .7; }
.week-day header strong { font-size: 13px; }
.appt { display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%; padding: 8px 8px 8px 10px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; color: var(--ink); font-family: var(--font);
  background: linear-gradient(var(--c1), var(--c2)) left / 4px 100% no-repeat, rgba(255,255,255,.06); }
.appt:hover { border-color: rgba(255,255,255,.35); }
@media (max-width: 1100px) { .week { grid-template-columns: 1fr; } .week-day { min-height: 0; } .week-day:not(.today) .muted.small:only-of-type { display: none; } }
.chip-check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); font: 600 13px var(--font); cursor: pointer; }
.chip-check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--move); }
.chip .dot, .chip-check .dot { margin-right: 0; border-radius: 5px; }
.pick-list { max-height: 180px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0 12px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 12px; }
.pick-list .check { font-size: 14px; }

/* Messagerie */
.inbox { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; align-items: start; }
.inbox-list { display: flex; flex-direction: column; gap: 8px; max-height: 75vh; overflow: auto; }
.threads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.thread-item { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.thread-item:hover { background: rgba(255,255,255,.05); }
.thread-item.on { background: rgba(30,167,255,.16); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-thread { display: flex; flex-direction: column; gap: 10px; }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; min-height: 200px; overflow: auto; padding: 4px; }
.phone-shell .thread { max-height: calc(100vh - 330px); }
.bubble { max-width: 82%; align-self: flex-start; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 2px; }
.bubble.mine { align-self: flex-end; background: rgba(30,167,255,.22); border-radius: 14px 14px 4px 14px; }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .bwho { color: var(--ink-3); }
.day-sep { align-self: center; font-size: 12px; color: var(--ink-3); padding: 4px 0; }
.composer textarea { min-height: 44px; resize: none; padding: 10px 12px; }
.only-mobile { display: none; }
@media (max-width: 760px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox.has-thread .inbox-list { display: none; }
  .inbox:not(.has-thread) .inbox-thread { display: none; }
  .only-mobile { display: inline-flex; }
}

.stat-tile { display: flex; flex-direction: column; gap: 4px; }
.line-key { display: inline-block; width: 16px; height: 4px; border-radius: 2px; }
.spark { width: 100%; height: 28px; display: block; margin-top: 2px; }

.team { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.team li { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.07); flex-wrap: wrap; }
.team li:first-child { border-top: 0; }

/* Messages temporaires */
.toasts { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(520px, calc(100% - 32px)); }
.toast { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #13284A; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.4); font-size: 14px; }
.toast-good { border-color: rgba(74,222,128,.5); } .toast-error { border-color: rgba(248,113,113,.6); }

@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-v { font-size: 26px; }
  .coach-main { padding: 16px; }
  .sidebar { padding: 16px; gap: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Coach-utilisateur : bascule vers l'espace coach et bandeau « vue coaché » */
.row-end { display: flex; justify-content: flex-end; }
.coach-switch { gap: 6px; }
.viewas-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--cook); color: #1a1205; font-size: 14px; }
.viewas-bar span { flex: 1; }
.viewas-bar .btn { background: rgba(0,0,0,.18); color: inherit; border: 0; }
.phone-shell.viewing main input:disabled, .phone-shell.viewing main textarea:disabled { opacity: .7; }

/* Équipes */
.team-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--team, var(--move)); flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--team, var(--move)) 30%, transparent); }
.team-dot.lg { width: 22px; height: 22px; }
.team-head { border-color: color-mix(in srgb, var(--team) 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--team) 18%, transparent), var(--card)); }
.team-teaser { color: inherit; text-decoration: none; align-items: center; }
.rank li .team-dot { margin-right: 4px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; }
.swatch input:checked + span { border-color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.4); }
.swatch input:focus-visible + span { outline: 2px solid var(--move); outline-offset: 2px; }
.locked-card h2 { display: flex; align-items: center; gap: 8px; }
[hidden] { display: none !important; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }

/* Démo coach : bandeau avec bascule invité / parcours */
.demo-bar { flex-wrap: wrap; row-gap: 8px; }
.demo-bar > span { display: inline-flex; align-items: center; gap: 6px; }
.demo-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(0,0,0,.2); }
.demo-seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.demo-seg button[aria-pressed="true"] { background: #1a1205; color: var(--cook); }

/* Écrans sous cadenas */
.locked-card { align-items: flex-start; border-color: color-mix(in srgb, var(--cook) 55%, transparent); }
.lock-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--cook) 16%, transparent); color: var(--cook); }
.locked-wrap { position: relative; }
.locked-sample { display: flex; flex-direction: column; gap: 12px; filter: blur(3px); opacity: .5; pointer-events: none; user-select: none; }
.locked-over { position: absolute; inset: 40px 6px auto; }
.locked-over .locked-card { background: rgba(1,16,33,.94); }
.cal-sample { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-sample .sq { width: 100%; aspect-ratio: 1; height: auto; }

/* Parcours */
.parcours-card .eyebrow.tone-cook { color: var(--cook); }
.parcours-card .eyebrow.tone-move { color: #6CC6FF; }
.dots { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.dots li { display: flex; gap: 8px; align-items: center; }
.dots li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-cook::before { background: var(--cook); } .dot-move::before { background: var(--move); }
.price-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--cook) 12%, transparent); border: 1px solid color-mix(in srgb, var(--cook) 45%, transparent); }
.price-box .sep-cook { padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--cook) 35%, transparent); align-items: baseline; }
.price-big { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--cook); line-height: 1; }
.right { text-align: right; }
.phone-shell.viewing .composer { display: none; }
.demo-bar { padding: 8px 12px; gap: 8px; font-size: 13px; }
.demo-bar > span { white-space: nowrap; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.demo-bar .demo-seg button { padding: 0 10px; }
.demo-bar > .btn { padding: 0 10px; }

/* Plats YESMAN */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 2px dashed color-mix(in srgb, var(--cook) 55%, transparent); border-radius: 16px; cursor: pointer; text-align: center; }
.dropzone:hover, .dropzone:focus-within { background: color-mix(in srgb, var(--cook) 8%, transparent); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.draft-table input { width: 100%; min-height: 38px; padding: 6px 8px; font-size: 14px; }
.draft-table .w-name { min-width: 280px; }
.draft-table .w-num { min-width: 76px; text-align: right; }
.draft-table td { vertical-align: middle; }
.per-portion { min-width: 110px; }
.week-card summary { cursor: pointer; list-style: none; gap: 8px; }
.week-card summary::-webkit-details-marker { display: none; }
.week-card[open] summary { margin-bottom: 10px; }
.lib-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lib-list li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.lib-list li:last-child { border-bottom: 0; padding-bottom: 0; }
details.older summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.demo-bar .demo-reset { min-width: 36px; padding: 0 8px; font-size: 18px; line-height: 1; background: rgba(0,0,0,.18); color: inherit; border: 0; }
.request-card { border-color: color-mix(in srgb, var(--cook) 60%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--cook) 12%, transparent), var(--card)); }
.request-card h2 { display: flex; align-items: center; gap: 8px; }
.request-card .badge { position: static; }
.parcours-form .check-card { padding: 10px 12px; }

/* Onglet « Demandes » qui s'allume */
.badge.badge-cook { background: var(--cook); color: #1a1205; }
.nav-item.lit { color: var(--cook); background: color-mix(in srgb, var(--cook) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cook) 55%, transparent); animation: req-glow 2.4s ease-in-out infinite; }
@keyframes req-glow { 0%, 100% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cook) 55%, transparent), 0 0 0 0 color-mix(in srgb, var(--cook) 0%, transparent); }
  50% { box-shadow: inset 0 0 0 1px var(--cook), 0 0 16px 2px color-mix(in srgb, var(--cook) 45%, transparent); } }
@media (prefers-reduced-motion: reduce) { .nav-item.lit { animation: none; } }
.draft-row { padding: 14px; }
.draft-row .field.compact .w-num { width: 96px; text-align: right; }
.draft-row .self-end { align-self: flex-end; margin-bottom: 4px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--move); text-decoration: underline; cursor: pointer; font: inherit; }
.recipe-missing { padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--cook) 10%, transparent); }
.per-box { margin: 0; }
.phone-shell.readonly #pane button, .phone-shell.readonly #pane form button[type=submit] { display: none; }

/* Vue coach : détail des repas sur l'accueil */
.meal-detail { display: flex; flex-direction: column; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.meal-fold { border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.meal-fold summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; }
.meal-fold summary::-webkit-details-marker { display: none; }
.meal-fold summary svg { transition: transform .2s; flex: none; }
.meal-fold[open] summary svg { transform: rotate(90deg); }
.meal-fold[data-empty] summary { cursor: default; pointer-events: none; }
.meal-fold[data-empty] summary .grow { opacity: .6; }
.meal-fold .entries { margin-bottom: 10px; }

/* Fiche coaché : gérer le compte */
.danger-zone { border-color: rgba(239,68,68,.25); }
.delete-box { border: 1px solid rgba(239,68,68,.45); border-radius: 12px; padding: 12px; background: rgba(239,68,68,.06); }
.btn-danger { background: #DC2626; color: #fff; border-color: #DC2626; }
.btn-danger:hover { background: #B91C1C; }
.btn-link-danger { background: none; border: none; color: #F87171; padding-left: 0; text-decoration: underline; text-underline-offset: 3px; }

/* Installer l'app */
.install-card { border-color: rgba(30,167,255,.35); }
.install-icon { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* Photos et cartes des coachs */
.avatar.photo { object-fit: cover; padding: 0; background: #0B1B2E; }
.avatar.md { width: 58px; height: 58px; border-radius: 50%; }
.avatar.xs { width: 22px; height: 22px; border-radius: 50%; font-size: 11px; vertical-align: middle; margin-right: 6px; }
.avatar.photo.ring-move { box-shadow: 0 0 0 2px var(--move); }
.avatar.photo.ring-cook { box-shadow: 0 0 0 2px var(--cook); }
.avatar.md.photo.ring-move { box-shadow: 0 0 0 3px var(--move); }
.avatar.md.photo.ring-cook { box-shadow: 0 0 0 3px var(--cook); }
.coach-list { display: flex; flex-direction: column; }
.coach-card { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.coach-card:first-child { border-top: 0; padding-top: 4px; }
.coach-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ctag { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.ctag.move { background: rgba(30,167,255,.15); color: #6CC6FF; }
.ctag.cook { background: rgba(245,166,35,.15); color: #FFC567; }
.avatar-stack { display: flex; flex: none; }
.avatar-stack .avatar + .avatar { margin-left: -12px; }
.bwho { display: inline-flex; align-items: center; }
.card-form-preview { padding: 12px; border: 1px dashed var(--line, rgba(255,255,255,.15)); border-radius: 12px; }
