/* Stock cuisine – feuille de style unique */
:root {
  --bg: #edf0f3;
  --surface: #ffffff;
  --surface-2: #f5f7f9;
  --ink: #172031;
  --muted: #5b6677;
  --line: #d5dbe3;
  --primary: #2456a6;
  --primary-ink: #ffffff;
  --primary-soft: #e3ebf7;
  --red: #c2372c;
  --red-soft: #fbe6e3;
  --amber: #8a5c00;
  --amber-soft: #fff0c7;
  --green: #22704d;
  --green-soft: #e0f2e8;
  --cabinet: #23364f;
  --cabinet-2: #1a2a3e;
  --glass: #dfe9f2;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(23, 32, 49, 0.08), 0 2px 8px rgba(23, 32, 49, 0.06);
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151d;
    --surface: #19202b;
    --surface-2: #1f2834;
    --ink: #e6ebf2;
    --muted: #98a3b3;
    --line: #2c3746;
    --primary: #6e9be8;
    --primary-ink: #0d1420;
    --primary-soft: #1e2d45;
    --red: #f07b70;
    --red-soft: #3a1e1c;
    --amber: #f0c25a;
    --amber-soft: #3a2f14;
    --green: #6cc898;
    --green-soft: #183327;
    --cabinet: #2a3f5c;
    --cabinet-2: #0f1a28;
    --glass: #223247;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.6rem; font-weight: 750; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0.4em 0; }
small, .muted { color: var(--muted); }
.muted { font-size: 0.9rem; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Coque ---------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
main#view {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
}
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 16px;
  min-height: 44px;
}
.topbar h1 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.topbar .back {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 1.2rem; cursor: pointer; flex: none;
}

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.bottomnav a, .bottomnav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 0.72rem; background: none; border: 0; font-family: inherit; cursor: pointer;
  text-decoration: none;
}
.bottomnav .ico { font-size: 1.3rem; line-height: 1; }
.bottomnav .ico svg { width: 24px; height: 24px; display: block; }
.bottomnav .scan-btn .ico svg { width: 26px; height: 26px; }
.bottomnav a.active { color: var(--primary); font-weight: 650; }
.bottomnav .scan-btn .ico {
  width: 48px; height: 48px; margin-top: -18px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--primary); color: var(--primary-ink);
  box-shadow: 0 3px 10px rgba(36, 86, 166, 0.35);
  font-size: 1.4rem;
}

