/* Popote : styles repris du prototype « Semainier Repas », puis ajouts (connexion, foyer, indicateur de synchro). */
html{scroll-padding-top:env(safe-area-inset-top,0px)}
body{margin:0}
img{max-width:100%}
[hidden]{display:none!important}
/* Couleurs : tokens de la charte Popote (public/tokens.css, --pop-*), clair et sombre gérés là-bas. */
:root{
  --bg:var(--pop-bg); --surface:var(--pop-surface); --surface-2:var(--pop-surface-2); --ink:var(--pop-ink); --muted:var(--pop-muted); --line:var(--pop-line);
  --accent:var(--pop-accent); --accent-ink:var(--pop-on-accent); --soft:var(--pop-soft); --today:var(--pop-sun); --danger:var(--pop-danger);
  --font-display:var(--pop-font-display); --font-body:var(--pop-font-body);
}
*{box-sizing:border-box}
html,body{height:auto}
body{background:var(--bg);color:var(--ink);font-family:var(--font-body);font-size:15px;line-height:1.4;padding-inline:16px;padding-block:0 96px;-webkit-tap-highlight-color:transparent}
.wrap{max-width:560px;margin:0 auto}
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}
h1,h2,h3{font-family:var(--font-display);margin:0;text-wrap:balance;letter-spacing:-.01em}
header.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:5;background:var(--bg);padding-block:14px 10px;display:flex;align-items:center;justify-content:space-between;gap:12px}
header.top h1{font-size:1.5rem;font-weight:700}
.chip,.btn{border-radius:999px;padding:8px 14px;font-weight:500;border:1px solid var(--line);background:var(--surface);min-height:40px;display:inline-flex;align-items:center;gap:6px}
a.btn{text-decoration:none;color:var(--ink)}
.note.warn{background:color-mix(in srgb,var(--today) 32%,var(--surface))}
.icon.bell{position:relative;width:40px;height:40px}
.icon.bell .dot{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;border-radius:99px;background:var(--danger);color:#fff;font-size:.7rem;font-weight:700;display:grid;place-items:center;padding:0 4px}
header.top{flex-wrap:wrap}
.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.btn.ghost{background:transparent}
.chip.on{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.spread{justify-content:space-between}
.muted{color:var(--muted)}
.small{font-size:.85rem}
.stack{display:flex;flex-direction:column;gap:12px}
.note{background:var(--soft);border-radius:12px;padding:10px 12px;font-size:.88rem;display:flex;gap:10px;justify-content:space-between;align-items:center}
.weeknav{display:flex;align-items:center;justify-content:space-between;gap:8px}
.weeknav .lbl{font-family:var(--font-display);font-weight:700;font-size:1.1rem;text-align:center;flex:1}
.icon{width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--surface);display:grid;place-items:center;font-size:1.2rem}
.day{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:8px}
.day.today{border-color:var(--today);box-shadow:0 0 0 2px color-mix(in srgb,var(--today) 45%,transparent)}
.day h3{font-size:1rem;font-weight:700;text-transform:capitalize;display:flex;justify-content:space-between}
.day h3 span{font-family:var(--font-body);font-weight:500;color:var(--muted);font-size:.8rem;text-transform:none}
.slot{display:grid;grid-template-columns:64px 1fr auto;gap:8px;align-items:center;min-height:44px;border-top:1px solid var(--line);padding-top:8px}
.slot:first-of-type{border-top:0;padding-top:0}
.slot .k{font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:700}
.slot .v{min-width:0;text-align:left;overflow-wrap:anywhere}
.slot .v.empty{color:var(--accent);font-weight:500}
.slot .x{width:36px;height:36px;border-radius:50%;color:var(--muted);font-size:1.1rem}
.meta{color:var(--muted);font-size:.8rem}
.rc{width:100%;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:4px}
.rc b{font-weight:700}
.tags{display:flex;gap:6px;flex-wrap:wrap}
.tag{font-size:.72rem;background:var(--soft);border-radius:999px;padding:2px 8px}
input[type=search],input[type=text]{width:100%;min-height:44px;border-radius:12px;border:1px solid var(--line);background:var(--surface);padding:8px 12px}
select{min-height:44px;border-radius:12px;border:1px solid var(--line);background:var(--surface);padding:8px 10px}
.aisle{display:flex;flex-direction:column;gap:2px}
.aisle h3{font-size:.8rem;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-family:var(--font-body);font-weight:700;padding-block:6px}
.item{display:flex;align-items:center;gap:12px;min-height:52px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:6px 12px;width:100%;text-align:left;margin-bottom:6px}
.box{width:24px;height:24px;border-radius:7px;border:2px solid var(--line);flex:none;display:grid;place-items:center;font-size:.9rem;color:var(--accent-ink)}
.item.done .box{background:var(--accent);border-color:var(--accent)}
.item.done .nm{text-decoration:line-through;color:var(--muted)}
.item .nm{flex:1;min-width:0;overflow-wrap:anywhere}
.item .q{color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.item small{display:block;color:var(--muted);font-size:.75rem}
nav.tabs{position:fixed;left:0;right:0;bottom:0;z-index:10;background:var(--surface);border-top:1px solid var(--line);display:flex;justify-content:center;padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px))}
nav.tabs div{display:flex;width:100%;max-width:560px;gap:6px}
nav.tabs button{flex:1;min-height:52px;border-radius:14px;font-weight:700;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:.78rem}
nav.tabs button.on{background:var(--soft);color:var(--accent)}
nav.tabs svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.badge{background:var(--accent);color:var(--accent-ink);border-radius:999px;font-size:.7rem;padding:0 6px;margin-left:4px}
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:20;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--bg);width:100%;max-width:560px;max-height:88%;overflow:auto;border-radius:20px 20px 0 0;padding:16px 16px calc(20px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:12px}
.sheet h2{font-size:1.3rem}
.sheet ul,.sheet ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px}
.sheet li{padding-left:2px}
textarea{width:100%;min-height:180px;border-radius:12px;border:1px solid var(--line);background:var(--surface);padding:10px;font-size:.9rem}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(84px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:999px;z-index:30;font-weight:500}
details summary{cursor:pointer;font-weight:500;min-height:44px;display:flex;align-items:center}
.bar{height:6px;border-radius:99px;background:var(--line);overflow:hidden}
.bar i{display:block;height:100%;background:var(--accent)}
@media (prefers-reduced-motion:no-preference){.sheet{animation:up .18s ease-out}@keyframes up{from{transform:translateY(24px);opacity:.6}}}

