
/* Layout: one phone column (cards on a cool grey ground, bottom tab bar); from 900px the tab bar becomes a left rail. */
:root{
  --bg:#F1F1F4; --surface:#FFFFFF; --surface-2:#E6E6EB; --fg:#16161A; --muted:#85858F; --line:#ECECF0;
  --accent:#D63A41; --accent-soft:#FBE4E5; --accent-fg:#FFFFFF;
  --amber:#E3A12F; --green:#2E9C69; --blue:#3C6FD8; --violet:#8A5BD6;
  --shadow:0 1px 2px rgba(20,20,30,.04),0 6px 24px rgba(20,20,40,.05);
  --scrim:rgba(14,14,20,.38);
  --font:"Figtree",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --r-card:22px; --r-ctl:14px;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#0F0F12; --surface:#1B1B20; --surface-2:#26262D; --fg:#F2F2F5; --muted:#9696A1; --line:#2A2A31;
  --accent:#F0545B; --accent-soft:#3A1D21; --accent-fg:#FFFFFF;
  --amber:#F0B14A; --green:#45B985; --blue:#6E95EA; --violet:#A786E6;
  --shadow:0 1px 2px rgba(0,0,0,.3); --scrim:rgba(0,0,0,.55); color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0F0F12; --surface:#1B1B20; --surface-2:#26262D; --fg:#F2F2F5; --muted:#9696A1; --line:#2A2A31;
  --accent:#F0545B; --accent-soft:#3A1D21; --accent-fg:#FFFFFF;
  --amber:#F0B14A; --green:#45B985; --blue:#6E95EA; --violet:#A786E6;
  --shadow:0 1px 2px rgba(0,0,0,.3); --scrim:rgba(0,0,0,.55); color-scheme:dark}

*{box-sizing:border-box}
html,body{background:var(--bg)}
body{color:var(--fg);font-family:var(--font);font-size:16px;line-height:1.4;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:8px}
svg{display:block}
.tabular{font-variant-numeric:tabular-nums}

.shell{max-width:560px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:18px calc(110px + env(safe-area-inset-bottom,0px))}
main{display:flex;flex-direction:column;gap:16px}

/* header */
.top{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding-top:6px}
.top .eyebrow{color:var(--muted);font-size:15px;font-weight:500;text-transform:capitalize}
.top h1{margin:2px 0 0;font-size:34px;font-weight:800;letter-spacing:-.02em;line-height:1.05;text-wrap:balance}
.iconbtn{width:48px;height:48px;border-radius:50%;background:var(--surface);box-shadow:var(--shadow);display:grid;place-items:center;position:relative;flex:none}
.iconbtn .badge{position:absolute;top:9px;right:10px;min-width:10px;height:10px;border-radius:6px;background:var(--accent);border:2px solid var(--surface)}
.iconbtn .badge.n{min-width:18px;height:18px;top:4px;right:3px;font-size:11px;font-weight:700;color:var(--accent-fg);display:grid;place-items:center;padding:0 4px}

.card{background:var(--surface);border-radius:var(--r-card);box-shadow:var(--shadow)}
.banner{border-radius:16px;padding:12px 14px;font-size:14px;background:var(--surface-2);color:var(--fg)}
.banner b{font-weight:700}

/* progress */
.progress{display:flex;align-items:center;gap:18px;padding:18px 20px}
.ring{position:relative;width:72px;height:72px;flex:none}
.ring svg{width:72px;height:72px;transform:rotate(-90deg)}
.ring .pct{position:absolute;inset:0;display:grid;place-items:center;font-weight:700;font-size:17px}
.progress h2{margin:0;font-size:19px;font-weight:700}
.progress p{margin:3px 0 0;color:var(--muted);font-size:15px}

/* segmented */
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:var(--surface-2);border-radius:16px;padding:4px;gap:4px}
.seg button{height:42px;border-radius:12px;font-weight:500;font-size:15px;color:var(--fg);opacity:.85}
.seg button[aria-pressed="true"]{background:var(--surface);font-weight:700;opacity:1;box-shadow:0 1px 3px rgba(0,0,0,.08)}

