/**
 * Fichier  : assets/css/inventory-enhance.css
 * Auteur   : KREMER Régis
 * Version  : 2.6.98
 * Date     : 2026-07-17
 * Description : Styles Inventaires — assistant, brouillons serveur, comptage terrain, revue des écarts et historique.
 *
 * Changelog :
 *   v2.6.22 (2026-07-08) — Filtres de statut et lisibilité du détail inventaire.
 *   v2.6.74 (2026-07-17) — INVENTORY MOBILE FLOW1 : assistant, cartes natives, dock sécurisé et retrait des pseudo-cartes de tableaux.
 *   v2.6.75 (2026-07-17) — INVENTORY RESUME REVIEW2 : modes complet/ciblé, brouillons persistants, reprise et revue avant stock.
 *   v2.6.76 (2026-07-17) — INVENTORY FIELD RECETTE3 : historique par magasin, cibles tactiles, autosauvegarde hors ligne et scanner compact.
 *   v2.6.77 (2026-07-17) — INVENTORY FIELD DEVICE VALIDATION4 : clavier visuel, rotation, veille et scanner responsive mobile/tablette.
 *   v2.6.98 (2026-07-20) — SCANNER TERRAIN CONFIRMATION1 : carte scanner Inventaire harmonisée et icône SVG.
 */

/* ═══════ PRODUCT THUMBNAILS ═══════ */
.inv-td-img {
  width: 44px !important;
  padding: 6px 4px 6px 10px !important;
  vertical-align: middle;
}
.inv-prod-thumb {
  width: 38px; height: 38px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: block;
}
.inv-prod-thumb-fb {
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

/* ═══════ SORTABLE HEADERS ═══════ */
.inv-sortable {
  cursor: pointer;
  user-select: none;
  transition: color .15s;
  white-space: nowrap;
}
.inv-sortable:hover {
  color: var(--blue);
}

/* ═══════ SCROLLABLE TABLE ═══════ */
#invViewProgress .table-container {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#invViewProgress .table-container thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card);
}

/* Same for detail view */
#invViewDetail .table-container {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#invViewDetail .table-container thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card);
}

/* History table scroll */
#invViewHome .table-container {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#invViewHome .table-container thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card);
}

/* ═══════ ROW HIGHLIGHT (after scan) ═══════ */
.inv-row-highlight {
  animation: invHighlight 2s ease-out;
}
@keyframes invHighlight {
  0%   { background: rgba(59,130,246,0.25); }
  100% { background: transparent; }
}

/* Active row focus */
.inv-row-active {
  background: var(--blue-pale) !important;
}

/* ═══════ RESPONSIVE TABLES ═══════
   Les tableaux restent strictement desktop. Les rendus mobile/tablette
   utilisent les cartes natives définies dans INVENTORY MOBILE FLOW1.
   ═══════ */

/* ═══════ LOT 2 — INVENTAIRE TERRAIN / SCAN CONTINU ═══════ */
.inv-scanner-topline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
}
.inv-scanner-topline strong { color: var(--text-primary); }
.inv-scanner-topline span { color: var(--text-muted); font-size: 13px; }
.inv-scan-found { animation: invScanCardIn .18s ease-out; }
@keyframes invScanCardIn { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.inv-scan-product-card {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-card);
  box-shadow: 0 10px 30px rgba(15,23,42,.08);
}
.inv-scan-product-main {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.inv-scan-product-img { width: 64px; height: 64px; flex: 0 0 64px; }
.inv-scan-prod-img,
.inv-scan-prod-fb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.inv-scan-product-info h3 {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.25;
}
.inv-scan-product-info p {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.inv-scan-product-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.inv-scan-product-stats span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--bg-elevated);
  font-size: 12px;
  color: var(--text-muted);
}
.inv-scan-product-stats span.ok { color: var(--green); background: var(--green-pale); }
.inv-scan-product-stats span.warn { color: var(--orange); background: var(--orange-pale); }
.inv-scan-product-stats span.muted { color: var(--text-muted); }
.inv-scan-qty {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  min-height: 52px;
  margin: 6px 0 12px;
}
.inv-scan-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.inv-scan-actions .btn { flex: 1 1 auto; min-height: 42px; }
.inv-final-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.inv-final-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.inv-final-card strong { font-size: 24px; line-height: 1; }
.inv-final-card span { color: var(--text-muted); font-size: 12px; }
.inv-final-card.warn strong { color: var(--orange); }
.inv-final-card.muted strong { color: var(--text-muted); }
.inv-final-diffs {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.inv-final-diffs h4 { margin: 0 0 8px; }
.inv-final-diffs ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.inv-final-diffs li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--bg-elevated);
  font-size: 13px;
}
.inv-final-diffs li span { color: var(--text-muted); white-space: nowrap; }
.inv-final-ok {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  color: var(--green);
  background: var(--green-pale);
  font-weight: 700;
}
.inv-line-count-modal h3 { margin: 0 0 6px; }

@media (max-width: 600px) {
  .inv-final-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv-final-diffs li { flex-direction: column; }
  .inv-scan-actions { flex-direction: column; }
  .inv-scan-actions .btn { width: 100%; }
}

/* ═══════ LOT 2.1 — SCANNER INVENTAIRE ALIGNÉ SUR SCANNER PRODUIT ═══════ */
.inv-scanner-preview {
  min-height: 320px;
  aspect-ratio: 4 / 3;
  margin: 12px 0;
  border: 1px solid rgba(59, 130, 246, .28);
  background: #0b1220;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .22);
}

#invScannerPreview #scannerH5,
#invScannerH5,
.inv-scanner-h5 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}


#invScannerPreview #scannerH5 > div,
#invScannerPreview #invScannerH5 > div,
#invScannerH5 > div,
.inv-scanner-h5 > div {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

#invScannerPreview #scannerH5 video,
#invScannerPreview #scannerH5 canvas,
#invScannerH5 video,
#invScannerH5 canvas,
.inv-scanner-h5 video,
.inv-scanner-h5 canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 0;
}

#invScannerPreview #scannerH5 [id*="qr-shaded-region"],
#invScannerPreview #scannerH5 [id*="qr-code-camera"] > div,
#invScannerPreview #scannerH5 [id*="qr-code"] > div,
#invScannerH5 [id*="qr-shaded-region"],
#invScannerH5 [id*="qr-code-camera"] > div,
#invScannerH5 [id*="qr-code"] > div {
  display: none !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.inv-scanner-preview .scanner-frame {
  inset: 18%;
  display: block;
}

.inv-scanner-preview[data-scan-mode=""] .scanner-frame,
.inv-scanner-preview:not([data-scan-mode]) .scanner-frame {
  display: none;
}

.inv-scanner-preview[data-scan-mode="barcode"] .scanner-frame {
  display: block;
}

.inv-scanner-placeholder-ico {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, .12);
  color: var(--blue, #3b82f6);
  font-size: 28px;
}

.inv-scanner-preview.scan-success {
  border-color: rgba(34, 197, 94, .75);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .16), 0 16px 34px rgba(15, 23, 42, .22);
}