/* ---------- ajouts Popote ---------- */
.syncline{font-size:.75rem;color:var(--muted);min-height:1em;width:100%;margin-top:-4px}
.syncline.off{color:var(--danger)}
.auth{max-width:420px;margin:8vh auto 0;display:flex;flex-direction:column;gap:12px}
.auth h1{font-size:2rem}
.auth label{font-size:.85rem;color:var(--muted)}
.auth input{width:100%;min-height:44px;border-radius:12px;border:1px solid var(--line);background:var(--surface);padding:8px 12px}
.auth .err{color:var(--danger);font-size:.9rem;min-height:1.2em}
.auth .links{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.linkbtn{color:var(--accent);font-weight:500;min-height:36px;text-decoration:underline;text-underline-offset:3px}
input[type=email],input[type=password]{width:100%;min-height:44px;border-radius:12px;border:1px solid var(--line);background:var(--surface);padding:8px 12px}
.member{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:44px}
.copybox{width:100%;font-size:.8rem;min-height:60px}

/* ---------- refonte visuelle (lot 1b) : ombres douces, coins généreux, onglets flottants ---------- */
body{font-size:15px;line-height:var(--pop-leading)}
header.top{background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:saturate(1.4) blur(12px);-webkit-backdrop-filter:saturate(1.4) blur(12px)}
header.top h1{font-size:var(--pop-text-xl);font-weight:800;letter-spacing:-.02em}
.chip,.btn{border-color:transparent;background:var(--surface);box-shadow:var(--pop-shadow-1);transition:transform .12s ease,box-shadow .12s ease,background .12s}
.btn:active,.chip:active,.item:active,.rc:active{transform:scale(.98)}
.btn.primary{box-shadow:var(--pop-shadow-2);font-weight:700}
.btn.primary:hover{background:var(--pop-accent-hover)}
.btn.ghost{box-shadow:none}
.chip.on{box-shadow:var(--pop-shadow-2)}
.icon{border-color:transparent;box-shadow:var(--pop-shadow-1)}
.day,.rc,.item,.panel,.card{border-color:transparent;box-shadow:var(--pop-shadow-1)}
.day{border-radius:var(--pop-radius-lg);padding:14px 14px 10px}
.day.today{box-shadow:0 0 0 2px var(--today),var(--pop-shadow-2)}
.day h3{font-size:1.05rem}
.slot .v.empty{color:var(--muted);font-weight:500}
.slot .v.empty::before{content:"+ ";color:var(--accent);font-weight:700}
.rc{border-radius:var(--pop-radius-md);padding:14px}
.rc b{font-family:var(--font-display);font-size:1.02rem}
.tag{background:var(--surface-2)}
.item{border-radius:var(--pop-radius-md);margin-bottom:8px}
.item.done{background:var(--surface-2);box-shadow:none}
.box{border-radius:8px;transition:background .15s,border-color .15s}
.note{border-radius:var(--pop-radius-md)}
.bar{height:8px}
.bar i{border-radius:99px;transition:width .3s ease}
input[type=search],input[type=text],input[type=email],input[type=password],select,textarea{border-color:var(--line);border-radius:var(--pop-radius-md)}
nav.tabs{left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom,0px));padding:6px;border:0;border-radius:var(--pop-radius-lg);box-shadow:var(--pop-shadow-3);background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);max-width:536px;margin:0 auto}
nav.tabs button{border-radius:var(--pop-radius-md)}
nav.tabs button.on{background:var(--soft)}
.sheet{border-radius:var(--pop-radius-lg) var(--pop-radius-lg) 0 0;box-shadow:var(--pop-shadow-3)}
.sheet::before{content:"";display:block;width:40px;height:5px;border-radius:99px;background:var(--line);margin:-4px auto 4px}
.toast{box-shadow:var(--pop-shadow-3);bottom:calc(96px + env(safe-area-inset-bottom,0px))}
.auth h1{font-size:var(--pop-text-2xl);font-weight:800;letter-spacing:-.02em}
.auth h1::before{content:"";display:block;width:64px;height:64px;margin-bottom:12px;background:url(/img/icon.svg) center/contain no-repeat}

