/* Stock et produits (style iOS : listes en encart, feuilles aux champs groupés). */
.kpi.red .v { color: var(--red); }
.kpi.sm .v { font-size: 17px; font-family: var(--font); font-weight: 600; margin-top: 6px; }

/* champs groupés des feuilles (libellé à gauche, valeur à droite) — partagés par Stock, Produits et Imports */
.list > .item.cm-f { color: var(--text); font-weight: 400; gap: 10px; }
.cm-f .cm-l { flex: none; max-width: 55%; }
.cm-f input, .cm-f select { flex: 1; min-width: 0; width: auto; min-height: 30px; padding: 0; background-color: transparent; box-shadow: none !important; text-align: right; color: var(--muted); }
.cm-f select { padding-right: 22px; background-position: calc(100% - 9px) 50%, calc(100% - 4px) 50%; text-align-last: right; }
.cm-f input:focus, .cm-f select:focus { color: var(--text); }
.cm-f > input:only-child, .cm-f > textarea:only-child { text-align: left; color: var(--text); }
.cm-f input[type="date"] { flex: none; width: auto; }
.cm-f .cm-u { flex: none; font-size: 15px; }
.cm-f .seg { flex: 1; }
.cm-f .seg:not(.block) { flex: none; margin-left: auto; }
.cm-f textarea, .cm-ta { width: 100%; min-height: 80px; padding: 0; background: transparent; box-shadow: none !important; resize: vertical; }
.cm-st { margin: 0 16px 6px; }
.cm-sheet .body > div > .section-title:first-child { margin-top: 0; }
.list > button.item.cm-add { color: var(--accent-text); }
.cm-csv { min-height: 200px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: transparent; box-shadow: none !important; border-radius: 0; }

/* produits */
.pr-name { gap: 6px; min-width: 0; }
.pr-sub .pr-bad { color: var(--red); }
.pr-price { color: var(--text); font-size: 17px; flex: none; }

