/* =============================================================
   MaBoutique — feuille de style
   Couleurs : indigo (teinture traditionnelle) pour la marque,
   vert pour l'argent gagné, ambre pour les alertes, rouge pour les pertes.
   ============================================================= */
:root {
  --indigo-900: #161d55;
  --indigo-800: #1f2870;
  --indigo-700: #2b379a;
  --indigo-100: #e6e8f6;
  --indigo-50:  #f2f3fb;
  --ink:   #171a2c;
  --ink-2: #474c66;
  --muted: #7c8199;
  --line:  #e2e4ee;
  --page:  #f4f5f9;
  --card:  #ffffff;
  --money: #0b7a52;  --money-bg: #e2f3eb;
  --warn:  #a85f00;  --warn-bg:  #fbefd9;
  --bad:   #b3302a;  --bad-bg:   #f8e3e1;
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(23, 26, 44, .06), 0 4px 16px rgba(23, 26, 44, .05);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rail: 248px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--indigo-700); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
small { font-size: 12.5px; }
code { background: var(--indigo-50); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--indigo-700); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.quiet { color: var(--muted); margin: 8px 0; }
.quiet.pad, .pad { padding: 16px 20px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lead { font-size: 16px; color: var(--ink-2); margin: 0 0 8px; }
.gain { color: var(--money); } .neg { color: var(--bad); } .warn { color: var(--warn); }
.hint { font-size: 13px; color: var(--ink-2); margin: 4px 0 0; }
.hint.warn { color: var(--warn); }
.spacer { flex: 1; }

/* ---------- Démarrage ---------- */
.boot, .center-screen { min-height: 100vh; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.boot-mark, .brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--indigo-800); color: #fff; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.boot-mark { width: 56px; height: 56px; font-size: 26px; margin: 0 auto 10px; }
.brand-mark.sm { width: 30px; height: 30px; font-size: 14px; border-radius: 9px; }
.brand-mark.lg { width: 56px; height: 56px; font-size: 26px; border-radius: 15px; background: #fff; color: var(--indigo-800); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: #c9ccdb; }
.btn.primary { background: var(--indigo-800); border-color: var(--indigo-800); color: #fff; }
.btn.primary:hover { background: var(--indigo-900); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--indigo-50); }
.btn.danger { color: var(--bad); }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn.big { min-height: 52px; font-size: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.primary):not(.danger-solid).loading::after { border-color: var(--indigo-700) var(--indigo-700) transparent transparent; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--indigo-50); color: var(--ink); }
.link-btn { border: 0; background: none; color: var(--indigo-700); font-weight: 600; cursor: pointer; padding: 8px 0; }
.link { font-size: 13.5px; font-weight: 600; text-decoration: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions.end { justify-content: flex-end; margin-top: 12px; }
.actions.center { justify-content: center; }

/* ---------- Champs ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field small { display: block; color: var(--muted); margin-top: 4px; }
.field input, .field select, .search input {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card);
}
.field input:focus, .field select:focus, .search:focus-within { outline: 2px solid var(--indigo-700); outline-offset: -1px; border-color: transparent; }
.field .static { min-height: 44px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.with-btn { display: flex; gap: 6px; min-width: 0; } .with-btn select, .with-btn input { flex: 1; min-width: 0; } .with-btn .btn { flex-shrink: 0; }
.form-error { background: var(--bad-bg); color: var(--bad); padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; margin: 0 0 12px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding-left: 12px; color: var(--muted); }
.search input { border: 0; outline: 0; padding-left: 0; color: var(--ink); background: transparent; }

/* Groupes de boutons (filtres) */
.seg { display: inline-flex; background: var(--indigo-50); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--indigo-800); box-shadow: 0 1px 2px rgba(23,26,44,.12); }
.seg.wide { display: flex; margin: 18px 0; } .seg.wide button { flex: 1; padding: 9px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill.ok { background: var(--money-bg); color: var(--money); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- Cadre : menu à gauche (ordinateur), onglets en bas (téléphone) ---------- */
.shell { min-height: 100vh; }
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); background: var(--indigo-900); color: #c9cdf0; padding: 20px 14px; display: flex; flex-direction: column; gap: 22px;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.rail > * { flex-shrink: 0; }
/* écran pas très haut (tablette, ordinateur portable) : menu plus serré, et il défile s'il ne tient toujours pas */
@media (max-height: 820px) { .rail { gap: 14px; padding-top: 14px; } .rail .nav-link { padding: 7px 12px; } }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.brand .brand-mark { background: #fff; color: var(--indigo-900); }
.brand strong { display: block; color: #fff; font-size: 15.5px; line-height: 1.25; }
.brand small { color: #9ea4d6; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c9cdf0; text-decoration: none; font-weight: 550; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: rgba(255,255,255,.11); color: #fff; box-shadow: inset 3px 0 0 #8f9bff; }
.trial { margin-top: auto; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.07); color: #dfe2ff; }
.topbar, .tabbar { display: none; }
main { margin-left: var(--rail); min-height: 100vh; outline: none; }
.page { max-width: 1180px; margin: 0 auto; padding: 32px 36px 60px; }
.narrow-page { max-width: 720px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head.compact { margin-bottom: 14px; }
.page-head p { margin: 4px 0 0; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 220px; }

/* ---------- Panneaux ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-head.pad { padding: 16px 20px 6px; margin: 0; }
.panel-head.spaced { margin-top: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.panel > .muted { margin: -4px 0 14px; font-size: 14px; }

/* Les chiffres clés : une seule bande, séparée par des filets */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; overflow: hidden; }
.figures > div { padding: 16px 20px; border-left: 1px solid var(--line); }
.figures > div:first-child { border-left: 0; }
.figures span { display: block; font-size: 13px; color: var(--ink-2); font-weight: 550; }
.figures strong { display: block; font-size: 25px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.figures strong.sm { font-size: 17px; }
.figures small { color: var(--muted); }
.figures .hl { background: var(--indigo-50); }
.figures.small { margin: 0 0 18px; } .figures.small strong { font-size: 20px; }

/* Listes */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.rows li:first-child { border-top: 0; }
.rows li > span { min-width: 0; }
.rows li small { display: block; color: var(--muted); }
.rows li > small.muted { max-width: 45%; text-align: right; }
.rows.big li { padding: 0; }
.row-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 20px; border: 0; background: none; text-align: left; cursor: pointer; }
.row-btn:hover { background: var(--indigo-50); }
.row-btn .grow { flex: 1; min-width: 0; }
.row-btn small { display: block; color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--indigo-100); color: var(--indigo-800); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.sub-title { font-size: 14px; margin: 4px 0 6px; color: var(--ink-2); }

/* Tableaux */
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 20px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td small { display: block; color: var(--muted); font-weight: 400; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Graphique des 7 jours */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 10px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; outline: none; }
.bar i { display: block; width: 100%; max-width: 46px; background: var(--indigo-100); border-radius: 6px 6px 2px 2px; }
.bar.today i { background: var(--indigo-700); }
.bar em { font-style: normal; font-size: 12px; color: var(--muted); margin-top: 6px; text-transform: capitalize; }
.bar .tip { position: absolute; bottom: calc(100% - 4px); background: var(--ink); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 2; }
.bar:hover .tip, .bar:focus .tip { opacity: 1; }

/* États vides et chargement */
.empty-state { text-align: center; padding: 48px 24px; max-width: 520px; margin: 0 auto; }
.empty-state h2 { font-size: 19px; margin-bottom: 8px; }
.empty-state p { color: var(--ink-2); margin: 0 0 18px; }
.loading-view { display: grid; place-items: center; padding: 60px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--indigo-100); border-top-color: var(--indigo-700); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Caisse ---------- */
.pos { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; max-width: 1280px; }
.catalog { min-width: 0; }
.catalog .search { margin-bottom: 10px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; margin-top: 10px; }
.product { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-height: 104px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: border-color .12s, transform .06s; }
.product:hover { border-color: var(--indigo-700); }
.product:active { transform: scale(.98); }
.product:disabled { opacity: .45; cursor: not-allowed; }
.p-name { font-weight: 650; font-size: 14.5px; line-height: 1.3; flex: 1; }
.p-price { font-weight: 750; font-size: 16px; color: var(--indigo-800); font-variant-numeric: tabular-nums; }
.p-price small { font-weight: 500; color: var(--muted); font-size: 12px; }
.p-stock { font-size: 12px; color: var(--muted); }
.product.low .p-stock { color: var(--warn); font-weight: 600; }
.p-count { position: absolute; top: 8px; right: 8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px; background: var(--indigo-800); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }

/* Le ticket : l'élément signature, comme un ticket de caisse */
.ticket { position: sticky; top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; display: flex; flex-direction: column; max-height: calc(100vh - 48px); box-shadow: var(--shadow); }
.ticket::after { content: ''; position: absolute; left: -1px; right: -1px; bottom: -10px; height: 10px;
  background: linear-gradient(-45deg, transparent 6px, var(--indigo-900) 0) 0 0 / 14px 10px, linear-gradient(45deg, transparent 6px, var(--indigo-900) 0) 0 0 / 14px 10px; }
.ticket-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 10px; border-bottom: 1px dashed var(--line); }
.ticket-lines { overflow-y: auto; padding: 6px 18px; min-height: 90px; flex: 1; }
.line { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name total" "step step"; gap: 6px 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.line:last-child { border-bottom: 0; }
.line-name { grid-area: name; min-width: 0; } .line-name b { display: block; font-weight: 600; } .line-name small { color: var(--muted); }
.line-total { grid-area: total; font-variant-numeric: tabular-nums; }
.stepper { grid-area: step; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; width: max-content; }
.stepper button { width: 36px; height: 32px; border: 0; background: none; cursor: pointer; font-size: 17px; color: var(--ink-2); }
.stepper .qty { width: auto; min-width: 46px; font-size: 14px; font-weight: 700; color: var(--ink); border-inline: 1px solid var(--line); border-radius: 0; }
.ticket-form { padding: 12px 18px 0; border-top: 1px dashed var(--line); }
.ticket-form .field { margin-bottom: 10px; }
.pay { display: flex; flex-wrap: wrap; gap: 6px; }
.pay button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.pay button.on { background: var(--indigo-800); border-color: var(--indigo-800); color: #fff; }
.ticket-total { display: flex; justify-content: space-between; align-items: baseline; background: var(--indigo-900); color: #fff; padding: 14px 18px; margin-top: 8px; }
.ticket-total span { font-weight: 600; color: #c9cdf0; }
.ticket-total strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ticket-actions { display: flex; gap: 8px; padding: 12px 18px 16px; background: var(--indigo-900); }
.ticket-actions .btn.ghost { color: #c9cdf0; } .ticket-actions .btn.ghost:hover { background: rgba(255,255,255,.08); }
.ticket-actions .btn.primary { flex: 1; background: #fff; color: var(--indigo-900); border-color: #fff; }
.ticket-actions .btn.primary:disabled { opacity: .35; }
.ticket-actions .btn.primary.loading::after { border-color: var(--indigo-900) var(--indigo-900) transparent transparent; }
.ticket-bar, .only-mobile { display: none; }

/* ---------- Fenêtres ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 18, 40, .45); display: grid; place-items: center; padding: 20px; z-index: 50; animation: fade .15s ease-out; }
.sheet { width: 100%; min-width: 0; max-width: 480px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); background: var(--card); border-radius: var(--r-lg); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(15,18,40,.25); animation: rise .18s ease-out; }
.sheet.wide { max-width: 640px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; }
.sheet-head h2 { font-size: 18px; }
.sheet-body { padding: 10px 20px; overflow-y: auto; overflow-x: hidden; min-width: 0; }
.sheet-foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.receipt { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; background: var(--page); border: 1px dashed #cfd2e0; padding: 16px; border-radius: var(--r-sm); white-space: pre-wrap; margin: 0; }
.checklist { display: grid; gap: 2px; max-height: 340px; overflow-y: auto; }
.checklist label { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.checklist span { flex: 1; font-weight: 550; } .checklist small { color: var(--muted); }
.checklist input { width: 18px; height: 18px; accent-color: var(--indigo-800); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }

/* Messages */
#toast-root { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14.5px; font-weight: 500; box-shadow: 0 8px 30px rgba(0,0,0,.2); animation: rise .18s ease-out; }
.toast.ok { background: var(--money); } .toast.bad { background: var(--bad); }

/* ---------- Connexion ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 0.9fr) 1.1fr; }
.auth-side { background: var(--indigo-900); color: #dfe2ff; padding: 56px 52px; display: flex; flex-direction: column; justify-content: center; gap: 18px;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 22px); }
.auth-side h1 { color: #fff; font-size: 38px; letter-spacing: -.03em; }
.auth-side > p { font-size: 18px; line-height: 1.5; max-width: 30ch; margin: 0; }
.auth-points { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; font-size: 15.5px; }
.auth-points li { padding-left: 28px; position: relative; }
.auth-points li::before { content: ''; position: absolute; left: 0; top: 5px; width: 14px; height: 8px; border-left: 2.5px solid #8f9bff; border-bottom: 2.5px solid #8f9bff; transform: rotate(-45deg); }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.auth-card .link-btn { display: block; margin: 10px auto 0; }
.panel.narrow { max-width: 460px; text-align: left; }
.panel.narrow h1 { margin-bottom: 10px; font-size: 22px; }

/* ---------- Tablette ---------- */
@media (max-width: 1100px) {
  .pos { grid-template-columns: 1fr 340px; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .rail { display: none; }
  main { margin-left: 0; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: var(--indigo-900); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
  .topbar .brand-mark { background: #fff; color: var(--indigo-900); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar .nav-link { flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 11px; color: var(--muted); border-radius: 8px; box-shadow: none; }
  .tabbar .nav-link.active { color: var(--indigo-800); background: var(--indigo-50); }
  .page { padding: 18px 16px 30px; }
  h1 { font-size: 23px; }
  .page-head { align-items: flex-start; }
  .page-head .actions { width: 100%; } .page-head .actions .btn { flex: 1; }
  .figures { grid-template-columns: 1fr 1fr; }
  .figures > div { border-left: 0; border-top: 1px solid var(--line); padding: 14px 16px; }
  .figures > div:nth-child(-n+2) { border-top: 0; }
  .figures > div:nth-child(even) { border-left: 1px solid var(--line); }
  .figures.five > div:last-child { grid-column: 1 / -1; border-left: 0; }
  .figures strong { font-size: 21px; }
  .hide-sm { display: none; }
  .table th, .table td { padding: 10px 14px; }
  .cols { grid-template-columns: 1fr; }
  .row-btn { padding: 12px 16px; }
  .panel { padding: 16px; }

  /* Caisse : le ticket devient un tiroir qui monte du bas */
  .pos { display: block; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .ticket { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40; max-height: 88vh; border-radius: var(--r-lg) var(--r-lg) 0 0; transform: translateY(105%); transition: transform .22s ease-out; box-shadow: 0 -10px 40px rgba(15,18,40,.25); }
  .ticket.open { transform: none; }
  .ticket::after { display: none; }
  .ticket-actions { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .only-mobile { display: inline-block; }
  .ticket-bar { display: flex; align-items: center; gap: 12px; position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 25; background: var(--indigo-900); color: #fff; border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 600; box-shadow: 0 8px 24px rgba(15,18,40,.3); cursor: pointer; }
  .ticket-bar[hidden] { display: none; }
  .ticket-bar strong { font-size: 18px; font-variant-numeric: tabular-nums; }
  .ticket-bar .bar-cta { margin-left: auto; color: #c9cdf0; font-size: 14px; }
  .catalog { padding-bottom: 80px; }

  .overlay { place-items: end stretch; padding: 0; }
  .sheet, .sheet.wide { max-width: none; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92vh; max-height: 92dvh; }
  .sheet-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .sheet-foot .btn { flex: 1; }
  .sheet-foot .spacer { display: none; }
  #toast-root { bottom: calc(84px + env(safe-area-inset-bottom)); }

  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 36px 24px 28px; gap: 10px; }
  .auth-side h1 { font-size: 28px; }
  .auth-side > p { font-size: 16px; }
  .auth-points { display: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Bandeau d'état (démo, hors ligne, envoi) ---------- */
#status:empty { display: none; }
.status { font-size: 14px; padding: 10px 36px; border-bottom: 1px solid var(--line); }
.status.demo { background: var(--indigo-50); color: var(--indigo-800); }
.status.off { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.status.sync { background: var(--indigo-50); color: var(--indigo-800); }
.status.bad { background: var(--bad-bg); color: var(--bad); }
.status a { color: inherit; font-weight: 700; }
@media (max-width: 760px) { .status { padding: 10px 16px; } }

/* ---------- Codes vendeurs ---------- */
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .12em; background: var(--indigo-50); color: var(--indigo-800); padding: 3px 8px; border-radius: 6px; }
.big-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 40px; font-weight: 800; letter-spacing: .2em; text-align: center; color: var(--indigo-800); background: var(--indigo-50); border: 1px dashed #b9bfe8; border-radius: var(--r); padding: 22px 10px; margin: 6px 0 4px; }
.field input.code-input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 24px; letter-spacing: .3em; text-align: center; text-transform: uppercase; min-height: 56px; }
.alert-panel { border-color: #f0c8c4; background: #fffafa; }
.narrow-page .panel + .panel { margin-top: 16px; }

/* ---------- Photos des produits ---------- */
.thumb { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; flex-shrink: 0; display: block; background: var(--indigo-50); }
.thumb.ph { display: grid; place-items: center; font-weight: 800; font-size: 16px; color: var(--ph); background: color-mix(in srgb, var(--ph) 13%, #fff); }
.thumb.lg { width: 96px; height: 96px; border-radius: 14px; font-size: 34px; }
.thumb.card { width: 100%; height: auto; aspect-ratio: 16 / 11; border-radius: 8px; margin-bottom: 8px; font-size: 26px; }
.cell-prod { display: flex; align-items: center; gap: 12px; }
.cell-prod > span { min-width: 0; }
.photo-field { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.photo-actions .btn { cursor: pointer; }
.field-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.link-btn.danger { color: var(--bad); padding: 2px 0; }
.product { padding: 8px 8px 12px; }
.product > .p-name, .product > .p-price, .product > .p-stock { padding: 0 6px; }
.product .p-count { top: 14px; right: 14px; box-shadow: 0 0 0 2px #fff; }
.check-head { display: flex; gap: 16px; margin: 4px 0 2px; }
.checklist label > span { display: flex; flex-direction: column; }
.checklist label > span small { font-weight: 400; }
.checklist label.has { opacity: .55; }
@media (max-width: 760px) { .thumb.card { aspect-ratio: 4 / 3; } }

/* ---------- Appareil partagé : écran « Qui vend ? » et clavier PIN ---------- */
.lock { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--indigo-900);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 22px); }
.lock-card { width: 100%; max-width: 420px; background: var(--card); border-radius: 22px; padding: 30px 24px 22px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.lock-card .brand-mark.lg { margin: 0 auto 12px; background: var(--indigo-800); color: #fff; }
.lock-card h1 { font-size: 22px; } .lock-card > p { margin: 4px 0 18px; }
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.who-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; }
.who-btn:hover { border-color: var(--indigo-700); background: var(--indigo-50); }
.who-btn .avatar { width: 48px; height: 48px; font-size: 20px; margin-bottom: 4px; }
.who-btn small { color: var(--muted); }
.avatar.xl { width: 64px; height: 64px; font-size: 28px; margin: 0 auto 10px; }
.dots { display: flex; justify-content: center; gap: 14px; margin: 6px 0 22px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--indigo-700); transition: background .1s; }
.dots i.on { background: var(--indigo-700); }
.dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto 10px; }
.keypad button { height: 62px; border-radius: 14px; border: 1px solid var(--line); background: var(--page); font-size: 24px; font-weight: 650; cursor: pointer; }
.keypad button:active { background: var(--indigo-100); }
.keypad .muted-key { font-size: 15px; font-weight: 600; color: var(--ink-2); background: transparent; border-color: transparent; }
.switch-btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #fff; font-weight: 600; cursor: pointer; }
.switch-btn:hover { background: rgba(255,255,255,.08); }
.switch-btn.sm { margin-left: auto; padding: 6px 10px; font-size: 13.5px; gap: 6px; }
.inline-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 0; }
.inline-field > span { margin: 0; } .inline-field select { width: auto; min-width: 150px; }

/* ---------- Caisse : scan, péremption, remise ---------- */
.search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.search-row .search { flex: 1; margin: 0; }
.p-exp { align-self: flex-start; font-size: 11.5px; font-weight: 700; color: var(--warn); background: var(--warn-bg); padding: 1px 8px; border-radius: 99px; margin: -2px 6px 4px; }
.p-exp.bad { color: var(--bad); background: var(--bad-bg); }
.cell-prod .p-exp { display: inline-block; margin: 3px 0 0; }
.discount-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.ticket-total { flex-wrap: wrap; }
.ticket-total .sub { flex-basis: 100%; font-size: 13px; color: #9ea4d6; font-weight: 500; margin-bottom: 2px; }
.quick-disc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.page-head.compact { display: flex; justify-content: space-between; align-items: center; }

/* Clôture de caisse */
.closing { text-align: center; padding: 18px; border-radius: var(--r); margin-bottom: 14px; background: var(--money-bg); color: var(--money); }
.closing.neg { background: var(--bad-bg); color: var(--bad); }
.closing.over { background: var(--warn-bg); color: var(--warn); }
.closing span { display: block; font-weight: 600; font-size: 13.5px; }
.closing strong { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.closing small { color: inherit; opacity: .85; }
.rows li.strong { font-weight: 700; }

/* ---------- Livraisons ---------- */
.recv-head, .recv-line { display: grid; grid-template-columns: minmax(0, 1.6fr) .8fr 1fr 1.1fr 34px; gap: 8px; align-items: center; }
.recv-head { font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 0; border-bottom: 1px solid var(--line); }
.recv-line { padding: 8px 0; border-bottom: 1px solid var(--line); }
.recv-line input { min-height: 40px; width: 100%; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.recv-name { min-width: 0; } .recv-name b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .recv-name small { color: var(--muted); }
.add-line { display: flex; gap: 8px; margin: 12px 0; }
.add-line input { flex: 1; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.receive-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; background: var(--indigo-50); border-radius: var(--r-sm); margin-bottom: 12px; font-weight: 600; }
.receive-total strong { font-size: 22px; color: var(--indigo-800); }
@media (max-width: 760px) {
  .recv-head { display: none; }
  .recv-line { grid-template-columns: 1fr 1fr 34px; grid-template-areas: "name name rm" "qty price price" "exp exp exp"; }
  .recv-line .recv-name { grid-area: name; } .recv-line [data-k="qty"] { grid-area: qty; } .recv-line [data-k="buy_price"] { grid-area: price; }
  .recv-line [data-k="expires_on"] { grid-area: exp; } .recv-line .icon-btn { grid-area: rm; }
}

/* Commandes fournisseurs */
.order-list { max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--line); }
.order-line { display: grid; grid-template-columns: 1fr 90px 64px; gap: 8px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.order-line small { display: block; color: var(--muted); }
.order-line input { min-height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; text-align: right; }
.order-line .unit { font-size: 13px; color: var(--muted); }
.order-line.zero { opacity: .5; }

/* ---------- Journal ---------- */
.wide-ok { max-width: 900px; }
.journal-day { margin-bottom: 14px; padding: 14px 18px; }
.journal { list-style: none; margin: 0; padding: 0; }
.journal li { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.journal li:first-child { border-top: 0; }
.journal time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13.5px; padding-top: 1px; }
.journal p { margin: 0; font-size: 14.5px; }
.journal small { display: block; color: var(--muted); margin-top: 2px; }
.journal .who { font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.journal li.alert { background: linear-gradient(90deg, var(--bad-bg), transparent 70%); margin: 0 -18px; padding-left: 18px; padding-right: 18px; box-shadow: inset 3px 0 0 var(--bad); }
.select-sm { min-height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; background: var(--card); }
@media (max-width: 760px) { .journal li { grid-template-columns: 44px 1fr; } .journal .who { grid-column: 2; } }

/* ---------- Réglages ---------- */
.roles-help { display: grid; gap: 6px; margin-bottom: 10px; }
.roles-help p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.check-field { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 44px; }
.check-field input { width: 20px; height: 20px; accent-color: var(--indigo-800); flex-shrink: 0; }
.check-field > span { margin: 0 !important; font-weight: 500 !important; }
.more-menu { display: grid; gap: 4px; }
.more-link { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.more-link:hover { background: var(--indigo-50); }
.tabbar button.nav-link { border: 0; background: none; font-family: inherit; cursor: pointer; }

/* ---------- Scanner ---------- */
.scanner { position: relative; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; margin-bottom: 14px; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; left: 12%; right: 12%; top: 30%; bottom: 30%; border: 3px solid rgba(255,255,255,.9); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-msg { position: absolute; left: 0; right: 0; bottom: 8px; margin: 0; text-align: center; color: #fff; font-size: 14px; font-weight: 600; text-shadow: 0 1px 3px #000; }

/* ---------- Étiquettes ---------- */
.labels-pick label { grid-template-columns: auto 1fr auto; }
.labels-pick .copies { width: 64px; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; }
.label-preview { margin-top: 12px; text-align: center; }
.label-preview svg { max-width: 100%; height: auto; }

/* ---------- Impression ---------- */
#print-root { display: none; }
@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block !important; }
  body.printing { background: #fff; }
  .labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .label { border: 1px dashed #bbb; padding: 3mm; text-align: center; break-inside: avoid; font-family: Arial, sans-serif; }
  .label b { display: block; font-size: 10pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .label span { display: block; font-size: 12pt; font-weight: 700; margin: 1mm 0; }
  .label svg { width: 100%; height: auto; }
  .ticket-print { font-family: 'Courier New', monospace; font-size: 11pt; color: #000; }
  .ticket-print.w58 { width: 48mm; } .ticket-print.w80 { width: 72mm; }
  .ticket-print .c { text-align: center; } .ticket-print .b { font-weight: 700; } .ticket-print .big { font-size: 15pt; }
  .ticket-print .r { display: flex; justify-content: space-between; gap: 2mm; }
  .ticket-print hr { border: 0; border-top: 1px dashed #000; margin: 1.5mm 0; }
  .print-ticket { margin: 0; }
  /* Facture et devis A4 */
  .doc-a4 { page: a4; font-family: Arial, Helvetica, sans-serif; font-size: 10.5pt; color: #000; line-height: 1.35; }
  .doc-a4 p { margin: 0; }
  .doc-head { display: flex; justify-content: space-between; gap: 10mm; padding-bottom: 5mm; border-bottom: 1.5pt solid #000; }
  .doc-shop h1 { font-size: 17pt; margin: 0 0 1.5mm; }
  .doc-title { text-align: right; }
  .doc-title h2 { font-size: 20pt; letter-spacing: .04em; margin: 0 0 1.5mm; }
  .doc-client { margin: 7mm 0 6mm auto; width: 85mm; border: 0.75pt solid #000; padding: 3mm 4mm; }
  .doc-client h3 { font-size: 9pt; font-weight: 400; margin: 0 0 1mm; color: #333; }
  .doc-blank { height: 12mm; }
  .doc-lines { width: 100%; border-collapse: collapse; }
  .doc-lines th { text-align: left; font-size: 9pt; border-bottom: 1pt solid #000; padding: 2mm 1.5mm; }
  .doc-lines td { padding: 1.8mm 1.5mm; border-bottom: 0.4pt solid #999; vertical-align: top; }
  .doc-lines th:not(:first-child), .doc-lines td:not(:first-child) { text-align: right; white-space: nowrap; }
  .doc-lines tr { break-inside: avoid; }
  .doc-totals { margin: 5mm 0 0 auto; border-collapse: collapse; min-width: 80mm; }
  .doc-totals th { text-align: left; font-weight: 400; padding: 1.2mm 4mm 1.2mm 0; }
  .doc-totals td { text-align: right; padding: 1.2mm 0; white-space: nowrap; }
  .doc-totals .grand th, .doc-totals .grand td { font-weight: 700; font-size: 12.5pt; border-top: 1pt solid #000; padding-top: 2mm; }
  .doc-totals .due th, .doc-totals .due td { font-weight: 700; }
  .doc-note { margin-top: 4mm; font-size: 9pt; }
  .doc-foot { margin-top: 14mm; break-inside: avoid; }
  .doc-sign { margin-left: auto; width: 70mm; height: 26mm; border-top: 0.75pt solid #000; padding-top: 1.5mm; font-size: 9pt; }
  .doc-foot > p { margin-top: 6mm; font-size: 9pt; text-align: center; color: #333; }
  /* QR codes des tables : 6 cartes par page A4, à découper */
  .qr-cards { page: a4; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6mm; font-family: Arial, Helvetica, sans-serif; color: #000; }
  .qr-card { border: 1px dashed #999; padding: 5mm; text-align: center; break-inside: avoid; height: 82mm; }
  .qr-card h2 { font-size: 13pt; margin: 0 0 2mm; }
  .qr-card .qr-img svg { width: 50mm; height: 50mm; }
  .qr-card b { display: block; font-size: 16pt; margin: 1mm 0; }
  .qr-card p { margin: 0; font-size: 10pt; }
}
@page a4 { size: A4; margin: 14mm 14mm 16mm; }

/* ---------- Référence Mobile Money à la caisse ---------- */
.ref-field input { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ref-warning { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--warn-bg); color: var(--warn); border: 1px solid #f0d199; font-size: 13.5px; font-weight: 650; line-height: 1.4; }
.ref-warning svg { flex-shrink: 0; margin-top: 1px; }
.table b.ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; }
.ref-field input::placeholder { text-transform: none; font-weight: 400; letter-spacing: 0; }

/* ---------- Abonnement ---------- */
.sub-status { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: var(--r); margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.sub-status > div { padding: 16px 20px; border-left: 1px solid var(--line); }
.sub-status > div:first-child { border-left: 0; }
.sub-status span { display: block; font-size: 13px; color: var(--ink-2); font-weight: 550; }
.sub-status strong { display: block; font-size: 18px; margin-top: 4px; }
.sub-status.ok { box-shadow: inset 4px 0 0 var(--money); }
.sub-status.soon { box-shadow: inset 4px 0 0 var(--warn); background: #fffbf3; }
.sub-status.expired { box-shadow: inset 4px 0 0 var(--bad); background: #fffafa; }
.sub-status.expired > div:last-child strong { color: var(--bad); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; align-items: start; }
.plan > .pill { align-self: flex-start; }
.tier-list { margin: 4px 0 8px; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.tier-list li { margin: 3px 0; }
.tier-price { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; display: flex; flex-direction: column; gap: 4px; }
.tag-pro { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; background: var(--indigo-800); color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.plan.best { border: 2px solid var(--indigo-700); }
.plan h2 { font-size: 15px; color: var(--ink-2); }
.plan-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0; color: var(--indigo-800); }
.plan-price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan .muted { margin: 0 0 8px; font-size: 13.5px; flex: 1; }
.trial { text-decoration: none; display: block; }
.trial.bad { background: rgba(236, 107, 98, .25); color: #fff; }
.blocked { padding-top: 70px; }
.blocked-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--bad-bg); color: var(--bad); display: grid; place-items: center; margin: 0 auto 16px; }
.blocked h1 { margin-bottom: 10px; }
@media (max-width: 760px) {
  .sub-status { grid-template-columns: 1fr; }
  .sub-status > div { border-left: 0; border-top: 1px solid var(--line); }
  .sub-status > div:first-child { border-top: 0; }
  .plans { grid-template-columns: 1fr; }
}

/* ---------- Paiement mobile money ---------- */
.panel-head .pill:not(.ok):not(.bad):not(.warn) { background: var(--indigo-50); color: var(--ink-2); }
.seg label { display: inline-flex; cursor: pointer; position: relative; }
.seg input[type=radio] { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; inset: 0; }
.seg label span { padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.seg input:checked + span { background: var(--card); color: var(--indigo-800); box-shadow: 0 1px 2px rgba(23,26,44,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--indigo-700); outline-offset: 1px; }
.with-btn input { flex: 1; min-width: 0; }
.alert-panel.inner { border: 1px solid #f0c8c4; border-radius: var(--r); padding: 12px 14px; margin: 0 0 16px; }
.momo-field .link-btn, .ref-field .link-btn { display: block; font-size: 13.5px; padding: 6px 0 0; text-align: left; }
.momo-field input { font-size: 18px; letter-spacing: .04em; }
.momo-wait { text-align: center; padding: 8px 4px 4px; }
.momo-wait h3 { font-size: 19px; margin: 14px 0 4px; }
.momo-wait .lead { margin: 10px 0 4px; }
.momo-amount { font-weight: 700; font-size: 15px; color: var(--indigo-800); margin: 0 0 12px; }
.momo-spinner { width: 54px; height: 54px; margin: 6px auto 0; border-radius: 50%; border: 5px solid var(--indigo-50); border-top-color: var(--indigo-700); animation: momo-spin 1s linear infinite; }
@keyframes momo-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .momo-spinner { animation-duration: 3s; } }
.momo-icon { width: 60px; height: 60px; margin: 4px auto 0; border-radius: 50%; display: grid; place-items: center; }
.momo-icon.bad { background: var(--bad-bg); color: var(--bad); }
.momo-icon.warn { background: var(--warn-bg); color: var(--warn); }
.momo-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; width: 100%; }
@media (max-width: 640px) { .momo-actions { flex-direction: column-reverse; } .momo-actions .btn { width: 100%; } }

/* ---------- Bouton « œil » des mots de passe et codes PIN ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 52px; }
.pw-wrap input::-ms-reveal { display: none; }
.eye-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); cursor: pointer; flex: none; -webkit-tap-highlight-color: transparent; }
.pw-wrap .eye-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
.eye-btn:hover { background: var(--indigo-50); color: var(--indigo-800); }
.eye-btn:focus-visible { outline: 2px solid var(--indigo-700); outline-offset: -2px; }
.pin-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px 0 22px; padding-left: 50px; }
.pin-row .dots { margin: 0; }
.dots.show i, .dots.show i.on { transition: none; width: 26px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 20px; color: var(--ink); background: transparent; }

/* ---------- Choix de la langue ---------- */
.lang-switch { display: flex; justify-content: flex-end; gap: 4px; margin: -6px 0 14px; }
.lang-switch.left { justify-content: flex-start; margin: 0 0 8px; }
.lang-switch button { min-height: 40px; min-width: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink-2); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.lang-switch button.on { background: var(--indigo-800); border-color: var(--indigo-800); color: #fff; }
.lang-switch button:focus-visible { outline: 2px solid var(--indigo-700); outline-offset: 2px; }

/* ---------- Aide, contact, textes juridiques ---------- */
.auth-main { align-content: center; gap: 18px; }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; margin: 0; font-size: 13.5px; color: var(--muted); }
.auth-foot .link-btn, .auth-card .link-btn.inline, .legal-links .link-btn { display: inline; margin: 0; padding: 6px 0; font-size: inherit; }
.help-contact .actions { margin-top: 10px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 4px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--indigo-700); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq summary:focus-visible { outline: 2px solid var(--indigo-700); outline-offset: 2px; border-radius: var(--r-sm); }
.faq-a { padding: 0 4px 16px; color: var(--ink-2); max-width: 68ch; }
.legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; }
.legal { max-width: 70ch; color: var(--ink-2); }
.legal h3 { color: var(--ink); font-size: 16px; margin: 20px 0 6px; }
.legal p, .legal ul { margin: 0 0 10px; }
.legal ul { padding-left: 20px; }
.legal mark { background: var(--warn-bg); color: var(--warn); padding: 0 3px; border-radius: 4px; }
.legal .updated { font-size: 13px; color: var(--muted); }

/* ---------- Tableaux sur téléphone : une carte par ligne ----------
   .table.cards : chaque ligne devient un bloc. Repères des cellules :
   c-main (le contenu principal), c-side (à droite : stock, montant),
   c-price / c-sub (2e ligne), c-act (les boutons, en bas). */
.table .num, .table .nowrap { white-space: nowrap; }
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  main, .page, .panel { min-width: 0; }
  .table.cards, .table.cards tbody { display: block; }
  .table.cards thead { display: none; }
  .table.cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main side" "sub act"; gap: 6px 12px;
    align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table.cards tr:last-child { border-bottom: 0; }
  .table.cards td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; }
  .table.cards td.hide-sm { display: none; }
  .table.cards .c-main { grid-area: main; }
  .table.cards .c-side { grid-area: side; text-align: right; justify-self: end; }
  .table.cards .c-price, .table.cards .c-sub { grid-area: sub; color: var(--ink-2); }
  .table.cards .c-act { grid-area: act; justify-self: end; display: flex; gap: 6px; }
  /* historique des ventes : la date au-dessus, les articles en dessous */
  .table.sale-cards tr { grid-template-areas: "sub side" "main main" "act act"; }
  .table.sale-cards .c-sub { font-size: 13px; color: var(--muted); }
  .table.sale-cards .c-act { justify-self: start; }
  /* produits : le prix à gauche et les boutons à droite sur la même ligne, sous le nom (le nom garde toute la largeur) */
  .table.prod-cards tr { grid-template-areas: "main side" "foot foot"; }
  .table.prod-cards .c-price { grid-area: foot; justify-self: start; font-weight: 600; color: var(--ink); }
  .table.prod-cards .c-act { grid-area: foot; justify-self: end; }
  .table .cell-prod { min-width: 0; }
  .table .cell-prod b { overflow-wrap: anywhere; }
}

/* ---------- Paiement en plusieurs moyens (caisse) ---------- */
.split { display: grid; gap: 8px; padding: 10px; margin: -4px 0 12px; background: var(--indigo-50); border-radius: var(--r); }
.split-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.split-row select, .split-row input { min-height: 42px; width: 100%; min-width: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.split-row input[data-sa] { text-align: right; font-variant-numeric: tabular-nums; }
.split-row .split-ref { grid-column: 1 / -1; text-transform: uppercase; }
.split-row .chip { white-space: nowrap; }
.split-row .icon-btn { width: 36px; height: 36px; }
.split-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.split-foot .link-btn { padding: 4px 0; }
#splitLeft { font-variant-numeric: tabular-nums; }
#splitLeft.ok { color: var(--money); }
#splitLeft.warn { color: var(--warn); }
.split .hint { margin: 0; }
.only-sm { display: none; }
@media (max-width: 760px) { .only-sm { display: block; } }

/* Le ticket garde toujours le total et le bouton « Encaisser » visibles :
   la liste des articles et la zone de paiement défilent quand elles sont trop longues (ex. plusieurs moyens) */
.ticket-lines { flex: 1 1 auto; min-height: 70px; }
.ticket-form { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ticket-total, .ticket-actions, .ticket-head { flex-shrink: 0; }
@media (max-width: 760px) { .ticket-lines { max-height: 32vh; } }

[hidden] { display: none !important; }

/* ---------- Importer une liste de produits ---------- */
.field textarea { width: 100%; min-height: 120px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); resize: vertical; font-size: 14.5px; line-height: 1.4; }
.field textarea:focus { outline: 2px solid var(--indigo-700); outline-offset: -1px; border-color: transparent; }
.import-pick { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.import-pick .btn { cursor: pointer; }
.import-src { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 12px; background: var(--indigo-50); border-radius: var(--r-sm); margin-bottom: 12px; }
.import-src span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.import-map { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 14px; }
.import-map summary { cursor: pointer; font-weight: 600; }
.import-map[open] summary { margin-bottom: 8px; }
.map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.map-grid .field select { min-width: 0; width: 100%; }
.margin-field { max-width: 340px; }
.import-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.import-sum .pill:not(.ok):not(.bad) { background: var(--indigo-50); color: var(--ink-2); }
.table-scroll { overflow-x: auto; max-height: 52vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); margin: 8px 0 14px; }
.import-table { font-size: 13.5px; }
.import-table th { position: sticky; top: 0; z-index: 1; }
.import-table th, .import-table td { padding: 8px 10px; }
.import-table td:nth-child(3) { min-width: 180px; }
.import-table small.neg { color: var(--bad); font-weight: 600; }
.import-table small.warn-text { color: var(--warn); }
.import-table tr.st-merged, .import-table tr.st-same { opacity: .6; }
.lookup-note { font-size: 13px; color: var(--ink-2); margin: -6px 0 12px; }
.lookup-note a { color: var(--indigo-700); }
.lookup-note.ok { color: var(--money); }
@media (max-width: 760px) {
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-table td:nth-child(3) { min-width: 150px; }
}
.share-hint { margin: -10px 0 14px; }
.import-pick + .hint { margin-bottom: 16px; }

/* ---------- Caisse du jour ---------- */
.register-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px 18px; border-radius: var(--r); margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--muted); }
.register-status.open { border-left-color: var(--money); }
.register-status p { margin: 0; flex: 1 1 260px; color: var(--ink-2); }
.register-status .pill:not(.ok) { background: var(--indigo-50); color: var(--ink-2); }
.figures.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figures > div.hl strong { color: var(--money); }
.register-page .panel .rows li small { display: block; }
.register-page .btn.block { width: 100%; justify-content: center; }
@media (max-width: 760px) {
  .figures.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures.four > div:nth-child(3) { border-left: 0; }
  .figures.four > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Fiscalité, services ---------- */
.ob-fiscal { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 14px 2px; margin: 4px 0 14px; min-width: 0; }
.ob-fiscal legend { font-weight: 600; font-size: 13.5px; color: var(--ink-2); padding: 0 6px; }
.check-hint { margin: -10px 0 14px; }
.vat-panel .rows li small { display: block; }
.hint.warn { color: var(--warn); background: var(--warn-bg); padding: 8px 12px; border-radius: var(--r-sm); }

/* ---------- Vente en gros ---------- */
.product .p-pack { font-size: 11.5px; color: var(--muted); }
.line .tier { font-style: normal; font-weight: 700; color: var(--money); margin-left: 4px; }
.line .pack-btn { display: block; font-size: 12.5px; margin-top: 2px; }
.wholesale { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 12px 10px; margin: 6px 0 10px; }
.wholesale summary { cursor: pointer; font-weight: 650; padding: 8px 0; }
.recv-line .pack-toggle { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; font-size: 13px; }

/* ---------- Mon espace de travail ---------- */
.module-list { display: grid; gap: 4px; margin: 8px 0; }
.module-list .check-field span { display: flex; flex-direction: column; gap: 2px; }
.module-list .check-field small { color: var(--muted); font-weight: 400; }

/* ---------- Restaurant : salle et notes ---------- */
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.table-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 104px; padding: 14px; text-align: left;
  border: 1.5px dashed var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.table-card b { font-size: 16px; }
.table-card small { color: var(--muted); font-size: 12.5px; }
.table-card strong { font-size: 18px; }
.table-card.busy { border-style: solid; border-color: var(--money); background: var(--money-bg); }
.table-card:focus-visible { outline: 3px solid var(--money); outline-offset: 2px; }
.salle .sub-title:empty { display: none; }
.order-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.order-menu .chips { margin: 8px 0; }
.menu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; }
.menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-height: 58px; }
.menu-item small { color: var(--muted); }
.menu-item:disabled { opacity: .45; cursor: not-allowed; }
.order-lines .line-note { display: block; color: var(--warn); font-weight: 650; }
.order-lines .sent { color: var(--money); font-weight: 650; }
.order-lines .stepper .qty { min-width: 28px; text-align: center; font-weight: 700; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.split-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.split-line span { display: flex; flex-direction: column; } .split-line small { color: var(--muted); }
.split-line input { width: 80px; min-height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; }
.order-banner { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 8px; border-radius: var(--r-sm); background: var(--money-bg); color: var(--money); font-weight: 650; }
.order-banner span { flex: 1; }
@media (max-width: 760px) { .order-wrap { grid-template-columns: 1fr; } .menu-list { max-height: 36vh; } }
.order-menu, .order-lines { min-width: 0; }
.order-menu .chips { flex-wrap: nowrap; overflow-x: auto; }
.order-menu .chips .chip { flex-shrink: 0; }
.extra-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.extra-row.comp { grid-template-columns: minmax(0, 1fr) 84px 44px 34px; }
.extra-row .extra-unit { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pad-x { padding: 0 16px; margin-top: -4px; }
.sm-pill { font-size: 11px; padding: 1px 8px; margin-top: 3px; align-self: flex-start; }
.extra-row input, .extra-row select { min-height: 40px; width: 100%; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: inherit; }
.wholesale .field-label { margin: 10px 0 2px; font-weight: 650; }

/* ---------- Écran cuisine ---------- */
.kitchen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.kitchen-card { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--money); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.kitchen-card.warn { border-top-color: var(--warn); }
.kitchen-card.late { border-top-color: var(--bad); }
.kitchen-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kitchen-card header b { font-size: 20px; }
.kitchen-card .wait { font-weight: 700; font-variant-numeric: tabular-nums; }
.kitchen-card.late .wait { color: var(--bad); }
.kitchen-card ul { list-style: none; margin: 10px 0 12px; padding: 0; }
.kitchen-card li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 17px; }
.kitchen-card li span { display: flex; flex-direction: column; gap: 2px; }
.kitchen-card .kq { font-size: 20px; }
.kitchen-card em { font-style: normal; font-weight: 700; color: var(--money); font-size: 15px; }
.kitchen-card i { font-style: normal; font-weight: 700; color: var(--warn); font-size: 15px; }
.pill.ok { background: var(--money-bg); color: var(--money); }

.pill.info { background: var(--indigo-800); color: #fff; white-space: normal; }
/* bons cuisine v25 : payé, à emporter / livraison, annulé, plat retiré */
.kitchen-card .kc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.kitchen-card .kc-tags:empty { display: none; }
.kitchen-card .kc-addr { display: block; margin-top: 6px; font-weight: 600; }
.kitchen-card.cancelled { border-top-color: var(--bad); background: var(--bad-bg); }
.kitchen-card .kc-cancel { margin: 0 0 8px; color: var(--bad); font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.kitchen-card .kc-why { margin: 8px 0 0; color: var(--bad); font-weight: 600; }
.kitchen-card li.gone > span { text-decoration: line-through; opacity: .7; }
.kitchen-card i.removed { color: var(--bad); text-decoration: none; }
/* salle : note payée, encore suivie (cuisine, remise, livraison) */
.table-card.paid { border-style: solid; border-color: var(--indigo-800); background: var(--indigo-50); }
.table-card .pill + .pill { margin-left: 0; }
.follow-info p { margin: 0 0 8px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.row-actions:empty { display: none; }

/* ---------- Dépôts (v29) ---------- */
.dep-split { display: block; font-size: 11.5px; margin-top: 2px; white-space: nowrap; }
.depot-table .cell-label { display: none; }
@media (max-width: 760px) {
  .depot-table thead { display: none; }
  .depot-table tr { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .depot-table td { display: block; padding: 0; border: 0; text-align: left; }
  .depot-table td:first-child { flex-basis: 100%; }
  .depot-table .cell-label { display: inline; color: var(--muted); font-weight: 400; margin-right: 4px; }
}
.banner-link { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 14px; font-weight: 600; color: inherit; text-decoration: none; }
.shop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.shop-card.here { border: 2px solid var(--indigo-800); }
.shop-card .panel-head { margin-bottom: 4px; }
.shop-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 10px 0 0; }
.shop-figs dt { font-size: 12.5px; color: var(--muted); }
.shop-figs dd { margin: 0; font-weight: 700; }
.old-price { font-size: 14px; font-weight: 400; margin-left: 6px; }
.brand.can-switch { cursor: pointer; border-radius: 10px; }
.brand.can-switch:hover { background: rgba(255,255,255,.08); }
.shop-switch { background: none; border: 0; color: inherit; font: inherit; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; cursor: pointer; }
.more-link.active { background: var(--indigo-50); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.warn-panel { border-left: 4px solid var(--warn); }
.count-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0 12px; }
.count-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.count-row:last-child { border-bottom: 0; }
.count-row span { min-width: 0; }
.count-row input { width: 96px; flex: none; text-align: right; }
.rows li > input[data-name] { flex: 1; min-width: 0; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- Commandes clients ---------- */
.order-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 12px; align-items: start; }
.order-card .panel-head h2 { font-size: 16px; }
.order-card .small { font-size: 13px; }
.extra-row > span { display: flex; flex-direction: column; min-width: 0; }

/* ---------- Commande par QR code : demandes dans la Salle ---------- */
.qr-requests { margin-bottom: 16px; }
.qr-requests .rows li { align-items: flex-start; }
.qr-items { display: block; margin-top: 4px; color: var(--ink); font-size: 14px; line-height: 1.45; }
.qr-requests .row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Page du client (menu.html) ---------- */
.qr-body { background: var(--page); }
.qr-page { max-width: 560px; margin: 0 auto; padding: 16px 16px 96px; }
.qr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.qr-head h1 { font-size: 22px; margin: 0 0 2px; }
.qr-head p { margin: 0; color: var(--ink-2); font-weight: 600; }
.qr-calls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.qr-calls .btn { justify-content: center; min-width: 0; white-space: normal; text-align: center; line-height: 1.25; padding: 10px 8px; font-size: 14px; }
.qr-calls .btn svg { flex-shrink: 0; }
.qr-cats { margin-bottom: 10px; }
.qr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qr-list li { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.qr-list li.out { opacity: .55; }
.qr-list .thumb.qr { width: 56px; height: 56px; border-radius: var(--r-sm); font-size: 22px; }
.qr-name { flex: 1; min-width: 0; }
.qr-name b { display: block; }
.qr-name small { color: var(--ink-2); font-weight: 600; }
.qr-add { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--indigo-800); background: var(--card); color: var(--indigo-800); font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.qr-add.on { background: var(--indigo-800); color: #fff; font-size: 17px; }
.qr-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); width: min(528px, calc(100% - 32px));
  display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border: 0; border-radius: var(--r-lg);
  background: var(--indigo-800); color: #fff; font: inherit; font-weight: 700; font-size: 16px; box-shadow: var(--shadow); cursor: pointer; }
.qr-reqs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.qr-reqs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font-weight: 600; }
.qr-reqs small { display: block; color: var(--muted); font-weight: 500; }
.qr-note { width: 100%; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; font-size: 14px; }

/* ---------- Catégories de produits ---------- */
.cat-filter { max-width: 220px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); font: inherit; font-weight: 600; color: var(--ink); }
.cat-row input[data-cn] { flex: 1; min-width: 0; }
.cat-row .extra-unit { white-space: nowrap; }
.cat-bar { height: 4px; background: var(--indigo-50); border-radius: 2px; margin-top: 5px; max-width: 220px; }
.cat-bar span { display: block; height: 100%; background: var(--indigo-700); border-radius: 2px; }
.also-types { border: 0; padding: 0; margin: 4px 0 12px; }
.also-types legend { font-weight: 600; font-size: 14px; margin-bottom: 2px; padding: 0; }
.also-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; margin-top: 6px; }
.also-grid .check-field { margin: 0; }
@media (max-width: 760px) { .cat-filter { max-width: none; flex: 1; } }
.pick-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; position: sticky; top: 8px; z-index: 5; }
.pick-bar .spacer { flex: 1; }
.pick-box { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--indigo-800); }
.table.picking tbody tr { cursor: pointer; }
.table.picking tr.picked, .table.picking tr.picked td { background: var(--indigo-50); }
.table.picking .c-act:empty { display: none; }
.qr-photos { justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 12px; }

/* ---------- Comptabilité ---------- */
.compta .page-head select { padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); font: inherit; font-weight: 600; }
.compta-months tr.on td { background: var(--indigo-50); }
.compta-months tr.quiet-row td { color: var(--muted); }
.compta-months tfoot th { border-top: 1.5px solid var(--ink); padding-top: 10px; }
.compta-months tfoot th.num { text-align: right; }
.compta-book .cat-pick { margin-left: 6px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 12.5px; background: var(--card); }
.compta-cash td, .compta-cash th { padding: 8px 6px; }
.figures .hl strong.neg { color: var(--bad); }
