/**
 * Fichier  : assets/css/scanner-consumer.css
 * Auteur   : KREMER Régis
 * Version  : 2.6.98
 * Date     : 2026-07-20
 * Description : Présentation commune des scanners intégrés aux parcours métier.
 *
 * Changelog :
 *   v2.6.90 (2026-07-20) — SCANNER CONSUMERS MIGRATION3 : états partagés et cartes résultat métier.
 *   v2.6.92 (2026-07-20) — SCANNER UX POLISH OPTIONAL1 : barre premium, résultat commun et états sonores.
 *   v2.6.94 (2026-07-20) — SCANNER UX FINAL FIELD VALIDATION2 : téléphone étroit,
 *                           amorçage sonore et cohérence finale des contextes.
 *   v2.6.95 (2026-07-20) — SCANNER RESULT DISPLAY FIX3 : carte produit commune clarifiée.
 *   v2.6.97 (2026-07-20) — SCANNER OVERLAY CONSUMER FIX5 : icône caméra SVG,
 *                           ligne de visée animée et alignement visuel des scanners métier.
 *   v2.6.98 (2026-07-20) — SCANNER TERRAIN CONFIRMATION1 : icônes SVG stables,
 *                           balayage GPU relancé et carte Inventaire harmonisée.
 */
.ms-scanner-consumer{display:grid;gap:16px;min-width:0}
.ms-scanner-consumer__camera{display:grid;gap:12px;min-width:0}
.ms-scanner-consumer__status{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--border,#dbe3ee);background:var(--bg-elevated,#f8fafc);color:var(--text-primary,#0f172a)}
.ms-scanner-consumer__status-icon{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;background:rgba(37,99,235,.10);color:var(--blue,#2563eb)}
.ms-scanner-consumer__status-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ms-scanner-consumer__status strong,.ms-scanner-consumer__status small{display:block}
.ms-scanner-consumer__status small{margin-top:2px;color:var(--text-muted,#64748b);font-size:12px;line-height:1.35}
.ms-scanner-consumer__status[data-scanner-status="success"]{border-color:rgba(22,163,74,.35);background:rgba(22,163,74,.08)}
.ms-scanner-consumer__status[data-scanner-status="warning"]{border-color:rgba(217,119,6,.35);background:rgba(245,158,11,.09)}
.ms-scanner-consumer__status[data-scanner-status="error"],.ms-scanner-consumer__status[data-scanner-status="notfound"]{border-color:rgba(220,38,38,.35);background:rgba(239,68,68,.08)}
.ms-scanner-consumer__preview{position:relative;min-height:300px;overflow:hidden;background:#07111f;border:1px solid rgba(148,163,184,.28)}
.ms-scanner-consumer__target{position:absolute;inset:0;min-height:300px}
.ms-scanner-consumer__target>div,.ms-scanner-consumer__target video{width:100%!important;height:100%!important;object-fit:cover!important}
.ms-scanner-consumer__frame{position:absolute;inset:50% auto auto 50%;width:min(82%,520px);height:132px;transform:translate(-50%,-50%);border:3px solid rgba(255,255,255,.92);pointer-events:none;box-shadow:0 0 0 999px rgba(2,6,23,.32)}
.ms-scanner-consumer__frame span{position:absolute;left:8%;right:8%;top:12%;height:2px;background:#60a5fa;box-shadow:0 0 12px rgba(96,165,250,.9);opacity:0;transform:translate3d(0,-50%,0);will-change:top,opacity}
.ms-scanner-consumer__preview.is-running .ms-scanner-consumer__frame span.is-sweep-armed{opacity:1;animation:msScannerConsumerSweep 1.45s cubic-bezier(.45,.05,.55,.95) infinite}
@keyframes msScannerConsumerSweep{0%,100%{top:12%}50%{top:88%}}
.ms-scanner-consumer__placeholder{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:6px;padding:24px;color:#dbeafe;text-align:center;background:radial-gradient(circle at center,rgba(37,99,235,.18),rgba(2,6,23,.92))}
.ms-scanner-consumer__placeholder[hidden]{display:none}
.ms-scanner-consumer__placeholder-icon{display:grid;place-items:center;width:54px;height:54px;color:#dbeafe}
.ms-scanner-consumer__placeholder-icon svg{width:42px;height:42px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.ms-scanner-consumer__placeholder small{color:#94a3b8}
.ms-scanner-consumer__camera-actions,.ms-scanner-consumer__secondary{display:flex;gap:10px;flex-wrap:wrap}
.ms-scanner-consumer__camera-actions .btn,.ms-scanner-consumer__secondary .btn{min-height:44px}
.ms-scanner-consumer__result[hidden],.ms-scanner-consumer__manual[hidden]{display:none}
.ms-scanner-consumer__result{display:grid;gap:12px}
.ms-scanner-consumer__manual{display:grid;gap:8px;padding:12px;border:1px solid var(--border,#dbe3ee);background:var(--bg-card,#fff)}
.ms-scanner-consumer__manual label{font-weight:700;color:var(--text-primary,#0f172a)}
.ms-scanner-consumer__manual>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.ms-scanner-consumer__manual input{min-width:0;min-height:44px;font-size:16px}
.ms-scanner-consumer__message,.ms-scanner-consumer__product{display:grid;gap:8px;padding:14px;border:1px solid var(--border,#dbe3ee);background:var(--bg-card,#fff)}
.ms-scanner-consumer__message p{margin:0;color:var(--text-muted,#64748b)}
.ms-scanner-consumer__product{grid-template-columns:auto minmax(0,1fr) auto;align-items:center}
.ms-scanner-consumer__product>span{font-size:28px}
.ms-scanner-consumer__product strong,.ms-scanner-consumer__product small{display:block}
.ms-scanner-consumer__product small{color:var(--text-muted,#64748b)}
.ms-scanner-consumer__choices{display:grid;gap:8px}
.ms-scanner-consumer__choices>button{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:center;width:100%;min-height:56px;padding:10px 12px;border:1px solid var(--border,#dbe3ee);background:var(--bg-card,#fff);color:var(--text-primary,#0f172a);text-align:left;cursor:pointer}
.ms-scanner-consumer__choices>button:focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}
.ms-scanner-consumer__choices strong,.ms-scanner-consumer__choices small{display:block}
.ms-scanner-consumer__choices small{color:var(--text-muted,#64748b)}
.ms-scanner-consumer-panel.ms-panel--page{max-width:760px}
[data-theme="dark"] .ms-scanner-consumer__status,[data-theme="dark"] .ms-scanner-consumer__manual,[data-theme="dark"] .ms-scanner-consumer__message,[data-theme="dark"] .ms-scanner-consumer__product,[data-theme="dark"] .ms-scanner-consumer__choices>button{background:#0f172a;border-color:rgba(148,163,184,.24);color:#f8fafc}

/* Résultats spécialisés injectés par les adaptateurs métier. */
.inv-scanner-result-card{display:grid;gap:8px;padding:14px;border:1px solid var(--border,#dbe3ee);background:var(--bg-card,#fff)}
.inv-scanner-result-card p{margin:0;color:var(--text-muted,#64748b)}
.inv-scanner-result-card[data-state="warning"]{border-color:rgba(217,119,6,.35);background:rgba(245,158,11,.08)}
.inv-scanner-result-card[data-state="notfound"]{border-color:rgba(220,38,38,.35);background:rgba(239,68,68,.07)}
[data-theme="dark"] .inv-scanner-result-card{background:#0f172a;border-color:rgba(148,163,184,.24);color:#f8fafc}
@media(max-width:599px){
  .ms-scanner-consumer__preview,.ms-scanner-consumer__target{min-height:260px}
  .ms-scanner-consumer__camera-actions,.ms-scanner-consumer__secondary{display:grid;grid-template-columns:1fr 1fr}
  .ms-scanner-consumer__camera-actions .btn,.ms-scanner-consumer__secondary .btn{width:100%}
  .ms-scanner-consumer__manual>div{grid-template-columns:1fr}
  .ms-scanner-consumer__product{grid-template-columns:auto minmax(0,1fr)}
  .ms-scanner-consumer__product .btn{grid-column:1/-1;width:100%}
}
@media(orientation:landscape) and (max-height:620px) and (max-width:1199px){
  .ms-scanner-consumer{grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);align-items:start}
  .ms-scanner-consumer__preview,.ms-scanner-consumer__target{min-height:220px}
  .ms-scanner-consumer__result,.ms-scanner-consumer__manual,.ms-scanner-consumer__secondary{grid-column:2}
}
@media(prefers-reduced-motion:reduce){.ms-scanner-consumer__frame span{animation:none!important;top:50%!important;opacity:.9!important}}


/* v2.6.92 — langage visuel scanner commun */
.ms-scanner-consumer__preview{border-radius:16px}
.ms-scanner-consumer__status{border-radius:14px}
.ms-scanner-consumer__toolbar{display:grid;grid-template-columns:minmax(0,1fr) 76px minmax(0,1fr);align-items:center;gap:8px;padding:7px;border:1px solid var(--border,#dbe3ee);border-radius:18px;background:color-mix(in srgb,var(--bg-card,#fff) 95%,transparent);box-shadow:0 12px 28px rgba(15,23,42,.12)}
.ms-scanner-consumer__toolbar button{min-width:0;min-height:48px;border:0;background:transparent;color:var(--text-secondary,#475569);font:inherit;font-weight:800;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer}
.ms-scanner-consumer__toolbar button>.ms-scanner-consumer__toolbar-icon{display:grid;place-items:center;width:22px;height:22px;line-height:1}
.ms-scanner-consumer__toolbar-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ms-scanner-consumer__toolbar button>small{font-size:12px;color:inherit}
.ms-scanner-consumer__toolbar .ms-scanner-consumer__camera-toggle{width:68px;height:68px;min-height:68px;justify-self:center;margin-top:-18px;border-radius:50%;border:5px solid var(--bg-card,#fff);background:var(--blue,#2563eb);color:#fff;box-shadow:0 12px 26px rgba(37,99,235,.30)}
.ms-scanner-consumer__toolbar .ms-scanner-consumer__camera-toggle.is-active{background:var(--red,#dc2626);box-shadow:0 12px 26px rgba(220,38,38,.26)}
.ms-scanner-consumer__toolbar button:focus-visible{outline:3px solid rgba(37,99,235,.42);outline-offset:2px}
.ms-scanner-consumer__product{grid-template-columns:48px minmax(0,1fr);padding:14px;border-radius:16px;background:var(--bg-elevated,#f8fafc)}
.ms-scanner-consumer__product-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:rgba(22,163,74,.12);color:var(--green,#16a34a);font-size:24px;font-weight:900}
.ms-scanner-consumer__product div{min-width:0}
.ms-scanner-consumer__product div>small{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--green,#16a34a)}
.ms-scanner-consumer__product div>strong{margin-top:2px;font-size:17px;color:var(--text-primary,#0f172a)}
.ms-scanner-consumer__product div>span{display:block;margin-top:3px;color:var(--text-muted,#64748b);font-size:13px;overflow-wrap:anywhere}
.ms-scanner-consumer__product .btn{grid-column:1/-1;min-height:48px}
[data-theme="dark"] .ms-scanner-consumer__toolbar{background:rgba(15,23,42,.96);border-color:rgba(148,163,184,.24)}
[data-theme="dark"] .ms-scanner-consumer__toolbar .ms-scanner-consumer__camera-toggle{border-color:#0f172a}
@media(max-width:599px){.ms-scanner-consumer__preview,.ms-scanner-consumer__target{min-height:250px}.ms-scanner-consumer__toolbar{grid-template-columns:minmax(0,1fr) 72px minmax(0,1fr)}.ms-scanner-consumer__toolbar .ms-scanner-consumer__camera-toggle{width:64px;height:64px;min-height:64px}}

@media(max-width:360px){
  .ms-scanner-consumer__toolbar{grid-template-columns:minmax(0,1fr) 62px minmax(0,1fr);gap:4px;padding:5px}
  .ms-scanner-consumer__toolbar button>small{font-size:11px}
  .ms-scanner-consumer__toolbar .ms-scanner-consumer__camera-toggle{width:58px;height:58px;min-height:58px;border-width:4px}
}


/* v2.6.95 — résultat commun cohérent avec la page Scanner */
.ms-scanner-consumer__product {
  grid-template-columns: 46px minmax(0,1fr);
  gap: 11px;
  padding: 13px;
  border-left: 4px solid var(--green,#16a34a);
  border-radius: 0;
  background: color-mix(in srgb,var(--green,#16a34a) 6%,var(--bg-card,#fff));
}
.ms-scanner-consumer__product-copy {min-width:0}
.ms-scanner-consumer__product-copy>small {color:var(--green,#15803d)}
.ms-scanner-consumer__product-copy>strong {display:block;margin-top:3px;font-size:18px;line-height:1.25;overflow-wrap:anywhere}
.ms-scanner-consumer__product-copy>span {display:block;margin-top:4px;color:var(--text-muted,#64748b);font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.ms-scanner-consumer__product .btn {margin-top:4px}


/* v2.6.97 — scanner métier aligné sur la page Scanner */
.ms-scanner-consumer__toolbar {
  position: relative;
  overflow: visible;
}
.ms-scanner-consumer__camera-toggle .ms-scanner-consumer__toolbar-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.9;
}
.ms-scanner-consumer__preview:not(.is-running) .ms-scanner-consumer__frame span {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .ms-scanner-consumer__preview.is-running .ms-scanner-consumer__frame span {
    animation: none;
    top: 50%;
    opacity: .9;
  }
}


/* v2.6.98 — confirmation terrain et homogénéité Inventaire */
.ms-scanner-consumer[data-scanner-context="inventory"] .inv-scan-product-card {
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border,#dbe3ee);
  border-left: 4px solid var(--green,#16a34a);
  border-radius: 0;
  background: color-mix(in srgb,var(--green,#16a34a) 5%,var(--bg-card,#fff));
}
.ms-scanner-consumer[data-scanner-context="inventory"] .inv-scan-product-main {align-items:center;gap:11px}
.ms-scanner-consumer[data-scanner-context="inventory"] .inv-scan-product-img {width:48px;height:48px;flex-basis:48px;border-radius:10px}
.ms-scanner-consumer[data-scanner-context="inventory"] .inv-scan-product-img svg {width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ms-scanner-consumer[data-scanner-context="inventory"] .inv-scan-product-info h3 {font-size:17px;line-height:1.25}
.ms-scanner-consumer[data-scanner-context="inventory"] .inv-scan-product-info p {font-size:12px;line-height:1.35}
.ms-scanner-consumer[data-scanner-context="inventory"] .inv-scan-product-stats {gap:6px}
.ms-scanner-consumer[data-scanner-context="inventory"] .inv-scan-product-stats span {min-height:30px;padding:6px 9px;font-size:11px}
.ms-scanner-consumer[data-scanner-context="inventory"] .inv-scan-actions .btn {min-height:48px}
