/* Popote · direction « Carnet » — papier crème, titres en serif, une seule couleur d'accent. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/inter-normal.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('fonts/newsreader-normal.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/newsreader-italic.woff2') format('woff2'); }

:root {
  --bg: #FAF7F2; --ink: #1F1B16; --ink2: #4A433B; --mute: #8C847A; --faint: #B9B0A4; --line: #E9E2D7; --soft: #F2ECE3; --raise: #FFFDFA;
  --acc: #B5532E; --acc-soft: rgba(181, 83, 46, .1); --scrim: rgba(31, 27, 22, .32); --bar: rgba(250, 247, 242, .9);
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif; --sans: 'Inter', -apple-system, system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161310; --ink: #F2ECE3; --ink2: #CFC6BA; --mute: #968C80; --faint: #645C53; --line: #2B2520; --soft: #221D18; --raise: #1D1915;
    --acc: #DB7A52; --acc-soft: rgba(219, 122, 82, .14); --scrim: rgba(0, 0, 0, .55); --bar: rgba(22, 19, 16, .88);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161310; --ink: #F2ECE3; --ink2: #CFC6BA; --mute: #968C80; --faint: #645C53; --line: #2B2520; --soft: #221D18; --raise: #1D1915;
  --acc: #DB7A52; --acc-soft: rgba(219, 122, 82, .14); --scrim: rgba(0, 0, 0, .55); --bar: rgba(22, 19, 16, .88);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--ink); }
body { font: 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; -webkit-user-select: none; user-select: none; font-feature-settings: "cv11"; }
input, textarea, select, button { font: inherit; color: inherit; background: none; border: 0; outline: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
button, [data-a] { cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }
.i { display: block; flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); }
.mute { color: var(--mute); }
.acc { color: var(--acc); }

/* ---------- Structure ---------- */
#view { padding: calc(var(--safe-t) + 18px) 22px calc(var(--safe-b) + 120px); max-width: 680px; margin: 0 auto; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
h1.title { font: 500 38px/1.05 var(--serif); letter-spacing: -.6px; margin-top: 6px; }
.round { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--ink); display: grid; place-items: center; flex-shrink: 0; position: relative; transition: transform .15s; }
.round:active { transform: scale(.92); }
.round .dot { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--bg); }
.sec { display: flex; justify-content: space-between; align-items: baseline; margin: 30px 0 4px; }
.sec h3 { font: 500 23px var(--serif); letter-spacing: -.2px; }
.link { font-size: 14px; font-weight: 500; color: var(--acc); }
.note { font-size: 13px; color: var(--mute); margin-top: 10px; line-height: 1.5; }

/* ---------- Barre d'onglets ---------- */
#tabbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 9px 12px calc(var(--safe-b) + 6px);
  background: var(--bar); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
#tabbar button { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72px; font-size: 10.5px; font-weight: 500; color: var(--faint); transition: color .2s; }
#tabbar button.on { color: var(--ink); }

/* ---------- Photos ---------- */
.ph { width: 100%; height: 100%; object-fit: cover; background: var(--soft); }
.ph-empty { display: grid; place-items: center; padding: 14px; background: var(--soft); color: var(--mute); text-align: center; font: 500 20px/1.15 var(--serif); }
.ph-empty .ini { display: none; }
.thumb .ph-empty { font-size: 0; padding: 0; }
.thumb .ph-empty .ini { display: block; font-size: 24px; }
.thumb .ph-empty .full { display: none; }
/* Sans photo : une grande initiale plutôt que le nom répété */
.rc .ph-empty .full { display: none; }
.rc .ph-empty .ini { display: block; font: italic 400 72px/1 var(--serif); color: var(--faint); }

