/* Administration de la caisse La Crêp'Apedale : meme univers que l'app (creme, prune, moutarde). */
:root {
  --creme: #FDF3E6; --creme-2: #F6E8D5; --blanc: #FFFBF5;
  --mauve: #C496B4; --prune: #94408A; --moutarde: #E8B66A; --ambre: #B36F00;
  --texte: #5B4553; --encre: #3B2A37; --muted: #6E5868; --line: #E8DACA; --line-2: #D9C6B2;
  --bad: #A8322A; --bad-bg: #FBE7E3; --ok-bg: #EEF0DA; --ok: #4E5A1C;
  --r: 16px; --r-s: 10px;
  --f-accent: "Grandstander", system-ui, sans-serif;
  --f-texte: "Quicksand", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--creme); color: var(--texte); font: 500 16px/1.5 var(--f-texte); }
a { color: var(--prune); text-underline-offset: 3px; }
a:hover { color: var(--encre); }
:focus-visible { outline: 3px solid var(--prune); outline-offset: 2px; border-radius: 4px; }
h1 { margin: 8px 0 16px; font: 800 32px/1.15 var(--f-accent); color: var(--encre); letter-spacing: -.01em; text-wrap: balance; }
h2 { margin: 0 0 12px; font: 800 20px/1.25 var(--f-accent); color: var(--encre); }
b { color: var(--encre); }
.sub, .lead { margin: -6px 0 20px; max-width: 70ch; color: var(--muted); }
.lead { font-size: 18px; color: var(--texte); }
.note { color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- bandeau ---------- */
.top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 12px 24px; background: var(--mauve); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--encre); text-decoration: none; font: 800 18px var(--f-accent); }
.brand img { background: var(--creme); border-radius: 50%; padding: 3px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--encre); text-decoration: none; font: 700 15px var(--f-accent); white-space: nowrap; }
.nav a:hover { background: rgba(255, 251, 245, .45); }
.nav a[aria-current="page"] { background: var(--encre); color: var(--creme); }
.who { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.who a, .who .link { color: var(--encre); font-weight: 700; }
.who form { margin: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 24px 64px; }

/* ---------- elements ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 2px solid var(--encre); background: var(--blanc); color: var(--encre);
  font: 700 15px var(--f-accent); text-decoration: none; cursor: pointer; transition: background-color .15s ease, transform .1s ease; }
.btn:hover { background: var(--creme-2); color: var(--encre); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--encre); color: var(--creme); }
.btn.primary:hover { background: #523C4D; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.ghost { border-color: var(--line-2); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
label { display: grid; gap: 6px; font: 700 14px var(--f-accent); color: var(--encre); }
input, select { min-height: 44px; width: 100%; padding: 0 12px; border-radius: var(--r-s); border: 2px solid var(--line-2);
  background: var(--blanc); color: var(--encre); font: 600 16px var(--f-texte); }
input:focus, select:focus { border-color: var(--prune); outline: none; box-shadow: 0 0 0 3px rgba(148, 64, 138, .18); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.check input { width: 20px; min-height: 20px; accent-color: var(--prune); }
.stack { display: grid; gap: 14px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; }
.row-actions form { margin: 0; }
.flash { margin: 0 0 20px; padding: 12px 16px; border-radius: var(--r-s); font-weight: 700; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.bad { background: var(--bad-bg); color: var(--bad); }
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--bad-bg); color: var(--bad);
  font: 700 12px var(--f-accent); }

.panel { margin: 0 0 24px; padding: 22px 24px; background: var(--blanc); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 10px 24px -20px rgba(59, 42, 55, .45); }
.panel.narrow { max-width: 520px; }
.panel.empty { text-align: center; padding: 40px 24px; }
.panel.empty p { max-width: 52ch; margin: 0 auto; color: var(--muted); }
.panel.alert { border-color: var(--bad); }
.panel.highlight { border: 2px solid var(--prune); }
.token code { display: block; padding: 12px 14px; border-radius: var(--r-s); background: var(--creme-2); color: var(--encre);
  font: 600 15px/1.4 ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; }

/* ---------- periode ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin: 0 0 24px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--blanc); color: var(--encre);
  font: 700 14px var(--f-accent); text-decoration: none; }
.chip:hover { background: var(--creme-2); color: var(--encre); }
.chip.on { background: var(--encre); border-color: var(--encre); color: var(--creme); }
.custom { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.custom label { grid-auto-flow: column; align-items: center; font-size: 14px; }
.custom input { width: auto; min-height: 38px; font-size: 15px; }

/* ---------- releve (resume de la periode, facon ticket de caisse) ---------- */
.releve { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 16px 32px; margin: 0 0 28px;
  padding: 24px 28px 34px; background: var(--blanc); border-radius: var(--r) var(--r) 0 0;
  box-shadow: 0 10px 24px -20px rgba(59, 42, 55, .45); }
.releve::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background: radial-gradient(circle at 10px 0, var(--blanc) 7px, transparent 7.5px) 0 0 / 20px 10px repeat-x; }
.releve-main { grid-column: 1 / -1; margin: 0; font: 600 18px/1.3 var(--f-texte); color: var(--texte); }
.releve-amount { display: block; margin-bottom: 4px; font: 700 clamp(40px, 7vw, 60px)/1 var(--f-texte); color: var(--encre); letter-spacing: -.02em; }
.releve-facts { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 0; }
.releve-facts div { padding: 0 22px; border-left: 1px solid var(--line); }
.releve-facts div:first-child { padding-left: 0; border-left: 0; }
.releve-facts dt { font: 700 13px var(--f-accent); color: var(--muted); }
.releve-facts dd { margin: 2px 0 0; font: 700 20px var(--f-texte); color: var(--encre); }
.releve-facts small { font-size: 14px; color: var(--muted); }