/* task list */
.list{padding:6px 0}
.group-label{font-size:12.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:12px 20px 4px}
.group-label.late{color:var(--accent)}
.row{display:flex;align-items:center;gap:14px;padding:12px 16px 12px 18px;min-height:68px}
.row + .row{border-top:1px solid var(--line)}
.check{width:30px;height:30px;border-radius:50%;border:2px solid #C9C9D0;flex:none;display:grid;place-items:center;transition:background .15s,border-color .15s}
:root[data-theme="dark"] .check{border-color:#4A4A54}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .check{border-color:#4A4A54}}
.check.on{background:var(--accent);border-color:var(--accent)}
.check svg{opacity:0}
.check.on svg{opacity:1}
.row .body{flex:1;min-width:0;text-align:left;display:flex;flex-direction:column;gap:3px}
.row .title{font-size:17px;font-weight:500;overflow-wrap:anywhere}
.row.done .title{text-decoration:line-through;color:var(--muted)}
.meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;color:var(--muted);font-size:14px}
.meta .late{color:var(--accent);font-weight:600}
.meta svg{width:14px;height:14px}
.sep{opacity:.6}
.mini{display:flex;align-items:center;gap:8px;margin-top:3px}
.mini .bar{flex:1;max-width:120px;height:5px;border-radius:3px;background:var(--surface-2);overflow:hidden}
.mini .bar i{display:block;height:100%;background:var(--green);border-radius:3px}
.mini span{font-size:12.5px;color:var(--muted)}
.dot{width:8px;height:8px;border-radius:50%;flex:none}
.dot.p2{background:var(--accent)} .dot.p1{background:var(--amber)}
.avatar{width:22px;height:22px;border-radius:50%;flex:none;object-fit:cover;background:var(--surface-2)}
.pill{font-size:11.5px;font-weight:700;letter-spacing:.03em;padding:2px 7px;border-radius:99px;background:var(--surface-2);color:var(--muted)}
.lt{display:inline-flex;align-items:center;gap:5px}
.lt i{width:7px;height:7px;border-radius:50%;display:inline-block}

.add{display:flex;align-items:center;gap:14px;padding:18px 20px;width:100%;color:var(--accent);font-size:18px;font-weight:600}
.add .plus{width:30px;height:30px;border-radius:50%;background:var(--accent-soft);display:grid;place-items:center}

.empty{padding:28px 22px;text-align:center;color:var(--muted);display:flex;flex-direction:column;gap:12px;align-items:center}
.empty strong{color:var(--fg);font-size:17px}
.btn{height:46px;padding:0 18px;border-radius:var(--r-ctl);font-weight:700;font-size:15.5px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn.primary{background:var(--accent);color:var(--accent-fg)}
.btn.soft{background:var(--accent-soft);color:var(--accent)}
.btn.ghost{background:var(--surface-2)}
.btn.danger{background:transparent;color:var(--accent)}
.btn[disabled]{opacity:.45;cursor:default}
.btn svg{width:18px;height:18px}

/* agenda strip */
.strip-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 4px}
.strip-head b{font-size:16px;text-transform:capitalize}
.strip-head .nav{display:flex;gap:6px}
.strip-head .nav button{width:36px;height:36px;border-radius:50%;background:var(--surface-2);display:grid;place-items:center}
.strip{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;padding:8px 10px 14px}
.day{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 0 7px;border-radius:14px}
.day small{font-size:12px;color:var(--muted);text-transform:uppercase;font-weight:600}
.day b{font-size:18px;font-weight:700}
.day .pips{height:6px;display:flex;gap:3px}
.day .pips i{width:5px;height:5px;border-radius:50%;background:var(--muted)}
.day.today b{color:var(--accent)}
.day[aria-pressed="true"]{background:var(--accent);}
.day[aria-pressed="true"] small,.day[aria-pressed="true"] b{color:var(--accent-fg)}
.day[aria-pressed="true"] .pips i{background:var(--accent-fg)}

/* shopping */
.quick{padding:14px;display:flex;flex-direction:column;gap:10px}
.quick .line{display:flex;gap:8px;flex-wrap:wrap}
.field{height:46px;border-radius:var(--r-ctl);background:var(--surface-2);border:1px solid transparent;padding:0 14px;min-width:0}
.field:focus{outline:none;border-color:var(--accent)}
.quick .name{width:100%}
.stepper{display:flex;align-items:center;background:var(--surface-2);border-radius:var(--r-ctl);height:46px}
.stepper button{width:40px;height:46px;display:grid;place-items:center;font-size:20px;font-weight:600}
.stepper input{width:44px;text-align:center;background:transparent;border:0;height:46px;font-weight:700}
.stepper input:focus{outline:none}
.quick select.field{flex:1;min-width:90px;appearance:none;-webkit-appearance:none;padding-right:28px;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 16px) 20px,calc(100% - 11px) 20px;background-size:5px 5px;background-repeat:no-repeat}
.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:2px}
.chips::-webkit-scrollbar{display:none}
.chip{height:36px;padding:0 14px;border-radius:99px;background:var(--surface);box-shadow:var(--shadow);font-weight:600;font-size:14px;white-space:nowrap;flex:none}
.chip[aria-pressed="true"]{background:var(--fg);color:var(--bg)}
.store-h{display:flex;justify-content:space-between;align-items:center;padding:14px 18px 2px;font-weight:700}
.store-h span{color:var(--muted);font-weight:500;font-size:14px}
.prow{display:flex;align-items:center;gap:12px;padding:10px 12px 10px 18px;min-height:62px}
.prow + .prow{border-top:1px solid var(--line)}
.prow .body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.prow .title{font-weight:600;font-size:16.5px;overflow-wrap:anywhere}
.prow.incart .title{text-decoration:line-through;color:var(--muted)}
.qty{display:flex;align-items:center;gap:2px;background:var(--surface-2);border-radius:12px;flex:none}
.qty button{width:32px;height:36px;display:grid;place-items:center;font-size:18px;font-weight:700}
.qty b{min-width:38px;white-space:nowrap;text-align:center;font-size:14px}
.x{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:var(--muted);flex:none}
.validate{position:fixed;left:0;right:0;bottom:calc(76px + env(safe-area-inset-bottom,0px));display:flex;justify-content:center;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));pointer-events:none;z-index:20}
.validate .btn{pointer-events:auto;height:54px;border-radius:18px;width:100%;max-width:528px;box-shadow:0 8px 28px rgba(214,58,65,.35);font-size:16.5px}
.hrow{padding:12px 16px 12px 18px}
.hrow + .hrow{border-top:1px solid var(--line)}
.hrow summary{list-style:none;display:flex;align-items:center;gap:12px;cursor:pointer}
.hrow summary::-webkit-details-marker{display:none}
.hrow .body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.hrow .title{font-weight:600;font-size:16.5px}
.hist{margin:10px 0 2px;padding:10px 12px;border-radius:12px;background:var(--surface-2);display:flex;flex-direction:column;gap:6px;font-size:14px}
.hist div{display:flex;justify-content:space-between;gap:10px}
.hist span{color:var(--muted)}

