/* Batch & Co — feuille de style (mobile d'abord) */
:root {
    --bg: #fbf8f3; --surface: #ffffff; --ink: #1f2933; --muted: #6b7280; --line: #e8e2d8;
    --primary: #2f855a; --primary-ink: #ffffff; --primary-soft: #e6f4ec; --primary-dark: #276749;
    --accent: #ed8936; --accent-soft: #fdf0e1; --danger: #c53030; --danger-soft: #fdeaea;
    --info-soft: #e8f1fb; --info-ink: #2a4a73; --cold: #2b6cb0; --cold-soft: #e3effb;
    --radius: 14px; --shadow: 0 1px 2px rgba(31, 41, 51, .06), 0 4px 14px rgba(31, 41, 51, .06);
    --tab-h: 62px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14171a; --surface: #1d2226; --ink: #e8ecef; --muted: #98a2ad; --line: #2c343b;
        --primary: #48bb78; --primary-ink: #0b1f14; --primary-soft: #1b3226; --primary-dark: #68d391;
        --accent: #f6ad55; --accent-soft: #33291d; --danger: #fc8181; --danger-soft: #3b2222;
        --info-soft: #1c2b3d; --info-ink: #b6d2f2; --cold: #63b3ed; --cold-soft: #1b2b3b;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; } h4 { font-size: 1rem; margin-top: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primary-dark); }
img { max-width: 100%; }
small, .hint { color: var(--muted); }
.hint { font-size: .875rem; margin: .5rem 0 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
code { background: var(--primary-soft); padding: 1px 5px; border-radius: 5px; font-size: .85em; }
[hidden] { display: none !important; }

/* ---------- Structure ---------- */
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 16px calc(var(--tab-h) + 32px + env(safe-area-inset-bottom)); }
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar-in { max-width: 960px; margin: 0 auto; padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.brand { font-weight: 800; font-size: 1.1rem; color: var(--ink); text-decoration: none; margin-right: auto; display: flex; align-items: center; gap: 6px; }
.topnav { display: none; gap: 4px; }
.topnav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; }
.topnav a.on { background: var(--primary-soft); color: var(--primary-dark); }
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tab-h); text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; }
.tabbar a .ti { font-size: 1.4rem; line-height: 1; filter: grayscale(.6); }
.tabbar a.on { color: var(--primary-dark); } .tabbar a.on .ti { filter: none; }
@media (min-width: 900px) {
    .tabbar { display: none; } .topnav { display: flex; }
    .wrap { max-width: 960px; padding-bottom: 48px; }
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.head-actions { display: flex; gap: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 0 8px; }
.section-head h2 { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--primary-dark); font-weight: 700; margin: 0 0 2px; }