@media (min-width: 900px) {
  .bottomnav { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 2px;
    position: fixed; top: 0; bottom: 0; left: 0; width: 220px;
    padding: 20px 12px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .sidebar .brand { font-weight: 800; font-size: 1.1rem; padding: 4px 10px 18px; }
  .sidebar a {
    display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--radius-sm);
    color: var(--ink); text-decoration: none;
  }
  .sidebar a:hover { background: var(--surface-2); }
  .sidebar a svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
  .sidebar a.active svg { color: inherit; }
  .sidebar a.active { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
  .sidebar .sep { height: 1px; background: var(--line); margin: 10px 4px; }
  main#view { margin-left: 220px; max-width: 1040px; padding: 24px 32px 48px; }
  .shell main#view { margin-left: max(220px, calc((100vw - 1040px) / 2 + 110px)); }
}

/* ---------- Composants ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.section { margin: 22px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.section-head h2 { flex: 1 1 auto; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 8px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 34px; padding: 4px 10px; font-size: 0.9rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row.end { justify-content: flex-end; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1.05rem; flex: none;
}

/* Listes */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; min-height: 56px;
  color: inherit; text-decoration: none;
}
a.row:hover, button.row:hover { background: var(--surface-2); text-decoration: none; }
button.row { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.row .main { flex: 1; min-width: 0; }
.row .title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.row .sub { display: block; color: var(--muted); font-size: 0.86rem; overflow-wrap: anywhere; }
.row .qty { font-weight: 700; text-align: right; white-space: nowrap; }
.row .qty small { font-weight: 500; }
.empty { padding: 22px 16px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 10px; }

.thumb {
  width: 40px; height: 40px; flex: none; border-radius: 8px;
  display: grid; place-items: center; font-size: 1.35rem;
  background: var(--surface-2); border: 1px solid var(--line); overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 22px; height: 22px; color: var(--muted); }
svg.i { width: 1.25em; height: 1.25em; vertical-align: middle; flex: none; }
.thumb.lg { width: 64px; height: 64px; font-size: 2rem; border-radius: 12px; }
.thumb .initials { font-size: 0.85rem; font-weight: 700; color: var(--muted); }

/* Étiquettes de date (statut de péremption) */
.date {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 999px; font-size: 0.8rem; font-weight: 650; white-space: nowrap;
  border: 1px solid transparent;
}
.date.ok { background: var(--green-soft); color: var(--green); }
.date.soon { background: var(--amber-soft); color: var(--amber); }
.date.expired { background: var(--red-soft); color: var(--red); }
.date.none { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.tag.blue { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.tag.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.tag.amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.tag.green { background: var(--green-soft); color: var(--green); border-color: transparent; }

/* Formulaires */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field > span { font-size: 0.86rem; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 0.8rem; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 10px; min-height: 42px; width: 100%; min-width: 0;
}
textarea { min-height: 120px; resize: vertical; }
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; accent-color: var(--primary); flex: none; }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; cursor: pointer; }
.fields { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
.fields.three { grid-template-columns: 1fr 1fr 1fr; }
.fields > .full { grid-column: 1 / -1; }
@media (max-width: 480px) { .fields.three { grid-template-columns: 1fr 1fr; } }
.search {
  display: flex; gap: 8px; align-items: center; margin-bottom: 10px;
}
.search input { flex: 1; }
.inline-add { display: flex; gap: 8px; align-items: center; }
.inline-add select { flex: 1; min-width: 0; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 0.88rem; cursor: pointer;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .n { opacity: 0.65; margin-left: 4px; }

/* Entrées quantité + date (plusieurs dates) */
.entry {
  display: grid; grid-template-columns: 90px 1fr 38px; gap: 8px; align-items: end; margin-bottom: 8px;
}
.entry .field { margin: 0; }
.quick-dates { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 12px; }
.quick-dates button { padding: 3px 9px; font-size: 0.8rem; border-radius: 999px; border: 1px dashed var(--line); background: none; color: var(--muted); cursor: pointer; font-family: inherit; }

/* Stepper portions */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.stepper button { width: 40px; height: 40px; border: 0; background: var(--surface-2); color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.stepper input { width: 64px; border: 0; text-align: center; min-height: 40px; border-radius: 0; }

/* ---------- Accueil ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; color: inherit; text-decoration: none; display: block;
}
.stat:hover { text-decoration: none; border-color: var(--primary); }
.stat b { display: block; font-size: 1.7rem; line-height: 1.1; }
.stat span { font-size: 0.82rem; color: var(--muted); }
.stat.red b { color: var(--red); }
.stat.amber b { color: var(--amber); }
.stat.blue b { color: var(--primary); }
.today { color: var(--muted); font-size: 0.95rem; margin-top: 2px; }

/* ---------- Vending machine ---------- */
.machine {
  --cell: minmax(68px, 1fr);
  background: linear-gradient(180deg, var(--cabinet), var(--cabinet-2));
  border-radius: 16px 16px 10px 10px;
  padding: 14px 14px 18px;
  color: #e9f0f8;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06), 0 6px 18px rgba(16, 26, 40, 0.25);
  max-width: 100%;
}
.machine-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.machine-head .name {
  flex: 1; font-weight: 800; letter-spacing: 0.02em; font-size: 1.05rem;
  padding: 6px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.machine-head .stat-mini { font-size: 0.82rem; opacity: 0.85; white-space: nowrap; }
.machine-body { display: flex; gap: 12px; align-items: stretch; }
.glass {
  flex: 1; min-width: 0; overflow-x: auto;
  background: var(--glass);
  border-radius: 8px;
  padding: 8px;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.18), inset 0 10px 30px rgba(255, 255, 255, 0.35);
}
@media (prefers-color-scheme: dark) { .glass { box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.35); } }
.glass-grid { display: grid; gap: 6px; min-width: max-content; }
.rowlabel {
  display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: 0.85rem; width: 18px;
}
.slot {
  position: relative;
  min-width: 68px; min-height: 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  padding: 6px 4px 18px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid rgba(23, 32, 49, 0.12);
  cursor: pointer; font: inherit; color: var(--ink);
  text-align: center;
}
.slot:hover { border-color: var(--primary); }
.slot .lbl {
  position: absolute; top: 3px; left: 5px; font-size: 0.68rem; font-weight: 800; color: var(--muted);
}
.slot .pic { font-size: 1.6rem; line-height: 1.2; height: 34px; display: grid; place-items: center; margin-top: 6px; }
.slot .pic img { width: 34px; height: 34px; object-fit: contain; border-radius: 4px; }
.slot .pname { font-size: 0.7rem; line-height: 1.15; max-width: 76px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.slot .count {
  font-weight: 800; font-size: 0.95rem;
}
.slot .count small { font-weight: 600; font-size: 0.7rem; color: var(--muted); }
/* spirale */
.slot::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 5px; height: 7px;
  background: repeating-linear-gradient(100deg, transparent 0 5px, color-mix(in srgb, var(--ink) 35%, transparent) 5px 7px);
  border-radius: 4px;
}
.slot.wide .pname { max-width: none; -webkit-line-clamp: 1; }
.slot.wide .pic { font-size: 2rem; }
.slot.empty-slot { background: transparent; border-style: dashed; color: var(--muted); }
.slot.empty-slot .pic { opacity: 0.5; }
.slot.zero { background: var(--red-soft); }
.slot.low { box-shadow: inset 0 -3px 0 var(--amber); }
.slot .dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; }
.slot .dot.expired { background: var(--red); }
.slot .dot.soon { background: #e0a100; }
.fill { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--green); border-radius: 0 0 0 6px; }
.panel {
  width: 64px; flex: none; display: flex; flex-direction: column; gap: 10px; align-items: center;
  padding: 8px 6px; border-radius: 8px; background: rgba(0, 0, 0, 0.18);
}
.panel .screen { width: 100%; height: 26px; border-radius: 4px; background: #0d1a10; color: #7cf09c; font: 700 0.75rem ui-monospace, monospace; display: grid; place-items: center; }
.panel .keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.panel .keys i { width: 12px; height: 12px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); }
.panel .coin { width: 8px; height: 26px; border-radius: 4px; background: #0b1420; }
.machine-foot { margin-top: 12px; height: 34px; border-radius: 6px; background: #0b1420; box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.5); }
@media (max-width: 560px) {
  .panel { display: none; }
  .machine { padding: 10px 8px 12px; }
}
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.82rem; color: var(--muted); margin: 10px 2px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

.mini-machine { display: grid; gap: 2px; padding: 5px; border-radius: 6px; background: var(--cabinet); width: 64px; flex: none; }
.mini-machine i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--glass); }
.mini-machine i.f { background: #8fb3dc; }
.mini-machine i.z { background: #e98b83; }

/* ---------- Scan ---------- */
.scanner-box { background: #000; border-radius: var(--radius); overflow: hidden; min-height: 220px; position: relative; }
.scanner-box video { width: 100% !important; display: block; }
#reader { width: 100%; }
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 12px; }
@media (min-width: 560px) { .modes { grid-template-columns: repeat(4, 1fr); } }
.modes .chip { text-align: center; }

/* ---------- Dialogues ---------- */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 640px;
  max-height: 92vh; border-radius: 16px 16px 0 0;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.25);
}
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 14px; } }
dialog.sheet::backdrop { background: rgba(10, 16, 26, 0.45); }
dialog.sheet[open] { animation: up 0.18s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.sheet[open] { animation: none; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sheet-head h2 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sheet-body { padding: 14px 16px 18px; overflow-y: auto; }
.sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--surface); }

