/* Carnet de recettes — interface tactile (iPad), d'après la maquette « C · Magazine ». */
:root {
  --accent: #4f9a14;
  --tint: #e8f1e1;
  --glass: rgba(79, 154, 20, .55);
  --ink: #ffffff;
  --bg: #f4f6f2;
  --surface: #ffffff;
  --surface2: #eef1ec;
  --text: #1b221e;
  --muted: #6a756f;
  --line: #e2e7e0;
  --red: #e5484d;
  --star: #f5a623;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 8px 24px rgba(20, 30, 25, .07);
  --rail-w: 236px;
  --pad: 24px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, sans-serif;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%; touch-action: manipulation; overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
input, select { font: inherit; color: inherit; }
img { display: block; }
svg.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------- structure ---------- */
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.main { flex: 1; position: relative; min-height: 0; }
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: 22px calc(var(--pad) + var(--sar)) calc(40px + var(--sab)) var(--pad); overscroll-behavior: contain; }
#detail-view { padding-top: 16px; padding-bottom: calc(24px + var(--sab)); }

/* ---------- rail ---------- */
.rail { width: var(--rail-w); flex: none; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px; padding: calc(18px + var(--sat)) 14px calc(16px + var(--sab)) calc(14px + var(--sal));
  overflow-y: auto; z-index: 40; }
.brandmark { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17px; letter-spacing: -.3px; padding: 0 4px; }
.brandmark i { width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: var(--ink);
  display: grid; place-items: center; font-style: normal; font-size: 20px; }
.side-lab { font-size: 10.5px; letter-spacing: .9px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 0 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 12px; padding: 0 12px; min-height: 46px; border-radius: 13px;
  font-size: 14.5px; font-weight: 600; color: var(--muted); text-align: left; transition: background .15s, color .15s; }
.nav button .i { font-size: 19px; }
.nav button > span:first-of-type { min-width: 0; line-height: 1.2; padding: 6px 0; }
.nav .n { white-space: nowrap; flex: none; }
.nav button:active { background: var(--surface2); }
.nav button.on { background: var(--tint); color: var(--accent); }
.nav .n { margin-left: auto; font-size: 11.5px; background: var(--surface2); padding: 2px 8px; border-radius: 999px;
  color: var(--muted); font-variant-numeric: tabular-nums; }
.nav button.on .n { background: var(--accent); color: var(--ink); }
.browse { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 12px; border-radius: 13px;
  background: var(--surface2); color: var(--muted); font-size: 14px; text-align: left; }