/* profile */
.prof{display:flex;align-items:center;gap:14px;padding:18px 20px}
.prof img{width:56px;height:56px;border-radius:50%}
.prof h2{margin:0;font-size:20px}
.status{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;color:var(--muted);margin-top:2px}
.status i{width:8px;height:8px;border-radius:50%;background:var(--green)}
.status.local i{background:var(--amber)}
.sect{padding:18px 20px;display:flex;flex-direction:column;gap:12px}
.sect h3{margin:0;font-size:17px}
.sect p{margin:0;color:var(--muted);font-size:15px;max-width:62ch}
.sect ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:15px}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.stat{background:var(--surface-2);border-radius:16px;padding:12px}
.stat b{display:block;font-size:24px;font-weight:800}
.stat span{font-size:13px;color:var(--muted)}
.members{display:flex;flex-direction:column;gap:10px}
.member{display:flex;align-items:center;gap:10px;font-weight:600}
.member .avatar{width:32px;height:32px}
.btns{display:flex;flex-wrap:wrap;gap:8px}

/* nav */
.tabbar{position:fixed;left:0;right:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);z-index:30;padding-bottom:env(safe-area-inset-bottom,0px);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
.tabbar nav{max-width:560px;margin:0 auto;display:grid;grid-template-columns:repeat(4,1fr)}
.tab{text-decoration:none;display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 0 12px;color:var(--muted);font-size:12.5px;font-weight:500;position:relative}
.tab[aria-current="page"]{color:var(--accent)}
.tab .cnt{position:absolute;top:6px;left:calc(50% + 8px);background:var(--accent);color:var(--accent-fg);font-size:10.5px;font-weight:800;min-width:17px;height:17px;border-radius:9px;display:grid;place-items:center;padding:0 4px}