/* ---------- graphiques ---------- */
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tick { font: 600 12px var(--f-texte); }
.chart .val { font: 700 13px var(--f-texte); fill: var(--encre); }
.chart .lbl { font: 600 14px var(--f-texte); fill: var(--encre); }
.chart tspan.muted { fill: var(--muted); font-weight: 600; }
.chart .mark { cursor: default; outline: none; }
.chart .mark:hover path, .chart .mark:focus path { opacity: .82; }
.chart .mark:hover rect[rx], .chart .mark:focus rect[rx] { stroke: var(--encre); stroke-width: 2; }
.chart .mark:focus-visible rect[fill="transparent"] { fill: rgba(148, 64, 138, .07); }
.heat { max-width: 900px; min-width: 620px; }
.wide { min-width: 600px; }
.scroll-x { overflow-x: auto; }
.scale { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.scale-k { margin-right: 6px; font: 700 13px var(--f-accent); }
.sw { width: 18px; height: 18px; border-radius: 4px; }
.sw-empty { background: #F2E6D6; } .sw-0 { background: #DDA24A; } .sw-1 { background: #C9832C; }
.sw-2 { background: #AA6519; } .sw-3 { background: #844A10; } .sw-4 { background: #5A2F08; }
.tv { margin-top: 14px; }
.tv summary { cursor: pointer; width: max-content; font: 700 14px var(--f-accent); color: var(--prune); }
.tip { position: fixed; z-index: 10; max-width: 260px; padding: 8px 12px; border-radius: var(--r-s); background: var(--encre);
  color: var(--creme); font: 600 13px/1.35 var(--f-texte); pointer-events: none; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35); }
.tip strong { display: block; font: 700 16px var(--f-texte); color: #fff; }

/* ---------- tableaux ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--blanc); }
.tv .table-wrap { margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { padding: 10px 12px; text-align: left; font: 700 13px var(--f-accent); color: var(--muted); background: var(--creme-2); white-space: nowrap; }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; color: var(--encre); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.journal .detail { min-width: 260px; color: var(--texte); }
tr.voided td { color: var(--muted); }
tr.voided td.num { text-decoration: line-through; }

/* ---------- carte ---------- */
.products { list-style: none; margin: 0; padding: 0; }
.products li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.products li:first-child { border-top: 0; padding-top: 0; }
.products li.inactive { opacity: .6; }
.dot { width: 14px; height: 14px; margin-top: 34px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(59, 42, 55, .25); }
.tone-moutarde { background: #E8B66A; } .tone-noisette { background: #A65A2E; } .tone-fraise { background: #D9453B; }
.tone-peche { background: #F08A5D; } .tone-ardoise { background: #7E95B8; } .tone-mauve { background: #C496B4; }
.product-form { display: grid; grid-template-columns: minmax(110px, 1.2fr) minmax(140px, 2fr) 84px 128px 128px 70px auto auto; gap: 10px; align-items: end; }
.product-form .check { min-height: 44px; }

/* ---------- connexion ---------- */
.auth { max-width: 420px; margin: 8vh auto 0; padding: 32px; background: var(--blanc); border-radius: var(--r); border: 1px solid var(--line);
  box-shadow: 0 16px 40px -28px rgba(59, 42, 55, .5); text-align: center; }
.auth h1 { font-size: 26px; }
.auth form { text-align: left; margin-top: 8px; }
.auth .note { margin: -4px 0 16px; }

@media (max-width: 900px) {
  .product-form { grid-template-columns: 1fr 1fr; }
  .product-form .f-desc { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .top { padding: 10px 16px; gap: 10px; }
  .brand span { display: none; }
  .who { width: 100%; justify-content: flex-end; order: 3; }
  .nav { order: 2; }
  .wrap { padding: 16px 16px 48px; }
  h1 { font-size: 26px; }
  .panel { padding: 18px 16px; }
  .releve { grid-template-columns: 1fr; padding: 20px 18px 30px; }
  .releve-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .releve-facts div, .releve-facts div:first-child { padding: 0; border-left: 0; }
  .filters { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---------- Achats ---------- */
.grid-3 { display: grid; grid-template-columns: 180px 1fr 180px; gap: 12px; margin-bottom: 12px; }
.purchase-form .panel > label { margin-bottom: 12px; }
.file input { padding: 10px 12px; min-height: 0; font-size: 15px; }
.lines { display: grid; gap: 16px; }
.line { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--creme); }
[hidden] { display: none !important; }
.line-main { display: grid; grid-template-columns: 2fr 1.3fr 120px auto; gap: 14px 12px; align-items: end; }
.line-food { display: grid; grid-template-columns: 1.4fr 170px 110px 1fr; gap: 14px 12px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.line-food .file { grid-column: 1 / -1; }
.total-line { margin-left: auto; font: 700 16px var(--f-accent); color: var(--muted); }
.total-line b { font-size: 20px; color: var(--encre); }

/* ---------- Bilan ---------- */
.bilan { margin-bottom: 14px; }
.bilan dd.neg { color: var(--bad); }
.legend { display: flex; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.legend .key { width: 14px; height: 14px; border-radius: 4px; }
.legend .key + .key, .legend .key:not(:first-child) { margin-left: 12px; }
.k-sales { background: #94408A; } .k-exp { background: #B36F00; }

/* ---------- Hygiene ---------- */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; }
.todo li span { font-weight: 700; color: var(--encre); }
.todo small { display: block; font-weight: 600; color: var(--muted); }
.todo form, .lots form, .task-form { margin: 0; }
.ok-line { margin: 0; padding: 10px 14px; border-radius: var(--r-s); background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.done-list { list-style: none; margin: 10px 0 0; padding: 0; }
.done-list li { padding: 6px 0; color: var(--encre); }
.done-list time { display: inline-block; width: 52px; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.done-list small { color: var(--muted); }
.lot-list { list-style: none; margin: 0; padding: 0; }
.lot-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--blanc); }
.lot-list li.alert-bad { background: var(--bad-bg); border-color: var(--bad); }
.lot-list li.alert-warn { background: #FBF0D9; border-color: #D9A441; }
.lot-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--encre); font-size: 15px; }
.lot-info b { font-size: 16px; }
.lot-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; }
.lot-actions form { margin: 0; }
.alert-text { color: var(--bad); font-size: 14px; }
tr.alert-warn .alert-text { color: #7A4A00; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.inline-form input { width: auto; flex: 1 1 200px; }
.recall { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--creme); }
.recall p { margin: 4px 0; color: var(--encre); }
.tasks { list-style: none; margin: 0 0 16px; padding: 0; }
.tasks li { padding: 10px 0; border-top: 1px solid var(--line); }
.tasks li:first-child { border-top: 0; }
.tasks li.inactive { opacity: .55; }
.task-form { display: grid; grid-template-columns: 1fr 210px 80px auto auto; gap: 10px; align-items: end; }
.task-form .check { min-height: 44px; }
h3 { margin: 16px 0 8px; font: 800 16px var(--f-accent); color: var(--encre); }

@media (max-width: 760px) {
  .grid-3, .line-main, .line-food, .task-form { grid-template-columns: 1fr 1fr; }
  .grid-3 label:nth-child(2), .line-main .l-label, .task-form label:first-of-type { grid-column: 1 / -1; }
  .lot-list li { flex-direction: column; align-items: stretch; }
  .lot-actions { justify-content: flex-start; }
}

/* Bilan : marge brute, marge nette */
.bilan-table { max-width: 620px; margin-bottom: 12px; font-size: 16px; }
.bilan-table th { padding: 8px 0; text-align: left; background: none; color: var(--encre); font: 600 16px var(--f-texte); white-space: normal; }
.bilan-table th small { color: var(--muted); font-size: 13px; }
.bilan-table td { padding: 8px 0 8px 16px; border-top: 0; }
.bilan-table tr + tr th, .bilan-table tr + tr td { border-top: 1px solid var(--line); }
.bilan-table tr.strong th, .bilan-table tr.strong td { font-weight: 800; }
.bilan-table tr.sub-total th, .bilan-table tr.sub-total td { font: 800 17px var(--f-accent); color: var(--encre); }
.bilan-table tr.total th, .bilan-table tr.total td { font: 800 20px var(--f-accent); color: var(--encre); border-top: 2px solid var(--encre); }
.bilan-table tr.neg td:not(.muted) { color: var(--bad); }

/* ---------- stocks ---------- */
.line-stock { display: grid; grid-template-columns: 2fr 120px 120px; gap: 14px 12px; align-items: end; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--line-2); }
.stock-now { font: 700 22px/1.2 var(--f-texte); color: var(--encre); letter-spacing: -.01em; }
.stock-list .alert-text { color: var(--bad); }
.count-form { margin: 0; flex-wrap: nowrap; }
.count-form input { flex: 0 1 130px; min-width: 0; }
.count-form select { width: auto; }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.with-unit { display: flex; align-items: center; gap: 8px; font: 600 14px var(--f-texte); color: var(--muted); }
.with-unit input { flex: 1; min-width: 0; }
.comp-form { display: grid; gap: 8px; }
.comp-head { font-size: 16px; }
.comp-row { display: grid; grid-template-columns: 1fr 140px; gap: 8px; }
.comp-form .btn { justify-self: start; }
.ing-form { grid-template-columns: 1.4fr 1.3fr 1.2fr 90px auto auto; }
@media (max-width: 760px) {
  .line-stock { grid-template-columns: 1fr 1fr; }
  .line-stock .l-ing { grid-column: 1 / -1; }
  .ing-form { grid-template-columns: 1fr 1fr; }
  .ing-form label:first-of-type { grid-column: 1 / -1; }
  .count-form { flex-wrap: wrap; }
}
.day-list { list-style: none; margin: 0 0 8px; padding: 0; }
.day-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.day-list li:first-child { border-top: 0; }
.day-list li > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.day-figs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 22px; font-size: 15px; text-align: right; }
.day-figs .warn b { color: var(--bad); }
@media (max-width: 640px) { .day-list li { flex-direction: column; align-items: flex-start; } .day-figs { justify-content: flex-start; text-align: left; } }

/* ---------- demandes ---------- */
.badge { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font: 800 12px/20px var(--f-accent); text-align: center; }
.req-msg { margin: 6px 0 0; padding: 8px 10px; border-radius: var(--r-s); background: var(--creme); color: var(--texte); font-size: 15px; white-space: normal; }
.lot-list li.inactive { opacity: .6; }

/* Achat en photos */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr 110px auto; gap: 14px 12px; align-items: end; }
.photo-item + .photo-item { margin-top: 14px; }
.big-file { margin-top: 14px; }
.jobs { list-style: none; margin: 0; padding: 0; }
.job { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; }
.job b { display: block; }
.job span { display: block; margin-top: 2px; }
.job .row-actions { margin: 0; }
.job .row-actions form { display: inline; }
.job-pret span { font-weight: 700; }
.job-erreur span { color: var(--bad, #a3262a); }
.read-note ul { margin: 8px 0 0; padding-left: 20px; }
@media (max-width: 720px) {
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid .file { grid-column: 1 / -1; }
}

/* Verification d'un achat lu en photos : la photo du lot a cote du champ */
.lot-thumb { display: block; grid-column: 1 / -1; }
.lot-thumb img { display: block; width: 100%; max-width: 420px; max-height: 260px; object-fit: contain; border-radius: 8px; background: #0001; }
.lot-doubt input { border-color: #c2410c; box-shadow: 0 0 0 2px #c2410c33; }
.lot-doubt em { color: #c2410c; font-style: normal; font-weight: 600; }

/* Prevision de pate */
.fc-list { list-style: none; margin: 14px 0 18px; padding: 0; display: grid; gap: 10px; }
.fc-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; }
.fc-list li:first-child { border-width: 2px; }
.fc-day { display: flex; flex-direction: column; gap: 2px; }
.fc-num { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.fc-num b { font-size: 1.15em; }
.fc-why { grid-column: 1 / -1; margin: 4px 0 0; font-size: .9em; opacity: .8; }
.fc-table { width: 100%; border-collapse: collapse; }
.fc-table td, .fc-table th { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line-2); }
.bad-txt { color: #b42318; }

/* Preparation de la pate */
.prep-days { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 4px; scrollbar-width: none; }
.prep-days a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--encre); text-decoration: none; font-weight: 700; }
.prep-days a[aria-current="page"] { background: var(--encre); color: var(--creme); border-color: var(--encre); }
.prep-stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prep-step { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--encre);
  color: var(--encre); text-decoration: none; font: 800 28px/1 var(--f-accent); }
.prep-step.off { opacity: .3; }
.prep-val { text-align: center; }
.prep-val b { display: block; font-size: 2.6em; line-height: 1.1; }
.prep-fc { margin: 14px 0 0; }
.prep-list { list-style: none; margin: 0; padding: 0; }
.prep-list li + li { border-top: 1px solid var(--line-2); }
.prep-list label { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "c n q" "c p q"; align-items: center; gap: 0 12px; padding: 12px 2px; cursor: pointer; }
.prep-list input { grid-area: c; width: 26px; height: 26px; accent-color: var(--encre); }
.prep-name { grid-area: n; font-weight: 700; font-size: 1.1em; }
.prep-per { grid-area: p; font-size: .85em; }
.prep-q { grid-area: q; font-size: 1.5em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prep-list label:has(input:checked) { opacity: .45; }
.prep-list label:has(input:checked) .prep-q { text-decoration: line-through; }
.prep-note p { margin: 0 0 10px; }

/* Pate, Stock, Recette et reglages */
.sub-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 16px; }
.sub-nav a { padding: 6px 12px; border-radius: 999px; color: var(--encre); text-decoration: none; font-weight: 700; font-size: .92em; background: rgba(0,0,0,.05); }
.sub-nav a[aria-current="page"] { background: var(--encre); color: var(--creme); }
.btn.big { width: 100%; min-height: 56px; font-size: 1.15em; }
.prep-ready { margin-top: 16px; }
.prep-ready .note { margin-top: 8px; }
.done { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: #e6f4ea; color: #1e5631; font-weight: 700; }
details.more { margin-top: 14px; }
details.more > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.fc-off { opacity: .5; }
.nudge { border: 2px solid #c2410c; }
.nudge .btn { display: inline-block; margin-top: 6px; text-decoration: none; }
.shop-list { list-style: none; margin: 8px 0; padding: 0; }
.shop-list li { border-bottom: 1px solid var(--line-2); }
.shop-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; }
.shop-list label { flex: 1; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.shop-list label > span, .shop-list li > span:first-child { display: flex; flex-direction: column; flex: 1; text-align: left; }
.shop-list li > span:last-child:not(:first-child) { flex: none; }
.shop-list small { font-size: .85em; }
.shop-list small { opacity: .75; }
.shop-list input { width: 24px; height: 24px; accent-color: var(--encre); flex: none; }
.shop-q { font-size: 1.25em; white-space: nowrap; }
.shop-list label:has(input:checked) { opacity: .45; }
.shop-list label:has(input:checked) .shop-q { text-decoration: line-through; }
.count-details > summary { cursor: pointer; font-weight: 700; font-size: .92em; padding: 6px 0; white-space: nowrap; }
.count-details[open] > summary { margin-bottom: 6px; }
.inv-list { list-style: none; margin: 0 0 14px; padding: 0; }
.inv-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.inv-name { display: flex; flex-direction: column; }
.inv-in { display: flex; gap: 6px; flex: none; }
.inv-in input { width: 84px; }
.shop-list label, .prep-list label { font: inherit; color: inherit; text-transform: none; letter-spacing: normal; }
.shop-list label b, .prep-name { font-weight: 700; }
.shop-q { font-weight: 800; }
.prep-lot { display: block; margin: -6px 0 6px 40px; font-size: .88em; font-weight: 600; }
.prep-lot.warn { color: #9a4a00; }
.prep-lot.bad { color: #b42318; }
.prep-fin { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px 40px; font-size: .88em; }
.prep-fin label { display: inline; font: inherit; }
.prep-fin input { width: 18px; height: 18px; }
/* Declaration URSSAF et resume du jour */
.freq-form button { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--encre); font-weight: 700; cursor: pointer; }
.freq-form button.on { background: var(--encre); color: var(--creme); border-color: var(--encre); }
.nudge-ok { border: 2px solid var(--encre); }
.decl-big { font-size: 1.2em; line-height: 1.4; margin: 6px 0 8px; }

/* ---------- Journal technique ---------- */
.tech-days { margin: 0 0 14px; }
.tech-sum { margin: 8px 0 10px; padding-left: 20px; }
.tech-sum li { margin: 4px 0; }
.tech-sum li.warn { color: #9a3412; }
.tech-spark { display: block; width: 100%; height: 80px; margin-top: 6px; background: var(--creme-2); border-radius: 8px; }
.tech-spark polyline { fill: none; stroke: var(--encre); stroke-width: 2; vector-effect: non-scaling-stroke; }
.tech-spark .tech-low { stroke: #c2410c; stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.tech-table td { vertical-align: top; }
.tech-table tr.tech-warn td { background: #fff1e6; color: #9a3412; }