.browse .i { font-size: 18px; }
.browse small { margin-left: auto; font-size: 11px; }
.rail .sp { flex: 1; }
.offline { background: var(--surface2); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.offline .lab { font-size: 10.5px; letter-spacing: .8px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.offline .val { font-size: 13px; font-weight: 600; line-height: 1.35; }
.offline .info { font-size: 12px; color: var(--muted); line-height: 1.35; }
.bar { height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 9px; transition: width .3s; }
.scrim { display: none; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600;
  color: var(--text); white-space: nowrap; transition: transform .1s, background .15s; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn.on { background: var(--tint); border-color: var(--accent); color: var(--accent); }
.btn.white { background: rgba(255, 255, 255, .95); color: #1b221e; border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.btn.danger { color: var(--red); }
.btn.sm { min-height: 36px; padding: 0 13px; font-size: 12.5px; }
.btn .fill { fill: currentColor; }
.btn.white .heart-on { fill: var(--red); stroke: var(--red); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; font-size: 22px; }

/* ---------- bandeau ---------- */
.band { background: var(--accent); color: var(--ink); padding: calc(16px + var(--sat)) calc(var(--pad) + var(--sar)) 14px var(--pad);
  display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; flex: none; transition: background .25s; }
.band:after { content: ""; position: absolute; right: -60px; top: -90px; width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); pointer-events: none; }
.band:before { content: ""; position: absolute; right: 160px; bottom: -140px; width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255, 255, 255, .07); pointer-events: none; }
.band-r1 { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; flex-wrap: wrap; }
.band .menu { display: none; color: var(--ink); background: rgba(255, 255, 255, .16); }
.who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.who .t { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who .t b { font-size: 19px; letter-spacing: -.3px; white-space: nowrap; }
.who .t span { font-size: 12.5px; opacity: .85; white-space: nowrap; }
.logo { height: var(--lh, 24px); width: auto; object-fit: contain; }
.logo-chip { background: #fff; border-radius: 12px; padding: 7px 11px; display: inline-flex; align-items: center; flex: none; --lh: 24px; }
.logo-chip.md { --lh: 30px; padding: 8px 13px; border-radius: 14px; box-shadow: var(--shadow); }
.search { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .97); color: #1b221e; height: 46px;
  border-radius: 14px; padding: 0 6px 0 14px; flex: 1; min-width: 240px; max-width: 560px; }
.search .i { color: #6a756f; font-size: 18px; }
.search input { flex: 1; border: 0; background: none; outline: 0; min-width: 0; font-size: 16px; color: #1b221e; }
.search input::placeholder { color: #6a756f; }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #6a756f; }
.band .sp { flex: 0 0 0; margin-left: auto; }
.swatch { display: flex; gap: 6px; background: rgba(0, 0, 0, .18); padding: 5px; border-radius: 15px; }
.swatch button { background: #fff; border-radius: 10px; padding: 0 9px; height: 40px; display: flex; align-items: center;
  opacity: .55; transition: .15s; --lh: 19px; }
.swatch button.on { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(0, 0, 0, .3); }
.chips { display: flex; gap: 8px; overflow-x: auto; position: relative; z-index: 1; align-items: center; margin: 0 calc(-1 * var(--pad));
  padding: 0 var(--pad) 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.me-mini { display: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, .22); }
.me-mini .av { width: 36px; height: 36px; box-shadow: 0 0 0 2px #fff; }
.chips-wrap { position: relative; z-index: 1; }
/* flèches des thèmes (souris) : posées sur un fondu à la couleur du site, les pastilles s'estompent dessous */
.chip-fade { position: absolute; top: -6px; bottom: -6px; width: calc(var(--pad) + 86px); z-index: 2; display: flex;
  align-items: center; pointer-events: none; }
.chip-fade.l { left: calc(-1 * var(--pad)); padding-left: calc(var(--pad) - 4px);
  background: linear-gradient(to right, var(--accent) 0, var(--accent) 58%, transparent); }
.chip-fade.r { right: calc(-1 * var(--pad)); padding-right: calc(var(--pad) - 4px); justify-content: flex-end;
  background: linear-gradient(to left, var(--accent) 0, var(--accent) 58%, transparent); }
.chip-fade[hidden] { display: none; }
.chip-arr { pointer-events: auto; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #1b221e; display: grid;
  place-items: center; font-size: 18px; box-shadow: 0 2px 12px rgba(0, 0, 0, .28); flex: none; }
@media (hover: none), (pointer: coarse) { .chip-fade { display: none !important; } }
.chip { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 0 15px; height: 38px;
  background: rgba(255, 255, 255, .16); color: var(--ink); white-space: nowrap; font-weight: 600; font-size: 13.5px;
  border: 1px solid rgba(255, 255, 255, .22); flex: none; }
.chip span { opacity: .7; font-size: 12px; }
.chip.on { background: #fff; color: #1b221e; border-color: #fff; }
.chips .lbl { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; opacity: .75; font-weight: 700; flex: none; margin-right: 2px; }
.app.in-detail .chips-wrap { display: none; }
@media (min-width: 1280px) { :root { --rail-w: 288px; } }

/* ---------- en-tête de page ---------- */
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 14px 16px; margin-bottom: 22px; flex-wrap: wrap; }
.ph-l { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ph-l > div { min-width: 0; }
.page-h h1 { font-size: 26px; letter-spacing: -.4px; line-height: 1.12; }
.count { font-size: 13px; color: var(--muted); margin-top: 3px; }
.ph-r { display: flex; gap: 10px; flex-wrap: wrap; }
.ph-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: var(--ink); display: grid;
  place-items: center; font-size: 26px; flex: none; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -8px 0 22px; }
.filters label { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 34px 0 15px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.filters label.on { background: var(--tint); border-color: var(--accent); color: var(--accent); }
.filters label:after { content: "▾"; position: absolute; right: 14px; font-size: 11px; }
.filters select { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; }
.filters .note { font-size: 12px; color: var(--muted); flex: 1 1 260px; line-height: 1.35; }

/* ---------- cartes ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 16px; }
.card { position: relative; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: #2b302d; color: #fff;
  box-shadow: var(--shadow); cursor: pointer; transform: translateZ(0); transition: transform .12s; }
.card:active { transform: scale(.98); }
.card > img.ph, .feature > img, .hero > img { position: absolute; object-fit: cover; opacity: 0; transition: opacity .3s; }
.card > img.ph { inset: 0; width: 100%; height: 100%; }
img.ph.ok, .feature > img.ok, .hero > img.ok { opacity: 1; }
.badge { position: absolute; left: 10px; top: 10px; background: #fff; border-radius: 9px; padding: 4px 8px; display: flex;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18); --lh: 16px; z-index: 2; }
.fav { position: absolute; right: 4px; top: 4px; width: 46px; height: 46px; display: grid; place-items: center; z-index: 3; }
.fav i { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: #33403a; display: grid;
  place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); font-size: 17px; font-style: normal; transition: transform .15s; }
.fav:active i { transform: scale(.88); }
.fav.on svg { fill: var(--red); stroke: var(--red); }
.time { position: absolute; right: 10px; top: 54px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 700;
  padding: 4px 10px 4px 8px; border-radius: 999px; display: flex; align-items: center; gap: 5px; z-index: 2; }
.card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 50px 15px 13px;
  background: linear-gradient(to top, rgba(8, 12, 10, .92), rgba(8, 12, 10, .55) 55%, transparent);
  display: flex; flex-direction: column; gap: 4px; }
.card-body h3 { font-size: 15px; line-height: 1.26; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-body p { font-size: 12.5px; color: rgba(255, 255, 255, .78); line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; margin-top: 4px; min-height: 16px; }
.diff { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .88); }
.diff:before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #52b788; }
.diff.d2:before { background: #f4a261; }
.diff.d3:before { background: #e76f51; }
.saved { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: #fff; }
.more { display: flex; justify-content: center; padding: 26px 0 10px; color: var(--muted); font-size: 13px; }
.empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; font-size: 17px; color: var(--text); margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 60px 0; text-align: center; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- « À la une » et bannière de la fiche ---------- */
.feature, .hero { position: relative; border-radius: 24px; overflow: hidden; display: flex; align-items: flex-end;
  color: var(--ink); background: var(--accent); box-shadow: var(--shadow); }
.feature { min-height: 290px; margin-bottom: 24px; cursor: pointer; }
.feature > img, .hero > img { top: 0; right: 0; bottom: 0; width: 74%; height: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%); mask-image: linear-gradient(to right, transparent, #000 22%); }
.cartouche { position: relative; z-index: 2; margin: 22px; padding: 18px 22px; border-radius: 20px; background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); display: flex; flex-direction: column;
  gap: 7px; max-width: min(440px, 46%); min-width: 260px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.eyebrow span { background: #fff; color: #1b221e; padding: 4px 10px; border-radius: 999px; }
.feature h2 { font-size: 25px; line-height: 1.12; letter-spacing: -.6px; }
.cartouche p { opacity: .88; font-size: 15px; line-height: 1.3; }
.fm { display: flex; gap: 16px; font-size: 13px; opacity: .92; align-items: center; margin-top: 2px; }
.fm span { display: inline-flex; align-items: center; gap: 6px; }
.feature .badge, .hero .badge { left: auto; right: 18px; top: 18px; --lh: 24px; padding: 7px 12px; border-radius: 12px; }
.hero { min-height: 360px; }
.hero h1 { font-size: 29px; letter-spacing: -.8px; line-height: 1.1; }
.hero .sub { font-size: 16.5px; opacity: .88; line-height: 1.3; }
.rating { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.rating .stars { color: #ffd166; letter-spacing: 1px; font-size: 16px; }
.rating b { font-size: 15px; }
.hero-actions { position: absolute; left: 18px; top: 18px; right: 170px; z-index: 3; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .badge { --lh: 28px; padding: 9px 14px; border-radius: 14px; }
.hero .cartouche { margin-top: 90px; }

/* ---------- fiche ---------- */
.detail { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.c-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; margin-top: -32px; position: relative;
  z-index: 4; padding: 0 18px; }
.panel { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; }
.panel h2 { font-size: 19px; letter-spacing: -.2px; }
.c-body .panel { display: flex; flex-direction: column; gap: 12px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--tint); color: var(--accent); }
.desc { font-size: 14.5px; line-height: 1.6; opacity: .9; white-space: pre-line; }
.allerg { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.allerg b { display: block; color: var(--text); font-size: 12px; margin-bottom: 2px; }
.nutri .hint { font-size: 12px; color: var(--muted); margin-top: -6px; }
.nutri .row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.nutri .row:last-child { border: 0; }
.nutri .row.sub { padding-left: 14px; color: var(--muted); font-size: 12.5px; }
.nutri .row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--surface); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden; }
.stat { display: flex; gap: 13px; align-items: center; padding: 17px 20px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat .ic { width: 42px; height: 42px; border-radius: 13px; background: var(--tint); color: var(--accent); display: grid; place-items: center;
  font-size: 20px; flex: none; }
.stat small { display: block; font-size: 11.5px; color: var(--muted); }
.stat b { font-size: 15px; display: block; overflow-wrap: anywhere; }
.ph { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.serv { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.seg { display: flex; background: var(--surface2); border-radius: 13px; padding: 3px; }
.seg button { min-width: 42px; height: 38px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.seg button.on { background: var(--accent); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.grp { font-size: 11px; letter-spacing: .8px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin: 16px 0 10px; }
.grp:first-of-type { margin-top: 0; }
.ings { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 10px; }
.ing { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface2); min-height: 66px; }
.ing .e { width: 46px; height: 46px; border-radius: 12px; background: var(--surface); flex: none; overflow: hidden; }
.ing .e img { width: 100%; height: 100%; object-fit: cover; }
.ing b { display: block; font-size: 14px; color: var(--accent); }
.ing span { font-size: 12.5px; color: var(--muted); line-height: 1.3; display: block; }
.ing.noqty span { color: var(--text); font-size: 13px; }
.lines { padding-left: 18px; font-size: 14px; line-height: 1.7; }
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.step { background: var(--surface2); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.step .pic { aspect-ratio: 3 / 2; background: var(--line); }
.step .pic img { width: 100%; height: 100%; object-fit: cover; }
.step .tx { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 10px; }
.step .hd { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; }
.step .num { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--ink); display: grid;
  place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.step p { font-size: 14.5px; line-height: 1.55; white-space: pre-line; }
.extras { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px; }
.extras.one { grid-template-columns: 1fr; }
.extras ul { list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 14px; margin-top: 12px; }
.extras li { display: flex; gap: 10px; align-items: baseline; }
.extras li:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-2px); }
.review { margin-top: 12px; }
.review b { color: var(--accent); font-size: 13px; display: block; margin-bottom: 2px; }
.review p { font-size: 14px; line-height: 1.5; }
.dock { position: sticky; bottom: 12px; display: flex; justify-content: center; pointer-events: none; z-index: 6; margin-top: 6px; }
.dock .in { pointer-events: auto; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
  border-radius: 20px; padding: 8px; display: flex; gap: 8px; align-items: center; max-width: 100%; overflow-x: auto; }
.dock .btn { border: 0; background: var(--surface2); border-radius: 14px; }
.dock .btn.on { background: var(--tint); }
.dock .btn.on.fav-on svg { fill: var(--red); stroke: var(--red); }
.dock .logo-chip { --lh: 20px; padding: 6px 10px; border: 1px solid var(--line); }

/* ---------- liste des courses ---------- */
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.sec-h h2 { font-size: 19px; }
.shop-recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-bottom: 24px; }
.shop-r { display: flex; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; min-height: 122px; }
.shop-r .pic { width: 132px; flex: none; background: #2b302d; position: relative; cursor: pointer; }
.shop-r .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shop-r .bd { flex: 1; padding: 12px 12px 12px 15px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.shop-r h3 { font-size: 14.5px; line-height: 1.28; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.shop-r small { font-size: 12px; color: var(--muted); }
.shop-r .row { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.shop-r .seg button { min-width: 36px; height: 32px; font-size: 13px; }
.shop-r .rm { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; background: var(--surface2); display: grid;
  place-items: center; color: var(--muted); flex: none; }
.cost-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); }
.cost-line span { flex: 1 1 300px; line-height: 1.4; }
.rayon { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.rayon-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rayon-h .dot { width: 12px; height: 12px; border-radius: 50%; }
.rayon-h h3 { font-size: 17px; }
.rayon-h small { font-size: 12px; font-weight: 700; color: var(--muted); }
.rayon-h .sub { margin-left: auto; font-weight: 700; font-size: 14px; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 12px; border-radius: 14px; background: var(--surface2);
  cursor: pointer; min-height: 64px; transition: background .15s; }
.item .ck { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--accent); background: var(--surface); flex: none;
  display: grid; place-items: center; color: var(--ink); font-size: 16px; }
.item.done .ck { background: var(--accent); }
.item .im { width: 42px; height: 42px; border-radius: 11px; background: var(--surface); flex: none; overflow: hidden; display: grid;
  place-items: center; font-weight: 700; font-size: 16px; }
.item .im img { width: 100%; height: 100%; object-fit: cover; }
.item .tx { flex: 1; min-width: 0; line-height: 1.3; }
.item .tx b { display: block; font-size: 13.5px; color: var(--accent); }
.item .tx span { display: block; font-size: 13.5px; }
.item .tx small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.done .tx b, .item.done .tx span { text-decoration: line-through; color: var(--muted); }
.item .price { align-self: stretch; min-width: 64px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  padding: 0 8px; font-size: 12.5px; font-weight: 700; border-radius: 10px; }
.item .price.none { color: var(--muted); }
.item .price em { font-style: normal; font-weight: 400; font-size: 10px; color: var(--accent); }

/* ---------- statistiques ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 14px; }
.tile { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 18px; display: flex; align-items: center; gap: 14px; }
.tile .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--tint); color: var(--accent); display: grid; place-items: center; font-size: 22px; }
.tile b { display: block; font-size: 24px; line-height: 1.1; }
.tile small { font-size: 12.5px; color: var(--muted); }
.st-info { font-size: 13px; color: var(--muted); margin-bottom: 22px; line-height: 1.5; }
.month-h { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 10px; }
.month-h h3 { font-size: 17px; }
.month-h small { font-size: 12px; font-weight: 700; color: var(--muted); }
.st-row { display: flex; align-items: center; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
  margin-bottom: 10px; min-height: 66px; }
.st-row .pic { width: 96px; align-self: stretch; background: #2b302d; flex: none; position: relative; }
.st-row .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-row .nm { flex: 1; padding: 10px 16px; min-width: 0; cursor: pointer; }
.st-row .nm b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-row .nm small { font-size: 12px; color: var(--muted); }
.st-row .mt { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 0 12px; white-space: nowrap; }
.st-row .mt .i { color: var(--accent); }
.st-row .rm { width: 38px; height: 38px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; color: var(--muted);
  margin: 0 12px; flex: none; }

/* ---------- feuilles (dialogues) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(10, 15, 12, .45); display: flex; align-items: center;
  justify-content: center; padding: 24px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--surface); border-radius: 22px; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); width: min(520px, 100%);
  max-height: calc(100% - 20px); display: flex; flex-direction: column; overflow: hidden; animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.sheet .sh { padding: 22px 24px 8px; }
.sheet h2 { font-size: 19px; }
.sheet .sb { padding: 8px 24px 4px; font-size: 14px; line-height: 1.55; color: var(--text); overflow-y: auto; white-space: pre-line; }
.sheet .sb .muted { color: var(--muted); }
.sheet .sf { padding: 16px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sheet .sf .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
.sheet input.txt { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); padding: 0 14px;
  font-size: 16px; outline: 0; margin-top: 12px; }
.sheet input.txt:focus { border-color: var(--accent); background: var(--surface); }
.sheet.wide { width: min(680px, 100%); }
.sheet.browse-sheet { width: min(620px, 100%); height: min(760px, 100%); }
.sheet .list { overflow-y: auto; padding: 4px 12px 16px; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet .list .hd { font-size: 10.5px; letter-spacing: .9px; font-weight: 700; color: var(--muted); padding: 14px 12px 6px; }
.sheet .list button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 46px; padding: 0 12px;
  border-radius: 12px; font-size: 14.5px; text-align: left; gap: 12px; }
.sheet .list button:active { background: var(--surface2); }
.sheet .list button.on { background: var(--accent); color: var(--ink); font-weight: 600; }
.sheet .list button span { font-size: 12px; color: var(--muted); }
.sheet .list button.on span { color: inherit; opacity: .8; }
.sheet .x { position: absolute; }

/* ---------- profils ---------- */
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700;
  font-size: 15px; flex: none; }
.av.lg { width: 72px; height: 72px; font-size: 30px; box-shadow: 0 6px 18px rgba(0, 0, 0, .16); }
.av.add { background: var(--surface2); color: var(--muted); box-shadow: none; border: 2px dashed var(--line); font-weight: 400; }
.me-box { background: var(--surface2); border-radius: 14px; overflow: hidden; }
.me { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; text-align: left; min-height: 54px; }
.me-pw { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px 0 16px; border-top: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--accent); text-align: left; }
.me-pw .i { font-size: 15px; }
.me > span:nth-child(2) { flex: 1; min-width: 0; line-height: 1.25; }
.me b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { font-size: 11.5px; color: var(--muted); }
.me > .i { color: var(--muted); }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 16px; }
.pick button { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 8px 14px; border-radius: 16px;
  font-weight: 600; font-size: 14.5px; }
.pick button:active { background: var(--surface2); }
.pick button.on { background: var(--tint); color: var(--accent); }
.pick button span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prows { display: flex; flex-direction: column; gap: 8px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; background: var(--surface2); white-space: normal; }
.prow b { flex: 1; font-size: 14.5px; min-width: 0; }
.prow small.pw { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.prow small.pw.on { color: var(--accent); }
.prow { flex-wrap: wrap; }
.pick button.off { opacity: .5; }
.pick button small.cur { color: var(--accent); font-weight: 700; }
.sheet-wrap ~ .toast, .toast { z-index: 95; }
.pick button small { font-size: 11px; font-weight: 400; color: var(--muted); margin-top: -6px; }
.prow small { font-size: 11.5px; color: var(--muted); }
.sheet .muted { color: var(--muted); }
.sheet .form { white-space: normal; display: flex; flex-direction: column; gap: 12px; }
.sheet .form p { margin: 0; }
.sheet .form .small { font-size: 12.5px; }
.fld { display: flex; flex-direction: column; gap: 5px; }
.fld span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.fld input.txt { margin-top: 0; }
.acct { display: flex; align-items: center; gap: 16px; }
.acct b { display: block; font-size: 18px; }
.acct .muted { font-size: 13px; }
.invite { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--tint); margin-bottom: 12px;
  flex-wrap: wrap; white-space: normal; }
.invite > div { flex: 1 1 220px; line-height: 1.35; }
.invite b { display: block; font-size: 14px; }
.invite .muted { font-size: 12px; }
.invite code { font-family: ui-monospace, Consolas, monospace; font-size: 17px; font-weight: 700; letter-spacing: 1px; color: var(--accent);
  background: var(--surface); padding: 6px 12px; border-radius: 10px; }
.prow small.presence { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.presence .pres { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.presence .devs { display: block; }
.presence .dev { display: block; padding-left: 14px; }
.presence .dot { width: 8px; height: 8px; border-radius: 50%; background: #c4ccc6; display: inline-block; flex: none; }
.presence .dot.on { background: #2fb344; box-shadow: 0 0 0 3px rgba(47, 179, 68, .2); animation: pulse 2s ease-in-out infinite; }
.presence b.on { color: #23963a; font-weight: 700; font-size: inherit; flex: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(47, 179, 68, .08); } }
.prow b em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--tint); padding: 2px 8px;
  border-radius: 999px; margin-left: 6px; vertical-align: 2px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(26px + var(--sab)); transform: translate(-50%, 20px); background: #17201b; color: #fff;
  padding: 12px 18px; border-radius: 14px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 90;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); display: flex; align-items: center; gap: 14px; max-width: calc(100% - 40px); }
.app.in-detail ~ .toast { bottom: calc(96px + var(--sab)); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: #fff; background: var(--accent); padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }

/* ---------- portrait / écrans étroits ---------- */
@media (max-width: 1360px) {
  .who .t { display: none; }
  .search { min-width: 200px; }
  .swatch button { padding: 0 8px; --lh: 17px; }
}
@media (max-width: 1023px) {
  :root { --pad: 20px; }
  .rail { position: fixed; left: 0; top: 0; bottom: 0; width: 300px; transform: translateX(-102%); transition: transform .25s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .app.drawer .rail { transform: none; }
  .app.drawer .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 15, 12, .35); z-index: 35; }
  .band .menu { display: grid; order: 0; }
  .me-mini { display: grid !important; order: 2; margin-left: auto; }
  .who { order: 1; }
  .swatch { order: 3; }
  .band .sp { display: none; }
  .band-r1 { gap: 12px; }
  .search { order: 5; max-width: none; flex-basis: 100%; }
  .who .t span { display: none; }
}
@media (min-width: 640px) and (max-width: 1023px) {   /* iPad en portrait : logos des sites puis pastille, à droite */
  .swatch { order: 2; margin-left: auto; }
  .me-mini { order: 3; margin-left: 0; }
}
@media (max-width: 900px) {
  .c-body, .extras { grid-template-columns: 1fr; }
  .cartouche { max-width: 62%; }
  .hero { min-height: 400px; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .cartouche { max-width: none; min-width: 0; margin: 14px; }
  .feature > img, .hero > img { width: 100%; -webkit-mask-image: none; mask-image: none; }
  .who .t { display: none; }
  .hero-actions { right: 18px; }
  .hero .badge { display: none; }
  .shop-recipes, .items { grid-template-columns: 1fr; }
}