.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast {
  pointer-events: auto; background: var(--ink); color: var(--bg); padding: 11px 14px; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); display: flex; gap: 10px; align-items: center; font-size: 0.95rem;
}
.toast.err { background: var(--red); color: #fff; }
.toast span { flex: 1; }
.toast button { background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* Login */
.login { max-width: 360px; margin: 14vh auto 0; }
.login h1 { margin-bottom: 14px; }

/* Recettes */
.ing-row { display: grid; grid-template-columns: 1fr 96px auto 38px; gap: 8px; align-items: center; margin-bottom: 8px; }
.ing-row .unit { font-size: 0.85rem; color: var(--muted); min-width: 34px; }
.ing-row label { font-size: 0.8rem; display: flex; gap: 4px; align-items: center; color: var(--muted); }
@media (max-width: 520px) {
  .ing-row { grid-template-columns: 1fr 80px 38px; }
  .ing-row .unit { display: none; }
  .ing-row label { grid-column: 1 / -1; order: 5; margin-top: -4px; }
}
.instructions { white-space: pre-wrap; line-height: 1.6; }
.day { margin-bottom: 14px; }
.day-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 6px; }
.day-head b { flex: 1; text-transform: capitalize; }
.day.today .day-head b { color: var(--primary); }

/* Étiquettes QR (impression) */
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.label {
  border: 1px dashed var(--line); border-radius: 8px; padding: 8px; text-align: center; background: #fff; color: #000;
  break-inside: avoid;
}
.label svg { width: 100%; height: auto; max-width: 130px; }
.label b { display: block; font-size: 0.85rem; overflow-wrap: anywhere; }
.label small { color: #444; }
@media print {
  .sidebar, .bottomnav, .no-print, .toasts { display: none !important; }
  body { background: #fff; }
  main#view { margin: 0 !important; padding: 0 !important; max-width: none; }
  .label { border-color: #999; }
}

/* ---------- Administration : droits, journal ---------- */
.table-wrap { overflow-x: auto; margin-bottom: 10px; }
.perm-table, .grid-table, .kv { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.perm-table th, .perm-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.perm-table tbody th { text-align: left; font-weight: 600; }
.perm-table thead th { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.perm-cell { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.perm-cell input { width: 20px; height: 20px; min-height: 0; accent-color: var(--primary); }
.perm-cell span { display: none; }
@media (max-width: 480px) { .perm-table thead { display: none; } .perm-cell span { display: inline; font-size: 0.8rem; } .perm-table td { text-align: left; } }
.grid-table th, .grid-table td { padding: 6px 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.grid-table thead th { background: var(--surface-2); font-size: 0.82rem; color: var(--muted); }
.grid-table .old { color: var(--red); }
.grid-table .new { color: var(--green); }
.kv th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 12px 4px 0; white-space: nowrap; vertical-align: top; width: 1%; }
.kv td { padding: 4px 0; overflow-wrap: anywhere; }
pre.json { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; overflow-x: auto; font-size: 0.8rem; max-height: 320px; }
details summary { cursor: pointer; font-weight: 600; }

/* ---------- Courses par fournisseur, commandes ---------- */
.supplier-group { margin-bottom: 14px; }
.supplier-group .section-head { margin: 10px 2px 6px; }
ul.plain { margin: 4px 0 0; padding-left: 18px; }