.inv-scanner-preview.scan-success .scanner-frame::before,
.inv-scanner-preview.scan-success .scanner-frame::after,
.inv-scanner-preview.scan-success .scanner-frame-bot::before,
.inv-scanner-preview.scan-success .scanner-frame-bot::after {
  border-color: var(--green, #22c55e);
}

.inv-scanner-preview.scan-success .scanner-line {
  background: linear-gradient(90deg, transparent 0%, rgba(34,197,94,.85) 40%, #22c55e 50%, rgba(34,197,94,.85) 60%, transparent 100%);
  box-shadow: 0 0 10px rgba(34,197,94,.75);
}

.inv-scanner-preview.scan-error {
  border-color: rgba(239, 68, 68, .75);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .14), 0 16px 34px rgba(15, 23, 42, .22);
}

.inv-scanner-preview.scan-error .scanner-frame::before,
.inv-scanner-preview.scan-error .scanner-frame::after,
.inv-scanner-preview.scan-error .scanner-frame-bot::before,
.inv-scanner-preview.scan-error .scanner-frame-bot::after {
  border-color: var(--red, #ef4444);
}

@media (max-width: 640px) {
  .inv-scanner-preview {
    min-height: 280px;
    aspect-ratio: 3 / 4;
  }
}

/* v3.2.0 — Lot 5 : images produit dans le détail inventaire et cohérence impression */
#invDetailTable .inv-td-img {
  width: 52px !important;
  text-align: center;
}
#invDetailTable .inv-detail-thumb,
#invDetailTable .inv-detail-thumb-fb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

/* Le détail mobile/tablette est rendu avec .inv-detail-card-list ;
   aucune conversion CSS de tableau n’est conservée. */

/* ═══════ v2.6.22 — INVENTAIRE : FILTRES STATUT + LISIBILITÉ ═══════ */
.inv-status-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--border,#e2e8f0);
  border-radius:10px;
  background:linear-gradient(135deg,var(--bg-card,#fff),var(--bg-elevated,#f8fafc));
}
.inv-detail-status-toolbar{border-top:0;border-radius:0;padding:10px 14px;background:var(--bg-elevated,#f8fafc)}
.inv-status-filter,
.inv-detail-filter{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:7px 11px;
  border:1px solid var(--border,#e2e8f0);
  border-radius:8px;
  background:var(--bg-card,#fff);
  color:var(--text-secondary,#475569);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:background .14s,border-color .14s,color .14s,transform .14s;
}
.inv-status-filter:hover,
.inv-detail-filter:hover{border-color:var(--blue,#2563eb);color:var(--blue,#2563eb);background:var(--blue-pale,#eff6ff)}
.inv-status-filter:active,
.inv-detail-filter:active{transform:scale(.98)}
.inv-status-filter.active,
.inv-detail-filter.active{background:var(--blue,#2563eb);border-color:var(--blue,#2563eb);color:#fff;box-shadow:0 6px 16px rgba(37,99,235,.18)}
.inv-status-filter.ok.active,.inv-detail-filter.ok.active{background:var(--green,#16a34a);border-color:var(--green,#16a34a)}
.inv-status-filter.diff.active,.inv-detail-filter.diff.active{background:var(--orange,#f59e0b);border-color:var(--orange,#f59e0b)}
.inv-status-filter.pending.active,.inv-detail-filter.pending.active{background:#64748b;border-color:#64748b}
.inv-status-filter span,
.inv-detail-filter span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:rgba(15,23,42,.08);
  color:inherit;
  font-size:11px;
  font-weight:1000;
}
.inv-status-filter.active span,
.inv-detail-filter.active span{background:rgba(255,255,255,.22);color:#fff}
.inv-row-ok td{background:rgba(22,163,74,.045)!important}
.inv-row-diff td{background:rgba(245,158,11,.075)!important}
.inv-line-sub{margin-top:2px;color:var(--text-muted,#64748b);font-size:11px;font-weight:600}
.inv-detail-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.inv-detail-meta-item{border:1px solid var(--border,#e2e8f0);border-left:4px solid var(--blue,#2563eb);border-radius:8px;background:var(--bg-elevated,#f8fafc);padding:10px 12px}
.inv-detail-meta-label{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted,#64748b);font-weight:900;margin-bottom:3px}
.inv-detail-meta-val{font-size:13px;font-weight:800;color:var(--text-primary,#0f172a)}
@media(max-width:900px){.inv-detail-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
  .inv-status-toolbar{display:grid;grid-template-columns:1fr 1fr;padding:8px;gap:7px}
  .inv-status-filter,.inv-detail-filter{justify-content:space-between;width:100%;min-height:40px;font-size:11.5px;padding:7px 9px}
  .inv-detail-meta-grid{grid-template-columns:1fr}
}

/* ============================================================
   INVENTORY MOBILE FLOW1 — v3.3.0 / MageStock 2.6.74
   Assistant mobile/tablette, cartes natives et actions terrain.
   ============================================================ */

/* ---------- Socle commun ---------- */
.page-inventory{--inv-accent:var(--blue,#2563eb);--inv-ok:var(--green,#16a34a);--inv-warn:var(--orange,#d97706);--inv-danger:var(--red,#dc2626);min-width:0}
.page-inventory button,.page-inventory input,.page-inventory select{font:inherit}
.inv-mobile-list,.inv-mobile-action-dock,.inv-mobile-scan-primary,.inv-wizard-progress{display:none}
.inv-page-kicker{display:block;margin:0 0 3px;color:var(--inv-accent);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.inv-page-hero,.inv-flow-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 18px}
.inv-page-hero__copy{min-width:0}
.inv-page-hero p,.inv-flow-heading p{margin:4px 0 0;line-height:1.5}
.inv-page-hero .page-title-inline,.inv-flow-heading .page-title-inline{margin:0}
.inv-new-trigger{min-height:48px;flex:0 0 auto}
.inv-new-trigger svg,.inv-mobile-scan-primary svg{width:20px;height:20px}
.inv-section-hint{margin:3px 0 0;color:var(--text-muted);font-size:12px;font-weight:500}
.inv-history-shell>.card-header,.inv-products-shell>.card-header,.inv-detail-lines-shell>.card-header{align-items:center}

/* ---------- Création / assistant ---------- */
.inv-new-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,340px);gap:18px;align-items:start}
.inv-wizard-card{min-width:0}
.inv-new-form{display:flex;flex-direction:column;gap:0;padding:0!important}
.inv-wizard-panel{padding:22px 24px}
.inv-wizard-panel+.inv-wizard-panel{border-top:1px solid var(--border)}
.inv-wizard-panel[hidden]{display:none!important}
.inv-step-heading{display:flex;align-items:flex-start;gap:12px;margin:0 0 20px}
.inv-step-number{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex:0 0 34px;border:1px solid color-mix(in srgb,var(--inv-accent) 32%,var(--border));background:var(--blue-pale,#eff6ff);color:var(--inv-accent);font-weight:900}
.inv-step-heading h3{margin:0;color:var(--text-primary);font-size:18px;line-height:1.25}
.inv-step-heading p{margin:4px 0 0;color:var(--text-muted);font-size:13px;line-height:1.5}
.inv-step-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.inv-new-form .form-group{margin:0}
.inv-new-form .form-label{display:block;margin:0 0 7px;color:var(--text-primary);font-size:13px;font-weight:800}
.inv-new-form .form-input,.inv-new-form .form-select{width:100%;min-height:48px;font-size:16px}
.required-mark{color:var(--inv-danger)}
.inv-field-help{margin:7px 0 0;color:var(--text-muted);font-size:12px;line-height:1.45}
.inv-new-aside{display:flex;flex-direction:column;gap:12px}
.inv-new-tip{padding:16px;border:1px solid var(--border);border-left:3px solid var(--inv-accent);background:var(--bg-card)}
.inv-new-tip-title{margin:0 0 7px;color:var(--text-primary);font-size:13px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}
.inv-new-tip-text{color:var(--text-secondary);font-size:13px;line-height:1.6}
.inv-new-tip-text strong{color:var(--text-primary)}
.inv-wizard-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 0;padding:14px;border:1px solid var(--border);background:var(--bg-card);box-shadow:var(--shadow)}
.inv-wizard-actions__main{display:flex;justify-content:flex-end;gap:10px}
.inv-wizard-actions .btn{min-width:130px;min-height:48px}
.inv-wizard-progress{align-items:center;gap:8px;margin:0 0 16px}
.inv-wizard-step{display:flex;align-items:center;gap:8px;min-width:0;padding:0;border:0;background:transparent;color:var(--text-muted);text-align:left}
.inv-wizard-step>span{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex:0 0 34px;border:1px solid var(--border);background:var(--bg-card);font-size:13px;font-weight:900}
.inv-wizard-step strong{font-size:12px;white-space:nowrap}
.inv-wizard-step.is-active{color:var(--inv-accent)}
.inv-wizard-step.is-active>span{border-color:var(--inv-accent);background:var(--inv-accent);color:#fff}
.inv-wizard-step.is-done>span{border-color:var(--inv-ok);background:var(--inv-ok);color:#fff}
.inv-wizard-line{height:1px;flex:1 1 32px;background:var(--border)}

/* Catégories : liste tactile, filtrée par magasin */
.inv-cat-zone{border:1px solid var(--border);background:var(--bg-card);overflow:hidden}
.inv-cat-header{display:grid;grid-template-columns:auto minmax(180px,1fr) auto;align-items:center;gap:10px;padding:12px;border-bottom:1px solid var(--border);background:var(--bg-elevated)}
.inv-cat-btn-all{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border:1px solid var(--inv-accent);background:var(--inv-accent);color:#fff;font-size:13px;font-weight:800;cursor:pointer}
.inv-cat-btn-all.inactive{background:var(--bg-card);color:var(--inv-accent)}
.inv-cat-search-wrap{position:relative;display:block;min-width:0}
.inv-cat-search-wrap svg{position:absolute;left:12px;top:50%;width:18px;height:18px;transform:translateY(-50%);color:var(--text-muted);pointer-events:none}
.inv-cat-search{width:100%;min-height:44px;padding:8px 12px 8px 40px;border:1px solid var(--border);background:var(--bg-input,var(--bg-card));color:var(--text-primary);font-size:16px;outline:none}
.inv-cat-search:focus{border-color:var(--inv-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--inv-accent) 18%,transparent)}
.inv-cat-counter{color:var(--text-muted);font-size:12px;white-space:nowrap}
.inv-cat-counter strong{color:var(--inv-accent)}
.inv-cat-selected{display:flex;flex-wrap:wrap;gap:7px;padding:10px 12px;border-bottom:1px solid var(--border);background:var(--blue-pale,#eff6ff)}
.inv-cat-selected:empty{display:none}
.inv-cat-sel-tag{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 10px;border:1px solid color-mix(in srgb,var(--inv-accent) 45%,var(--border));background:var(--bg-card);color:var(--text-primary);font-size:12px;font-weight:700;cursor:pointer}
.inv-cat-sel-tag svg{width:12px;height:12px;color:var(--inv-danger)}
.inv-cat-scroll-wrap{position:relative}
.inv-cat-scroll{max-height:280px;overflow:auto;padding:10px 12px;scrollbar-width:thin}
.inv-cat-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.inv-cat-chip{display:flex;align-items:center;min-height:44px;padding:9px 11px;border:1px solid var(--border);background:var(--bg-card);color:var(--text-secondary);font-size:13px;font-weight:650;text-align:left;cursor:pointer;white-space:normal;line-height:1.3}
.inv-cat-chip:hover,.inv-cat-chip:focus-visible{border-color:var(--inv-accent);color:var(--inv-accent)}
.inv-cat-chip.active{border-color:var(--inv-accent);background:var(--inv-accent);color:#fff}
.inv-cat-chip.filtered-out{display:none}
.inv-cat-empty,.inv-cat-no-match{grid-column:1/-1;padding:20px;color:var(--text-muted);font-size:13px;text-align:center}
.inv-cat-scroll-fade{position:absolute;left:0;right:6px;bottom:0;height:28px;background:linear-gradient(transparent,var(--bg-card));pointer-events:none}
.inv-cat-scroll-fade.hidden{display:none}
.inv-review-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}
.inv-review-grid>div{padding:14px;border:1px solid var(--border);background:var(--bg-elevated)}
.inv-review-grid dt{margin:0 0 5px;color:var(--text-muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.inv-review-grid dd{margin:0;color:var(--text-primary);font-size:15px;font-weight:800;line-height:1.4;overflow-wrap:anywhere}
.inv-review-note{display:flex;align-items:flex-start;gap:10px;margin:12px 0 0;padding:12px;border-left:3px solid var(--inv-accent);background:var(--blue-pale,#eff6ff);color:var(--text-secondary);font-size:13px;line-height:1.5}
.inv-review-note svg{width:18px;height:18px;flex:0 0 18px;color:var(--inv-accent)}

/* ---------- Inventaire en cours ---------- */
.inv-header-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 14px;padding:16px 18px;border:1px solid var(--border);border-left:3px solid var(--inv-accent);background:var(--bg-card)}
.inv-header-title{margin:0;color:var(--text-primary);font-size:24px;line-height:1.2}
.inv-header-meta{display:block;margin:5px 0 0;color:var(--text-muted);font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.inv-progress-actions-desktop{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.inv-progress-overview{display:grid;grid-template-columns:1fr auto;align-items:end;gap:8px 16px;margin:0 0 12px;padding:14px 16px;border:1px solid var(--border);background:var(--bg-card)}
.inv-progress-copy{display:flex;flex-direction:column;gap:3px}
.inv-progress-copy strong{font-size:15px;color:var(--text-primary)}
.inv-progress-copy span{font-size:12px;color:var(--text-muted)}
.inv-progress-pct{font-size:16px;font-weight:900;color:var(--inv-accent)}
.inv-progress-bar{grid-column:1/-1;height:8px;overflow:hidden;background:var(--bg-elevated);border:1px solid var(--border)}
.inv-progress-fill{height:100%;background:var(--inv-accent);transition:width .2s ease}
.inv-kpi-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 14px}
.inv-kpi-card{padding:14px;border:1px solid var(--border);border-left:3px solid var(--inv-accent);background:var(--bg-card)}
.inv-kpi-card.green{border-left-color:var(--inv-ok)}.inv-kpi-card.orange{border-left-color:var(--inv-warn)}.inv-kpi-card.muted{border-left-color:var(--text-muted)}
.inv-kpi-val{font-size:24px;font-weight:900;color:var(--text-primary)}
.inv-kpi-lbl{font-size:12px;font-weight:700;color:var(--text-muted)}
.inv-status-toolbar{display:flex;align-items:center;gap:8px;margin:0 0 12px;overflow-x:auto;scrollbar-width:none}
.inv-status-toolbar::-webkit-scrollbar{display:none}
.inv-status-filter,.inv-detail-filter{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 13px;border:1px solid var(--border);background:var(--bg-card);color:var(--text-secondary);font-size:13px;font-weight:800;white-space:nowrap;cursor:pointer}
.inv-status-filter span,.inv-detail-filter span{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 6px;background:var(--bg-elevated);color:var(--text-muted);font-size:11px}
.inv-status-filter.active,.inv-detail-filter.active{border-color:var(--inv-accent);background:var(--inv-accent);color:#fff}
.inv-status-filter.active span,.inv-detail-filter.active span{background:rgba(255,255,255,.18);color:#fff}
.inv-search-card{margin:0 0 12px}
.inv-search-card .card-body{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:12px}
.inv-search-card .search-box{min-width:0}
.inv-search-card .btn{min-width:120px}
.inv-bulk-actions{position:relative}
.inv-bulk-actions>summary{list-style:none;cursor:pointer}
.inv-bulk-actions>summary::-webkit-details-marker{display:none}
.inv-actions-popover{position:absolute;right:0;top:calc(100% + 6px);z-index:30;display:flex;flex-direction:column;gap:4px;width:250px;padding:8px;border:1px solid var(--border);background:var(--bg-card);box-shadow:var(--shadow-lg)}
.inv-actions-popover .btn{justify-content:flex-start;width:100%}
.inv-load-more{display:block;margin:12px auto 16px;min-height:46px}

/* ---------- Cartes natives ---------- */
.inv-empty-state{display:flex;flex-direction:column;align-items:center;gap:5px;padding:28px 18px;border:1px dashed var(--border);color:var(--text-muted);text-align:center}
.inv-empty-state strong{color:var(--text-primary)}
.inv-empty-state.is-error{color:var(--inv-danger)}
.inv-history-card,.inv-product-card,.inv-detail-card{min-width:0;border:1px solid var(--border);border-left:3px solid var(--inv-accent);background:var(--bg-card);box-shadow:var(--shadow)}
.inv-history-card__main{display:flex;flex-direction:column;align-items:stretch;width:100%;padding:16px;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}
.inv-history-card__eyebrow{color:var(--text-muted);font-size:12px;font-weight:700}
.inv-history-card__title{margin:5px 0 6px;color:var(--text-primary);font-size:17px;line-height:1.35}
.inv-history-card__scope{color:var(--text-secondary);font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.inv-history-card__metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 8px}
.inv-history-card__metrics>span{padding:10px;border:1px solid var(--border);background:var(--bg-elevated);color:var(--text-secondary);font-size:12px}
.inv-history-card__metrics strong{display:block;color:var(--text-primary);font-size:18px}
.inv-history-card__metrics .is-warning strong{color:var(--inv-warn)}.inv-history-card__metrics .is-ok strong{color:var(--inv-ok)}
.inv-history-card__operator{color:var(--text-muted);font-size:12px}
.inv-history-card__actions{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px 16px;border-top:1px solid var(--border)}
.inv-history-card__actions .btn{min-height:44px}

.inv-product-card{padding:14px}
.inv-product-card.is-ok{border-left-color:var(--inv-ok)}.inv-product-card.is-diff{border-left-color:var(--inv-warn)}
.inv-product-card__head{display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:start;gap:12px}
.inv-product-card__image{width:58px;height:58px}
.inv-card-thumb,.inv-card-thumb-fb{display:flex;align-items:center;justify-content:center;width:58px;height:58px;object-fit:contain;border:1px solid var(--border);background:var(--bg-elevated);font-size:24px}
.inv-product-card__identity{min-width:0}
.inv-product-card__category{display:block;margin:0 0 3px;color:var(--text-muted);font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inv-product-card__identity h4{margin:0;color:var(--text-primary);font-size:17px;line-height:1.3;overflow-wrap:anywhere}
.inv-product-card__sku{display:block;margin:4px 0 0;color:var(--text-muted);font-family:var(--font-mono,monospace);font-size:11px;overflow-wrap:anywhere}
.inv-product-card__status{display:inline-flex;align-items:center;min-height:30px;padding:4px 8px;border:1px solid var(--border);background:var(--bg-elevated);color:var(--text-muted);font-size:11px;font-weight:900;white-space:nowrap}
.inv-product-card__status.is-ok{border-color:color-mix(in srgb,var(--inv-ok) 35%,var(--border));background:var(--green-pale,#f0fdf4);color:var(--inv-ok)}
.inv-product-card__status.is-diff{border-color:color-mix(in srgb,var(--inv-warn) 35%,var(--border));background:var(--orange-pale,#fff7ed);color:var(--inv-warn)}
.inv-product-card__stock{display:grid;grid-template-columns:1fr minmax(105px,1.2fr) 1fr;align-items:end;gap:8px;margin:14px 0;padding:12px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.inv-product-card__stock>div,.inv-product-card__stock>label{display:flex;flex-direction:column;gap:5px;min-width:0}
.inv-product-card__stock span{color:var(--text-muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.inv-product-card__stock strong{color:var(--text-primary);font-size:19px}
.inv-product-card__stock strong.is-ok{color:var(--inv-ok)}.inv-product-card__stock strong.is-diff{color:var(--inv-warn)}
.inv-card-count{min-height:48px!important;padding:8px 10px!important;text-align:center;font-size:18px!important;font-weight:900!important}
.inv-product-card__actions{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}
.inv-product-card__actions .btn{min-height:44px;padding-left:12px;padding-right:12px}
.inv-card-reset{font-size:12px}
.inv-row-active{outline:3px solid color-mix(in srgb,var(--inv-accent) 25%,transparent);outline-offset:1px}

/* ---------- Détail historique ---------- */
.inv-detail-heading{align-items:center}
.inv-detail-print{margin-left:auto}
.inv-detail-header{margin:0 0 12px}
.inv-detail-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:0!important}
.inv-detail-meta-item{padding:14px 16px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);min-width:0}
.inv-detail-meta-item:nth-child(3n){border-right:0}
.inv-detail-meta-label{display:block;margin:0 0 5px;color:var(--text-muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.inv-detail-meta-val{display:block;color:var(--text-primary);font-size:13px;font-weight:750;line-height:1.45;overflow-wrap:anywhere}
.inv-detail-status-toolbar{padding:10px 12px;margin:0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.inv-detail-card{padding:14px}
.inv-detail-card.is-ok{border-left-color:var(--inv-ok)}.inv-detail-card.is-diff{border-left-color:var(--inv-warn)}
.inv-detail-card__head{display:grid;grid-template-columns:58px minmax(0,1fr);gap:12px}
.inv-detail-card__head span{display:block;color:var(--text-muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.inv-detail-card__head h4{margin:3px 0;color:var(--text-primary);font-size:16px;line-height:1.35}
.inv-detail-card__head small{color:var(--text-muted);font-family:var(--font-mono,monospace)}
.inv-detail-card__values{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin:14px 0 0;border:1px solid var(--border)}
.inv-detail-card__values>div{padding:10px;border-right:1px solid var(--border)}
.inv-detail-card__values>div:last-child{border-right:0}
.inv-detail-card__values dt{font-size:10px;font-weight:800;text-transform:uppercase;color:var(--text-muted)}
.inv-detail-card__values dd{margin:4px 0 0;font-size:18px;font-weight:900;color:var(--text-primary)}
.inv-detail-card__values dd.is-ok{color:var(--inv-ok)}.inv-detail-card__values dd.is-diff{color:var(--inv-warn)}
.inv-detail-card__result{margin:8px 0 0;padding:8px 10px;background:var(--bg-elevated);color:var(--text-muted);font-size:12px;font-weight:900;text-align:center}
.inv-detail-card__result.is-ok{background:var(--green-pale,#f0fdf4);color:var(--inv-ok)}.inv-detail-card__result.is-diff{background:var(--orange-pale,#fff7ed);color:var(--inv-warn)}


/* ---------- Historique regroupé par magasin ---------- */
.inv-history-group-row th{padding:11px 14px!important;border-top:2px solid var(--border);border-bottom:1px solid var(--border);background:var(--bg-elevated);text-align:left}
.inv-history-group-row th>span{color:var(--text-primary);font-size:14px;font-weight:900}
.inv-history-group-row th>small{margin-left:10px;color:var(--text-muted);font-size:11px;font-weight:700}
.inv-history-group{grid-column:1/-1;min-width:0;border:1px solid var(--border);background:var(--bg-elevated)}
.inv-history-group__header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;border-bottom:1px solid var(--border);background:var(--bg-card)}
.inv-history-group__header h4{margin:0;color:var(--text-primary);font-size:17px;line-height:1.3;overflow-wrap:anywhere}
.inv-history-group__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:10px}
.inv-history-group__list .inv-history-card{box-shadow:none}

/* ---------- Verrouillage après conflit ---------- */
.inv-conflict-banner{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 14px;margin:0 0 10px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--inv-danger) 45%,var(--border));border-left:4px solid var(--inv-danger);background:color-mix(in srgb,var(--red-pale,#fef2f2) 80%,var(--bg-card))}
.inv-conflict-banner[hidden]{display:none!important}
.inv-conflict-banner strong{color:var(--text-primary);font-size:14px}
.inv-conflict-banner span{color:var(--text-secondary);font-size:12px;line-height:1.45}
.inv-conflict-banner .btn{grid-column:2;grid-row:1/3;min-height:44px}
.page-inventory.is-draft-locked #invViewProgress .inv-product-card,
.page-inventory.is-draft-locked #invViewProgress .inv-desktop-table,
.page-inventory.is-draft-locked #invViewProgress .inv-search-card,
.page-inventory.is-draft-locked #invViewProgress .inv-status-toolbar{opacity:.66}
.page-inventory.is-draft-locked #invViewProgress .inv-product-card,
.page-inventory.is-draft-locked #invViewProgress .inv-search-card{pointer-events:none}

/* ---------- RESUME REVIEW2 : modes, reprise et revue ---------- */
.inv-drafts-shell{margin:0 0 16px;border-left:3px solid var(--inv-accent)}
.inv-drafts-shell>.card-header{align-items:center}
.inv-drafts-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}
.inv-draft-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--border);border-left:3px solid var(--inv-accent);background:var(--bg-card)}
.inv-draft-card__top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 14px 10px}
.inv-draft-card__top>div{min-width:0}
.inv-draft-card h4{margin:7px 0 3px;color:var(--text-primary);font-size:17px;line-height:1.35;overflow-wrap:anywhere}
.inv-draft-card p{margin:0;color:var(--text-muted);font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.inv-mode-badge{display:inline-flex;align-items:center;min-height:28px;padding:4px 8px;border:1px solid color-mix(in srgb,var(--inv-accent) 38%,var(--border));background:var(--blue-pale,#eff6ff);color:var(--inv-accent);font-size:10px;font-weight:900;letter-spacing:.05em;text-transform:uppercase}
.inv-mode-badge.is-partial{border-color:color-mix(in srgb,var(--inv-warn) 42%,var(--border));background:var(--orange-pale,#fff7ed);color:var(--inv-warn)}
.inv-draft-card__state{flex:0 0 auto;padding:5px 8px;border:1px solid var(--border);background:var(--bg-elevated);color:var(--text-muted);font-size:10px;font-weight:900;text-transform:uppercase}
.inv-draft-card__state.is-review{border-color:color-mix(in srgb,var(--inv-ok) 40%,var(--border));background:var(--green-pale,#f0fdf4);color:var(--inv-ok)}
.inv-draft-card__progress{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:0 14px 10px}
.inv-draft-card__progress>div{height:8px;overflow:hidden;background:var(--bg-elevated);border:1px solid var(--border)}
.inv-draft-card__progress>div>span{display:block;height:100%;background:var(--inv-accent)}
.inv-draft-card__progress strong{color:var(--text-primary);font-size:12px;white-space:nowrap}
.inv-draft-card__meta{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border-top:1px solid var(--border);color:var(--text-muted);font-size:11px;line-height:1.4}
.inv-draft-card__actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:auto;padding:10px 14px;border-top:1px solid var(--border)}
.inv-draft-card__actions .btn{min-height:44px}

.inv-mode-fieldset{min-width:0;margin:18px 0 0;padding:0;border:0}
.inv-mode-fieldset legend{margin:0 0 8px;color:var(--text-primary);font-size:13px;font-weight:900}
.inv-mode-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.inv-mode-option{position:relative;display:flex;align-items:flex-start;gap:10px;min-height:76px;padding:13px;border:1px solid var(--border);background:var(--bg-card);cursor:pointer}
.inv-mode-option.is-selected{border-color:var(--inv-accent);box-shadow:inset 3px 0 0 var(--inv-accent);background:color-mix(in srgb,var(--blue-pale,#eff6ff) 66%,var(--bg-card))}
.inv-mode-option input{width:20px;height:20px;flex:0 0 20px;margin:1px 0 0;accent-color:var(--inv-accent)}
.inv-mode-option__copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.inv-mode-option__copy strong{color:var(--text-primary);font-size:14px;line-height:1.3}
.inv-mode-option__copy small{color:var(--text-muted);font-size:12px;line-height:1.45}
.inv-full-scope-notice{display:flex;flex-direction:column;gap:4px;padding:15px;border:1px solid color-mix(in srgb,var(--inv-accent) 32%,var(--border));border-left:3px solid var(--inv-accent);background:var(--blue-pale,#eff6ff)}
.inv-full-scope-notice[hidden],#invPartialScopeGroup[hidden]{display:none!important}
.inv-full-scope-notice strong{color:var(--text-primary);font-size:14px}
.inv-full-scope-notice span{color:var(--text-secondary);font-size:12px;line-height:1.5}

.inv-header-kicker-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 5px}
.inv-save-status{display:block;margin:5px 0 0;color:var(--text-muted);font-size:11px;font-weight:700;line-height:1.4}
.inv-save-status::before{content:'●';margin-right:6px;color:var(--inv-ok)}
.inv-save-status.is-saving::before{color:var(--inv-warn);animation:invSavePulse 1s ease-in-out infinite}
.inv-save-status.is-error{color:var(--inv-danger)}
.inv-save-status.is-error::before{color:var(--inv-danger)}
.inv-save-status.is-offline{color:var(--inv-warn)}
.inv-save-status.is-offline::before{color:var(--inv-warn)}
@keyframes invSavePulse{50%{opacity:.3}}

.inv-review-heading{align-items:center}
.inv-review-print{margin-left:auto}
.inv-review-alert{display:flex;flex-direction:column;gap:4px;margin:0 0 12px;padding:13px 15px;border:1px solid color-mix(in srgb,var(--inv-danger) 42%,var(--border));border-left:4px solid var(--inv-danger);background:color-mix(in srgb,var(--red-pale,#fef2f2) 74%,var(--bg-card));color:var(--text-secondary)}
.inv-review-alert.is-warning{border-color:color-mix(in srgb,var(--inv-warn) 42%,var(--border));border-left-color:var(--inv-warn);background:color-mix(in srgb,var(--orange-pale,#fff7ed) 76%,var(--bg-card))}
.inv-review-alert strong{color:var(--text-primary);font-size:14px}
.inv-review-alert span{font-size:12px;line-height:1.5}
.inv-review-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 12px}
.inv-review-summary-card{display:flex;flex-direction:column;gap:6px;min-width:0;padding:14px;border:1px solid var(--border);border-top:3px solid var(--inv-accent);background:var(--bg-card)}
.inv-review-summary-card>span{color:var(--text-muted);font-size:10px;font-weight:900;letter-spacing:.06em;text-transform:uppercase}
.inv-review-summary-card>strong{color:var(--text-primary);font-size:26px;line-height:1}
.inv-review-summary-card>strong small{color:var(--text-muted);font-size:12px}
.inv-review-summary-card>small{color:var(--text-muted);font-size:11px;line-height:1.35}
.inv-review-summary-card.is-ok{border-top-color:var(--inv-ok)}
.inv-review-summary-card.is-warning{border-top-color:var(--inv-warn)}
.inv-review-summary-card.is-muted{border-top-color:var(--text-muted)}
.inv-review-diffs-shell,.inv-review-pending-shell{margin:0 0 12px}
.inv-review-empty{padding:24px 16px;color:var(--inv-ok);font-size:14px;font-weight:800;text-align:center}
.inv-review-line-cat{display:block;margin-top:3px;color:var(--text-muted);font-size:10px;font-weight:500}
.inv-review-stock-changed{background:color-mix(in srgb,var(--orange-pale,#fff7ed) 55%,transparent)}
.inv-review-card-list{align-items:start}
.inv-review-card{padding:14px;border-left:3px solid var(--inv-warn)}
.inv-review-card.is-stock-changed{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--inv-warn) 35%,transparent)}
.inv-review-card__head{display:grid;grid-template-columns:58px minmax(0,1fr);gap:12px;align-items:start}
.inv-review-card__head span{display:block;color:var(--text-muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.inv-review-card__head h4{margin:3px 0;color:var(--text-primary);font-size:16px;line-height:1.35;overflow-wrap:anywhere}
.inv-review-card__head small{color:var(--text-muted);font-family:var(--font-mono,monospace);font-size:11px}
.inv-review-card dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:14px 0 0;border:1px solid var(--border)}
.inv-review-card dl>div{min-width:0;padding:10px;border-right:1px solid var(--border)}
.inv-review-card dl>div:last-child{border-right:0}
.inv-review-card dt{color:var(--text-muted);font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.inv-review-card dd{margin:5px 0 0;color:var(--text-primary);font-size:18px;font-weight:900;overflow-wrap:anywhere}
.inv-review-card dd.is-plus{color:var(--inv-warn)}
.inv-review-card dd.is-minus{color:var(--inv-danger)}
.inv-review-card__warning{margin:10px 0 0;padding:9px 10px;border-left:3px solid var(--inv-warn);background:var(--orange-pale,#fff7ed);color:var(--text-secondary);font-size:11px;line-height:1.45}
.inv-review-pending-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:12px}
.inv-review-pending-list>span{display:flex;flex-direction:column;gap:2px;min-width:0;padding:10px;border:1px solid var(--border);background:var(--bg-elevated)}
.inv-review-pending-list strong{color:var(--text-primary);font-size:12px;overflow-wrap:anywhere}
.inv-review-pending-list small{color:var(--text-muted);font-size:10px;overflow-wrap:anywhere}
.inv-review-pending-list .is-more{align-items:center;justify-content:center;color:var(--text-muted);font-size:12px;font-weight:800}
.inv-review-confirm{margin:0 0 12px;padding:14px;border:1px solid color-mix(in srgb,var(--inv-ok) 38%,var(--border));border-left:4px solid var(--inv-ok);background:var(--green-pale,#f0fdf4)}
.inv-review-confirm label{display:flex;align-items:flex-start;gap:10px;cursor:pointer}
.inv-review-confirm input{width:22px;height:22px;flex:0 0 22px;margin:0;accent-color:var(--inv-ok)}
.inv-review-confirm span{color:var(--text-primary);font-size:13px;font-weight:750;line-height:1.5}
.inv-review-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:12px;border:1px solid var(--border);background:var(--bg-card);box-shadow:var(--shadow)}
.inv-review-actions .btn{min-height:48px}
.inv-exit-choice{display:flex;flex-direction:column;gap:12px}
.inv-exit-choice p{margin:0;color:var(--text-secondary);line-height:1.55}
.inv-exit-choice__warning{display:flex;flex-direction:column;gap:3px;padding:11px;border-left:3px solid var(--inv-danger);background:var(--red-pale,#fef2f2)}
.inv-exit-choice__warning strong{color:var(--inv-danger)}
.inv-exit-choice__warning span{color:var(--text-muted);font-size:12px;line-height:1.4}

/* ---------- Tablette + téléphone : assistant et cartes ---------- */
@media (max-width:1199px), (pointer:coarse){
  .inv-wizard-step,.inv-status-filter,.inv-detail-filter{min-height:44px}
  .page-inventory .inv-desktop-table{display:none!important}
  .page-inventory .inv-mobile-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}
  .inv-wizard-progress{display:flex}
  .inv-new-layout{display:block;max-width:920px;margin:0 auto}
  .inv-new-aside{display:none}
  .inv-wizard-card{border-left:3px solid var(--inv-accent)}
  .inv-wizard-panel{padding:20px}
  .inv-wizard-panel+.inv-wizard-panel{border-top:0}
  .inv-step-grid{grid-template-columns:1fr}
  .inv-wizard-actions{position:sticky;bottom:12px;z-index:40;max-width:920px;margin:12px auto 0}
  .inv-wizard-actions__main{margin-left:auto}
  .inv-progress-actions-desktop,.inv-kpi-row{display:none!important}
  .inv-header-bar{display:block;position:static!important;margin-bottom:10px;padding:14px!important}
  .inv-header-title{font-size:21px}
  .inv-progress-overview{margin-bottom:10px}
  .inv-mobile-scan-primary{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:54px;margin:0 0 10px;font-size:16px;font-weight:900}
  .inv-status-toolbar{padding:2px 0 6px;margin-bottom:6px}
  .inv-products-shell>.card-header{position:relative}
  .inv-bulk-actions{display:none}
  .inv-products-shell>.card-header{padding:12px 14px}
  .inv-product-card-list{align-items:start}
  .inv-mobile-action-dock{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) auto;gap:8px;position:sticky;bottom:12px;z-index:50;margin:12px 0 0;padding:10px;border:1px solid var(--border);background:color-mix(in srgb,var(--bg-card) 94%,transparent);box-shadow:var(--shadow-lg);backdrop-filter:blur(8px)}
  .inv-mobile-action-dock>.btn,.inv-mobile-more>summary{min-height:48px}
  .inv-mobile-more{position:relative}
  .inv-mobile-more>summary{display:flex;align-items:center;justify-content:center;min-width:52px;list-style:none;cursor:pointer}
  .inv-mobile-more>summary::-webkit-details-marker{display:none}
  .inv-mobile-more-menu{position:absolute;right:0;bottom:calc(100% + 8px);display:flex;flex-direction:column;width:min(280px,calc(100vw - 32px));padding:8px;border:1px solid var(--border);background:var(--bg-card);box-shadow:var(--shadow-lg)}
  .inv-mobile-more-menu button{min-height:46px;padding:10px 12px;border:0;border-bottom:1px solid var(--border);background:transparent;color:var(--text-primary);text-align:left;font-weight:750;cursor:pointer}
  .inv-mobile-more-menu button:last-child{border-bottom:0}
  .inv-mobile-more-menu button.danger{color:var(--inv-danger)}
  .inv-detail-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inv-review-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inv-review-pending-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .inv-review-actions{position:sticky;bottom:12px;z-index:51}
  .inv-detail-meta-item:nth-child(3n){border-right:1px solid var(--border)}
  .inv-detail-meta-item:nth-child(2n){border-right:0}
}

/* ---------- Téléphone ---------- */
@media (max-width:640px){
  body.inventory-progress-active #scrollTopProgress{display:none!important}
  .page-inventory{width:100%;overflow-x:hidden}
  .page-inventory[data-inv-view="new"],.page-inventory[data-inv-view="progress"],.page-inventory[data-inv-view="review"]{padding-bottom:104px}
  .inv-page-hero,.inv-flow-heading{padding:14px 14px 0;margin-bottom:14px;gap:10px}
  .inv-page-hero{display:grid;grid-template-columns:1fr}
  .inv-page-hero p{font-size:13px}
  .inv-new-trigger{width:100%;justify-content:center}
  .inv-history-shell>.card-header,.inv-products-shell>.card-header,.inv-detail-lines-shell>.card-header{padding:12px 14px}
  .page-inventory .inv-mobile-list{grid-template-columns:1fr;gap:10px;padding:10px 12px 14px}
  .inv-history-card,.inv-product-card,.inv-detail-card,.inv-review-card{border-right:0;border-radius:0!important;box-shadow:none}
  .inv-drafts-shell{border-left:0;margin-bottom:12px}
  .inv-drafts-shell>.card-header{padding:12px 14px}
  .inv-drafts-list{grid-template-columns:1fr;padding:10px 12px 14px}
  .inv-draft-card{border-right:0}
  .inv-draft-card__top{display:grid;grid-template-columns:minmax(0,1fr) auto}
  .inv-draft-card__meta{align-items:flex-start;flex-direction:column;gap:3px}
  .inv-mode-options{grid-template-columns:1fr}
  .inv-mode-option{min-height:72px}
  .inv-history-card__actions{grid-template-columns:1fr 1fr}
  .inv-flow-heading{align-items:center}
  .inv-flow-heading>div{min-width:0}
  .inv-flow-heading .page-title-inline{font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .inv-wizard-progress{padding:0 14px;margin-bottom:12px}
  .inv-wizard-step strong{display:none}
  .inv-wizard-line{flex-basis:20px}
  .inv-wizard-card{border-left-width:0!important;border-right-width:0!important}
  .inv-wizard-panel{padding:18px 14px}
  .inv-step-heading{margin-bottom:16px}
  .inv-step-heading h3{font-size:17px}
  .inv-step-number{width:32px;height:32px;flex-basis:32px}
  .inv-cat-header{grid-template-columns:1fr;gap:8px;padding:10px}
  .inv-cat-btn-all{width:100%}
  .inv-cat-counter{white-space:normal}
  .inv-cat-scroll{max-height:42vh;padding:8px 10px}
  .inv-cat-chips{grid-template-columns:1fr}
  .inv-cat-chip{min-height:48px;font-size:14px}
  .inv-review-grid{grid-template-columns:1fr}
  .inv-review-heading{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center}
  .inv-review-heading .inv-review-print{grid-column:1/-1;width:100%;margin:2px 0 0}
  .inv-review-alert{margin-left:12px;margin-right:12px}
  .inv-review-summary{grid-template-columns:1fr 1fr;gap:8px;padding:0 12px}
  .inv-review-summary-card{padding:11px}
  .inv-review-summary-card>strong{font-size:22px}
  .inv-review-diffs-shell,.inv-review-pending-shell{border-left:0;border-right:0}
  .inv-review-pending-list{grid-template-columns:1fr;padding:10px 12px}
  .inv-review-confirm{margin:0 12px 10px}
  .inv-review-actions{position:fixed;left:0;right:0;bottom:calc(var(--bottom-nav-height,60px) + var(--safe-bottom,0px));z-index:90;display:grid;grid-template-columns:1fr 1.35fr;margin:0;padding:9px 12px;border-left:0;border-right:0;border-bottom:0;box-shadow:0 -8px 24px rgba(15,23,42,.16)}
  .inv-review-actions .btn{min-width:0;padding-left:9px;padding-right:9px;white-space:normal;line-height:1.25}
  .inv-wizard-actions{position:fixed;left:0;right:0;bottom:calc(var(--bottom-nav-height,60px) + var(--safe-bottom,0px));z-index:88;margin:0;padding:10px 12px;border-left:0;border-right:0;border-bottom:0;box-shadow:0 -8px 24px rgba(15,23,42,.12)}
  .inv-wizard-actions>#btnCancelNew{display:none}
  .inv-wizard-actions__main{display:flex;width:100%;margin:0}
  .inv-wizard-actions__main .btn{min-width:0;flex:1 1 0}
  .inv-header-bar{border-left-width:0!important;border-right-width:0!important;padding:14px!important;margin:0!important}
  .inv-header-title{font-size:20px}
  .inv-header-meta{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .inv-progress-overview{border-left:0;border-right:0;margin:0;padding:12px 14px}
  .inv-mobile-scan-primary{margin:10px 12px;width:calc(100% - 24px)}
  .inv-status-toolbar{padding:0 12px 8px;margin:0}
  .inv-status-filter,.inv-detail-filter{min-height:46px}
  .inv-search-card{margin:0 0 10px}
  .inv-search-card .card-body{grid-template-columns:1fr;padding:10px 12px}
  .inv-search-card .btn{width:100%}
  .inv-products-shell{margin-top:0!important}
  .inv-product-card{padding:12px}
  .inv-product-card__head{grid-template-columns:52px minmax(0,1fr)}
  .inv-product-card__image,.inv-card-thumb,.inv-card-thumb-fb{width:52px;height:52px}
  .inv-product-card__status{grid-column:2;justify-self:start;margin-top:4px}
  .inv-product-card__stock{grid-template-columns:1fr 1.25fr 1fr}
  .inv-product-card__stock strong{font-size:17px}
  .inv-product-card__actions{grid-template-columns:1fr 1fr}
  .inv-product-card__actions .inv-card-reset{grid-column:1/-1}
  .inv-mobile-action-dock{position:fixed;left:0;right:0;bottom:calc(var(--bottom-nav-height,60px) + var(--safe-bottom,0px));z-index:89;margin:0;padding:9px 12px;border-left:0;border-right:0;border-bottom:0;box-shadow:0 -8px 24px rgba(15,23,42,.16)}
  .inv-mobile-action-dock>.btn{padding-left:10px;padding-right:10px}
  .inv-detail-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto}
  .inv-detail-print{margin:0}
  .inv-detail-header{margin:0}
  .inv-detail-meta-grid{grid-template-columns:1fr}
  .inv-detail-meta-item,.inv-detail-meta-item:nth-child(2n),.inv-detail-meta-item:nth-child(3n){border-right:0}
  .inv-detail-status-toolbar{padding:10px 12px}
  .inv-detail-card__values{grid-template-columns:repeat(3,minmax(0,1fr))}
  .inv-detail-card__values>div{padding:8px}
}

@media (max-width:640px){
  .inv-history-group{border-left:0;border-right:0}
  .inv-history-group__header{padding:12px 14px}
  .inv-history-group__list{grid-template-columns:1fr;padding:10px 12px 12px}
  .inv-conflict-banner{grid-template-columns:1fr;margin:0 12px 10px}
  .inv-conflict-banner .btn{grid-column:1;grid-row:auto;width:100%;margin-top:5px}
  .inv-scanner-preview{min-height:220px;height:min(34svh,300px);aspect-ratio:auto}
  .inv-scanner-manual>div{flex-direction:column!important}
  .inv-scanner-manual .btn{width:100%;min-height:48px}
  .inv-scan-qty-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .inv-scan-qty-tools #btnInvScanExpected{grid-column:1/-1}
  .inv-scan-qty-tools .btn{min-height:46px}
}

@media (min-width:641px) and (max-width:1199px){
  .inv-page-hero,.inv-flow-heading{margin-top:0}
  .inv-mobile-action-dock{max-width:780px;margin-left:auto;margin-right:auto}
  .inv-product-card-list,.inv-detail-card-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* ---------- Validation appareil : clavier, rotation et PWA ---------- */
.page-inventory input,
.page-inventory select,
.page-inventory textarea,
.inv-scanner-container input{
  scroll-margin-top:96px;
  scroll-margin-bottom:150px;
}

@media (max-width:1199px), (pointer:coarse){
  .page-inventory button,
  .page-inventory summary,
  .page-inventory input,
  .page-inventory select,
  .inv-scanner-container button,
  .inv-scanner-container input{
    touch-action:manipulation;
  }
  .page-inventory input,
  .page-inventory select,
  .page-inventory textarea,
  .inv-scanner-container input{
    font-size:16px!important;
  }
  .inv-scanner-container{
    max-height:calc(var(--inv-visual-height,100dvh) - 150px);
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
}

@media (max-width:640px){
  .inv-wizard-actions,
  .inv-mobile-action-dock,
  .inv-review-actions{
    transition:opacity .16s ease,transform .16s ease,visibility .16s ease;
  }
  body.inv-soft-keyboard-open .bottom-nav{
    display:none!important;
  }
  body.inv-soft-keyboard-open #scrollTopProgress{
    display:none!important;
  }
  body.inv-soft-keyboard-open .inv-wizard-actions,
  body.inv-soft-keyboard-open .inv-mobile-action-dock,
  body.inv-soft-keyboard-open .inv-review-actions{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(calc(100% + 12px));
  }
  body.inv-soft-keyboard-open .page-inventory[data-inv-view="new"],
  body.inv-soft-keyboard-open .page-inventory[data-inv-view="progress"],
  body.inv-soft-keyboard-open .page-inventory[data-inv-view="review"]{
    padding-bottom:24px;
  }
  body.inv-soft-keyboard-open .inv-cat-scroll{
    max-height:calc(var(--inv-visual-height,55vh) - 190px);
  }
  body.inv-soft-keyboard-open .inv-scanner-container{
    max-height:calc(var(--inv-visual-height,100dvh) - 92px);
  }
}

@media (orientation:landscape) and (pointer:coarse) and (max-height:640px){
  .inv-page-hero,.inv-flow-heading{
    padding-top:8px;
    margin-bottom:8px;
  }
  .inv-wizard-progress{
    margin-bottom:8px;
  }
  .inv-wizard-panel{
    padding:12px 16px;
  }
  .inv-step-heading{
    margin-bottom:10px;
  }
  .inv-cat-scroll{
    max-height:38vh;
  }
  .inv-header-bar{
    padding:10px 14px!important;
  }
  .inv-progress-overview{
    padding:8px 14px;
  }
  .inv-mobile-scan-primary{
    min-height:48px;
    margin-top:6px;
    margin-bottom:6px;
  }
  .inv-status-toolbar{
    padding-bottom:4px;
  }
  .inv-scanner-preview{
    min-height:170px;
    height:min(48svh,260px);
  }
  .inv-scanner-topline span{
    display:none;
  }
  .inv-scanner-result{
    margin-top:8px;
  }
}

@media (min-width:641px) and (max-width:1199px) and (orientation:landscape){
  .inv-new-layout{
    max-width:980px;
  }
  .inv-review-summary{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .inv-review-pending-list{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media (prefers-reduced-motion:reduce){
  .inv-progress-fill,.inv-row-highlight,.inv-scan-found{transition:none!important;animation:none!important}
}

/* v2.6.98 — fallback produit scanner sans emoji dépendant du système */
.inv-scan-prod-fb svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
