/* Écran « Vendre » (views/sell.js) — caisse façon iOS : grille d'articles en photos, panier en panneau (iPad / PC)
   ou en barre du bas (iPhone), encaissement en feuille. Uniquement les variables de base.css (clair / sombre automatiques). */

/* ---------- mise en page ---------- */
.sl-split { display: grid; grid-template-columns: minmax(0, 1fr) 384px; gap: 16px; align-items: start; }
@media (max-width: 1199px) { .sl-split { grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; } .sl-split .sl-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; } .sl-split .sl-tn { font-size: 13px; } }
.sl-left { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.sl-gridwrap { min-width: 0; }
.sl-gridwrap .sv-sect + .sv-sect { margin-top: 14px; }
.sl-gridwrap .section-title { margin: 4px 4px 8px; }

/* Onglets des catégories : une rangée qui défile, collée sous la barre de navigation. */
.sl-cats { position: sticky; top: var(--top-h); z-index: 6; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px 0 8px; margin: -6px 0 0;
  background: linear-gradient(var(--bg) 80%, transparent); }
.sl-cats::-webkit-scrollbar { display: none; }
.sl-cat { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 15px; border-radius: 999px; background: var(--surface); font-size: 15px; font-weight: 500;
  letter-spacing: -.01em; color: var(--text); transition: background .15s, color .15s, transform .2s var(--spring); }
.sl-cat:active { transform: scale(.95); }
.sl-cat.on { background: var(--accent-fill); color: #fff; font-weight: 600; } /* [Claude 2026-11-23] design pass: white text on --accent-fill (4.5:1) */
.sl-cat svg.i { color: var(--orange); } .sl-cat.on svg.i { color: #fff; }

/* ---------- tuiles des articles ---------- */
.sl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.sl-tile { position: relative; border-radius: 16px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; text-align: left; min-width: 0;
  transition: transform .28s var(--spring), box-shadow .2s; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sl-tile:active { transform: scale(.955); transition-duration: .06s; }
.sl-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sl-tile.hit { animation: sl-hit .45s var(--spring); }
@keyframes sl-hit { 30% { box-shadow: 0 0 0 3px var(--accent); transform: scale(.97); } }
.sl-ph { position: relative; display: block; }
.sl-ph .media-tile { border-radius: 0; aspect-ratio: 1; }
.sl-badge { position: absolute; top: 7px; right: 7px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--accent-fill); color: #fff; font-size: 14px; font-weight: 700; /* [Claude 2026-11-23] design pass: white text on --accent-fill (4.5:1) */
  display: grid; place-items: center; font-variant-numeric: tabular-nums; box-shadow: 0 2px 8px rgba(0,0,0,.25); animation: sl-pop .3s var(--spring); }
@keyframes sl-pop { from { transform: scale(.4); opacity: 0; } }
.sl-fav { position: absolute; top: 7px; left: 7px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #ffd60a;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sl-fav svg.i { width: 13px; height: 13px; fill: currentColor; }
.sl-tt { display: flex; flex-direction: column; gap: 3px; padding: 8px 11px 10px; flex: 1; justify-content: space-between; }
.sl-tn { font-size: 14px; font-weight: 500; line-height: 1.22; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.44em; }
.sl-tp { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px; font-size: 15px; font-weight: 600; color: var(--accent-text); }
.sl-low { font-size: 11px; font-weight: 600; color: var(--red); white-space: nowrap; }
/* [Claude 2026-11-05] stock item without a POS price yet */
.sl-tile.pending { opacity: .6; } .sl-tile.pending .media-tile { filter: grayscale(.8); } .sl-tile.pending .sl-tp { color: var(--orange); }
.sl-tile.out { opacity: .45; } .sl-tile.out .media-tile { filter: grayscale(1); } .sl-tile.out .sl-tp { color: var(--red); }

/* ---------- le panier ---------- */
.sl-cart { position: sticky; top: calc(var(--top-h) + 10px); max-height: calc(100dvh - var(--top-h) - 24px); display: flex; flex-direction: column; border-radius: 18px; }
.sl-cart.in-sheet { position: static; max-height: none; border-radius: 16px; }
.sl-chead { display: flex; align-items: center; gap: 4px; padding: 10px 8px 8px 10px; }
/* [GPT 2026-10-28] Clear is labelled beside the cart title and on the phone bar; pending payment stays visibly locked. */
.sl-cart-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px 0}.sl-clear{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:66px;min-height:44px;color:var(--red)}.sl-clear:disabled{color:var(--muted);opacity:.45}.sl-pending-notice{border:1px solid color-mix(in srgb,var(--red) 35%,transparent);color:var(--red);background:color-mix(in srgb,var(--red) 6%,var(--surface))!important}.sl-pending-notice>.grow{min-width:0}.mobile-bar.sl-bar{grid-template-columns:minmax(0,1fr) auto minmax(100px,.9fr)}.mobile-bar.sl-bar .sl-clear{font-size:14px;padding:8px}.mobile-bar.sl-bar .sl-paybtn{min-width:0}
.sl-cust { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; text-align: left; color: var(--text); }
.sl-cust.add { color: var(--accent-text); font-weight: 500; }
@media (hover: hover) { .sl-cust:hover { background: var(--hover); } }
.sl-cust:active { background: var(--pressed); }
.sl-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--fill); color: var(--accent-text); font-weight: 600; font-size: 15px; }
.sl-av.on { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, white), var(--accent)); color: #fff; }
.sl-park { position: relative; color: var(--accent-text); }
.sl-park .badge { position: absolute; top: 2px; right: 0; padding: 0 5px; min-width: 18px; height: 18px; font-size: 11px; }
.sl-notes { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 8px; }
.sl-notes .notice { background: var(--surface-2); }
.sl-kind { padding: 0 12px 10px; }
.sl-cscroll { flex: 1; min-height: 120px; overflow: auto; border-top: .5px solid var(--line-2); overscroll-behavior: contain; }
.sl-cart.in-sheet .sl-cscroll { overflow: visible; }
.sl-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--muted); font-size: 15px; padding: 36px 20px; min-height: 180px; }
.sl-empty-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--fill); color: var(--faint); }
.sl-lines > .item { padding: 8px 12px 8px 10px; gap: 8px; }
.sl-lines > .item:not(:last-child)::after { left: 60px; }
.sl-lmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; padding: 2px 0; border-radius: 10px; }
.sl-lmain:active { opacity: .6; }
.sl-ln { font-size: 15px; font-weight: 500; letter-spacing: -.01em; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sl-lsub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.sl-note { color: var(--orange); font-weight: 500; }
.sl-tag { display: inline-flex; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 18px; background: var(--green-soft); color: var(--green); letter-spacing: 0; }
.sl-tag.o { background: var(--orange-soft); color: var(--orange); } .sl-tag.b { background: var(--blue-soft); color: var(--blue); }
.sl-lp { font-size: 15px; font-weight: 600; white-space: nowrap; min-width: 62px; text-align: right; }
.sl-step { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: var(--fill); flex: none; }
.sl-step button { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-text); transition: background .1s; }
.sl-step button:active { background: var(--surface); }
.sl-step span { min-width: 22px; text-align: center; font-weight: 600; font-size: 15px; }
.sl-ex { background: color-mix(in srgb, var(--red) 7%, var(--surface)); }
.sl-neg { color: var(--red); font-weight: 600; }
.sl-o { color: var(--orange); }
.sl-links { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 16px; border-top: .5px solid var(--line-2); }
.sl-links .link { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; padding: 4px 0; }
.sl-totals { border-top: .5px solid var(--line-2); }
.sl-totals > .item { min-height: 36px; padding-top: 7px; padding-bottom: 7px; }
.sl-totals > .item.muted { color: var(--muted); font-size: 15px; }
.sl-totals > .item.small { font-size: 13px; }
.sl-totals > .item.grand { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.sl-totals > .item.strong { font-weight: 600; }
.sl-totals > button.item { width: 100%; text-align: left; }
.sl-pay { padding: 4px 12px 12px; }
.sl-paybtn { min-height: 60px; font-size: 19px; border-radius: 16px; font-variant-numeric: tabular-nums; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.sl-paybtn:disabled { box-shadow: none; }

/* ---------- iPhone : la barre du panier au-dessus des onglets ---------- */
.mobile-bar.sl-bar { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
.sl-barinfo { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; padding: 0 6px; border-radius: 12px; color: var(--text); }
.sl-barinfo:active { background: var(--pressed); }
.sl-barcount { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--accent-fill); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; } /* [Claude 2026-11-23] design pass: white text on --accent-fill (4.5:1) */
.sl-barinfo svg.i { color: var(--muted); transform: rotate(180deg); }
.mobile-bar.sl-bar .btn { font-size: 18px; }
@media (min-width: 900px) { .mobile-bar.sl-bar { left: var(--nav-w); bottom: 0; padding-bottom: calc(8px + env(safe-area-inset-bottom)); } }
.sl-sheet > .inner { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* ---------- feuilles : ligne, client, retour ---------- */
.sl-lhead { display: flex; align-items: center; gap: 12px; }
.sl-ltot { font-family: var(--rounded); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.sl-qbtn { background: var(--surface); border-radius: 12px; min-height: 52px; }
.sl-chips { flex-wrap: wrap; }
.sl-chips .chips { justify-content: flex-end; }
.modal .section-title { margin: 6px 4px 0; }
.sl-newc { padding: 12px; display: grid; gap: 8px; }
.sl-plink { text-align: left; min-width: 0; }
.sl-pick { max-height: 52vh; overflow: auto; }
.sl-code { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; background: var(--surface); border-radius: 14px; }
.sl-code .num { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 22px; font-weight: 600; letter-spacing: .04em; }
.sl-code svg.i { color: var(--muted); }
.sl-rline.off { opacity: .5; }
.sl-toggle { background: var(--surface); border-radius: var(--radius); padding: 10px 16px; }
.sl-st.r { color: var(--red); font-weight: 600; } .sl-st.o { color: var(--orange); font-weight: 600; }
.sl-off { text-decoration: line-through; }
.sl-rhead { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 4px 0 2px; }
.sl-rtotal { font-family: var(--rounded); font-size: 38px; font-weight: 700; letter-spacing: -.02em; }
.sl-retbtn { color: var(--red); background: var(--surface); }
.sl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .sl-kpis .kpi .v { font-size: 20px; } .sl-kpis .kpi { padding: 12px; } }
.sl-in input { width: 96px; min-height: 36px; padding: 6px 10px; text-align: right; }

/* ---------- encaissement ---------- */
.sl-paysheet .paygrid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 760px) { .sl-paysheet .paygrid { grid-template-columns: 1fr; } }
.sl-paygrid > .sl-validate { grid-column: 1 / -1; min-height: 58px; font-size: 19px; border-radius: 16px; }
.sl-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sl-tenders > .item { padding-top: 8px; padding-bottom: 8px; }
.sl-exact { background: var(--accent-fill); color: #fff; font-weight: 600; } /* [Claude 2026-11-23] design pass: white text on --accent-fill (4.5:1) */
.sl-notes-row .sl-note-chip { background: var(--surface); font-variant-numeric: tabular-nums; }
.sl-paydone { display: grid; place-items: center; min-height: 200px; border-radius: 16px; background: var(--green-soft); color: var(--green); }
.sl-paydone svg.i { width: 64px; height: 64px; stroke-width: 2.4; }
.sl-validate .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }

/* Vente terminée */
.sl-done { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 6px 0 4px; }
.sl-donecheck { width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; animation: sl-pop .45s var(--spring); }
.sl-donecheck svg.i { width: 40px; height: 40px; stroke-width: 3; }
.sl-donettl { font-size: 17px; font-weight: 600; color: var(--muted); }
.sl-donetotal { font-family: var(--rounded); font-size: 40px; font-weight: 700; letter-spacing: -.02em; }
.sl-donebtns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.sl-donebtns .btn { flex-direction: column; gap: 4px; min-height: 64px; font-size: 13px; font-weight: 600; background: var(--surface); color: var(--text); padding: 8px 4px; white-space: normal; }
.sl-donebtns .btn svg.i { color: var(--accent-text); width: 22px; height: 22px; }

/* ---------- caméra ---------- */
.sl-cam { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.sl-cam.off { display: none; }
.sl-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sl-aim { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: var(--red); box-shadow: 0 0 12px var(--red); animation: sl-aim 1.6s ease-in-out infinite alternate; }
@keyframes sl-aim { from { transform: translateY(-40px); } to { transform: translateY(40px); } }

/* ---------- étiquettes ---------- */
.sl-lab { max-height: 50vh; overflow: auto; }
.sl-lab > .item.on { background: var(--accent-soft); }
.sl-labprev { background: var(--surface-3); border-radius: 12px; padding: 10px; overflow: auto; }
.sl-labframe { display: block; width: 100%; height: min(70vh, 1120px); min-height: 420px; border: 0; border-radius: 6px; background: #fff; }

/* ---------- téléphone ---------- */
@media (max-width: 640px) {
  .sl-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .sl-tt { padding: 6px 8px 8px; }
  .sl-tn { font-size: 13px; }
  .sl-tp { font-size: 14px; }
  .sl-badge { top: 5px; right: 5px; min-width: 24px; height: 24px; font-size: 13px; }
  .sl-paysheet .kpi .v { font-size: 22px; }
  .sl-paysheet .kpi { padding: 10px 12px; }
  .sl-paysheet .pad button { min-height: 50px; }
  .sl-paysheet .amount { min-height: 56px; font-size: 32px; }
  .sl-cats { top: calc(var(--top-h) + env(safe-area-inset-top)); }
}

/* [GPT 2026-10-28] A compact, bounded catalogue keeps five hundred products readable without loading five hundred photos. */
.sl-browser-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:4px 0 12px}
.sl-browser-caption{display:flex;flex-direction:column;gap:4px;min-width:0}.sl-browser-caption h2{font-size:22px;margin:0}
.sl-view-choice{display:inline-flex;gap:3px;padding:3px;border-radius:12px;background:var(--fill)}.sl-view-choice button{display:flex;align-items:center;gap:6px;min-height:40px;padding:8px 11px;border-radius:10px;color:var(--muted);font-size:14px}.sl-view-choice button.on{background:var(--surface);color:var(--accent-text);box-shadow:0 1px 4px rgba(0,0,0,.08)}
.sl-category-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin-top:16px}.sl-category-card{display:flex;align-items:center;gap:12px;padding:18px 14px;min-height:88px;text-align:left;background:var(--surface);border-radius:16px;color:var(--text)}.sl-category-card .grow{display:flex;flex-direction:column;gap:5px;min-width:0}.sl-category-card strong{font-size:16px}.sl-category-card>.i{flex:none;color:var(--muted)}
.sl-product-list{display:flex;flex-direction:column;gap:5px}.sl-tile.sl-product-row{display:flex;flex-direction:row;align-items:center;gap:12px;min-height:64px;padding:12px 14px;border-radius:12px;content-visibility:auto;contain-intrinsic-size:auto 64px}.sl-product-row .sl-tt{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:16px;row-gap:4px;flex:1;padding:0;min-width:0}.sl-product-row .sl-tn{grid-column:1;grid-row:1;font-size:15px;line-height:1.35;white-space:normal;-webkit-line-clamp:unset;overflow:visible}.sl-product-row .sl-product-code{grid-column:1;grid-row:2;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sl-product-row .sl-tp{grid-column:2;grid-row:1 / span 2;display:flex;flex-direction:column;align-items:flex-end;gap:4px;font-size:15px;white-space:nowrap}.sl-product-row .sl-badge{position:static;flex:none;min-width:28px;width:auto;height:28px;font-size:13px;box-shadow:none}.sl-tile:disabled{cursor:default}
.sl-show-more{display:flex;align-items:center;justify-content:center;gap:14px;padding:20px 0}.sl-show-more .btn{min-height:44px}
@media(max-width:640px){.sl-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.sl-category-card{padding:13px 10px;min-height:86px;gap:8px}.sl-category-card .itile{display:none}.sl-category-card strong{font-size:14px}.sl-product-row .sl-tt{column-gap:10px}.sl-product-row .sl-tn,.sl-product-row .sl-tp{font-size:14px}.sl-tile.sl-product-row{padding:11px 12px;gap:7px}.sl-view-choice button{min-height:42px;padding:8px 10px}.sl-show-more{flex-wrap:wrap}.sl-browser-controls{gap:9px}}
/* [GPT 2026-10-28] Keep cart, labelled clear and payment reachable together on portrait/phone layouts. */
.mobile-bar.sl-bar{grid-template-columns:minmax(0,1fr) auto minmax(0,1.1fr)}
@media(max-width:420px){.mobile-bar.sl-bar{gap:5px}.mobile-bar.sl-bar>.btn.primary{font-size:15px;padding-left:8px;padding-right:8px}.sl-barinfo{gap:6px;padding-left:0}.sl-barcount{min-width:26px;padding:0 6px}.mobile-bar.sl-bar .sl-clear{min-width:58px;padding:6px;gap:3px}}

/* [Claude 2026-11-07] Customer picker (Hadi: « super ugly »): a wide popup with one big search, cards in two columns where the
   screen allows, the typed part highlighted, chips for price list / points / credit, and an inline « Nouveau client » panel. */
.customer-lookup { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cl-search { display: flex; align-items: center; gap: 10px; padding: 0 12px; min-height: 52px; border-radius: 14px; background: var(--fill, var(--hover)); border: 1px solid transparent; }
.cl-search:focus-within { border-color: var(--accent); background: var(--surface); }
.cl-search .i { color: var(--muted); flex: none; }
.cl-input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 18px; color: var(--text); padding: 12px 0; outline: none; }
.cl-search .cl-input::-webkit-search-cancel-button { display: none; }
.cl-clear { flex: none; width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; color: var(--muted); }
.cl-head { display: flex; justify-content: space-between; padding: 0 2px; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; max-height: min(52vh, 460px); overflow-y: auto; padding: 2px; }
.cl-grid[aria-busy="true"] { opacity: .55; }
.cl-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: var(--text); }
.cl-row .i:last-child { color: var(--muted); }
@media (hover: hover) { .cl-row:hover { border-color: var(--accent); } }
.cl-row:active, .cl-row.focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.cl-av { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; font-weight: 700; font-size: 15px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent-text, var(--accent)); }
.cl-av.co { border-radius: 12px; background: color-mix(in srgb, var(--blue, #2f6fdb) 14%, var(--surface)); color: var(--blue, #2f6fdb); }
.cl-av.new { background: var(--accent-fill); color: #fff; } /* [Claude 2026-11-23] design pass: white text on --accent-fill (4.5:1) */
.cl-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cl-txt strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-txt small { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-txt mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.cl-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.cl-chip { font-size: 12px; line-height: 1; padding: 4px 7px; border-radius: 999px; background: var(--hover); color: var(--muted); }
.cl-chip.bad { background: color-mix(in srgb, var(--red, #c0392b) 14%, transparent); color: var(--red, #c0392b); }
.cl-chip.warn { background: color-mix(in srgb, var(--orange, #b7791f) 16%, transparent); color: var(--orange, #b7791f); }
.cl-new { border-style: dashed; }
.cl-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 8px; color: var(--muted); text-align: center; }
.cl-create { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--fill, var(--hover)); }
.cl-create-head { display: flex; justify-content: space-between; align-items: center; }
.cl-create-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cl-create-row .cl-input { background: var(--surface); border-radius: 12px; padding: 12px; font-size: 17px; min-height: 48px; }
.cl-err:empty { display: none; }
.cl-err { color: var(--red, #c0392b); font-size: 14px; }
.cl-newbtn { align-self: flex-start; min-height: 44px; }
.cl-sheet:has(.cl-create:not([hidden])) .cl-newbtn { display: none; }
@media (max-width: 640px) { .cl-grid { grid-template-columns: 1fr; max-height: 48vh; } .cl-create-row { grid-template-columns: 1fr; } }
.cl-create[hidden], .cl-clear[hidden] { display: none; }
.cl-search .cl-input, .cl-search .cl-input:focus { border: 0; box-shadow: none; outline: none; background: transparent; border-radius: 0; min-height: 0; }
.cl-create-row .cl-input { border: 1px solid var(--line); }
.cl-create-row .cl-input:focus { border-color: var(--accent); outline: none; }
/* [Claude 2026-11-07] UX w0: a cashier on the POS (counter mode) never sees « Actions » in the header (it leads nowhere there). */
html.pos-limited .action-corner-trigger{display:none}
/* [Claude 2026-11-07] UX w0: the takeover card (another login holds the drawer) — text on top, one big button under it. */
.sl-notes .notice.sl-desk-held { flex-wrap: wrap; align-items: flex-start; background: color-mix(in srgb, var(--orange) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--orange) 45%, transparent); }
.sl-desk-held > .grow { flex: 1 1 180px; min-width: 0; }
.sl-desk-held > .grow strong { display: block; font-size: 16px; }
.sl-desk-held > .btn { flex: 1 1 100%; min-height: 48px; }
.sl-notes .cw-delivery{width:100%;min-height:52px;text-align:left;cursor:pointer;font:inherit;color:inherit;background:color-mix(in srgb,var(--blue) 12%,var(--surface))}
.sl-notes .cw-delivery .btn{pointer-events:none}
.sl-held-items { white-space: normal; line-height: 1.35; }
.sl-held-btn .badge.count { margin-left: 6px; }
/* [Claude 2026-11-07] UX w0: basket − / qty / + are 44 px touch targets; the quantity pad for stems. */
.sl-step button { width: 44px; height: 44px; }
.sl-step .sl-qty { width: auto; min-width: 44px; padding: 0 6px; border-radius: 22px; font-weight: 600; font-size: 16px; color: var(--text); }
.sl-qgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sl-qbtn { min-height: 64px; font-size: 22px; font-weight: 700; }
/* [Claude 2026-11-07] Role homes · cashier: the « À faire » strip above the POS catalogue (one pill = one thing to do now). */
.sl-todo{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 10px;scrollbar-width:none}
.sl-todo::-webkit-scrollbar{display:none}
.sl-todo[hidden]{display:none}
.sl-pill{display:inline-flex;align-items:center;gap:8px;min-height:44px;max-width:300px;padding:0 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--text);font:inherit;font-weight:600;font-size:14px;white-space:nowrap;cursor:pointer;flex:none}
.sl-pill:active{transform:scale(.97)}
.sl-pill:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.sl-pill.go{background:var(--accent-fill);color:#fff;border-color:transparent} /* [Claude 2026-11-23] design pass: white text on --accent-fill (4.5:1) */
.sl-pill.blue{background:color-mix(in srgb,var(--blue) 14%,var(--surface));border-color:color-mix(in srgb,var(--blue) 40%,transparent)}
.sl-pill.orange{background:var(--orange-soft);border-color:color-mix(in srgb,var(--orange) 40%,transparent)}
.sl-pill.task .i{color:var(--accent)}
.sl-pill.ghost{background:transparent}
.sl-pill-time{color:var(--muted);font-weight:500}
/* [GPT 2026-11-10] A distinct basket surface, compact browse area and a checkout that stays within the viewport. */
.sl-cart { top: calc(var(--app-bar-h, var(--top-h)) + 12px); max-height: calc(100dvh - var(--app-bar-h, var(--top-h)) - 24px); border: 1px solid var(--line); }
.sl-cart.in-sheet { max-height: none; }
.sl-cart-heading { padding: 12px 14px 8px; }
.sl-cart-title { display: flex; align-items: center; gap: 10px; }
.sl-cart-title strong { display: block; font-size: 18px; }
.sl-cart-title .small { display: block; }
.sl-cart-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.sl-chead { padding: 0 12px 10px; }
.sl-cust { min-height: 44px; border: 1px solid var(--line); }
.sl-cart .sl-cscroll { min-height: 64px; }
.sl-cart .sl-empty { padding: 18px 14px; min-height: 126px; }
.sl-cart .sl-totals,.sl-cart .sl-pay { background: var(--surface-2); }
.sl-cart .sl-pay { padding: 7px 12px 12px; }
.sl-cart .sl-paybtn { min-height: 51px; box-shadow: none; }
.sl-cats { top: var(--app-bar-h, var(--top-h)); }
.sl-cat { min-height: 42px; }
.sl-tile:not(.sl-product-row) { border: 1px solid var(--line); }
.sl-tn { font-weight: 600; }
.sl-step button { min-width: 38px; min-height: 40px; }
@media (max-width: 640px) { .sl-cat { min-height: 44px; } .sl-cart .sl-pay { padding-bottom: calc(12px + env(safe-area-inset-bottom)); } }

/* [Claude 2026-11-10] The till (1280 × 720): the title, tabs, search and headings took 460 px and one row of products was
   visible. On a POS terminal's selling screen the page title goes (the tab already says « POS »), tabs + search + actions share
   one row, and the product heading and tiles are tighter: two full rows of products above the fold. Wide screens only. */
@media (min-width: 900px) {
  html.pos-terminal body:has(#view > .sl-split) .ltitle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 8px; }
  html.pos-terminal body:has(#view > .sl-split) .ltitle .lt-row { display: contents; }
  html.pos-terminal body:has(#view > .sl-split) .ltitle h1.lt { display: none; }
  html.pos-terminal body:has(#view > .sl-split) .ltitle #lt-seg { grid-column: 1; grid-row: 1; min-width: 420px; }
  html.pos-terminal body:has(#view > .sl-split) .ltitle #lt-tools { grid-column: 2; grid-row: 1; min-width: 0; }
  html.pos-terminal body:has(#view > .sl-split) .ltitle #top-actions { grid-column: 3; grid-row: 1; }
  html.pos-terminal .sl-browser-controls { min-height: 0; padding-block: 2px; }
  html.pos-terminal .sl-browser-caption { display: flex; align-items: baseline; gap: 8px; }
  html.pos-terminal .sl-todo { padding-block: 2px; }
}
@media (min-width: 900px) and (max-height: 800px) {
  html.pos-terminal .sl-grid .sl-tile .sl-ph .media-tile { aspect-ratio: 4 / 3; object-fit: cover; }
  html.pos-terminal .sl-cats { padding-block: 4px; }
}
/* [Claude 2026-11-14] Customer required: the basket head is a phone field (phone first, then name in « Nouveau client »). */
.sl-cust.need { gap: 8px; padding: 4px 6px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.sl-cust.need .sl-cust-phone { flex: 1; min-width: 0; min-height: 40px; border: 0; background: transparent; color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; outline: none; }
.sl-cust.need .sl-cust-phone::placeholder { color: var(--muted); }
.sl-cust.need .btn { min-height: 40px; }

/* [Claude 2026-11-17] « Servi par » under the customer */
.sl-served { display: flex; align-items: center; gap: 8px; width: calc(100% - 20px); margin: 0 10px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; text-align: left; min-height: 40px; }

/* [Claude 2026-11-18] Hadi: « buttons scattered, unorganized; nicer, simpler ». Quiet one-line links in the basket head, a capped head so
   the items keep room and the total + « Encaisser » never leave the screen. */
.sl-linkrow { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 10px; background: var(--surface-2); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sl-linkrow .sl-linkrow-go { color: var(--accent-text); font-weight: 600; font-size: 14px; }
.sl-cart > .sl-notes { max-height: 34vh; overflow: auto; }
.sl-cscroll { min-height: 96px; }
.sl-served { margin-top: 0; min-height: 36px; padding: 6px 10px; font-size: 14px; }
/* [Claude 2026-11-18] one row: to-do pills (start/end of day, Caisse, deliveries, tasks) then the categories */
.sl-toprow { position: sticky; top: var(--app-bar-h, var(--top-h)); z-index: 6; display: flex; align-items: center; gap: 10px; background: var(--bg); padding-block: 4px 6px; }
.sl-toprow > .sl-todo { flex: 0 1 auto; max-width: 55%; padding: 0; }
.sl-toprow > .sl-cats { position: static; flex: 1 1 0; min-width: 0; margin: 0; padding: 0; border-left: 1px solid var(--line); padding-left: 10px; }
/* [Claude 2026-11-18] orders pill: red while an order is late */
.sl-pill.late { background: color-mix(in srgb, var(--red) 16%, var(--surface)); color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); font-weight: 600; }
/* [Claude 2026-11-18] bouquet builder and its basket row */
.bb { gap: 10px; min-width: min(640px, 92vw); }
.bb-name, .bb-search { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; }
.bb-found, .bb-parts { max-height: 30vh; overflow: auto; }
.bb-part .sl-step { margin-inline: 8px; }
.bb-line { min-width: 80px; text-align: right; }
.bb-sum { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.bb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bb-price { width: 140px; min-height: 44px; text-align: right; font-size: 20px; font-weight: 700; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--surface); }
.bb-warn { color: var(--orange); font-weight: 600; }
.bb-actions { justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.bb-tpls { flex-wrap: wrap; }
.sl-bundle { text-align: left; width: 100%; }
/* [Claude 2026-11-18] bouquet tiles at the start of the grid */
.sl-bundle-tile .sl-bundle-ph { display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-text); }
.sl-bundle-tile.new .sl-bundle-ph { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.sl-bundle-tile .sl-bundle-ph svg { width: 42px; height: 42px; }
.sl-bundle-tile .sl-bundle-ph { width: 100%; aspect-ratio: 4 / 3; } /* same shape as the photos */
/* [Claude 2026-11-18] bouquet builder as a mini till: tiles left, the bouquet right */
.modal.bb-modal { width: min(1280px, 96vw); max-width: 96vw; }
.bb-pos { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 14px; min-width: 0; }
.bb-left, .bb-right { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bb-left { max-height: calc(var(--vvh, 100vh) - 190px); }
.bb-left .bb-grid { flex: 1 1 auto; overflow: auto; }
.bb-left .bb-found { display: contents; }
.bb-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; align-content: start; }
.bb-tools { gap: 8px; }
.bb-tools .bb-search { flex: 1 1 auto; }
.bb-scan { flex: 0 0 auto; min-height: 44px; }
.bb-cats { position: static; margin: 0; padding: 0 0 4px; }
.bb-right .bb-parts { max-height: calc(var(--vvh, 100vh) - 470px); min-height: 80px; }
@media (max-width: 860px) {
  .bb-pos { grid-template-columns: 1fr; }
  .bb-left { max-height: 46vh; }
  .bb-right .bb-parts { max-height: 30vh; }
}
.bb-grid .sl-tile { height: auto; min-height: 0; display: flex; flex-direction: column; }
.bb-grid .sl-tile .sl-ph { aspect-ratio: 4 / 3; height: auto; flex: none; }
.bb-grid .sl-tile .sl-tt { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 8px; }
.bb-grid .sl-tile .sl-tn { font-size: 13px; line-height: 1.2; white-space: normal; }
.modal .bb-grid { grid-auto-rows: auto !important; }
.modal .bb-grid .sl-tile.bb-tile { height: auto !important; max-height: none !important; overflow: hidden; }
.modal .bb-grid .sl-tile.bb-tile .sl-ph { height: auto !important; aspect-ratio: 4 / 3; }
.modal .bb-grid { grid-auto-rows: max-content !important; grid-template-rows: none !important; }
/* [Claude 2026-11-18] Hadi: « the list is squeezed on the left and half the page is empty » → nearly full width, tiles take the space */
.modal.bb-modal { width: 96vw; max-width: 1800px; }
.bb-pos { grid-template-columns: minmax(0, 1fr) 380px; }
.modal .bb-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.bb-left { max-height: calc(var(--vvh, 100vh) - 170px); }
@media (max-width: 860px) { .bb-pos { grid-template-columns: 1fr; } .modal.bb-modal { width: 100vw; } }
.bb-part > .grow { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
.bb-part .bb-line { min-width: 64px; }
/* [Claude 2026-11-18] handover photos per bouquet; bouquet gallery in « À préparer »; template tile photo */
.pc-targets .pc-target { gap: 10px; align-items: center; }
.pc-mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.pc-mark.done { background: color-mix(in srgb, var(--green) 20%, var(--surface)); color: var(--green); }
.pc-warn { color: var(--orange); font-weight: 600; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pg-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.pg-card.cancelled { opacity: .55; }
.pg-ph { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; padding: 0; background: var(--surface-2); cursor: pointer; }
.pg-ph.none { display: grid; place-items: center; gap: 4px; color: var(--muted); cursor: default; }
.pg-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-big { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: 12px; }
.pg-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.sl-bundle-ph .sl-bundle-img { width: 100%; height: 100%; object-fit: cover; }
/* [Claude 2026-11-18] « Modèles de bouquets » page */
.bt-page { display: flex; flex-direction: column; gap: 10px; }
.bt-intro { margin-bottom: 2px; }
.bt-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: start; padding: 12px; }
.bt-ph { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-text); }
.bt-ph img { width: 100%; height: 100%; object-fit: cover; }
.bt-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bt-top { gap: 8px; align-items: center; }
.bt-top .chip.on { color: var(--green); border-color: var(--green); }
.bt-in { color: var(--text-2, inherit); overflow-wrap: anywhere; }
.bt-warn { color: var(--red); }
.bt-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.bt-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
@media (max-width: 640px) { .bt-row { grid-template-columns: 64px 1fr; } .bt-ph { width: 64px; height: 64px; } .bt-acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } }
/* [Claude 2026-11-18] Hadi « I can't add chocolate »: the builder's categories wrap (a hidden sideways scroll hid « Chocolats » on a laptop) */
.bb-cats { flex-wrap: wrap; overflow: visible; }
.bb-more { grid-column: 1 / -1; padding: 8px 4px; }
/* [Claude 2026-11-18] preparation pulse */
.pp-pulse { padding: 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pp-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pp-cell { display: flex; flex-direction: column; align-items: flex-start; }
.pp-cell strong { font-size: 22px; line-height: 1.1; }
.pp-cell.bad strong { color: var(--red); }

/* [Claude 2026-11-19] orders sent to this till and not paid: one bold block at the top of the selling screen */
.sl-waiting{border:2px solid var(--orange);background:color-mix(in srgb,var(--orange) 12%,var(--card));border-radius:18px;padding:10px 12px;display:flex;flex-direction:column;gap:8px}
.sl-waiting-h{display:flex;align-items:center;gap:10px;font-size:17px}.sl-waiting-n{min-width:34px;height:34px;border-radius:50%;background:var(--orange);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:17px;animation:sl-wait 1.6s ease-in-out infinite}
@keyframes sl-wait{0%,100%{transform:scale(1)}50%{transform:scale(1.14)}}@media (prefers-reduced-motion:reduce){.sl-waiting-n{animation:none}}
.sl-waiting-row{display:flex;align-items:center;gap:10px;background:var(--card);border-radius:14px;padding:8px 10px;min-width:0}.sl-waiting-row .grow{min-width:0}.sl-waiting-name{font-weight:650;font-size:16px}.sl-waiting-by{color:var(--muted)}.sl-waiting-amt{font-weight:700;font-size:18px;white-space:nowrap}.sl-waiting-row .btn.primary{min-height:44px;white-space:nowrap}
@media (max-width:640px){.sl-waiting-row{flex-wrap:wrap}.sl-waiting-row .btn.primary{flex:1 1 100%}}

/* [Claude 2026-11-20] Hadi: the till's pills get their own row that wraps (never cut or scrolled sideways), waiting sales first and orange */
.sl-todo{flex-wrap:wrap;overflow:visible;padding:2px 0 10px}
.sl-pill{max-width:none}
.sl-pill .ellipsis{overflow:visible;text-overflow:clip;white-space:nowrap}
.sl-pill.waiting{background:var(--orange);color:#fff;border-color:transparent;font-weight:700}
.sl-pill.waiting .i{color:#fff}
.sl-held-btn.waiting{background:var(--orange);color:#fff;border-color:transparent;font-weight:700}
.sl-held-btn.waiting .badge.count{background:#fff;color:var(--orange)}
html.pos-terminal .sl-todo{padding-block:2px 8px}

/* [Claude 2026-11-23] UX pass on the till (1280 × 720, counter mode). Seen on screen: with a few items in the basket « Encaisser »
     sat 40 px below the bottom edge until the page was scrolled (the basket's height assumed it started right under the app bar,
     but the tabs + search row sit above it), and an empty attention slot added a second 12 px grid row to that header.
     Now the tabs + search row stays pinned (one fixed 62 px row), the categories pin under it, and the basket is sized from where it
     really starts, so its total and « Encaisser » are always on screen, scrolled or not. */
@media (min-width: 900px) {
     html.pos-terminal body:has(#view > .sl-split) { --sl-lt-h: 62px; }
     html.pos-terminal body:has(#view > .sl-split) .ltitle { position: sticky; top: var(--app-bar-h, var(--top-h)); z-index: 7; height: var(--sl-lt-h); box-sizing: border-box; background: var(--bg); }
     html.pos-terminal body:has(#view > .sl-split) .ltitle #context-attention:empty { display: none; }
     html.pos-terminal body:has(#view > .sl-split) .sl-cats { top: calc(var(--app-bar-h, var(--top-h)) + var(--sl-lt-h)); }
     html.pos-terminal body:has(#view > .sl-split) .sl-cart { top: calc(var(--app-bar-h, var(--top-h)) + var(--sl-lt-h) + 4px); max-height: calc(100dvh - var(--app-bar-h, var(--top-h)) - var(--sl-lt-h) - 16px); }
}
/* Short tills: a tighter basket head leaves more room for the lines; the total and « Encaisser » keep their size. */
@media (min-width: 900px) and (max-height: 800px) {
     html.pos-terminal .sl-cart-heading { padding: 8px 12px 4px; }
     html.pos-terminal .sl-cart-icon { width: 32px; height: 32px; border-radius: 10px; }
     html.pos-terminal .sl-chead { padding-bottom: 6px; }
     html.pos-terminal .sl-cart .sl-notes { padding-bottom: 6px; gap: 6px; }
     html.pos-terminal .sl-totals > .item { min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
}
/* The category row scrolls sideways: its right edge fades so a cut chip reads as « more this way », and the last chip can scroll clear of the fade. */
.sl-cats:not(.bb-cats) { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.sl-cats:not(.bb-cats)::after { content: ''; flex: 0 0 28px; }
/* A long one-word product name (« Chrysanthème ») breaks inside its tile instead of running past the edge (hyphenated on phones,
     where the tiles are 100 px wide). */
.sl-tn, .sl-ln { overflow-wrap: break-word; }
@media (max-width: 640px) { .sl-tn { -webkit-hyphens: auto; hyphens: auto; } }
/* The basket panel is 340 px on a 1024 px till: the photo left the name a 48 px column (« Bouqu / et 12… »). In a panel that narrow the
     line drops its 40 px photo and the name gets the room (container query; older WebViews keep the photo). */
.sl-cart:not(.in-sheet) { container: slcart / inline-size; }
@container slcart (max-width: 360px) { .sl-line .sl-lmain > .media-thumb { display: none; } }
/* Sale done: one, two or three buttons always share the full width (a lone « Imprimer » sat in a third of the row). */
.sl-donebtns { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
/* The closed-desk notice in the basket: the sentence on one or two lines, then « Ouvrir la caisse » as one full-width 48 px button
     (same shape as the takeover card above it). */
.sl-notes .notice.sl-desk-closed { flex-wrap: wrap; align-items: flex-start; }
.sl-desk-closed > .grow { flex: 1 1 180px; min-width: 0; }
.sl-desk-closed > .btn { flex: 1 1 100%; min-height: 48px; justify-content: center; }
/* Basket opened as a sheet (phones, handheld): the card is squeezed to the sheet's height, and its list (overflow: visible) ran over
     « Remise », the total and « Encaisser » once there were more lines than room. The lines now scroll inside the card; the total and
     « Encaisser » stay in place under them. */
.sl-cart.in-sheet .sl-cscroll { overflow: auto; overscroll-behavior: contain; }
/* Narrow till: « POS · Journée » share the tab bar like a segmented control instead of two small tabs pushed to the left of a wide grey bar
     (more tabs than fit still scroll sideways, as on every phone screen). */
@media (max-width: 640px) { html.pos-terminal .ltitle .seg.block > * { flex-grow: 1; } }
/* Narrow screens (58 mm handheld, 360 px): a basket line keeps its name readable on the first row; − qty + and the amount go under it. */
@media (max-width: 480px) {
     .sl-lines > .item.sl-line { flex-wrap: wrap; row-gap: 2px; }
     .sl-line > .sl-lmain { flex: 1 1 100%; }
     .sl-line > .sl-step { margin-left: 50px; }
     .sl-line > .sl-lp { margin-left: auto; font-size: 16px; }
}
/* [Claude 2026-11-24] purchase order editor picked like the POS (views/purchases.js poEditor + po-picker.js): tiles left, the order right;
   each column scrolls on its own on the till (1280 × 720) and tablets, one column on phones */
.po-pos .bb-right { min-width: 0; }
@media (min-width: 861px) { .po-pos .bb-right { max-height: calc(var(--vvh, 100vh) - 170px); overflow: auto; padding-right: 2px; } }
.po-pos .po-line .sl-step { flex: none; }
.po-pos .po-line .sl-step .po-qty { padding: 4px 6px; }
.po-pos .po-fees { text-align: left; }
/* [Claude 2026-11-24] « Commande à préparer » (flower-preparation.js): the pack builder's layout, the right side scrolls on its own */
.po-right { max-height: calc(var(--vvh, 100vh) - 190px); overflow: auto; padding-right: 2px; }
.po-sect { display: flex; flex-direction: column; gap: 8px; }
.po-need { justify-content: center; gap: 8px; border: 2px dashed var(--accent, #2563eb); }
.po-cust { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.po-mode { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.po-mode .dw-day { flex-direction: row; gap: 8px; min-height: 52px; font-size: 16px; }
.po-line { align-items: flex-start; gap: 8px; }
.po-line .sl-step { flex: none; }
.po-qty { width: 56px; text-align: center; min-height: 40px; }
.po-line-note { width: 100%; margin-top: 4px; min-height: 36px; font-size: 14px; }
.po-note { width: 100%; min-height: 64px; }
.po-shops { flex-wrap: wrap; }
.po-right .po-lines { max-height: none; }
/* [Claude 2026-11-24] review: Client · Boutique · Pour quand kept in view at the top of the sheet on phones and narrow tablets */
.po-summary { display: none; }
.po-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 0; max-width: 100%; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border, #d0d5dd); background: var(--surface, #fff); color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.po-chip.need { border: 2px dashed var(--accent, #2563eb); }
@media (max-width: 860px) {
  .po-right { max-height: none; overflow: visible; }
  .po-summary { display: flex; flex-wrap: wrap; gap: 6px; position: sticky; top: 0; z-index: 2; padding: 6px 0; background: var(--bg, #fff); grid-column: 1 / -1; }
}
/* [Claude 2026-11-24] Hadi: « the order wizard is ugly … small fields, not scrollable, not clear. Make it as a wizard. »
   The purchase order editor (views/purchases.js poEditor) is one step per screen: progress on top, the step in the middle (it
   scrolls on its own), « Retour » / « Suivant » always visible at the bottom. Big fields (52 px), − / + at 52 px, works on the
   1280 × 720 till, tablets and phones, light and dark (CSS variables only). */
.modal.pw-modal { width: min(1280px, 96vw); max-width: 96vw; height: min(calc(var(--vvh, 100dvh) - 40px), 900px); }
.modal.pw-modal .body { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 0; gap: 0; }
.pw { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.pw-steps { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 4px 16px 12px; border-bottom: .5px solid var(--line); flex: none; }
.pw-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 52px; padding: 4px 2px; border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.pw-step .pw-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); font-weight: 700; font-size: 14px; }
.pw-step.on { color: var(--text); font-weight: 600; }
.pw-step.on .pw-dot { background: var(--accent); color: #fff; }
.pw-step.done .pw-dot { background: var(--green); color: #fff; }
.pw-step .pw-sl { line-height: 1.15; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pw-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--fill); }
.pw-progress span { display: block; height: 100%; background: var(--accent); transition: width .25s ease; }
.pw-stage { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.pw-stage > .fs-alert { margin: 0 16px 8px; flex: none; }
.pw-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.pw-nav { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: .5px solid var(--line); background: var(--surface); }
.pw-nav .btn { min-height: 52px; padding: 0 22px; font-size: 17px; font-weight: 600; gap: 6px; }
.pw-nav .pw-next { min-width: 160px; justify-content: center; }
.pw-nav .btn[hidden] { display: none; }
.pw-navsum { color: var(--muted); font-size: 15px; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-sect { display: flex; flex-direction: column; gap: 10px; }
.pw-h { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.pw-sub { font-weight: 600; font-size: 15px; padding: 2px 2px 0; }
.pw-hint { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.pw-center { text-align: center; }
.pw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 16px; }
.pw-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pw-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.pw-in { min-height: 52px; width: 100%; font-size: 17px; border-radius: 12px; padding: 0 14px; box-sizing: border-box; }
.pw-line .pw-in, .pw-fee .pw-in, .pw-req .pw-in { background: var(--fill); }
.pw-in:disabled { opacity: .55; }
.pw-in.num { font-variant-numeric: tabular-nums; }
.pw-pick { display: flex; align-items: center; gap: 8px; text-align: left; background: var(--fill); color: var(--text); }
.pw-field .seg.block { min-height: 52px; }
.pw .seg { flex-wrap: wrap; }
.pw .seg button { min-height: 44px; }
.pw-choice { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: var(--text); font-size: 18px; width: 100%; }
.pw-choice strong { display: block; }
.pw-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pw-mode { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 88px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 600; }
.pw-mode .pw-emoji { font-size: 30px; line-height: 1; }
.pw-mode.on { border-color: var(--accent); background: var(--fill); }
/* ② articles: tiles left, the order right (each scrolls on its own); one at a time on phones with two tabs */
.pw-items { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); grid-template-rows: minmax(0, 1fr); gap: 0; }
.pw-itabs { display: none; }
.pw-col { min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 12px 16px; }
.pw-pickcol { border-right: .5px solid var(--line); }
.pw-pickcol .bb-left { max-height: none; flex: 1 1 auto; min-height: 0; }
.pw-pickcol .bb-grid { overflow: auto; overscroll-behavior: contain; }
.pw-pickcol .bb-search { min-height: 48px; font-size: 16px; }
.pw-ordercol { background: var(--surface-2); }
.pw-orderh { padding: 0 2px 8px; flex: none; }
.pw-count:not(:empty) { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.pw-lines { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.pw-line, .pw-fee { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); border: .5px solid var(--line); flex: none; }
.pw-lhead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pw-lph { flex: none; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; }
.pw-lph img, .pw-lph span { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; }
.pw-lname { min-width: 0; }
.pw-lname strong { display: block; font-size: 16px; line-height: 1.25; white-space: normal; }
.pw-del { flex: none; min-width: 48px; min-height: 48px; color: var(--red); }
.pw-lgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; align-items: end; }
/* [Claude 2026-11-24] review: an order line's fields never squeeze the − / + (180 px at least). Two columns by default
   (quantity | price, the total as its own row: fits the 1024 px tablet's 380 px column and a 375 px phone), three on wide screens
   where the order column has ~490 px (the 1280 × 720 till). The charges keep the auto-fit grid above. */
.pw-line .pw-lgrid { grid-template-columns: minmax(180px, 1.3fr) minmax(110px, 1fr); }
.pw-line .pw-tot { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
.pw-line .pw-tot .pw-ltotal { min-height: 36px; }
@media (min-width: 1200px) {
  .pw-line .pw-lgrid { grid-template-columns: minmax(180px, 1.3fr) minmax(110px, 1fr) minmax(90px, auto); }
  .pw-line .pw-tot { grid-column: auto; flex-direction: column; align-items: flex-end; }
  .pw-line .pw-tot .pw-ltotal { min-height: 52px; }
}
@media (max-width: 340px) { .pw-line .pw-lgrid { grid-template-columns: minmax(0, 1fr); } }
.pw-retired { flex: none; padding: 8px 2px 0; }
.pw-stepper { display: grid; grid-template-columns: 52px minmax(64px, 1fr) 52px; align-items: center; gap: 6px; }
.pw-stepper button { height: 52px; border-radius: 12px; background: var(--fill); color: var(--accent-text); display: grid; place-items: center; }
.pw-stepper button:active { background: var(--fill-2); }
.pw-stepper .pw-qty { text-align: center; font-size: 19px; font-weight: 600; padding: 0 4px; }
.pw-tot { align-items: flex-end; text-align: right; }
.pw-ltotal { font-size: 19px; min-height: 52px; display: flex; align-items: center; }
.pw-free { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.pw-free input { width: 22px; height: 22px; }
.pw-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 12px; color: var(--muted); text-align: center; border: 2px dashed var(--line); border-radius: 14px; }
.pw-cartbtn { min-height: 52px; flex: none; }
.pw-req { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: .5px solid var(--line); }
.pw-req .pw-wl { max-width: 140px; text-align: right; }
/* ③ poids et frais */
.pw-weightrow { display: flex; align-items: center; gap: 10px; max-width: 320px; }
.pw-weight { font-size: 24px; font-weight: 700; min-height: 60px; text-align: right; }
.pw-unit { font-size: 20px; font-weight: 600; color: var(--muted); }
.pw-feegroup { display: flex; flex-direction: column; gap: 10px; }
.pw-feename { font-weight: 600; }
.pw-feefoot { align-items: center; gap: 10px; }
.pw-feefoot strong { font-size: 19px; }
.pw-acct { min-height: 48px; }
.pw-feebtns { flex-wrap: wrap; gap: 8px; }
.pw-feebtns .btn { min-height: 48px; }
.pw-feetot { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--fill); }
.pw-feetot strong { font-size: 19px; }
.pw-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pw-link { padding: 0; min-height: 32px; justify-content: flex-start; }
.pw-wlist { display: flex; flex-direction: column; gap: 8px; }
/* ④ documents */
.pw-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; border-radius: 16px; border: 2px dashed var(--accent); background: var(--surface); color: var(--accent-text); font-size: 17px; padding: 16px; text-align: center; }
.pw-drop svg { width: 34px; height: 34px; }
/* ⑤ récapitulatif */
.pw-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: .5px solid var(--line); }
.pw-card .pw-row { min-height: 28px; }
.pw-big strong { font-size: 22px; }
.pw-table { display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); border: .5px solid var(--line); overflow: hidden; }
.pw-tr { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 14px; border-top: .5px solid var(--line); align-items: center; font-size: 15px; }
.pw-tr:first-child { border-top: 0; }
.pw-th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; background: var(--surface-2); }
.pw-tr .num { text-align: right; font-variant-numeric: tabular-nums; }
.pw-tn { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
/* the till (1280 × 720) and short screens: tighter frame, the same sizes */
@media (max-height: 760px) {
  .modal.pw-modal { height: calc(var(--vvh, 100dvh) - 16px); }
  .pw-steps { padding-bottom: 8px; }
  .pw-step { min-height: 44px; }
  .pw-scroll { padding: 12px 16px; gap: 14px; }
}
/* phones and narrow tablets: one column; « Ajouter des articles » / « Commande » as two tabs; step names under the active dot only */
@media (max-width: 860px) {
  .modal.pw-modal { width: 100vw; max-width: 100vw; height: calc(var(--vvh, 100dvh) - 8px); }
  .pw-items { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .pw-itabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 12px 0; }
  .pw-itabs button { min-height: 48px; border-radius: 12px; background: var(--fill); font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text); }
  .pw-itabs button.on { background: var(--accent); color: #fff; }
  .pw-itabs button.on .pw-count { background: #fff; color: var(--accent-text); }
  .pw-items.show-pick .pw-ordercol, .pw-items.show-order .pw-pickcol { display: none; }
  .pw-pickcol { border-right: 0; }
  .pw-col { padding: 10px 12px; }
  .pw-ordercol .pw-orderh { display: none; }
  .pw-step:not(.on) .pw-sl { display: none; }
  .pw-steps { padding: 4px 8px 10px; }
  .pw-nav { gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .pw-nav .btn { padding: 0 16px; }
  .pw-nav .pw-next { min-width: 0; flex: 1 1 auto; }
  .pw-navsum { display: none; }
  .pw-scroll { padding: 12px; }
  .pw-tr { grid-template-columns: minmax(0, 1fr) auto auto; }
  .pw-tr > :nth-child(3), .pw-tr > :nth-child(4) { display: none; }
}
/* [Claude 2026-11-26] owners: « Caisse · Stock » — one line near the basket header (desk that records the money, place the goods leave) */
.sl-anytill { display: flex; align-items: center; gap: 6px; margin: 0 10px 8px; }
.sl-anytill .sl-served { margin: 0; width: auto; flex: 1; min-width: 0; }
.sl-anytill .btn { min-height: 36px; }
@media (pointer: coarse) { .sl-anytill .btn { min-height: 44px; min-width: 44px; } } /* [Claude 2026-11-26] polish: the « × » keeps the 44 px touch size (FE-15); a mouse keeps 36 px */

/* [Claude 2026-11-27] Hadi: a small photo at the start of each row of the list view */
.sl-tile.sl-product-row .sl-row-thumb{flex:none;width:48px;height:48px;border-radius:10px;overflow:hidden;display:grid;place-items:center;background:var(--fill)}
.sl-tile.sl-product-row .sl-row-thumb img,.sl-tile.sl-product-row .sl-row-thumb .media-thumb{width:48px;height:48px;object-fit:cover;border-radius:10px}