@media (min-width:900px){
  .shell{max-width:none;display:grid;grid-template-columns:230px minmax(0,640px);justify-content:center;gap:40px;padding-block:32px 60px}
  .tabbar{position:sticky;top:32px;align-self:start;border:0;background:none;padding:0;grid-row:1;grid-column:1}
  .tabbar nav{display:flex;flex-direction:column;gap:4px}
  .tabbar .brand{display:flex}
  .tab{flex-direction:row;gap:12px;padding:12px 14px;border-radius:14px;font-size:16px}
  .tab[aria-current="page"]{background:var(--surface);box-shadow:var(--shadow)}
  .tab .cnt{position:static;margin-left:auto}
  main{grid-column:2}
  .validate{left:220px}
}
.brand{display:none;align-items:center;gap:10px;font-weight:800;font-size:19px;white-space:nowrap;letter-spacing:-.02em;padding:0 14px 18px}
.brand .mark{width:36px;height:36px;border-radius:11px;background:var(--accent);display:grid;place-items:center;padding:4px;flex:none}
.brand em{font-style:normal;color:var(--accent)}

/* sheet */
.scrim{position:fixed;inset:0;background:var(--scrim);z-index:50;display:flex;align-items:flex-end;justify-content:center;animation:fade .18s ease}
.sheet{background:var(--surface);width:100%;max-width:560px;max-height:92%;border-radius:26px 26px 0 0;overflow:auto;padding:10px 0 calc(18px + env(safe-area-inset-bottom,0px));animation:up .22s ease}
@media (min-width:700px){.scrim{align-items:center}.sheet{border-radius:26px;max-height:88%}}
@keyframes fade{from{opacity:0}}
@keyframes up{from{transform:translateY(24px);opacity:.6}}
@media (prefers-reduced-motion:reduce){.scrim,.sheet{animation:none}}
.grab{width:40px;height:5px;border-radius:3px;background:var(--surface-2);margin:0 auto 6px}
.sheet-in{padding-left:max(20px,env(safe-area-inset-left,0px));padding-right:max(20px,env(safe-area-inset-right,0px));display:flex;flex-direction:column;gap:16px}
.sheet-h{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:-10px;background:var(--surface);padding:8px 0;z-index:2}
.sheet-h h2{margin:0;font-size:21px}
.sheet .title-in{font-size:21px;font-weight:600;border:0;background:transparent;padding:4px 0;width:100%}
.sheet .title-in:focus{outline:none}
.sheet textarea{width:100%;min-height:64px;resize:vertical;border:0;border-radius:var(--r-ctl);background:var(--surface-2);padding:12px 14px}
.sheet textarea:focus{outline:2px solid var(--accent)}
.lbl{font-size:12.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:8px;display:block}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.grid2 .field{width:100%}
.radio{display:flex;flex-wrap:wrap;gap:8px}
.radio label{position:relative}
.radio input{position:absolute;opacity:0;pointer-events:none}
.radio span{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px;border-radius:99px;background:var(--surface-2);font-weight:600;font-size:14.5px;cursor:pointer}
.radio input:checked + span{background:var(--fg);color:var(--bg)}
.radio input:focus-visible + span{outline:2px solid var(--accent);outline-offset:2px}
.subs{display:flex;flex-direction:column;border-radius:var(--r-ctl);background:var(--surface-2)}
.sub{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 12px}
.sub + .sub{border-top:1px solid var(--line)}
.sub .check{width:24px;height:24px}
.sub input[type=text]{flex:1;min-width:0;border:0;background:transparent;height:34px}
.sub input[type=text]:focus{outline:none}
.sub.done input[type=text]{text-decoration:line-through;color:var(--muted)}
.links{display:flex;flex-wrap:wrap;gap:8px}
.links a,.links button{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 14px;border-radius:12px;background:var(--surface-2);font-weight:600;font-size:14.5px;color:var(--fg);text-decoration:none}
.links svg{width:17px;height:17px}
.foot{display:flex;gap:10px;justify-content:space-between;align-items:center;padding-top:4px}
.copybox{width:100%;min-height:110px}
.rem{display:flex;align-items:center;gap:12px;padding:12px 0;text-align:left;width:100%}
.rem + .rem{border-top:1px solid var(--line)}
.rem .body{flex:1;min-width:0}
.rem b{display:block;font-weight:600}
.rem small{color:var(--muted);font-size:14px}