/* ---------- Boutons & formulaires ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px;
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { border-color: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-dark); color: var(--primary-ink); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn-on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.btn-sm { min-height: 36px; padding: 4px 12px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
    border: 0; background: transparent; color: var(--ink); font-size: 1.15rem; text-decoration: none; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--primary-soft); }
.icon-btn.fav.on { color: #e53e3e; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.actions form { margin: 0; }
.actions-end { margin-top: 20px; }

.field { display: block; margin: 0 0 14px; border: 0; padding: 0; }
.field > span, fieldset.field legend { display: block; font-weight: 600; margin-bottom: 4px; font-size: .92rem; padding: 0; }
input[type=text], input[type=search], input[type=url], input[type=number], input[type=date], select, textarea {
    width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 1px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 420px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .9rem; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-error { color: var(--danger); font-weight: 600; }
.card, fieldset.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; box-shadow: var(--shadow); }
fieldset.card legend { font-weight: 700; padding: 0 6px; }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); }
.flash-err { background: var(--danger-soft); border-color: var(--danger); }
.flash-info { background: var(--info-soft); border-color: transparent; color: var(--info-ink); }
.code-show { font-family: ui-monospace, Menlo, monospace; font-size: 1.2rem; letter-spacing: .06em; user-select: all; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.3rem; color: var(--primary-dark); cursor: pointer; }
.stepper button:active { background: var(--primary-soft); }
.stepper input, .stepper output { width: 44px; min-height: 40px; height: 40px; text-align: center; border: 0; border-radius: 0; padding: 0; font-weight: 700; font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center; -moz-appearance: textfield; background: transparent; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.persons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }

/* ---------- Connexion ---------- */
body.login .wrap { display: grid; place-items: center; min-height: 100vh; padding-bottom: 32px; }
.login-card { width: 100%; max-width: 380px; text-align: center; background: var(--surface); padding: 28px 22px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.login-logo { font-size: 3.2rem; }
.code-input { text-align: center; font-size: 1.25rem; letter-spacing: .12em; text-transform: uppercase; font-family: ui-monospace, Menlo, monospace; }
.login-card .field { text-align: left; }

/* ---------- Accueil ---------- */
.hero { margin: 4px 0 16px; } .hero h1 { margin: 0; font-size: 1.9rem; }
.steps { display: grid; gap: 10px; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
.step { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.step.done .step-n { background: var(--primary); color: var(--primary-ink); }
.step-t { display: flex; flex-direction: column; } .step-t small { font-size: .85rem; }
.cta-row { display: grid; gap: 10px; margin-top: 20px; }
@media (min-width: 640px) { .cta-row { grid-template-columns: 1fr 1fr; } }
.cta { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--primary-soft); text-decoration: none; color: var(--ink); }
.cta span { grid-row: span 2; font-size: 1.8rem; align-self: center; } .cta small { color: var(--muted); }

/* ---------- Recettes : liste & cartes ---------- */
.search { display: flex; gap: 8px; margin-bottom: 10px; }
.search input { flex: 1; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -16px 4px; padding-inline: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 600; white-space: nowrap; }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chips-sm .chip { padding: 5px 11px; font-size: .82rem; font-weight: 500; }
.rlist { display: grid; gap: 10px; }
@media (min-width: 720px) { .rlist { grid-template-columns: 1fr 1fr; } }
.rcard { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rcard-link { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 12px; text-decoration: none; color: var(--ink); }
.rcard-ico { flex: none; width: 58px; height: 58px; border-radius: 14px; background: var(--primary-soft); display: grid; place-items: center; font-size: 1.9rem; overflow: hidden; }
.rcard-ico.has-img img { width: 100%; height: 100%; object-fit: cover; }
.rcard-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rcard-body strong { line-height: 1.25; }
.rcard-meta { font-size: .82rem; color: var(--muted); }
.rcard-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rcard-actions { display: flex; flex-direction: column; justify-content: space-around; padding: 4px 6px 4px 0; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--line); color: var(--ink); }
.b-frigo { background: var(--cold-soft); color: var(--cold); } .b-congel { background: #e6e9fb; color: #4c51bf; } .b-veg { background: var(--primary-soft); color: var(--primary-dark); }
.b-mine { background: var(--accent-soft); color: var(--accent); } .b-batch { background: var(--accent); color: #fff; } .b-alerte { background: var(--danger-soft); color: var(--danger); }
@media (prefers-color-scheme: dark) { .b-congel { background: #262b4a; color: #a3bffa; } }

/* ---------- Fiche recette ---------- */
.recipe-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.recipe-emoji { flex: none; width: 84px; height: 84px; border-radius: 20px; background: var(--primary-soft); display: grid; place-items: center; font-size: 3rem; }
.recipe-img { flex: none; width: 110px; height: 110px; object-fit: cover; border-radius: 18px; }
.recipe-head h1 { margin-bottom: 6px; }
.tagrow { display: flex; flex-wrap: wrap; gap: 5px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; margin: 0 0 12px; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.facts span { font-size: .75rem; color: var(--muted); } .facts strong { font-size: 1rem; }
.ing { list-style: none; padding: 0; margin: 10px 0 0; }
.ing li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.ing li:last-child { border-bottom: 0; }
.ing em { color: var(--muted); font-style: normal; font-size: .9rem; }
.ing-basic li { color: var(--muted); }
.check-title { margin-top: 16px; }
.pill { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 700; }
.method { padding-left: 1.3rem; margin: 0; } .method li { margin-bottom: .8rem; padding-left: 4px; }
.method li::marker { font-weight: 800; color: var(--primary); }
.app { display: inline-block; padding: 2px 9px; border-radius: 8px; font-size: .78rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); margin-right: 4px; }
.app-four { background: #fde8e0; color: #c05621; } .app-mijoteuse, .app-casserole { background: #e9f5ee; color: var(--primary-dark); } .app-poele { background: #fff4d6; color: #b7791f; }
@media (prefers-color-scheme: dark) { .app-four { background: #3a251b; color: #f6ad55; } .app-poele { background: #372f17; } }
.cuisson { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 0 12px; }
.cuisson summary { padding: 12px 0; cursor: pointer; font-weight: 600; }
.cuisson ol { padding-left: 1.2rem; margin: 0 0 12px; }
.keep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.keep-item { padding: 12px; border-radius: 12px; display: flex; flex-direction: column; }
.keep-item span { font-size: .85rem; } .keep-item strong { font-size: 1.15rem; }
.k-frigo { background: var(--cold-soft); color: var(--cold); } .k-congel { background: #e6e9fb; color: #4c51bf; } .k-congel.no { background: var(--danger-soft); color: var(--danger); }
@media (prefers-color-scheme: dark) { .k-congel { background: #262b4a; color: #a3bffa; } }
.tip { background: var(--accent-soft); padding: 10px 12px; border-radius: 12px; }

/* ---------- Planning ---------- */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; text-align: center; }
.weeknav > div { display: flex; flex-direction: column; }
.weeknav .icon-btn { background: var(--surface); border: 1px solid var(--line); font-size: 1.4rem; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.day.today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.day > header { padding: 10px 14px; background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slot { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
.slot-l { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-top: 10px; }
.slot-c { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.meal { display: flex; align-items: center; gap: 4px; background: var(--primary-soft); border-radius: 12px; padding: 2px 4px 2px 10px; }
.meal-t { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); font-weight: 600; padding: 8px 0; line-height: 1.25; }
.meal .icon-btn { width: 34px; height: 34px; font-size: 1rem; }
.add-slot { text-align: left; padding: 9px 10px; border: 1px dashed var(--line); border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; }
.add-slot:hover { border-color: var(--primary); color: var(--primary-dark); }
.pool .meal { margin-bottom: 6px; }
.persons-card .persons strong { margin-right: 4px; }
.field.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .field.inline input { width: auto; }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-box { background: var(--surface); width: 100%; max-width: 620px; max-height: 88vh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet-box { border-radius: 22px; max-height: 80vh; } }
.sheet-box > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; gap: 8px; }
.sheet-box > header h3 { margin: 0; }
.sheet-body { overflow-y: auto; padding: 8px 16px 18px; }
.pick-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.pick:hover { border-color: var(--primary); background: var(--primary-soft); }
.pick .pe { font-size: 1.6rem; } .pick span:nth-child(2) { flex: 1; min-width: 0; line-height: 1.25; } .pick small { display: block; }
.slot-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 8px 0; }
.slot-grid .lab { grid-column: 1 / -1; font-weight: 700; margin-top: 6px; }
.week-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 6px 0; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); background: #1f2933; color: #fff; padding: 11px 18px; border-radius: 999px; z-index: 80; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); max-width: 90vw; font-size: .95rem; }
.toast a { color: #9ae6b4; margin-left: 8px; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* ---------- Courses ---------- */
.progress { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bar { flex: 1; height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .25s; }
.clist { list-style: none; margin: 0; padding: 0; }
.crow { padding: 2px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; }
.crow:last-child, .brow:last-child { border-bottom: 0; }
.crow label { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; min-width: 0; }
.crow .cb, .tick input { width: 22px; height: 22px; flex: none; accent-color: var(--primary); }
.cname { flex: 1; font-weight: 600; min-width: 0; } .cqty { color: var(--primary-dark); font-weight: 700; white-space: nowrap; }
.csrc { flex: 0 0 100%; padding: 0 0 8px 34px; font-size: .78rem; display: block; color: var(--muted); line-height: 1.35; }
.tick-txt .csrc, .binfo .csrc { padding: 2px 0 0; flex: none; }
.crow.done .cname, .crow.done .cqty { text-decoration: line-through; color: var(--muted); }
.brow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.brow.ok { opacity: .55; }
.binfo { min-width: 0; flex: 1 1 200px; }
.bbtn { display: flex; gap: 6px; }
.verify { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.addline { display: flex; gap: 8px; margin-top: 10px; } .addline input { flex: 1; min-width: 0; }

/* ---------- Session ---------- */
.phase { margin-bottom: 22px; }
.phase > h2 { display: flex; align-items: center; gap: 10px; }
.pn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: .95rem; flex: none; }
.checks, .steps-checks { list-style: none; padding: 0; margin: 0; }
.steps-checks li, .checks li { margin: 0 0 4px; }
.tick { display: flex; gap: 12px; align-items: flex-start; padding: 8px 4px; cursor: pointer; }
.tick input { margin-top: 2px; }
.tick-txt { flex: 1; min-width: 0; }
.tick input:checked + .tick-txt { text-decoration: line-through; color: var(--muted); }
.box { display: inline-block; width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 3px; flex: none; margin: 3px 8px 0 0; vertical-align: -2px; }
.cuisson-card, .four-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.cuisson-card header { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; } .cuisson-card h3 { margin: 0; }
.ce { font-size: 2.2rem; }
.split { list-style: none; padding: 0; margin: 0 0 8px; background: var(--primary-soft); border-radius: 12px; }
.split li { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid color-mix(in srgb, var(--primary) 15%, transparent); }
.split li:last-child { border: 0; }
.ovl { list-style: none; padding: 0; margin: 8px 0 0; } .ovl li { padding: 3px 0; } .ovl em { color: var(--muted); font-style: normal; }
.rec-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.rec-block summary { padding: 14px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; list-style: none; }
.rec-block summary::-webkit-details-marker { display: none; }
.rec-block summary em { color: var(--muted); font-style: normal; font-size: .85rem; }
.re { font-size: 1.4rem; }
.rec-in { padding: 0 14px 14px; }
.cond-list { display: flex; flex-direction: column; gap: 8px; }
.cond { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.cond-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .cond-h small { margin-left: auto; }
.cond-b { margin-top: 4px; font-size: .9rem; }
.cond-alerte { border-color: var(--danger); background: var(--danger-soft); }
.rules li, .tips li { margin-bottom: .6rem; }
.table-wrap { overflow-x: auto; } .table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.preview { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 8px 0 14px; }
.preview li { padding: 4px 0; } .preview .tagline { font-size: .75rem; color: var(--muted); }
.sticky-actions { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); padding: 10px 0; backdrop-filter: blur(6px); }
@media (min-width: 900px) { .sticky-actions { bottom: 0; } }

/* ---------- Impression / PDF ---------- */
.printview { background: #e9e6df; }
.print-toolbar { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.print-doc { max-width: 820px; margin: 16px auto; padding: 0 12px 40px; }
.sheet { background: #fff; color: #111; padding: 22px; margin-bottom: 16px; border-radius: 6px; box-shadow: var(--shadow); --line: #ddd; --muted: #555; --surface: #fff; --ink: #111; --primary-soft: #eef6f1; --accent-soft: #fdf0e1; --cold-soft: #e8f1fb; --bg: #fff; }
.sheet-h { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #2f855a; padding-bottom: 10px; margin-bottom: 12px; }
.sheet-h h2 { margin: 0; font-size: 1.5rem; } .sheet-h p { margin: 0; } .se { font-size: 2.4rem; }
.sheet-cols { display: grid; grid-template-columns: 1fr; gap: 6px 26px; }
@media (min-width: 640px) { .sheet-cols { grid-template-columns: 5fr 7fr; } }
.sheet-keep { border: 1px solid #ccc; border-radius: 8px; padding: 10px 12px; margin-top: 12px; font-size: .92rem; }
.sheet .ing li { padding: 4px 0; display: flex; }
.week { width: 100%; border-collapse: collapse; margin: 12px 0; } .week th, .week td { border: 1px solid #ccc; padding: 6px 8px; text-align: left; vertical-align: top; font-size: .92rem; }
.cols { columns: 2; column-gap: 24px; list-style: none; padding: 0; margin: 0 0 12px; } .cols li { break-inside: avoid; padding: 3px 0; }
.sheet .card, .sheet .cuisson-card, .sheet .four-card, .sheet .rec-block, .sheet .cond { box-shadow: none; }
.session-print .tick { cursor: default; }
@page { size: A4; margin: 12mm; }
@media print {
    :root { --bg: #fff; }
    body, .printview { background: #fff !important; color: #000; font-size: 11pt; }
    .topbar, .tabbar, .no-print, .toast, .print-toolbar, .actions, .weeknav .icon-btn, .icon-btn, .btn { display: none !important; }
    .wrap, .print-doc { max-width: none; padding: 0; margin: 0; }
    .sheet { box-shadow: none; border-radius: 0; padding: 0; margin: 0; page-break-after: always; break-after: page; }
    .sheet:last-child { page-break-after: auto; break-after: auto; }
    .cuisson-card, .four-card, .cond, .rec-block, .card { break-inside: avoid; page-break-inside: avoid; }
    details.rec-block > summary { pointer-events: none; }
    a { color: inherit; text-decoration: none; }
    .card { border-color: #ccc; box-shadow: none; }
}