/* ---------- Semaine ---------- */
.tonight { position: relative; display: block; width: 100%; height: 300px; border-radius: 20px; overflow: hidden; text-align: left; }
.tonight::after { content: ""; position: absolute; inset: 38% 0 0; background: linear-gradient(transparent, rgba(20, 14, 8, .8)); }
.tonight .t { position: absolute; left: 20px; right: 82px; bottom: 18px; color: #fff; z-index: 1; }
.tonight .t span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .82; }
.tonight h2 { font: 500 28px/1.08 var(--serif); margin: 5px 0; }
.tonight .t small { font-size: 13px; opacity: .85; }
.tonight .go { position: absolute; right: 18px; bottom: 20px; width: 50px; height: 50px; border-radius: 50%; background: #FAF7F2; color: #1F1B16; display: grid; place-items: center; z-index: 1; }
.free { border-radius: 20px; background: var(--soft); padding: 26px 22px; }
.free h2 { font: 500 26px/1.1 var(--serif); margin: 6px 0 4px; }
.free p { color: var(--mute); font-size: 15px; }
.free .btns { margin-top: 18px; flex-wrap: wrap; }
.free .btns > * { flex: 0 0 auto; }
.free .btn.line { background: var(--bg); box-shadow: none; }
.strip { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; margin-top: 4px; }
.strip .lbl { flex: 1; min-width: 0; }
.strip b { font-weight: 600; font-size: 15px; display: block; }
.strip small { color: var(--mute); font-size: 13px; }
.bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 2px; transition: width .4s; }
.bar i.over { background: var(--acc); }
.day { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; min-height: 78px; }
.day .d { width: 40px; text-align: center; flex-shrink: 0; }
.day .d b { display: block; font: 500 27px/1 var(--serif); }
.day .d span { font-size: 10px; font-weight: 600; letter-spacing: .12em; color: var(--mute); text-transform: uppercase; }
.day.today .d b, .day.today .d span { color: var(--acc); }
.day .m { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 500; }
.day .m small { display: block; color: var(--mute); font-weight: 400; font-size: 13px; margin-top: 1px; }
.day.done .m, .day.past .m { color: var(--mute); }
.day.past .thumb { opacity: .55; }
.day .thumb { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.day .empty { flex: 1; padding: 0; text-align: left; color: var(--faint); font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.day.cont { min-height: 0; }
.day.cont .d { visibility: hidden; }
.weeknav { display: flex; justify-content: center; margin-top: 24px; }

/* ---------- Recettes ---------- */
.search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: var(--soft); border-radius: 12px; color: var(--mute); }
.search input { flex: 1; height: 100%; color: var(--ink); font-size: 16px; min-width: 0; }
.search input::placeholder { color: var(--mute); }
.search input::-webkit-search-cancel-button { display: none; }
.filters { display: flex; gap: 20px; overflow-x: auto; margin: 14px -22px 0; padding: 0 22px; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex-shrink: 0; font-size: 15px; font-weight: 500; color: var(--mute); padding: 8px 0 10px; white-space: nowrap; }
.filters button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.grid { display: grid; align-items: start; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 14px; margin-top: 20px; }
.rc { text-align: left; display: block; width: 100%; }
.rc .img { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; transition: transform .2s; }
.rc:active .img { transform: scale(.98); }
.rc .fav { position: absolute; top: 10px; right: 10px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
.rc h4 { font: 500 18px/1.18 var(--serif); margin-top: 10px; letter-spacing: -.1px; }
.rc small { display: block; font-size: 13px; color: var(--mute); margin-top: 3px; }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.li .thumb { width: 62px; height: 62px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.li .m { flex: 1; min-width: 0; }
.li .m b { display: block; font: 500 18px/1.2 var(--serif); }
.li .m small { display: block; font-size: 13px; color: var(--mute); margin-top: 3px; }
.li .e { font-size: 13px; color: var(--mute); text-align: right; white-space: nowrap; }
.li .date { width: 40px; text-align: center; flex-shrink: 0; }
.li .date b { display: block; font: 500 24px/1 var(--serif); }
.li .date span { font-size: 10px; font-weight: 600; letter-spacing: .12em; color: var(--mute); text-transform: uppercase; }
.li .on { color: var(--ink); }
.stars { display: inline-flex; gap: 1px; color: var(--ink); vertical-align: -2px; }
.month { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 28px 0 0; }
.count { display: flex; gap: 28px; margin: 22px 0 0; }
.count div b { display: block; font: 500 32px/1 var(--serif); }
.count div span { font-size: 12px; color: var(--mute); }
.empty { text-align: center; padding: 56px 24px; color: var(--mute); }
.empty b { display: block; font: 500 24px/1.2 var(--serif); color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 20px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 52px; padding: 0 24px; border-radius: 26px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 16px; transition: transform .12s, opacity .2s; white-space: nowrap; }
.btn:disabled { opacity: .35; pointer-events: none; }
.btn:active { transform: scale(.98); opacity: .9; }
.btn.soft { background: var(--soft); color: var(--ink); }
.btn.line { background: none; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); }
.btn.sm { height: 40px; padding: 0 18px; border-radius: 20px; font-size: 14.5px; }
.btn.danger { background: none; color: var(--acc); box-shadow: inset 0 0 0 1.5px var(--line); }
.btns { display: flex; gap: 10px; margin-top: 20px; }
.btns > * { flex: 1; }

/* ---------- Fiche recette ---------- */
.page { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; animation: push .34s cubic-bezier(.2, .8, .2, 1); }
.page.out { animation: pop .26s ease-in forwards; }
@keyframes push { from { transform: translateX(100%); } }
@keyframes pop { to { transform: translateX(100%); } }
.hero { height: 400px; }
.hero .ph-empty { font-size: 34px; padding: 70px 40px 60px; }
.hero-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 300px; background: var(--soft); color: var(--mute); font-size: 15px; cursor: pointer; padding-bottom: 30px; }
.float { position: fixed; top: calc(var(--safe-t) + 10px); left: 0; right: 0; padding: 0 16px; display: flex; justify-content: space-between; z-index: 6; pointer-events: none; max-width: 712px; margin: 0 auto; }
.float > * { pointer-events: auto; }
.float .grp { display: flex; gap: 10px; }
.glass { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #1F1B16; background: rgba(250, 247, 242, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.glass.on { color: var(--acc); }
.float::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: calc(var(--safe-t) + 60px); background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .2s; z-index: -1; pointer-events: none; }
.float .ttl { position: absolute; left: 66px; right: 116px; top: 0; font: 500 17px/40px var(--serif); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s; pointer-events: none; }
.page.scrolled .float::before, .page.scrolled .float .ttl { opacity: 1; }
.page.scrolled .glass { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--ink); }
.page.scrolled .glass.on { color: var(--acc); }
.sheet-body { position: relative; margin: -30px auto 0; background: var(--bg); border-radius: 26px 26px 0 0; padding: 28px 22px calc(var(--safe-b) + 120px); max-width: 680px; }
.sheet-body h1 { font: 500 34px/1.08 var(--serif); letter-spacing: -.5px; margin: 7px 0 18px; }
.meta { display: flex; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta > div { flex: 1; padding: 12px 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.meta > div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.meta small { font-size: 10.5px; color: var(--mute); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.meta b { font: 500 20px var(--serif); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.meta .stp { color: var(--mute); display: grid; place-items: center; width: 24px; height: 24px; margin: -4px; }
.tabs2 { display: flex; gap: 24px; margin: 26px 0 0; border-bottom: 1px solid var(--line); }
.tabs2 button { font-size: 15px; font-weight: 600; color: var(--mute); padding-bottom: 10px; }
.tabs2 button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.ing { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.ing b { font-weight: 600; min-width: 72px; flex-shrink: 0; }
.ing span { flex: 1; }
.ing em { font-style: normal; font-size: 12px; color: var(--mute); white-space: nowrap; }
.ing em.buy { color: var(--acc); }
.step { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.step .n { font: 500 26px/1 var(--serif); color: var(--faint); width: 26px; flex-shrink: 0; }
.step p { font-size: 16px; line-height: 1.55; }
.tlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--acc); }
.after { margin-top: 22px; color: var(--mute); font-size: 14px; }
.after .link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; }
.cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(var(--safe-b) + 14px); background: linear-gradient(transparent, var(--bg) 35%); z-index: 6; }
.cta > div { display: flex; gap: 10px; max-width: 648px; margin: 0 auto; }
.cta .btn { flex: 1; height: 56px; border-radius: 28px; }
.cta .round { width: 56px; height: 56px; }
.cta .round.on { background: var(--ink); color: var(--bg); }

/* ---------- Mode cuisine ---------- */
.cook { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; padding: calc(var(--safe-t) + 14px) 24px calc(var(--safe-b) + 18px); animation: up .36s cubic-bezier(.2, .9, .25, 1); }
.cook.out { animation: up .24s reverse forwards; }
.cook-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cook-top b { font: 500 17px var(--serif); text-align: center; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog { display: flex; gap: 4px; margin-top: 18px; }
.prog i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.prog i.on { background: var(--ink); }
.cook-main { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 620px; width: 100%; margin: 0 auto; }
.cook-main p { font: 400 31px/1.3 var(--serif); letter-spacing: -.2px; margin: 12px 0 24px; -webkit-user-select: text; user-select: text; }
.cook-main .next { color: var(--faint); font-size: 15px; margin-top: 36px; border-top: 1px solid var(--line); padding-top: 16px; }
.cook-main .next span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.cook .btns { max-width: 620px; width: 100%; margin: 0 auto; }

/* ---------- Courses ---------- */
.budget { padding: 2px 0 18px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; display: block; }
.budget .big { font: 500 48px/1 var(--serif); letter-spacing: -1.2px; display: flex; align-items: baseline; gap: 8px; }
.budget .big small { font: 400 15px var(--sans); color: var(--mute); letter-spacing: 0; }
.budget .cap { display: flex; justify-content: space-between; font-size: 13px; color: var(--mute); margin-top: 9px; }
.add { display: flex; align-items: center; gap: 12px; height: 54px; color: var(--mute); border-bottom: 1px solid var(--line); }
.add input { flex: 1; height: 100%; font-size: 16px; color: var(--ink); min-width: 0; }
.add input::placeholder { color: var(--mute); }
.aisle { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 26px 0 0; display: flex; justify-content: space-between; }
.it { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ck { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--faint); flex-shrink: 0; display: grid; place-items: center; color: var(--bg); transition: background .15s, border-color .15s; }
.ck.on { background: var(--ink); border-color: var(--ink); }
.it .n { flex: 1; min-width: 0; text-align: left; font-size: 16px; }
.it .n small { display: block; font-size: 12.5px; color: var(--mute); margin-top: 1px; }
.it.x .n { color: var(--mute); text-decoration: line-through; text-decoration-color: var(--faint); }
.it .pr { font-size: 14px; color: var(--mute); }
.float-cta { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 80px); z-index: 15; box-shadow: 0 10px 30px rgba(31, 27, 22, .22); animation: rise .3s; }
@keyframes rise { from { transform: translate(-50%, 20px); opacity: 0; } }
.spend { display: flex; align-items: flex-end; gap: 10px; height: 104px; margin-top: 16px; }
.spend div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; font-size: 11px; color: var(--mute); }
.spend i { display: block; width: 100%; max-width: 30px; min-height: 2px; border-radius: 3px; background: var(--ink); }
.spend i.over { background: var(--acc); }
.spend i.zero { background: var(--line); }

/* ---------- Frigo ---------- */
.places { display: flex; gap: 20px; margin: 14px 0 0; border-bottom: 1px solid var(--line); }
.places button { font-size: 15px; font-weight: 500; color: var(--mute); padding: 8px 0 10px; }
.places button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.ideas { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; margin: 14px -22px 0; padding: 0 22px 4px; scroll-snap-type: x mandatory; scroll-padding: 0 22px; scrollbar-width: none; }
.ideas::-webkit-scrollbar { display: none; }
.ideas .rc { width: 140px; flex-shrink: 0; scroll-snap-align: start; }
.ideas .rc .img { aspect-ratio: 1; }
.ideas .rc h4 { font-size: 16px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink2); font-size: 14.5px; width: 100%; text-align: left; }
.alert .i { color: var(--acc); margin-top: 1px; }
.pi { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.pi .n { flex: 1; min-width: 0; font-size: 16px; }
.pi .n small { display: block; font-size: 13px; color: var(--mute); }
.pi .x { font-size: 13px; color: var(--mute); white-space: nowrap; }
.pi .x.soon { color: var(--acc); font-weight: 500; }

/* ---------- Feuilles ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 35; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s; }
.sheet-wrap.out { animation: fade .22s reverse forwards; }
.sheet { background: var(--bg); width: 100%; max-width: 680px; max-height: calc(100% - var(--safe-t) - 16px); border-radius: 22px 22px 0 0; overflow-y: auto; padding: 0 22px calc(var(--safe-b) + 28px); animation: up .36s cubic-bezier(.2, .9, .25, 1); }
.sheet-wrap.out .sheet { animation: up .22s reverse forwards; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -22px; padding: 22px 22px 14px; background: var(--bg); }
.sbar::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; border-radius: 2px; background: var(--line); transform: translateX(-50%); }
.sbar h3 { flex: 1; text-align: center; font: 500 19px var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbar button { min-width: 72px; font-size: 15px; color: var(--mute); text-align: left; }
.sbar button.ok { text-align: right; color: var(--acc); font-weight: 600; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 28px 0 2px; }
.sbar + .label { margin-top: 6px; }
.fr { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; font-size: 16px; }
.fr .k { flex: 1; min-width: 0; }
.fr .k small { display: block; font-size: 13px; color: var(--mute); }
.fr input, .fr select { text-align: right; color: var(--ink2); font-size: 16px; min-width: 0; width: 50%; -webkit-appearance: none; appearance: none; }
.fr select { text-align-last: right; }
.fr input[type=number] { width: 88px; flex-shrink: 0; }
.fr input::placeholder { color: var(--faint); }
.fr .v { color: var(--mute); font-size: 15px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.fr.on .v { color: var(--ink); }
.fr.danger { color: var(--acc); }
.fr .lead { color: var(--mute); }
.big-input { width: 100%; font: 500 28px/1.2 var(--serif); padding: 8px 0 12px; border-bottom: 1px solid var(--line); color: var(--ink); }
.big-input::placeholder { color: var(--faint); }
textarea.area { width: 100%; min-height: 150px; resize: vertical; padding: 14px 16px; background: var(--soft); border-radius: 14px; font-size: 15.5px; line-height: 1.55; color: var(--ink); margin-top: 8px; }
textarea.area::placeholder { color: var(--faint); }
.photo-pick { position: relative; display: block; height: 210px; border-radius: 18px; overflow: hidden; background: var(--soft); }
.photo-pick .over { position: absolute; right: 12px; bottom: 12px; }
.photo-pick .none { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--mute); font-size: 14px; font-weight: 500; }
.stars-in { display: flex; justify-content: center; gap: 16px; margin: 12px 0 4px; color: var(--faint); }
.stars-in button.on { color: var(--ink); }
.toggle, .fr .toggle { position: relative; width: 50px; height: 30px; border-radius: 15px; background: var(--line); flex-shrink: 0; transition: background .2s; -webkit-appearance: none; appearance: none; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.toggle:checked { background: var(--ink); }
.toggle:checked::after { transform: translateX(20px); }
.code { font: 500 26px var(--serif); letter-spacing: 3px; text-align: center; padding: 18px; border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; -webkit-user-select: all; user-select: all; }
.hint { font-size: 14px; color: var(--ink2); line-height: 1.55; background: var(--soft); border-radius: 14px; padding: 14px 16px; margin-top: 10px; }
.hint code { font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status i { width: 7px; height: 7px; border-radius: 50%; }

/* ---------- Minuteurs & messages ---------- */
#timer-pill { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 78px); display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 18px 0 14px; border-radius: 22px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 15px; box-shadow: 0 10px 28px rgba(31, 27, 22, .25); max-width: calc(100% - 32px); white-space: nowrap; }
#timer-pill .lbl { font-weight: 400; opacity: .7; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
#timer-pill.ring { background: var(--acc); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.04); } }
.layer-open #timer-pill { bottom: calc(var(--safe-b) + 96px); }
.sheet-open #timer-pill { display: none; }
.has-float-cta #timer-pill { bottom: calc(var(--safe-b) + 140px); }
.timer { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timer .tt { font: 400 46px/1 var(--serif); letter-spacing: -1px; }
.timer .tl { font-size: 13px; color: var(--mute); margin-top: 6px; }
.timer.ring .tt { color: var(--acc); }
.timer .acts { display: flex; gap: 8px; margin-left: auto; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.presets button { height: 48px; border-radius: 24px; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; font-size: 15px; }
#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--safe-b) + 82px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 22px;
  font-size: 14.5px; font-weight: 500; animation: rise .3s; max-width: calc(100% - 40px); width: max-content; text-align: center; box-shadow: 0 10px 30px rgba(31, 27, 22, .2); }
.layer-open #toast { bottom: calc(var(--safe-b) + 100px); }
.has-float-cta #toast { bottom: calc(var(--safe-b) + 140px); }
/* Le message passe au-dessus du minuteur quand il est affiché */
.has-timer #toast { bottom: calc(var(--safe-b) + 136px); }
.has-timer.layer-open #toast { bottom: calc(var(--safe-b) + 154px); }
.has-timer.has-float-cta #toast { bottom: calc(var(--safe-b) + 198px); }
.has-timer.sheet-open #toast { bottom: calc(var(--safe-b) + 100px); }

/* ---------- Mode courses ---------- */
.shopgo { width: 100%; margin-top: 16px; }
.shopm { position: fixed; inset: 0; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 20px calc(var(--safe-b) + 120px); animation: up .36s cubic-bezier(.2, .9, .25, 1); }
.shopm.out { animation: up .24s reverse forwards; }
.shopm > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.shop-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 14px) 0 10px; background: var(--bg); }
.shop-top > div { flex: 1; text-align: center; min-width: 0; }
.shop-top b { display: block; font: 500 20px/1.2 var(--serif); }
.shop-top small { font-size: 13px; color: var(--mute); }
.prog1 { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 4px; }
.prog1 i { display: block; height: 100%; background: var(--ink); transition: width .3s; }
.sb { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 68px; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
.sb .ck { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1.75px var(--faint); display: grid; place-items: center; flex-shrink: 0; transition: background .15s; }
.sb .ck.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.sb .n { flex: 1; min-width: 0; font-size: 19px; font-weight: 500; }
.sb .n small { display: block; font-size: 14px; color: var(--mute); font-weight: 400; margin-top: 2px; }
.sb .pr { color: var(--mute); font-size: 15px; }
.sb.x .n { color: var(--faint); text-decoration: line-through; }
.sb.x .n small { text-decoration: none; }
.aisle.done { color: var(--faint); }
.shop-cta { position: fixed; left: 0; right: 0; bottom: 0; max-width: none; padding: 14px 16px calc(var(--safe-b) + 14px); background: linear-gradient(transparent, var(--bg) 35%); }
.shop-cta .btn { display: flex; width: 100%; max-width: 648px; height: 56px; margin: 0 auto; border-radius: 28px; }

/* ---------- Réglages : soirs végé, flèches, compteurs ---------- */
.days7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.days7 button { height: 42px; border-radius: 21px; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; font-size: 15px; transition: background .15s; }
.days7 button.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.fr .steps { display: flex; gap: 8px; }
.fr .stp { width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--ink); display: grid; place-items: center; }
.fr .stp:disabled { opacity: .3; }
.note .i { display: inline-block; vertical-align: -2px; }

/* Gestes : une couche glissée au doigt se ferme depuis sa position, sans rejouer l'animation */
.sheet-wrap.dragged.out .sheet, .page.dragged.out, .cook.dragged.out, .shopm.dragged.out { animation: none; }
.cook::before, .shop-top::before { content: ""; position: absolute; top: calc(var(--safe-t) + 5px); left: 50%; width: 36px; height: 4px; border-radius: 2px; background: var(--line); transform: translateX(-50%); }
.shop-top::before { top: calc(var(--safe-t) + 4px); }
.sheet, .shopm, .page { overscroll-behavior-y: contain; }

/* Repas de la journée */
.day .ml { display: block; font: 600 10.5px/1.3 var(--sans); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin-bottom: 2px; }
.day.today .ml { color: var(--acc); }
.day .empty span { display: block; }
.days7.meals { grid-template-columns: repeat(4, 1fr); }
.days7.meals button { font-size: 14px; }