/* toast */
.toast{width:max-content;position:fixed;left:50%;bottom:calc(150px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--fg);color:var(--bg);padding:12px 16px;border-radius:14px;font-size:15px;font-weight:500;display:flex;gap:14px;align-items:center;z-index:80;max-width:calc(100% - 32px);box-shadow:0 10px 30px rgba(0,0,0,.25);animation:up .2s ease}
.toast button{color:var(--accent);font-weight:800;filter:brightness(1.25)}
@media (min-width:900px){.toast{bottom:40px}}

/* ===== v2 : appli autonome ===== */
:root{ padding-top:env(safe-area-inset-top,0px) }
html,body{min-height:100%}
body{margin:0;overscroll-behavior-y:none}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:40;background:var(--bg)}
img{max-width:100%}
[hidden]{display:none!important}
.sync{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);font-weight:500}
.sync i{width:8px;height:8px;border-radius:50%;background:var(--green)}
.sync.off i{background:var(--amber)} .sync.err i{background:var(--accent)} .sync.busy i{background:var(--blue)}

/* écrans d'accueil (configuration, connexion, foyer) */
.gate{min-height:100vh;display:flex;align-items:center;justify-content:center;padding-block:32px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.gate-box{width:100%;max-width:420px;display:flex;flex-direction:column;gap:18px}
.logo{display:flex;align-items:center;gap:12px}
.logo .mark{width:56px;height:56px;border-radius:17px;background:var(--accent);display:grid;place-items:center;flex:none;padding:6px}
.mark svg{width:100%;height:100%}
.logo .tagline{display:block;color:var(--muted);font-size:14.5px;font-weight:500;margin-top:2px}
.logo b{display:block;line-height:1.1;font-size:26px;font-weight:800;letter-spacing:-.02em}
.logo b em{font-style:normal;color:var(--accent)}
.gate h1{margin:0;font-size:28px;font-weight:800;letter-spacing:-.02em;text-wrap:balance}
.gate p{margin:0;color:var(--muted);font-size:15.5px;line-height:1.5}
.form{display:flex;flex-direction:column;gap:12px;padding:20px}
.form label{display:flex;flex-direction:column;gap:6px;font-size:13.5px;font-weight:600;color:var(--muted)}
.form .field{width:100%;font-size:16px}
.form .btn{width:100%;height:50px}
.err{color:var(--accent);font-size:14.5px;font-weight:500}
.link{color:var(--accent);font-weight:600;text-decoration:none;background:none;font-size:15px}
.or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}
.code{font-size:30px;font-weight:800;letter-spacing:.18em;font-variant-numeric:tabular-nums}
.code-in{text-transform:uppercase;letter-spacing:.2em;font-weight:700;text-align:center;font-size:22px!important}

/* bandeau courses en cours */
.live{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:18px;background:var(--accent-soft);color:var(--fg)}
.live .pulse{width:10px;height:10px;border-radius:50%;background:var(--accent);flex:none;box-shadow:0 0 0 0 var(--accent);animation:pulse 1.8s infinite}
@keyframes pulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 60%,transparent)}70%{box-shadow:0 0 0 10px transparent}100%{box-shadow:0 0 0 0 transparent}}
@media (prefers-reduced-motion:reduce){.live .pulse{animation:none}}
.live .body{flex:1;min-width:0;font-size:14.5px}
.live .body b{display:block;font-size:15.5px}
.live .btn{height:38px;padding:0 12px;font-size:14px;flex:none}
.startshop{display:flex;align-items:center;justify-content:center;gap:8px;height:46px;border-radius:16px;border:1.5px dashed color-mix(in srgb,var(--accent) 45%,transparent);color:var(--accent);font-weight:700;font-size:15px;width:100%}
.startshop svg{width:19px;height:19px}