/* ---------- ambiance « Marché » (choix de Bryan, 2026-10-13) ---------- */
header.top{margin-inline:-16px;padding:14px 16px 14px;background:var(--pop-head);color:var(--pop-on-head);border-radius:0 0 var(--pop-radius-lg) var(--pop-radius-lg);backdrop-filter:none;-webkit-backdrop-filter:none;margin-bottom:14px;box-shadow:var(--pop-shadow-2)}
header.top h1{color:var(--pop-on-head)}
header.top .icon{background:rgba(255,255,255,.18);color:var(--pop-on-head);box-shadow:none}
header.top .muted{color:rgba(255,255,255,.85)}
header.top .syncline{color:rgba(255,255,255,.85)}
header.top .syncline.off{color:var(--pop-sun)}
.avatars{display:flex;padding-left:6px}
.avatars b{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:.75rem;font-weight:800;margin-left:-6px;border:2px solid var(--pop-head);background:var(--pop-sun);color:var(--pop-on-sun)}
.avatars b:nth-child(2n){background:var(--pop-pop);color:#fff}
.avatars b:nth-child(3n){background:#FFFFFF;color:var(--pop-ink)}
.strip{display:flex;gap:6px}
.strip button{flex:1;min-width:0;border-radius:14px;padding:6px 0;font-size:.7rem;font-weight:700;background:var(--surface);box-shadow:var(--pop-shadow-1);color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:1px;min-height:48px;justify-content:center}
.strip button b{font-family:var(--font-display);font-size:1.05rem;color:var(--ink)}
.strip button.today{background:var(--pop-sun);color:var(--pop-on-sun)}
.strip button.today b{color:var(--pop-on-sun)}
.strip button i{width:5px;height:5px;border-radius:50%;background:var(--accent)}
.strip button i.none{background:transparent}
.slot{grid-template-columns:52px 1fr auto}
.slot .thumb{width:46px;height:46px;border-radius:14px;position:relative;overflow:hidden;display:block}
.slot .thumb::after{content:"";position:absolute;right:-10px;bottom:-16px;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.35)}
.slot .thumb.free{background:var(--surface-2)}
.slot .k{display:none}
.pill{display:inline-block;font-size:.62rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;padding:2px 7px;border-radius:999px;background:var(--soft);color:var(--accent);margin-bottom:3px}
.slot .v{font-family:var(--font-display);font-weight:600}
.slot .v .meta{font-family:var(--font-body);font-weight:400}
.slot .v.empty{font-family:var(--font-body)}
.aisle h3{display:flex;align-items:center;gap:8px}
.aisle h3::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--dot,var(--muted))}
nav.tabs{background:var(--pop-tabs);box-shadow:var(--pop-shadow-3);backdrop-filter:none;-webkit-backdrop-filter:none}
nav.tabs button{color:var(--pop-tabs-ink)}
nav.tabs button.on{background:var(--pop-sun);color:var(--pop-on-sun)}
nav.tabs .badge{background:var(--accent);color:var(--accent-ink)}
nav.tabs button.on .badge{background:var(--pop-tabs);color:var(--pop-sun)}
.item.done .box{background:var(--pop-pop);border-color:var(--pop-pop)}
.bar i{background:var(--accent)}
.day{scroll-margin-top:150px}
.slot .v.empty::before{content:none}
.slot .v.empty .add{color:var(--accent);font-weight:700}

/* Nunito (choix de Bryan) : titres en 800, texte en 500 pour un meilleur contraste */
body{font-weight:500}
header.top h1{font-weight:900;letter-spacing:-.01em}
.slot .v{font-weight:700}
.rc b{font-weight:800}