/* stock */
/* [GPT 2026-10-25] Photo inventory stays readable on phones and portrait tablets without horizontal scrolling. */
.stk-photo-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(155px,1fr)); gap:12px; }
.stk-photo-card { display:flex; flex-direction:column; text-align:left; min-width:0; overflow:hidden; padding:0; border:0; border-radius:16px; background:var(--surface); color:var(--text); }
.stk-photo-card .media-tile { width:100%; aspect-ratio:4/3; height:auto; object-fit:cover; border-radius:0; }
.stk-photo-copy { padding:12px; display:flex; flex-direction:column; gap:6px; width:100%; overflow-wrap:anywhere; }
.stk-photo-copy .num { font-size:20px; font-weight:650; }
.stk-photo-card:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.stk-life { display:flex; flex-direction:column; gap:16px; }
.stk-life-hero { display:flex; align-items:center; gap:12px; padding:4px; }
.stk-life-metrics { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.stk-life-metric { padding:14px; background:var(--surface); border-radius:14px; display:flex; flex-direction:column; gap:7px; }
.stk-life-metric strong { font-size:22px; }
.stk-life .item .num { white-space:normal; text-align:right; }
.stk-purchase-line { flex-direction:column; align-items:stretch !important; gap:12px; }
.stk-purchase-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.stk-purchase-fields label { display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--muted); min-width:0; }
.stk-purchase-fields input { width:100%; min-height:44px; font-size:16px; }
/* [GPT 2026-10-27] One inline photo catalogue keeps selected quantities/prices visible and touchable. */
.stk-order-editor { display:flex; flex-direction:column; gap:12px; width:100%; min-width:0; }
.stk-order-editor .section-title { margin:0; }
.stk-order-catalogue { max-height:250px; overflow:auto; border:1px solid var(--line); border-radius:12px; }
.stk-order-catalogue .item { width:100%; text-align:left; min-height:56px; }
.stk-order-catalogue [aria-pressed="true"] { color:var(--accent-text); background:var(--accent-soft); }
.stk-order-total { text-align:right; font-weight:600; }
.stk-delivery { align-items:flex-start; }
.stk-delivery .grow { min-width:0; overflow-wrap:anywhere; }
.stk-qr { max-width:280px; margin:auto; padding:16px; background:white; border-radius:16px; }
.stk-qr svg { display:block; width:100%; height:auto; }
@media (max-width:360px) { .stk-photo-grid { grid-template-columns:1fr 1fr; gap:8px; } .stk-photo-copy {padding:10px;} }
.stk-right { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.stk-bad { color: var(--red); } .stk-warn { color: var(--orange); } .stk-good { color: var(--green); }
.stk-off { opacity: .5; }
.stk-intro { margin: 0 4px; }
.stk-st { margin: 0 16px 6px; }
.stk-iv { max-width: 60%; text-align: right; }
.stk-qty { flex: none; width: 96px; min-height: 36px; padding: 4px 10px; text-align: right; font-variant-numeric: tabular-nums; }
.stk-qty.stk-ok { box-shadow: inset 0 0 0 1.5px var(--green); }
.stk-qty.stk-err { box-shadow: inset 0 0 0 1.5px var(--red); }
.stk-unit { flex: none; width: 26px; }
.list > .item.stk-line { flex-direction: column; align-items: stretch; gap: 10px; }
.stk-g label { color: var(--muted); }
.stk-g input { min-height: 38px; padding: 6px 10px; font-size: 16px; }
.stk-trow { gap: 8px; justify-content: space-between; }
.stk-lines { color: var(--text); margin-top: 2px; }
.stk-form { gap: 16px; }
.stk-ptitle { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.stk-dtitle { font-size: 17px; }
.stk-dpad { width: 60px; flex: none; }
.stk-dfoot { gap: 10px; }
.stk-drawer .dbody > .search { flex: none; }
@media (max-width: 420px) { .stk-g { grid-template-columns: 1fr 1fr; } .stk-g label:last-child { grid-column: 1 / -1; } }
/* les feuilles ouvertes depuis le panneau passent devant lui */

/* Réglages et rapports (style « Réglages » d'iOS) */
.set-page { width: 100%; max-width: 760px; }
.set-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 16px 6px; }
.set-head .section-title { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-link { font-size: 15px; flex: none; }
.set-val { color: var(--muted); max-width: 60%; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.set-wrap { font-size: 15px; line-height: 1.35; letter-spacing: -.01em; }
.set-blue { color: var(--accent-text); }
.set-lbl { flex: none; min-width: 96px; }
.set-num { width: 22px; flex: none; text-align: right; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.set-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.set-url { font-size: 17px; font-weight: 600; }
.set-act { flex: none; color: var(--accent-text); font-size: 15px; padding: 6px 4px; }
.set-act.green { color: var(--green); } .set-act.red { color: var(--red); } .set-act:disabled { color: var(--faint); }
.set-main { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.list > .item.dim .grow > :first-child { color: var(--muted); }
.list > button.item.set-btn { justify-content: center; color: var(--accent-text); }
.list > label.item.fm-sw { color: var(--text); font-weight: 400; cursor: pointer; }
.list > label.item.fm-sw .small { font-weight: 400; }
label > .chips .chip { color: var(--text); font-size: 15px; } label > .chips .chip.on { color: #fff; }
.item input.set-input { flex: 1; min-width: 0; width: auto; min-height: 32px; padding: 0; background: transparent; box-shadow: none !important; text-align: right; color: var(--muted); }
.item input.set-input:focus { color: var(--text); }
.item input.set-input.set-days { flex: none; width: 56px; }
.list > .item.set-id { padding-top: 12px; padding-bottom: 12px; }
.list > .item.set-id > .itile:first-child { width: 56px; height: 56px; border-radius: 14px; font-size: 24px; }
.set-id-name { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.code-big { font-family: var(--rounded); font-size: 44px; font-weight: 700; letter-spacing: .08em; text-align: center; padding: 18px; border-radius: var(--radius); background: var(--surface); }
/* rapports */
.rep-date { padding: 4px 6px; }
.rep-pick { position: relative; display: inline-block; }
.rep-pick .strong::first-letter { text-transform: uppercase; }
.rep-pick input[type="date"] { position: absolute; inset: 0; width: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }
.kpi .s { color: var(--muted); font-size: 13px; letter-spacing: 0; margin-top: 2px; }
.rep-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px 20px; align-items: start; }
.rep-grid > * { min-width: 0; }
@media (max-width: 640px) { .rep-grid { grid-template-columns: 1fr; } .rep-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* [GPT 2026-10-26] Full workplace scenes stay readable in a compact, responsive private photo gallery. */
.qr-photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px}.qr-photo{margin:0;overflow:hidden}.qr-photo img{display:block;width:100%;max-height:420px;object-fit:contain;background:var(--bg)}

/* [GPT 2026-10-26] Reference captions retain normal inset spacing below full-scene photos. */
.qr-photo figcaption{padding:16px}

/* [GPT 2026-10-27] Keep recipe deduction labels and checkboxes easy to tap on tablets and phones. */
.stk-recipe-toggle{display:flex;align-items:center;gap:8px;min-height:38px;cursor:pointer;white-space:normal}.stk-recipe-toggle input{width:20px;height:20px;flex:none;accent-color:var(--accent)}

/* [GPT 2026-10-29] Quantity correction remains a touch-friendly row inside one reviewed transfer form. */
.transfer-edit-line{gap:6px;flex-wrap:wrap}.transfer-edit-line select{flex:1;min-width:140px;max-width:100%}.transfer-edit-line input{width:90px;min-height:44px}.transfer-edit-line select{min-height:44px}
/* [GPT 2026-10-29] Reviewed AI source data stays contained within the shared touch layout. */
.analysis-page{max-width:1000px;margin:auto}.analysis-fact{white-space:pre-wrap;overflow-wrap:anywhere;font:12px var(--font-mono,monospace);max-height:260px;overflow:auto}
/* [Claude 2026-11-03] Transfer rows on phones and narrow tablets: the route and lines take the full width, the
   « Imprimer et QR » / « Recevoir » buttons go under them instead of covering the text. */
@media (max-width: 820px) {
     .stk-tritem { flex-wrap: wrap; row-gap: 8px; }
     .stk-tritem > .attention-open { flex: 1 0 100%; min-width: 0; }
     .stk-tritem > :not(.attention-open) { margin-left: auto; }
     .stk-tritem .stk-lines { white-space: normal; }
}
/* [Claude 2026-11-07] UX florist walk: at 360 px the transfer row laid its three lines side by side (the shared row button is a
   flex row), squeezing the goods into a 40 px column cut on the right. They stack: route + status, number · time · who, goods. */
.stk-tritem > .attention-open { flex-direction: column; align-items: stretch; gap: 2px; }
.stk-tritem .stk-trow { display: flex; align-items: baseline; min-width: 0; }
.stk-tritem .stk-trow > .ellipsis { min-width: 0; flex: 1; }
.stk-tritem .stk-trow > .small { flex: none; }
.stk-tritem .stk-lines { white-space: normal; overflow-wrap: anywhere; }

/* [Claude 2026-11-07] UX w0: journal sentences wrap; raw data behind « Détails » */
.rep-log .rep-sentence{white-space:normal;overflow-wrap:anywhere}.rep-log-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px}.rep-raw-btn{min-height:44px}.rep-raw{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 0;font-size:12px}