/* saisie rapide */
.qa{padding:12px;display:flex;flex-direction:column;gap:10px}
.qa-row{display:flex;gap:8px}
.qa-row .field{flex:1;min-width:0;font-size:16px}
.qa-row .btn{flex:none;width:48px;padding:0}
.qa-tools{display:flex;gap:8px;flex-wrap:wrap}
.tool{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 12px;border-radius:12px;background:var(--surface-2);font-weight:600;font-size:13.5px}
.tool svg{width:16px;height:16px}
.tool.ai{background:color-mix(in srgb,var(--violet) 16%,transparent);color:var(--violet)}
.hint{font-size:13px;color:var(--muted)}

/* suggestions */
.sugg{padding:14px 0 12px;display:flex;flex-direction:column;gap:10px}
.sugg-h{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 16px 0 18px}
.sugg-h b{font-size:15px}
.sugg-h small{color:var(--muted);font-size:13px;font-weight:500}
.sugg .chips{padding:2px 16px 4px 18px}
.schip{display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;min-height:48px;padding:6px 12px;border-radius:14px;background:var(--surface-2);text-align:left;flex:none;max-width:200px}
.schip b{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.schip span{font-size:12px;color:var(--muted);white-space:nowrap}
.schip.due{background:color-mix(in srgb,var(--amber) 18%,var(--surface-2))}
.schip:active{transform:scale(.97)}
.listbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 10px;margin:2px 2px 0}
.bulk{display:flex;flex-wrap:wrap;gap:6px;margin-left:auto}
.bulk .mini-btn{background:var(--surface-2);color:var(--fg)}
.bulk .mini-btn.del{color:var(--accent)}
.vsw{display:inline-grid;grid-auto-flow:column;gap:2px;background:var(--surface-2);border-radius:12px;padding:3px}
.vsw button{height:30px;padding:0 12px;border-radius:9px;font-size:13px;font-weight:600;color:var(--muted)}
.vsw button[aria-pressed="true"]{background:var(--surface);color:var(--fg);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.prow .dishes{display:flex;flex-direction:column;align-items:flex-start;gap:3px;margin:3px 0 2px}
.pill.dish{background:color-mix(in srgb,var(--amber) 20%,transparent);color:var(--fg);font-weight:600;letter-spacing:0;font-size:12px;line-height:1.25;border-radius:8px;white-space:normal;text-align:left}
.pill.dish.here{background:transparent;padding:0;color:var(--muted)}
.mini-btn{white-space:nowrap;flex:none;height:32px;padding:0 10px;border-radius:10px;background:var(--accent-soft);color:var(--accent);font-weight:700;font-size:13px}

/* rayons */
.ray-h{display:flex;align-items:center;gap:10px;padding:14px 14px 4px 18px}
.ray-h b{font-size:15.5px;flex:1;min-width:0}
.ray-h span{color:var(--muted);font-size:13.5px;font-weight:500}
.claim{height:30px;padding:0 10px;border-radius:10px;background:var(--surface-2);font-size:12.5px;font-weight:700;display:inline-flex;align-items:center;gap:6px}
.claim .avatar{width:18px;height:18px}
.claim.mine{background:var(--fg);color:var(--bg)}
.pill.new{background:color-mix(in srgb,var(--blue) 18%,transparent);color:var(--blue)}
.pill.price{background:transparent;padding:0;font-weight:600;color:var(--muted);letter-spacing:0}
.prow .body{cursor:pointer}
.aftershop{display:flex;flex-direction:column;gap:10px;padding:16px 18px}
.aftershop p{margin:0;color:var(--muted);font-size:14.5px}
.validate .btn + .btn{margin-left:8px}
.validate{gap:8px}
.validate .btn.scan{width:auto;flex:none;background:var(--surface);color:var(--fg);box-shadow:var(--shadow);padding:0 16px}

/* menus */
.recipe{display:flex;align-items:center;gap:12px;padding:12px 14px 12px 18px;width:100%;text-align:left}
.recipe + .recipe{border-top:1px solid var(--line)}
.recipe .body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.recipe .title{font-weight:600;font-size:16.5px}
.plan-row{display:flex;align-items:center;gap:10px;padding:10px 12px 10px 18px}
.plan-row + .plan-row{border-top:1px solid var(--line)}
.plan-row .body{flex:1;min-width:0}
.plan-row .title{font-weight:600}
.plan-foot{padding:12px 14px 14px;display:flex;flex-direction:column;gap:8px}
.plan-foot .btn{width:100%}
.ing{font-family:var(--font);font-size:15px;min-height:160px!important;line-height:1.6}

/* budget */
.budget{padding:18px 20px;display:flex;flex-direction:column;gap:14px}
.budget-top{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.budget-top b{font-size:30px;font-weight:800;letter-spacing:-.02em}
.budget-top small{display:block;color:var(--muted);font-size:13.5px;font-weight:500}
.delta{font-size:13.5px;font-weight:700;padding:4px 9px;border-radius:99px;background:var(--surface-2)}
.delta.up{color:var(--accent)} .delta.down{color:var(--green)}
.bars{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;align-items:end;height:86px}
.bars div{display:flex;flex-direction:column;align-items:center;gap:5px;height:100%;justify-content:flex-end}
.bars i{display:block;width:100%;max-width:34px;border-radius:7px 7px 3px 3px;background:var(--surface-2);min-height:3px}
.bars div.cur i{background:var(--accent)}
.bars span{font-size:11.5px;color:var(--muted);text-transform:capitalize}
.trip{display:flex;justify-content:space-between;gap:10px;padding:10px 18px;font-size:14.5px}
.trip + .trip{border-top:1px solid var(--line)}
.trip span{color:var(--muted)}

/* ticket */
.tline{display:grid;grid-template-columns:minmax(0,1fr) 64px 76px;gap:8px;align-items:center;padding:10px 0}
.tline + .tline{border-top:1px solid var(--line)}
.tline .lab{grid-column:1/-1;font-size:12.5px;color:var(--muted);font-family:ui-monospace,Menlo,monospace;overflow-wrap:anywhere}
.tline select,.tline input{height:42px;border-radius:12px;background:var(--surface-2);border:1px solid transparent;padding:0 10px;min-width:0;width:100%}
.tline input{text-align:right}
.tline.skip{opacity:.5}
.progressbar{height:8px;border-radius:4px;background:var(--surface-2);overflow:hidden}
.progressbar i{display:block;height:100%;background:var(--accent);transition:width .3s}
.checks{display:flex;flex-direction:column;gap:2px}
.checks label{display:flex;align-items:center;gap:12px;padding:10px 4px;font-size:15.5px}
.checks input{width:20px;height:20px;accent-color:var(--accent)}
.checks small{color:var(--muted);margin-left:auto;white-space:nowrap}
.order{display:flex;flex-direction:column}
.order div{display:flex;align-items:center;gap:8px;padding:6px 0;font-size:15px}
.order div + div{border-top:1px solid var(--line)}
.order span{flex:1}
.order button{width:36px;height:36px;border-radius:10px;background:var(--surface-2);display:grid;place-items:center}
.order button[disabled]{opacity:.3}
.kv{display:flex;justify-content:space-between;gap:12px;font-size:15px}
.kv span{color:var(--muted)}
input[type=file].hidden-file{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}

.qa-row .btn.mic{background:var(--surface-2);color:var(--fg)}
.qa-row .btn.mic.on{background:var(--accent);color:var(--accent-fg);animation:pulse 1.6s infinite}
@media (prefers-reduced-motion:reduce){.qa-row .btn.mic.on{animation:none}}
.qa-tools .hint{line-height:1.4}

/* choix photo / fichier */
.choice{display:flex;flex-direction:column;gap:10px}
.choice .btn{height:auto;min-height:64px;padding:12px 16px;justify-content:flex-start;gap:14px;text-align:left;border-radius:16px;width:100%}
.choice .btn svg{flex:none;width:22px;height:22px}
.choice .btn span{display:flex;flex-direction:column;gap:2px}
.choice .btn b{font-size:15.5px}
.choice .btn small{font-size:13px;font-weight:500;color:var(--muted)}
