/* Gestio — feuille de style */
:root {
  --navy: #13206b;
  --blue: #2457c5;
  --blue2: #3d8bfd;
  --head1: #1f3f9c;
  --head2: #2b72c6;
  --filter: #e6efff;
  --row-alt: #eef4ff;
  --line: #d3dcec;
  --ink: #1d2433;
  --muted: #586174;
  --ok: #127a41;
  --ok-bg: #e5f6ec;
  --err: #be2a2a;
  --err-bg: #fdecec;
  --warn: #f1c232;
  --ebay: #e53238;
  --site: #3a4b66;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: #fff; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
h1 { color: var(--navy); font-weight: 500; font-size: 30px; margin: 10px 0 18px; }
h2 { color: var(--navy); font-weight: 500; font-size: 20px; margin: 18px 0 10px; }
h3, h4 { margin: 14px 0 6px; color: var(--navy); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: var(--err); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.row { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.row.right { justify-content: flex-end; }

/* Bandeau mode test */
.test-banner { background: repeating-linear-gradient(45deg, #ffd34d, #ffd34d 14px, #ffcb2b 14px, #ffcb2b 28px); color: #3a2c00; font-weight: 700; text-align: center; padding: 5px; letter-spacing: .3px; position: sticky; top: 0; z-index: 60; }
.test-pill { display: inline-block; background: #ffd34d; color: #3a2c00; font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 20px; margin-bottom: 6px; }
.test-box { background: #fff8de; border-color: #f3d36b; }

/* En-tête et menu */
.top { display: flex; align-items: center; gap: 26px; padding: 12px 34px; border-bottom: 1px solid #eef1f6; background: #fff; position: sticky; top: 0; z-index: 50; }
.test-banner + .top { top: 29px; }
.logo { font-size: 20px; color: var(--navy); letter-spacing: .5px; font-weight: 300; }
.logo b { font-weight: 800; color: var(--blue); }
.logo.big { font-size: 28px; display: block; margin-bottom: 4px; }
.logo span { display: block; font-size: 12px; color: var(--muted); letter-spacing: 3px; text-transform: uppercase; }
.menu { display: flex; background: #f3f6fd; border-radius: 10px; padding: 4px 10px; }
.menu-item { position: relative; }
.menu-top { display: block; padding: 10px 16px; color: #4f63b4; font-weight: 500; font-size: 16px; }
.menu-item.active > .menu-top, .menu-item:hover > .menu-top { color: var(--navy); }
.drop { display: none; position: absolute; top: 100%; left: 0; min-width: 250px; background: #f5f8ff; border-radius: 0 0 8px 8px; box-shadow: 0 10px 24px rgba(20, 30, 80, .12); padding: 6px 0; z-index: 70; }
.drop.right { left: auto; right: 0; min-width: 190px; }
.menu-item:hover .drop, .menu-item:focus-within .drop { display: block; }
.drop a { display: block; padding: 11px 22px; color: var(--navy); font-size: 15px; }
.drop a:hover, .drop a.active { background: #e3ebff; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user .menu-top { font-size: 14px; color: var(--navy); background: #f3f6fd; border-radius: 20px; padding: 8px 14px; }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: #c5cbd6; }
.sync-dot.ok { background: #3ccf7a; }
.sync-dot.err { background: var(--err); }
.sync-dot.running { background: var(--blue2); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .3; } }

.page { padding: 18px 34px 110px; }
.page-head { display: flex; align-items: center; gap: 14px; }
.page-head h1 { flex: 1; }

/* Boutons */
.btn { border: 1px solid var(--line); background: #fff; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: 500; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:disabled { background: #a7b4cf; border-color: #a7b4cf; }
.btn.outline { border: 1.5px solid var(--navy); color: var(--navy); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.small { padding: 4px 11px; font-size: 13px; }
.btn.big { width: 100%; padding: 13px; font-size: 16px; margin-top: 10px; border-radius: 10px; }
.link { color: var(--blue); cursor: pointer; }
button.link { background: none; border: 0; padding: 8px 0 0; text-decoration: underline; color: var(--muted); font-size: 13px; }
.copy { border: 0; background: none; color: var(--blue2); cursor: pointer; padding: 0 2px; font-size: 13px; }

/* Grilles */
.grid-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.grid-bar select, .grid-bar .btn { height: 38px; }
.grid-bar select { border: 1px solid #b9c3d6; border-radius: 6px; padding: 0 10px; background: #fff; }
.grid-count { color: var(--ink); }
.pager { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--blue2); background: #fff; color: var(--blue2); font-size: 20px; cursor: pointer; line-height: 1; }
.pager:disabled { opacity: .35; cursor: default; }
.grid-wrap { overflow-x: auto; border-radius: 6px; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid thead tr:first-child th { background: linear-gradient(90deg, var(--head1), var(--head2)); color: #fff; font-weight: 600; text-align: left; padding: 14px 12px; font-size: 14px; white-space: nowrap; }
table.grid thead th.sortable { cursor: pointer; }
table.grid thead .sort-ind { font-style: normal; margin-left: 6px; }
table.grid tr.filters th { background: var(--filter); padding: 8px 10px; vertical-align: top; border-bottom: 1px solid var(--line); }
table.grid .f { width: 100%; min-width: 70px; padding: 7px 8px; border: 1px solid #b9c3d6; border-radius: 4px; background: #fff; display: block; }
table.grid .f.small { margin-bottom: 4px; }
table.grid td { padding: 12px; border-bottom: 1px solid #e3e8f2; vertical-align: top; border-right: 1px dashed #d8e0ee; }
table.grid td:last-child { border-right: 0; }
table.grid tbody tr:nth-child(even) td { background: var(--row-alt); }
table.grid tbody tr.click { cursor: pointer; }
table.grid tbody tr.click:hover td { background: #dde8ff; }
table.grid th.sel, table.grid td.sel { width: 44px; text-align: center; }
table.grid td.img { width: 84px; }
table.grid td.img img, .noimg { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; background: #f2f4f8; display: block; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.variant { color: var(--muted); }
.stock.pos { color: var(--ok); }
.stock.neg { color: var(--err); }
.pill { display: inline-block; padding: 3px 14px; border-radius: 6px; border: 1.5px solid; font-size: 13px; }
.pill.on { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }
.pill.off { color: #5d6577; border-color: #c4c9d3; background: #f4f5f7; }
.status { display: inline-block; padding: 4px 14px; border-radius: 6px; border: 1.5px solid; font-size: 13px; white-space: nowrap; }
.status.run { color: var(--blue); border-color: #8fb0f0; background: #dfe9ff; }
.status.done { color: var(--ok); border-color: #7dcca0; background: var(--ok-bg); }
.status.cancel { color: var(--err); border-color: #eba3a3; background: var(--err-bg); }
.count { display: inline-block; min-width: 32px; padding: 2px 8px; border: 1.5px solid #7dcca0; border-radius: 6px; background: var(--ok-bg); text-align: center; }
.flag { font-size: 24px; line-height: 1; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; color: #fff; vertical-align: middle; }
.badge.ch-eBay { background: var(--ebay); }
.badge.ch-Site { background: var(--site); }
.carrier { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 12px; font-weight: 700; background: #eef1f6; color: #333; white-space: nowrap; }
.carrier.chrono { background: #e2eefc; color: #1665c0; }
.carrier.poste { background: #fff3c4; color: #23317c; }
.carrier.pickup { background: #f0f0f0; color: #222; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.chip i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.mv.out { color: #fff; background: var(--err); border-radius: 3px; padding: 0 5px; font-size: 11px; }
.mv.in { color: #fff; background: var(--ok); border-radius: 3px; padding: 0 5px; font-size: 11px; }
.bar { width: 70px; height: 7px; background: #e1e5ee; border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
.bar div { height: 100%; background: var(--ok); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.card.pad { padding: 16px 18px; }
table.mini { width: 100%; border-collapse: collapse; margin: 6px 0 14px; }
table.mini th { text-align: left; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); padding: 6px 8px; }
table.mini td { padding: 7px 8px; border-bottom: 1px solid #edf0f5; vertical-align: middle; }
img.thumb { width: 42px; height: 42px; object-fit: contain; border-radius: 4px; background: #f2f4f8; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 10px; }
.kv { margin: 4px 0; }
.kv span { color: var(--muted); margin-right: 6px; }
.kv span + b + span, .kv b + span { margin-left: 14px; }
.product-head { display: flex; gap: 18px; }
.product-head img { width: 110px; height: 110px; object-fit: contain; background: #f2f4f8; border-radius: 8px; }
.soon { max-width: 720px; }
.soon-tag { display: inline-block; background: #e3ebff; color: var(--navy); font-weight: 700; padding: 3px 10px; border-radius: 20px; font-size: 12px; }

/* Préparation */
.tabs-big { display: flex; gap: 6px; margin-bottom: 18px; }
.tabs-big button { border: 0; background: #e6efff; color: var(--navy); padding: 18px 18px; font-size: 15px; font-weight: 500; cursor: pointer; border-radius: 4px; position: relative; }
.tabs-big button.active { background: linear-gradient(90deg, #1452b8, #2468c8); color: #fff; }
.tabs-big button.active::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-top-color: #2068cc; border-bottom: 0; }
.stepbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 14px 34px; background: #f5f8ff; border-top: 1px solid var(--line); z-index: 40; }
.step { border: 1.5px solid var(--navy); background: #fff; color: var(--navy); border-radius: 20px; padding: 7px 18px; font-weight: 700; font-size: 13px; text-transform: uppercase; cursor: pointer; }
.step:hover { background: var(--navy); color: #fff; }

/* Poste de préparation (douchette) */
body.station-open { overflow: hidden; }
.station { position: fixed; inset: 0; background: #f4f6fa; z-index: 80; display: flex; flex-direction: column; }
.station-top { display: flex; gap: 14px; align-items: center; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.scan { flex: 0 0 440px; padding: 12px 14px; font-size: 18px; border: 2px solid var(--blue); border-radius: 10px; outline: none; }
.scan.tracking { border-color: var(--ok); }
.feedback { flex: 1; padding: 10px 14px; border-radius: 10px; font-weight: 600; min-height: 46px; display: flex; align-items: center; }
.feedback.ok { background: var(--ok-bg); color: var(--ok); }
.feedback.err { background: var(--err-bg); color: var(--err); }
.feedback.info { background: #eef3fd; color: var(--blue); }
.station-body { flex: 1; display: grid; grid-template-columns: 220px 1fr 340px; gap: 16px; padding: 16px 20px; overflow: auto; }
.queue { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; align-self: start; }
.queue h4 { margin: 4px 6px 8px; }
.queue a { display: block; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.queue a span { display: block; font-size: 12px; color: var(--muted); }
.queue a.current { background: #e3ebff; }
.station h2 { margin-top: 0; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background .2s; }
.line:last-child { border-bottom: 0; }
.line img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: #f2f3f5; }
.line .name { font-weight: 600; }
.line .codes { font-size: 12px; color: var(--muted); margin-top: 2px; }
.line .count { display: flex; align-items: center; gap: 8px; border: 0; background: none; }
.line .count b { font-size: 22px; min-width: 72px; text-align: center; }
.line .count button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; }
.line.done { background: var(--ok-bg); }
.line.done .count b { color: var(--ok); }
.line.flash-ok { background: #c9f0d9; }
.line.flash-err { background: var(--err-bg); }
.side .lbl { display: block; font-size: 13px; color: var(--muted); margin-top: 12px; }
.side input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font-size: 16px; border: 1px solid var(--line); border-radius: 8px; }
.progress { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress div { height: 100%; background: var(--ok); transition: width .2s; }
.picking td.big { font-size: 20px; font-weight: 700; }
.box { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #555; border-radius: 3px; }

/* Intégration / réglages */
.sched { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sched input.every { width: 70px; }
.sched input, .sched select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; }
.settings fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.settings legend { font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.settings .states { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 16px; }
.settings label { display: block; margin: 8px 0; }
.settings label.check, label.check { display: flex; align-items: center; gap: 8px; }
.settings input:not([type=checkbox]), .settings select { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; min-width: 300px; margin-top: 4px; }

/* Connexion */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eef3ff, #f9fbff); }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px 34px; width: 400px; box-shadow: 0 20px 50px rgba(20, 40, 120, .08); }
.auth-card label { display: block; margin: 12px 0; font-size: 13px; color: var(--muted); }
.auth-card input { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; color: var(--ink); }
.auth-error { color: var(--err); min-height: 20px; }

/* Fenêtres et notifications */
.modal-back { position: fixed; inset: 0; background: rgba(15, 25, 60, .35); display: flex; align-items: flex-start; justify-content: center; padding: 50px 20px; z-index: 100; overflow: auto; }
.modal { background: #fff; border-radius: 12px; width: 560px; max-width: 100%; padding: 22px 26px; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
.modal.wide { width: 1000px; }
.modal h2 { margin-top: 0; }
.modal-x { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
#toasts { position: fixed; right: 20px; bottom: 80px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: #24304a; color: #fff; padding: 11px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: 420px; transition: opacity .4s, transform .4s; }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--err); }
.toast.out { opacity: 0; transform: translateY(10px); }

/* Impression (liste de picking) */
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; }
  .no-print { display: none; }
}

/* Boutiques */
.store { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; border: 1px solid; }
.store.st-storephone { color: #1f3f9c; background: #e6eeff; border-color: #b9cbf5; }
.store.st-sparestore { color: #7a3b00; background: #fff1e0; border-color: #f2c999; }
.badge.ch-Boutique { background: #5b6b7d; }
.warn-box { background: #fff6e0; border: 1px solid #f3d36b; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(7, 1fr); background: #e9f0ff; border-radius: 6px; margin: 10px 0 16px; }
.stats div { padding: 10px; text-align: center; }
.stats span { display: block; font-size: 12px; color: var(--muted); }
.stats b { font-size: 18px; color: var(--navy); }
table.grid input.edit { width: 90px; padding: 7px 8px; border: 1px solid #b9c3d6; border-radius: 4px; text-align: center; }
table.grid input.edit.wide { width: 140px; text-align: left; }
table.grid input.edit.changed { border-color: var(--blue); background: #eef4ff; font-weight: 700; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 14px 34px; background: #f5f8ff; border-top: 1px solid var(--line); z-index: 40; }
.mvform { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 10px 14px; align-items: center; }
.mvform input, .mvform select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; }

.labelbox { margin-top: 12px; }
.labelprev { width: 100%; height: 300px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; background: #f2f4f8; }
.tabs-side { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.side-tabs { display: flex; flex-direction: column; gap: 6px; }
.side-tabs button { text-align: left; border: 0; background: #e6efff; color: var(--navy); padding: 12px 14px; border-radius: 4px; cursor: pointer; font-weight: 500; }
.side-tabs button.active { background: linear-gradient(90deg, #1452b8, #2468c8); color: #fff; }
.side-body textarea { width: 100%; font-family: ui-monospace, Menlo, monospace; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.side-body details { margin-top: 12px; }
table.mini input, table.mini select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
#ship select, #pay input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; max-width: 320px; }
.settings table.mini input, .settings table.mini select { min-width: 0; width: 100%; margin: 0; }
.settings table.mini td:last-child { width: 44px; }
.side-body { min-width: 0; overflow-x: auto; }

/* Achats */
.po-head { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 12px; margin-bottom: 10px; }
.po-head input, .po-head select { min-width: 0 !important; width: 100%; }
.po-lines input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.po-lines input.missing { border-color: var(--err); background: var(--err-bg); }
.po-lines tr.done-row td { background: var(--ok-bg); }
.recv-bar { display: flex; gap: 12px; align-items: center; margin: 10px 0; }
.recv-bar .scan { flex: 0 0 360px; }
.qtybox { display: flex; gap: 6px; align-items: center; }
.qtybox input.edit { width: 70px; }
.qtybox .btn { min-width: 36px; }
.sales { display: flex; gap: 6px; }
.sales span { display: flex; flex-direction: column; align-items: center; background: #eef1f6; border-radius: 6px; padding: 4px 8px; font-weight: 700; min-width: 48px; }
.sales i { font-weight: 400; font-style: italic; font-size: 11px; color: var(--muted); }
table.grid td select.q-sup { max-width: 220px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; }
/* Rapports */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 14px 0 18px; }
.kpi { background: #e9f0ff; border-radius: 10px; padding: 14px 16px; }
.kpi span { display: block; font-size: 12px; color: var(--muted); }
.kpi b { font-size: 22px; color: var(--navy); }
.kpi.warn { background: var(--warn-bg); }
.row label input[type=date] { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; margin-left: 4px; }

/* Fiche produit */
.fiche { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; }
.fiche .side-tabs { position: sticky; top: 120px; }
.side-title { font-weight: 700; color: var(--navy); text-transform: uppercase; font-size: 13px; margin: 0 0 8px 4px; }
.fiche .product-head img, .noimg.big { width: 110px; height: 110px; }
.stats.wide { grid-template-columns: repeat(8, 1fr); }
h3.sec { color: #3d8bdf; text-transform: uppercase; font-size: 14px; letter-spacing: .4px; display: flex; align-items: center; gap: 12px; margin: 22px 0 10px; }
h3.sec::after { content: ''; flex: 1; height: 1px; background: #9fc2ef; }
table.depot input, table.depot select, table.sup input, table.sup select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; width: 100%; min-width: 80px; }
.attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 10px; }
.attr { background: #f3f6fd; border-radius: 8px; padding: 10px 12px; }
.attr span { display: block; font-size: 12px; color: var(--muted); }
#bc input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; width: 100%; }

/* Mouvements : ajout / suppression */
.mvdlg { display: flex; flex-direction: column; gap: 12px; min-width: 460px; }
.mvdlg label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.mvdlg input, .mvdlg select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 15px; color: inherit; }
.mvdlg .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mv-target { min-height: 20px; }
.btn.danger { background: #d93a3a; color: #fff; border-color: #d93a3a; }
.btn.danger:hover { background: #b92c2c; }
label.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
tr.deleted td { color: #9aa3b5; text-decoration: line-through; }
tr.deleted td:last-child { text-decoration: none; }
.err { color: var(--err); }

/* Personnaliser la grille (tiroir à droite) */
.grid-custom { padding: 6px 10px; white-space: nowrap; }
.drawer-back { position: fixed; inset: 0; background: rgba(20, 30, 60, 0); z-index: 300; transition: background .12s; }
.drawer-back.open { background: rgba(20, 30, 60, .45); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 92vw); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .12s; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.drawer-back.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 10px; }
.drawer-head h2 { margin: 0; color: var(--navy); }
.drawer-head .modal-x { position: static; }
.drawer .info { margin: 0 24px 10px; padding: 10px 14px; border: 1px solid #9fc2ef; background: #eef5fe; border-radius: 8px; font-size: 13px; color: #2c4f80; }
.colpick { list-style: none; margin: 0; padding: 0 24px; overflow: auto; flex: 1; }
.colpick li { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); background: #fff; cursor: grab; }
.colpick li.dragging { opacity: .4; }
.colpick .handle { color: #8a94a8; font-size: 18px; }
.colpick label { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; font-size: 15px; }
.colpick input { width: 17px; height: 17px; }
.drawer-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); background: #f6f8fd; }
.promo { color: #c0392b; }

/* Fiche commande (panneau à onglets) */
.drawer.order-drawer { width: min(1180px, 96vw); }
.order-drawer .drawer-head h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 20px; }
.tabs-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 24px 12px; border-bottom: 1px solid var(--line); }
.tabs-row button { border: 0; background: #eef3fb; color: #33507e; padding: 10px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.tabs-row button:hover { background: #dde8f8; }
.tabs-row button.active { background: linear-gradient(135deg, #1877be, #1a3e8f); color: #fff; }
.o-body { overflow: auto; flex: 1; padding: 6px 24px 30px; }
.o-actions { margin: 10px 0 4px; gap: 8px; flex-wrap: wrap; }
.btn.danger-text { color: #c0392b; border-color: #e3b1ab; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 14px 0 18px; }
.tiles.small { grid-template-columns: repeat(4, 1fr); }
.tile { background: linear-gradient(135deg, #1877be, #1a3e8f); color: #fff; border-radius: 8px; padding: 14px 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.tile span { font-size: 13px; opacity: .9; }
.tile b { font-size: 16px; }
.tile small { font-size: 11px; opacity: .8; }
.tile.warn { background: linear-gradient(135deg, #e8833a, #c0392b); }
.o-client { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.cols2 h4 { margin: 6px 0; color: var(--navy); }
.o-lines .thumb { width: 40px; height: 40px; }
.o-totals { display: flex; justify-content: flex-end; gap: 22px; margin-top: 10px; flex-wrap: wrap; }
.o-totals div { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; color: var(--muted); }
.o-totals b { color: var(--text, #1d2a44); font-size: 15px; }
.o-totals .big b { font-size: 19px; color: var(--navy); }
table.kvtable { width: 100%; border-collapse: collapse; }
table.kvtable th { text-align: left; font-weight: 500; color: var(--muted); width: 38%; padding: 9px 10px; }
table.kvtable td { padding: 9px 10px; }
table.kvtable tr:nth-child(odd) { background: #f3f5f9; }
table.margins tr.tot td { font-weight: 700; background: #f3f6fd; }
.o-custorders tr.current td { background: #fff8e1; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid #c9d8ef; }
.timeline li { position: relative; padding: 8px 0 10px 14px; display: grid; grid-template-columns: 170px 1fr; gap: 10px; }
.timeline li::before { content: ''; position: absolute; left: -25px; top: 13px; width: 11px; height: 11px; border-radius: 50%; background: #9fb6d9; border: 2px solid #fff; }
.timeline li.k-ship::before { background: #27ae60; } .timeline li.k-label::before { background: #1e8fd6; } .timeline li.k-state::before { background: #8e44ad; }
.timeline li.k-cancel::before, .timeline li.k-warn::before { background: #c0392b; } .timeline li.k-stock::before { background: #e67e22; }
.t-date { color: var(--muted); font-size: 13px; }
.t-src { font-size: 11px; padding: 2px 7px; border-radius: 10px; background: #eef3fb; color: #33507e; margin-right: 4px; }
.t-src.s-PrestaShop { background: #f3e9fb; color: #6c3483; } .t-src.s-Stock { background: #fdf0e3; color: #a04000; }
.float-tip { position: fixed; z-index: 400; background: #1d2a44; color: #fff; font-size: 12px; padding: 8px 11px; border-radius: 7px; max-width: 460px; box-shadow: 0 6px 20px rgba(0,0,0,.25); pointer-events: none; display: none; line-height: 1.5; }
.count[data-tip] { cursor: help; }
select.row-action { padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; max-width: 120px; }
.settings .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.settings textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.settings .invoice-set h4 { margin: 16px 0 4px; color: var(--navy); }
.settings .row3 input { min-width: 0 !important; width: 100%; box-sizing: border-box; }
.o-client { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.o-track { background: #f3f6fd; border-radius: 6px; padding: 6px 12px; }
.tile.click { cursor: pointer; } .tile.click:hover { filter: brightness(1.1); }
.cols2 h4 .link { font-weight: 500; margin-left: 6px; }
.modal-back { z-index: 350; } .toasts, #toasts, .toast { z-index: 500; }

/* Préparation : produits en stock / manquants sur le tableau */
.prodlist div { padding: 1px 0; }
.prodlist .p-ok { color: #157340; }
.prodlist .p-part { color: #b26a00; }
.prodlist .p-no { color: #a3271c; font-weight: 600; }

/* Poste de préparation (douchette) */
.st-sel { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy); }
.st-sel select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; max-width: 360px; }
.station-main { flex: 1; overflow: auto; padding: 16px 24px 90px; }
.st-head { border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.st-title { background: linear-gradient(135deg, #1877be, #1a3e8f); color: #fff; text-align: center; padding: 12px; font-size: 18px; }
.st-title .link { color: #fff; text-decoration: underline; }
.st-cells { display: grid; grid-template-columns: repeat(8, 1fr); background: #dde9f8; }
.st-cells div { padding: 12px 8px; text-align: center; border-right: 1px solid #fff; display: flex; flex-direction: column; gap: 3px; }
.st-cells span { font-size: 12px; color: #4a5b78; }
.st-cells .click { cursor: pointer; } .st-cells .click:hover { background: #cfe0f6; }
table.st-lines { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
table.st-lines th { background: linear-gradient(135deg, #1877be, #1a3e8f); color: #fff; padding: 10px; font-weight: 600; font-size: 13px; text-align: left; }
table.st-lines td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.st-lines img, table.st-lines .noimg { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: #f2f3f5; }
table.st-lines td.big { font-size: 20px; font-weight: 700; }
table.st-lines tr.done td { background: #e3f6ea; }
table.st-lines tr.flash-ok td { background: #c9f0d9; } table.st-lines tr.flash-err td { background: var(--err-bg); }
.qbtns { display: inline-flex; align-items: center; gap: 4px; }
.qbtns b { min-width: 42px; text-align: center; font-size: 20px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 0; background: #fff; }
.qbtns button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #9fb6d9; background: #fff; cursor: pointer; font-weight: 700; color: #1a3e8f; }
.st-chip { display: inline-block; padding: 8px 12px; border-radius: 6px; font-weight: 700; color: #fff; }
.st-chip.no { background: #e53935; } .st-chip.ok { background: #1e8a4c; }
.st-box { display: flex; align-items: center; gap: 16px; margin-top: 14px; background: #1a3e8f; color: #fff; border-radius: 8px; padding: 10px 16px; }
.st-box input { width: 90px; padding: 6px 8px; border-radius: 6px; border: 0; margin-left: 6px; font-size: 16px; }
.st-box .btn.ghost { color: #fff; }
.st-done { background: #fff; border-radius: 10px; padding: 20px; text-align: center; }
.st-done h2 { margin: 0 0 14px; }
.st-docs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.st-done .labelprev { width: 100%; max-width: 520px; height: 340px; border: 1px solid var(--line); border-radius: 8px; margin: 8px auto; display: block; }
.st-track { margin-top: 16px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.st-track-head { background: linear-gradient(135deg, #1877be, #1a3e8f); color: #fff; padding: 12px; font-size: 16px; }
.st-track .row { padding: 14px; gap: 10px; justify-content: center; }
.st-track input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; width: 280px; }
.st-track-val { padding: 14px; font-size: 20px; font-weight: 700; }
.st-bottom { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 14px; background: #f5f8ff; border-top: 1px solid var(--line); padding: 14px 28px; font-size: 16px; z-index: 81; }
.st-bottom .progress { width: 220px; }
.row.center { justify-content: center; }
.logo .brand-img { max-height: 38px; max-width: 180px; vertical-align: middle; }
.logo.big .brand-img { display: block; max-height: 60px; margin: 0 auto 6px; }
.logo-set { display: flex; gap: 18px; align-items: center; }
.logo-prev { width: 220px; height: 90px; border: 1px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fff; }
.logo-prev img { max-width: calc(100% - 16px); max-height: 80px; object-fit: contain; }
.logo .brand-txt { display: inline; font-size: inherit; letter-spacing: .5px; text-transform: none; color: var(--navy); font-weight: 700; }
.logo.big .brand-txt { display: block; }
.ch-color { width: 44px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 6px; }
.st-box input { color: #111; background: #fff; }
.st-box .btn.ghost { color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.7); }
.brand-img[hidden], .brand-txt[hidden] { display: none !important; }
.status-map select { min-width: 240px !important; padding: 5px 8px !important; margin: 0 !important; } .status-map td { padding: 4px 8px; }
.logo-set { margin-bottom: 12px; }
.st-empty { text-align: center; font-size: 26px; color: var(--navy); padding: 120px 20px; }
.prep-st { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #eef3fb; color: #33507e; }
.prep-st.prepared { background: #fff4d6; color: #8a5b00; } .prep-st.shipped { background: #e3f6ea; color: #1e8a4c; }
tr.row-shipped td { opacity: .65; }
#mass { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.clogo { display: flex; align-items: center; justify-content: center; width: 96px; min-height: 64px; margin: 0 auto; }
.clogo img { width: 96px; height: 64px; object-fit: contain; display: none; }
.clogo.has img { display: block; } .clogo.has .carrier { display: none; }
.svc-table td { padding: 6px 8px; }
.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.switch .sw-lbl::after { content: 'Désactivé'; color: #b03a2e; font-size: 13px; }
.switch input:checked + .sw-lbl::after { content: 'Activé'; color: #1e8a4c; }
details.gen { margin-top: 14px; background: #f3f6fd; padding: 10px 12px; border-radius: 8px; }
details.gen summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.grid td .btn.remove { margin-top: 6px; }
/* Poste de préparation : la douchette écrit dans un champ invisible (toujours actif), pas de case de saisie à l'écran. */
.station .scan { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.qbtns.hd { gap: 8px; } .qbtns.hd button { background: #fff; color: #1a3e8f; border-color: #fff; }
.st-box.parcel { margin-top: 8px; } .st-box .muted-w { color: #cfe0ff; }
.st-box .p-del { color: #fff; border: 1px solid rgba(255,255,255,.6); }
.st-steps { display: flex; gap: 8px; margin-left: 16px; }
.st-steps .step { font-size: 12px; padding: 8px 12px; }
.st-steps .step.active { background: var(--navy); color: #fff; }

.customs-box { margin: 14px 0; padding: 14px 18px; border: 2px solid #e8a33d; background: #fff6e5; border-radius: 12px; color: #6b4300; font-size: 1.05rem; }
.customs-box b { display: block; margin-bottom: 4px; font-size: 1.1rem; }
.customs-box .cb-inv { margin-top: 8px; }
.customs-box .cb-inv:empty { display: none; }

.swap-note { color: #b26a00; margin-top: 2px; }
.nowrap { white-space: nowrap; }

.stockcell { white-space: nowrap; }
.stk { display: flex; justify-content: space-between; gap: 10px; min-width: 120px; padding: 3px 10px; border-radius: 8px; background: #eef2fb; margin: 2px 0; font-size: .95rem; }
.stk span { color: #4a5578; }
.stk b { font-size: 1.05rem; color: #14215a; }
.stk.ok { background: #e3f5e8; } .stk.ok b { color: #1d7a3a; }
.stk.zero { background: #fde7e7; } .stk.zero b { color: #c62828; }

.track-link { color: #1f4fd1; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.track-link:hover { color: #0d2f8f; }
.st-track-val .track-link { font-size: inherit; }

.pick-img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line, #dde3f0); transition: transform .15s; transform-origin: left center; position: relative; z-index: 1; cursor: zoom-in; }
.pick-img:hover { transform: scale(3.2); z-index: 20; box-shadow: 0 8px 30px rgba(0,0,0,.25); }

.stk.inc { background: #fff1d6; } .stk.inc span { color: #8a5a00; } .stk.inc b { color: #b26a00; }

.carrier-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.cp-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 14px; border: 1px solid var(--line, #dde3f0); border-radius: 12px; background: #fff; cursor: pointer; }
.cp-card:hover { border-color: #2a5bd7; box-shadow: 0 4px 14px rgba(42, 91, 215, .15); }
.carrier.c-dpd { background: #fde8ec; color: #a3002b; } .carrier.c-ups { background: #f3ead9; color: #4a2d0b; } .carrier.c-dhl { background: #fff4c2; color: #b00000; }
.carrier.c-mr { background: #fde9f1; color: #8a1048; } .carrier.c-gls { background: #e6ecfa; color: #0b2a7a; } .carrier.c-cp { background: #ffeede; color: #b34700; } .carrier.c-fedex { background: #efe7f7; color: #4d148c; }


.product-drawer { width: min(1400px, 94vw); }
.product-drawer .drawer-body { padding: 18px 26px 40px; overflow: auto; height: 100%; }
.product-drawer .page-head { position: sticky; top: -18px; background: #fff; z-index: 3; padding-top: 6px; }
.order-page .order-full { background: #fff; border-radius: 14px; box-shadow: 0 4px 20px rgba(20, 40, 100, .08); overflow: hidden; }
.order-page .drawer-head { display: flex; align-items: center; gap: 10px; }

.phys-hint { font-size: 12.5px; color: #8a94ad; margin-top: 5px; line-height: 1.45; white-space: nowrap; }
.phys-hint b { color: #5b6684; }
.sn-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sn-chip { display: inline-flex; align-items: center; gap: 4px; background: #eef2fb; border: 1px solid #cfd8ee; border-radius: 14px; padding: 3px 4px 3px 10px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.sn-chip button { border: 0; background: transparent; cursor: pointer; color: #8a94ad; padding: 0 4px; }
.sn-chip button:hover { color: #c62828; }
.sn-count { margin-top: 6px; }
.serial-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #4d148c; background: #efe7f7; border-radius: 8px; padding: 1px 7px; margin-left: 6px; vertical-align: 0.14em; line-height: 1.5; }

.test-banner.readonly-banner, .test-pill.readonly-banner { background: repeating-linear-gradient(45deg, #ffb35c, #ffb35c 14px, #ffc47f 14px, #ffc47f 28px); color: #4a2400; }

/* Correspondances */
select.todo { border-color: #e0a100; background: #fff8e6; }
.ok-text { color: var(--ok); }
.def-ship { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-bottom: 10px; }
.def-ship label { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.def-ship select { min-width: 320px; }
#ship .m-method { min-width: 340px; }
#pay .p-raw { min-width: 260px; }
.pay-todo h3 { margin: 0 0 8px; font-size: 15px; }
.pay-todo .pill { padding: 0 8px; font-size: 11px; border-color: #c4c9d3; color: #5b6475; }
.cat-help { margin-top: 2px; max-width: 320px; }

/* Fiche fournisseur */
.modal.xwide { width: 1320px; }
.sup-sheet { min-height: 520px; }
.sup-sheet .side-tabs button:disabled { opacity: .45; cursor: not-allowed; }
.sup-sheet h3.sec { color: #2a78d9; text-transform: uppercase; font-size: 13px; letter-spacing: .04em; border-bottom: 1px solid #b9d3f3; padding-bottom: 6px; margin: 18px 0 10px; }
.sup-sheet h3.sec:first-child { margin-top: 0; }
.sup-sheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.sup-sheet textarea.plain, textarea.plain { font-family: inherit; }
.sup-sheet .days { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 10px; }
.sup-sheet .chk-help { margin: -4px 0 10px 26px; }
.sup-sheet input.cell, .sup-sheet select.cell { width: 100%; min-width: 90px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; }
.sup-sheet input.cell.num { text-align: right; }
.sup-sheet .cell.saved { border-color: var(--ok); background: #eefbf1; }
.rep-bar { gap: 18px; margin-bottom: 8px; }
.rep-bar label { display: flex; gap: 8px; align-items: center; }
.chart-title { text-align: center; font-size: 15px; margin: 8px 0; }
svg.bars { width: 100%; height: auto; }
svg.bars rect { fill: #86b3e6; }
svg.bars rect:hover { fill: #2a78d9; }
svg.bars text { font-size: 11px; fill: #5b6475; }
svg.bars .gl { stroke: #e3e7ee; stroke-width: 1; }
.warn-line { color: #9a6700; background: #fff8e6; border: 1px solid #f0d58a; border-radius: 6px; padding: 5px 9px; margin: 6px 0; }
.sup-sheet .two input:not([type=checkbox]), .sup-sheet .two select, .sup-sheet .settings > label > input:not([type=checkbox]) { width: 100%; min-width: 0; box-sizing: border-box; }
.sup-sheet .grid-bar input, .sup-sheet .grid-bar select, .sup-sheet table.grid input, .sup-sheet table.grid select, .sup-sheet .rep-bar select, .sup-sheet [id$=grid] select, .sup-sheet [id$=grid] input { min-width: 0 !important; margin-top: 0 !important; }
.sup-sheet table.grid .f { min-width: 60px !important; }
.sup-sheet table.grid input.cell, .sup-sheet table.grid select.cell { min-width: 80px !important; }

/* Texte toujours blanc dans les messages (la classe .err mettait le texte en rouge sur fond rouge) */
.toast, .toast.err, .toast.ok, .toast.info { color: #fff; }
.phys-locked { display: inline-block; min-width: 60px; text-align: center; padding: 6px 10px; background: #eef1f6; border-radius: 6px; }

.menu-item.open .drop { display: block; }
.menu-top[role=button] { cursor: pointer; }

/* Codes du fichier fournisseur + rapport */
.codes-group { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0 16px; overflow: hidden; }
.codes-head { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; background: #eef3fd; }
table.codes { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.codes th { text-align: left; font-size: 12px; color: #5b6475; padding: 8px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
table.codes td { padding: 7px 14px; border-bottom: 1px solid #eef1f6; vertical-align: middle; overflow-wrap: anywhere; }
table.codes tr:last-child td { border-bottom: 0; }
table.codes th:nth-child(1) { width: 22%; } table.codes th:nth-child(2) { width: 30%; } table.codes th:nth-child(3) { width: 26%; }
table.codes .ex { color: #33415c; font-size: 13px; }
.code-chip { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: #fff; border: 1px solid #b9c8e6; color: #1a3e8f; border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.code-chip:hover { background: #e3ebff; }
.file-out { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; font-size: 13px; overflow-x: auto; white-space: pre; }
.chart-wrap { position: relative; }
.chart-tip { position: absolute; background: #fff; border: 1px solid #b9c8e6; border-radius: 6px; padding: 7px 10px; font-size: 13px; box-shadow: 0 6px 18px rgba(20, 30, 80, .15); pointer-events: none; white-space: nowrap; z-index: 5; }
svg.bars rect { cursor: pointer; }
svg.bars text.val { fill: #1a3e8f; font-weight: 600; }
.rep-table { margin-top: 14px; }
.rep-table tr.click { cursor: pointer; }
.rep-table tr.click:hover > td { background: #f2f6ff; }
.rep-detail > td { background: #f8faff; padding: 6px 14px 12px 28px !important; }
.rep-table td.num, .rep-table td.small { white-space: nowrap; }

#toasts, .toasts { z-index: 100000 !important; }

/* Page d'un retour fournisseur */
.ret-head { gap: 16px; }
.rt-tabs { display: flex; gap: 6px; border-bottom: 2px solid #dbe4f5; margin: 6px 0 16px; }
.rt-tabs button { border: 0; background: #e6efff; color: var(--navy); padding: 10px 18px; border-radius: 8px 8px 0 0; cursor: pointer; font-weight: 600; font-size: 14px; }
.rt-tabs button.active { background: linear-gradient(90deg, #1452b8, #2468c8); color: #fff; }
.rt-tabs button:disabled { opacity: .45; cursor: not-allowed; }
.ret-history td { padding: 9px 12px; vertical-align: top; }
.nowrap { white-space: nowrap; }

/* Besoins d'approvisionnement : tableau compact qui tient sur un petit écran */
.page-achats-reappro table.grid { table-layout: fixed; font-size: 13px; }
.page-achats-reappro table.grid thead tr:first-child th { padding: 10px 7px; font-size: 13px; white-space: normal; line-height: 1.15; vertical-align: middle; }
.page-achats-reappro table.grid tr.filters th { padding: 7px 6px; }
.page-achats-reappro table.grid .f { min-width: 0; padding: 5px 4px; font-size: 12px; }
.page-achats-reappro table.grid td { padding: 7px; vertical-align: middle; overflow-wrap: anywhere; line-height: 1.3; }
.page-achats-reappro table.grid td.img { width: 54px; }
.page-achats-reappro table.grid td.img img, .page-achats-reappro .noimg { width: 40px; height: 40px; }
.page-achats-reappro .qtybox { gap: 4px; }
.page-achats-reappro .qtybox input.edit { width: 46px; padding: 6px 2px; }
.page-achats-reappro .qtybox .btn { min-width: 30px; padding: 4px 7px; }
.page-achats-reappro .sales { gap: 4px; }
.page-achats-reappro .sales span { min-width: 42px; padding: 3px 4px; }
.page-achats-reappro .sales.hd span { background: #fff; }
.page-achats-reappro .sales.hd i { font-style: normal; font-weight: 600; font-size: 10px; color: var(--ink, #1b2a6b); }
.page-achats-reappro table.grid td select.q-sup { width: 100%; max-width: none; font-size: 12.5px; }
.page-achats-reappro .status { white-space: normal; text-align: center; display: inline-block; font-size: 12px; padding: 3px 7px; }
.page-achats-reappro table.grid td { font-size: 13px; }
.page-achats-reappro table.grid td.bc { white-space: nowrap; overflow-wrap: normal; font-size: 12.5px; }
.page-achats-reappro .f-extra { display: block; font-weight: 400; font-size: 12px; margin-top: 5px; text-align: left; }
.page-achats-reappro .f-extra.check { display: flex; align-items: center; gap: 5px; }
.page-achats-reappro .f-extra.check input.f { width: auto; min-width: 0; display: inline-block; margin: 0; }
.page-achats-reappro .sup-line { display: flex; gap: 5px; align-items: flex-start; font-size: 12.5px; line-height: 1.3; margin-bottom: 4px; font-weight: 400; }
.page-achats-reappro .sup-line.pick { cursor: pointer; }
.page-achats-reappro .sup-line input { margin: 2px 0 0; flex: none; }
.page-achats-reappro .sup-primary { font-weight: 700; text-decoration: underline; }
/* Bouton avec liste déroulante (choix du fournisseur ou de la commande) */
.dd { position: relative; display: inline-block; }
.dd-menu { display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 100%; width: max-content; max-width: 420px; max-height: 60vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 30, 70, .18); padding: 4px 0; }
.dd-menu.open { display: block; }
.dd-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 16px; font: inherit; cursor: pointer; color: inherit; }
.dd-menu button:hover { background: #eef2fb; }
.page-achats-reappro .sales { gap: 6px; }
.page-achats-reappro .sales span { flex: 1; min-width: 0; }
.page-achats-reappro .sales.hd span { padding: 4px 2px; }
.page-achats-reappro .sales.hd i { font-size: 9.5px; }

/* Fiche commande fournisseur en page complète */
.status.wait { color: #8a5a00; border-color: #e6c36a; background: #fff4d1; }
.po-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 6px 0 18px; }
.po-tile { background: #eef0f4; border-radius: 8px; padding: 14px 10px; text-align: center; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.po-tile span { font-weight: 600; font-size: 13px; color: var(--muted); }
.po-tile b { font-size: 15px; }
.po-tabs { flex-wrap: wrap; }
.po-pane { padding: 18px 0 90px; }
.po-sec { color: var(--blue); text-transform: uppercase; font-size: 14px; letter-spacing: .03em; border-bottom: 1px solid #b9cdf3; padding-bottom: 6px; margin: 18px 0 14px; }
.po-pane > .po-sec:first-child { margin-top: 0; }
.po-form { display: grid; grid-template-columns: repeat(2, minmax(260px, 460px)); gap: 14px 40px; }
.po-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; }
.po-form label .ro { font-weight: 400; padding: 8px 0; }
.po-form label .muted { font-weight: 400; }
.po-form input, .po-form select, .po-form textarea { min-width: 0; width: 100%; }
.po-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(20, 30, 70, .08); padding: 12px 34px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 900px) { .po-tiles { grid-template-columns: repeat(3, 1fr); } .po-form { grid-template-columns: 1fr; } }

/* Onglet « Ajouter des produits » d'une commande fournisseur */
.po-add table.grid { table-layout: fixed; font-size: 13px; }
.po-add table.grid thead tr:first-child th { padding: 10px 7px; font-size: 13px; white-space: normal; line-height: 1.15; vertical-align: middle; }
.po-add table.grid tr.filters th { padding: 7px 6px; }
.po-add table.grid .f { min-width: 0; padding: 5px 4px; font-size: 12px; }
.po-add table.grid td { padding: 7px; vertical-align: middle; overflow-wrap: anywhere; line-height: 1.3; }
.po-add table.grid td.img { width: 54px; }
.po-add table.grid td.img img, .po-add .noimg { width: 40px; height: 40px; }
.po-add .qtybox { gap: 4px; }
.po-add .qtybox input.edit { width: 46px; padding: 6px 2px; }
.po-add .qtybox .btn { min-width: 30px; padding: 4px 7px; }
.po-add .sales { gap: 4px; }
.po-add .sales span { min-width: 42px; padding: 3px 4px; }
.po-add .sales.hd span { background: #fff; }
.po-add .sales.hd i { font-style: normal; font-weight: 600; font-size: 10px; color: var(--ink, #1b2a6b); }
.po-add table.grid td select.q-sup { width: 100%; max-width: none; font-size: 12.5px; }
.po-add .status { white-space: normal; text-align: center; display: inline-block; font-size: 12px; padding: 3px 7px; }
.po-add table.grid td { font-size: 13px; }
.po-add table.grid td.bc { white-space: nowrap; overflow-wrap: normal; font-size: 12.5px; }
.po-add .f-extra { display: block; font-weight: 400; font-size: 12px; margin-top: 5px; text-align: left; }
.po-add .f-extra.check { display: flex; align-items: center; gap: 5px; }
.po-add .f-extra.check input.f { width: auto; min-width: 0; display: inline-block; margin: 0; }
.po-add .sup-line { display: flex; gap: 5px; align-items: flex-start; font-size: 12.5px; line-height: 1.3; margin-bottom: 4px; font-weight: 400; }
.po-add .sup-line.pick { cursor: pointer; }
.po-add .sup-line input { margin: 2px 0 0; flex: none; }
.po-add .sup-primary { font-weight: 700; text-decoration: underline; }
.po-add .sales { gap: 6px; }
.po-add .sales span { flex: 1; min-width: 0; }
.po-add .sales.hd span { padding: 4px 2px; }
.po-add .sales.hd i { font-size: 9.5px; }
.po-add { display: flex; gap: 18px; align-items: flex-start; }
.po-add-grid { flex: 1; min-width: 0; }
.po-add-sel { width: 290px; flex: none; position: sticky; top: 10px; }
.po-add-sel h3 { margin: 0 0 8px; }
.po-add-sel .btn { width: 100%; margin-top: 10px; white-space: normal; }
.po-add input.a-qty { padding: 6px 2px; }
.po-prod-bar { margin-bottom: 8px; align-items: center; }
.po-lines input { min-width: 0; }
.po-lines td { vertical-align: middle; }
@media (max-width: 1100px) { .po-add { flex-direction: column; } .po-add-sel { width: 100%; position: static; } }
.po-add-sel { width: 330px; }
.po-add-sel input.s-qty { width: 52px; padding: 5px 2px; }
.po-add-sel input.s-price { width: 78px; padding: 5px 4px; }
.po-add-sel td { vertical-align: middle; }

/* Filtre à cocher (plusieurs valeurs), ex. fournisseurs */
.f-multi { position: relative; }
.f-multi-btn { width: 100%; text-align: left; padding: 5px 20px 5px 6px; border: 1px solid #b9c3d6; border-radius: 4px; background: #fff; font: inherit; font-size: 12.5px; font-weight: 400; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; color: var(--muted); }
.f-multi-btn::after { content: '▾'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: #555; }
.f-multi-btn.on { color: inherit; font-weight: 600; border-color: var(--blue); }
.f-multi-menu { display: none; position: absolute; right: 0; top: calc(100% + 3px); z-index: 40; width: max-content; min-width: 100%; max-width: 340px; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 30, 70, .18); padding: 6px 0; text-align: left; }
.f-multi.open .f-multi-menu { display: block; }
.f-multi-menu label { display: flex; gap: 8px; align-items: center; padding: 7px 12px; font-weight: 400; font-size: 13px; cursor: pointer; white-space: nowrap; }
.f-multi-menu label:hover { background: #eef2fb; }
.f-multi-menu input { width: auto; min-width: 0; margin: 0; }
.grid-wrap:has(.f-multi.open) { min-height: 470px; }

/* Onglet Produits d'une commande fournisseur : vrai tableau (en-tête bleu, colonnes séparées, lignes alternées).
   Les colonnes prennent la largeur de leur contenu : sur un grand écran tout est aéré, sur un petit les titres passent sur deux lignes. */
table.po-lines { table-layout: auto; width: 100%; font-size: 13px; }
table.po-lines thead tr:first-child th { padding: 10px 12px; font-size: 13px; white-space: normal; line-height: 1.2; vertical-align: middle; }
table.po-lines thead th.num { text-align: right; }
table.po-lines td { padding: 8px 12px; font-size: 13px; vertical-align: middle; line-height: 1.35; }
table.po-lines td:first-child, table.po-lines th:first-child { padding: 6px 8px; width: 40px; }
table.po-lines td:last-child, table.po-lines th:last-child { padding: 6px 6px; width: 30px; }
table.po-lines td.c-sku { min-width: 104px; overflow-wrap: anywhere; }
table.po-lines td.c-name { min-width: 150px; }
table.po-lines td.bc, table.po-lines td.nowrap { white-space: nowrap; }
table.po-lines td input { min-width: 0; padding: 6px 6px; border: 1px solid #b9c3d6; border-radius: 4px; font-size: 13px; }
table.po-lines td.num input { text-align: right; }
table.po-lines input.l-ref { width: 64px; }
table.po-lines input.l-com { width: 112px; }
table.po-lines input.l-qty, table.po-lines input.r-qty { width: 66px; }
table.po-lines input.l-price { width: 84px; }
table.po-lines input.l-disc { width: 56px; }
table.po-lines td input.missing { border-color: var(--red, #d93a3a); background: #fff1f1; }
table.po-lines td img.thumb { width: 34px; height: 34px; object-fit: contain; display: block; }
table.po-lines tr.done-row td { background: #eefaf1; }
table.po-lines .l-del { padding: 2px 4px; }
/* Écran plus étroit : mêmes colonnes, simplement plus serrées pour éviter la barre de défilement. */
@media (max-width: 1460px) {
  table.po-lines thead tr:first-child th, table.po-lines td { padding-left: 6px; padding-right: 6px; }
  table.po-lines thead tr:first-child th { font-size: 12.5px; }
  table.po-lines input.l-ref { width: 52px; }
  table.po-lines input.l-com { width: 88px; }
  table.po-lines input.l-qty, table.po-lines input.r-qty { width: 56px; }
  table.po-lines input.l-price { width: 72px; }
  table.po-lines input.l-disc { width: 48px; }
  table.po-lines td.c-sku { min-width: 96px; }
  table.po-lines td.c-name { min-width: 130px; }
}

/* Écran de réception d'une commande fournisseur */
.rc-top { display: flex; gap: 30px; align-items: flex-start; margin: 4px 0 16px; flex-wrap: wrap; }
.rc-scan { flex: 1; min-width: 320px; display: flex; flex-direction: column; gap: 8px; }
.rc-scan input.scan { max-width: 520px; }
.rc-count { font-size: 17px; line-height: 1.9; min-width: 240px; }
.rc-count b { font-size: 19px; }
table.rc-lines { font-size: 13px; }
table.rc-lines thead tr:first-child th { padding: 10px 8px; font-size: 13px; white-space: normal; line-height: 1.2; vertical-align: middle; }
table.rc-lines thead th.num { text-align: right; }
table.rc-lines td { padding: 8px; font-size: 13px; vertical-align: middle; line-height: 1.35; }
table.rc-lines td.bc { white-space: nowrap; }
table.rc-lines td.c-sku { min-width: 100px; overflow-wrap: anywhere; }
table.rc-lines td.c-name { min-width: 150px; }
table.rc-lines td img.thumb { width: 34px; height: 34px; object-fit: contain; display: block; }
table.rc-lines input.r-loc { width: 84px; min-width: 0; padding: 6px; border: 1px solid #b9c3d6; border-radius: 4px; text-align: center; }
table.rc-lines input.r-qty { width: 56px; padding: 6px 2px; }
table.rc-lines input.r-bad { width: 52px; padding: 6px 2px; }
.rc-qty { display: flex; gap: 4px; align-items: center; }
.rc-qty .btn { min-width: 30px; padding: 4px 7px; font-weight: 700; }
table.rc-lines tr.done-row td { background: #eefaf1; }
table.rc-lines .status { white-space: nowrap; }
.page-achats-reception { padding-bottom: 90px; }
.rc-scan input.scan { flex: none; height: 46px; min-height: 0; font-size: 16px; padding: 8px 14px; width: 100%; }

/* Onglet Réceptions d'une commande fournisseur */
table.rec-list td { vertical-align: top; }
table.rec-list td.rec-det div { line-height: 1.5; }
table.rec-list tr.rec-cancelled td { background: #fbf1f1 !important; color: #8a8f9c; }
table.rec-list tr.rec-cancelled td.rec-det, table.rec-list tr.rec-cancelled td.num { text-decoration: line-through; }
table.rc-lines .r-sn { margin-top: 4px; padding: 3px 8px; font-size: 12px; }

/* Tous les petits tableaux (« mini ») sont de vrais tableaux : en-tête bleu, colonnes séparées, lignes alternées.
   Plus lisible dès qu'il y a beaucoup de texte. */
table.mini { border: 1px solid #d5ddec; border-radius: 6px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.mini th { background: linear-gradient(90deg, var(--head1), var(--head2)); color: #fff; font-size: 13px; font-weight: 600; padding: 9px 10px; border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, .18); vertical-align: middle; }
table.mini th.num { text-align: right; }
table.mini th:last-child { border-right: 0; }
table.mini td { padding: 8px 10px; border-bottom: 1px solid #e3e8f2; border-right: 1px dashed #d8e0ee; }
table.mini td:last-child { border-right: 0; }
table.mini tbody tr:last-child td, table.mini > tr:last-child td { border-bottom: 0; }
table.mini tbody tr:nth-child(even) td { background: var(--row-alt); }
table.mini tfoot td { background: #f3f6fb; border-top: 1px solid #d5ddec; border-right: 0; font-weight: 600; }
table.mini tr.done-row td { background: #eefaf1; }
table.mini td.empty { background: #fff; }

table.rec-list .rec-line { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 2px 0; }
table.rec-list .rec-fix { flex: none; padding: 1px 8px; font-size: 12px; }
.fix-sn { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; margin: 8px 0 12px; }
table.rc-lines .r-sn { margin-top: 0; white-space: nowrap; }
.stats.wide small { display: block; font-size: 11.5px; font-weight: 400; }

/* Vue d'ensemble d'un produit : toutes les cases sur une seule ligne */
.stats.wide { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.stats.wide > div { padding-left: 6px; padding-right: 6px; }
.stats.wide > div span { font-size: 12.5px; }
.stats.wide > div b { font-size: 19px; white-space: nowrap; }

.att-add { gap: 10px; align-items: center; margin: 10px 0 4px; flex-wrap: wrap; }
.att-add input#att-label { width: 280px; min-width: 0; }

.ret-done { cursor: pointer; display: inline-block; margin-top: 4px; white-space: normal; }
.bl-hide { display: none !important; }

a.il { color: inherit; text-decoration: inherit; font: inherit; }

.lb-model { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 12px; border: 1px solid var(--line, #d9dee7); border-radius: 8px; padding: 8px 12px; }
.lb-model label { display: flex; align-items: center; gap: 6px; margin: 0; }
.lb-model select { width: auto; }

.hist { padding: 14px 16px; }
.hist-bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hist-bar label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.hist-bar input[type=date], .hist-bar select { width: auto; }
#h-chart { position: relative; }
.hist-svg { width: 100%; height: auto; display: block; }
.hist-svg .hg { stroke: #e3e7ee; stroke-width: 1; }
.hist-svg .ht { font-size: 12px; fill: #7a8394; }
.hist-svg .hl { fill: none; stroke: #2a78d6; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.hist-svg .ha { fill: #2a78d6; opacity: .1; }
.hist-svg .hd { fill: #2a78d6; stroke: #fff; stroke-width: 2; }
.hist-svg .hc { stroke: #9aa3b2; stroke-width: 1; stroke-dasharray: 4 3; }
.hist-tip { position: absolute; background: #1d2b4f; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; pointer-events: none; width: 180px; line-height: 1.5; }
.pv-frame { width: 100%; height: 68vh; border: 1px solid #d9dee7; border-radius: 8px; background: #f3f5f9; }

.rcf { padding: 14px 16px; margin-bottom: 14px; }
.rcf-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.rcf-row:last-child { margin-bottom: 0; }
.rcf-row > label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 12px; font-weight: 600; min-width: 150px; }
.rcf-row > label.check, .rcf-row > label.inl { flex-direction: row; align-items: center; min-width: 0; font-size: 13px; font-weight: 400; gap: 6px; }
.rcf-row > label.inl input { width: 80px; }
.rcf-ebay { background: #f2f5fb; border-radius: 8px; padding: 10px 12px; align-items: center; }
.rcf .f-multi-btn { padding: 8px 24px 8px 10px; font-size: 13px; min-width: 170px; }
.rcf .f-multi-menu { left: 0; right: auto; }
.kpi b small { font-size: 12px; font-weight: 600; color: var(--muted); }
.badge.soft { background: #e6ebf5; color: #44506a; }
.rc-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 6px 0 0; overflow-x: auto; }
.rc-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 34px; flex: 1; max-width: 60px; }
.rc-bar span { display: block; width: 100%; max-width: 24px; background: #2a78d6; border-radius: 4px 4px 0 0; }
.rc-bar small { font-size: 11px; color: var(--muted); }
.badge.warn { background: #f6c453; color: #5a3d00; }
.rcf-row[hidden], .rcf-row > label[hidden] { display: none; }
#c-grid .grid-reset, #c-grid .grid-search { display: none; }

.imp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 14px 0; }
.imp-tile { text-align: left; background: #fff; border: 1px solid #d9dee7; border-radius: 10px; padding: 14px 16px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 6px; }
.imp-tile:hover, .imp-tile.on { border-color: var(--blue); background: #f2f6ff; }
.imp-tile b { color: var(--navy); font-size: 15px; }
.imp-tile span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.imp-card { padding: 16px 18px; }
.imp-opt { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0; }
.imp-opt label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 12px; font-weight: 600; }
.imp-opt label[hidden] { display: none; }
.err-text { color: #c0392b; }
.menu-item.closing .drop { display: none !important; }

.mail-card { padding: 20px 24px; max-width: 980px; }
.mail-card .mail-h { margin: 22px 0 6px; font-size: 15px; color: var(--navy); border-bottom: 1px solid #e3e7ee; padding-bottom: 6px; }
.mail-card .row3 { gap: 16px 20px; margin-bottom: 4px; }
.mail-card label { font-size: 13px; font-weight: 600; margin: 10px 0; }
.mail-card label.check { font-weight: 400; margin: 16px 0; }
.mail-card .row3 select { min-width: 0; width: 100%; box-sizing: border-box; }
.mail-card .mail-actions { display: flex; gap: 12px; margin: 18px 0 14px; }
.mail-card p.small { line-height: 1.6; }
.po-filter { display: flex; gap: 16px; align-items: center; margin: 4px 0 10px; }
.po-filter label { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 600; font-size: 13px; }
.po-filter select { width: auto; }

table.grid.compact th, table.grid.compact td { padding: 8px 10px; font-size: 13px; }
table.grid.compact .th-sub { font-size: 11px; font-weight: 400; opacity: .85; }
table.grid.compact .status { font-size: 11.5px; padding: 3px 8px; }

.kpis.kpis-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.kpis.kpis-row .kpi { padding: 10px 12px; }
.kpis.kpis-row .kpi span { font-size: 11.5px; line-height: 1.3; min-height: 30px; }
.kpis.kpis-row .kpi b { font-size: 17px; white-space: nowrap; }
table.grid.compact th, table.grid.compact td { padding: 7px 8px; font-size: 12.5px; }
table.grid.compact th { line-height: 1.25; white-space: normal; }

table.grid.compact th, table.grid.compact td { padding: 7px 6px; font-size: 12px; }
table.grid.compact td:nth-child(4) a { word-break: break-all; }
table.grid.compact .status { font-size: 11px; padding: 2px 6px; white-space: nowrap; }
table.grid.compact thead tr:first-child th { padding: 9px 6px; font-size: 12px; white-space: normal; line-height: 1.2; vertical-align: middle; }

/* Logos des transporteurs fournis avec l'outil */
.carrier.logo { background: none; padding: 0; vertical-align: middle; }
.carrier.logo img { width: 60px; height: 40px; object-fit: contain; display: block; }
.clogo .carrier.logo img { display: block; }
.carrier.logo img, .clogo img { mix-blend-mode: multiply; }
.carrier[data-tip] { cursor: help; }

/* Logo + nom de l'outil (Gestio) côte à côte */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo.big { display: flex; flex-direction: column; gap: 4px; }
.logo.big .brand-img { margin: 0 auto; max-height: 84px; }
.logo .brand-img { max-height: 46px; }
.logo.big .brand-img { max-height: 84px; }

/* Onglet Intégration : barre commune, tableau des flux */
.int-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.int-tabs a { padding: 7px 14px; border-radius: 18px; background: #eef3fb; color: var(--navy); font-size: 14px; text-decoration: none; }
.int-tabs a.active { background: var(--navy); color: #fff; }
.flux-table td { vertical-align: middle; }
.flux-table select { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.flux-group td { background: var(--navy); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .3px; padding: 11px 14px; border-top: 3px solid #fff; }
table.grid.flux-table tbody tr.flux-group:hover td { background: var(--navy); }
.flux-off td { color: var(--muted); background: #fafbfc; }
.flux-mini td { padding: 4px 10px; border: 0; }

/* Message flottant : erreur sur une boutique (en haut, au centre) */
#store-alert { position: fixed; top: 3px; left: 50%; transform: translateX(-50%); z-index: 450; background: #fde8e6; color: #7a1410; border: 1px solid #e58a84; border-radius: 6px; padding: 3px 18px; font-size: 14px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
#store-alert.under-banner { top: 32px; }
#store-alert:hover { background: #fbd5d1; }
.top-right .menu-item.user, .top-right .menu-item.user > * { white-space: nowrap; flex-shrink: 0; }
.top-right .sync-dot { flex-shrink: 0; }

/* Intégration : tableau du haut (compteurs) */
.int-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 4px 0 18px; }
.int-tile { display: block; background: #eef3fb; border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--navy); border: 1px solid transparent; }
.int-tile:hover { border-color: #b9cbee; }
.int-tile span { display: block; font-size: 13px; color: #55607a; min-height: 34px; }
.int-tile b { display: block; font-size: 26px; line-height: 1.2; }
.int-tile small { display: block; font-size: 12px; color: #6b7590; }
.int-tile.bad { background: #fde8e6; color: #7a1410; }
.int-tile.bad span, .int-tile.bad small { color: #7a1410; }

/* Commande fournisseur : produit non relié au fournisseur */
.unlinked-tag { font-size: 11.5px; color: #a15c00; white-space: nowrap; margin-top: 2px; }
.warn-box .btn { margin-left: 8px; }
.d-out { white-space: nowrap; }
#backup-due { position: fixed; right: 14px; bottom: 12px; z-index: 440; background: #fff6d6; color: #5c4500; border: 1px solid #e6c65c; border-radius: 6px; padding: 5px 14px; font-size: 13px; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
#backup-due:hover { background: #ffefb8; }
.rule-form fieldset { border: 1px solid var(--line, #dfe5f2); border-radius: 8px; padding: 8px 14px 4px; margin: 10px 0; }
.rule-form fieldset legend { font-weight: 600; font-size: 13px; padding: 0 6px; }
.rule-form h3 { margin: 18px 0 6px; }
.rule-checks { column-gap: 22px; }
.rule-checks label.check { break-inside: avoid; font-weight: 400; margin: 2px 0; }
.rule-countries { max-height: 230px; overflow: auto; border: 1px solid var(--line, #dfe5f2); border-radius: 6px; padding: 6px 10px; margin-top: 8px; }
.rule-form label > span.row { gap: 6px; margin: 0; } .rule-form label > span.row input { min-width: 0; }
#rules tr.click { cursor: pointer; }
.rule-form .row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin: 8px 0; }
.rule-form > label, .rule-form .row3 > label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.rule-form input:not([type=checkbox]), .rule-form select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; color: var(--text, #1b2440); min-width: 0; width: 100%; box-sizing: border-box; }
.rule-form fieldset .row input#c-find { width: 220px; }
.rule-form label > span.row { display: flex; }
.rule-form .rule-checks label.check { color: var(--text, #1b2440); font-size: 14px; }

.meth b { display: block; font-weight: 600; line-height: 1.3; }
.meth small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.meth small.meth-todo { color: #b3261e; font-weight: 600; }
.qbtns button { padding: 0; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 15px; flex: 0 0 32px; letter-spacing: -1px; }

/* Lisibilité : aucune étiquette ou note en dessous de 12 px. */
.badge, .store, .mv.out, .mv.in, .sales i, .tile small, .t-src, .serial-tag, .pay-todo .pill, .rc-bar small, table.grid.compact .th-sub, table.grid.compact .status, .kpis.kpis-row .kpi span, .unlinked-tag, .stats.wide small { font-size: 12px; }
.tile small { opacity: .95; }
small, small.muted { font-size: 12px; }
.page-achats-reappro .sales.hd i, .po-add .sales.hd i { font-size: 11px; }
.int-tile small { color: #55607a; }
svg.bars text { font-size: 12px; }

/* Message d'erreur des boutiques : bande pleine largeur, toujours visible en haut, qui ne recouvre plus rien. */
#store-alert, #store-alert.under-banner { position: sticky; top: 0; left: auto; transform: none; display: block; box-sizing: border-box; height: 28px; line-height: 20px; padding: 3px 18px; max-width: none; width: 100%; text-align: center; border-radius: 0; border-width: 0 0 1px; box-shadow: none; z-index: 61; font-weight: 600; }
body.has-alert .test-banner { top: 28px; }
body.has-alert .top { top: 28px; }
body.has-alert .test-banner + .top { top: 57px; }
/* Préparation : « −− Qté préparée ++ » centré au-dessus des boutons de chaque ligne, signes bien séparés. */
.qbtns.hd { display: flex; justify-content: center; }
.qbtns button { letter-spacing: 0; font-size: 13px; }

/* Commandes en partiel et restes à rembourser */
.rem-tag { display: inline-block; margin-top: 4px; background: #fde8e8; color: #9b1c1c; border: 1px solid #f3b4b4; border-radius: 5px; padding: 1px 7px; font-size: 12px; font-weight: 600; }
.rem-back { background: #fff3cd; color: #6b4e00; border-radius: 4px; padding: 0 5px; font-size: 12px; white-space: nowrap; }
.prep-hint { margin: 0 0 10px; max-width: 1100px; }
.short-box { margin: 12px 0; background: #fff6e0; border: 1px solid #e5c56a; color: #5c4500; border-radius: 8px; padding: 10px 14px; font-size: 14px; line-height: 1.5; }

.prep-lock { margin: 10px 0 14px; background: #fde8e8; border: 1px solid #e9a3a3; color: #8a1616; border-radius: 8px; padding: 10px 14px; font-size: 14px; }
/* Écran de préparation : textes centrés (en-têtes, quantités, emplacement, statut) ; SKU, code-barres et produit restent à gauche. */
table.st-lines th, table.st-lines th.num { text-align: center; }
table.st-lines td, table.st-lines td.num { text-align: center; }
table.st-lines td:nth-child(5), table.st-lines td:nth-child(6), table.st-lines td:nth-child(8) { text-align: left; }
table.st-lines td img, table.st-lines td .noimg { display: block; margin: 0 auto; }
.st-cells div { justify-content: center; align-items: center; }
.st-cells .meth { border: 0; padding: 0; }
.mod-state { display: inline-block; margin-left: 12px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.16); color: #fff; }
.mod-state.ok { background: #d9f2e3; color: #0f5f33; } .mod-state.ko { background: #fde2e2; color: #8f1d1d; } .mod-state.warn { background: #fdf0cf; color: #6b4a00; }
.refresh-state { font-size: 13px; font-weight: 600; margin-right: 12px; } .refresh-state.ok { color: var(--ok); } .refresh-state.ko { color: var(--err); }
.spin { display: inline-block; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.img-zoom { position: fixed; z-index: 9999; width: 340px; height: 340px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 30, 60, .25); padding: 8px; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.img-zoom img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.prep-st.ready { background: #e2ecff; color: #1a3e8f; }
/* Logo transporteur centré dans sa colonne, pastille TEST centrée dessous. */
.logo-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.logo-cell .carrier, .logo-cell .clogo { margin: 0 auto; }
td.center .meth { text-align: center; }

/* ---------- 28/11 : fiches à onglets en haut, tableaux resserrés ---------- */
/* Fiche produit et fiche fournisseur : onglets en ligne en haut (comme la fiche commande), contenu sur toute la largeur. */
.fiche, .tabs-side.sup-sheet { display: block; }
.fiche .side-tabs, .sup-sheet .side-tabs { flex-direction: row; flex-wrap: wrap; gap: 6px; position: static; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.fiche .side-tabs .side-title { display: none; }
.fiche .side-tabs button, .sup-sheet .side-tabs button { padding: 10px 14px; border-radius: 6px; white-space: nowrap; }
.modal.xwide { width: 1500px; }
/* Édition en masse : la case remplit sa colonne. */
table.grid input.edit { width: 100%; min-width: 90px; box-sizing: border-box; } table.grid input.edit.wide { width: 100%; min-width: 140px; }
.qtybox input.edit, .page-achats-reappro .qtybox input.edit, .po-add .qtybox input.edit { min-width: 0; }
.qtybox input.edit { width: 70px; } .page-achats-reappro .qtybox input.edit, .po-add .qtybox input.edit { width: 46px; }
/* Tableaux courts : pas étirés sur tout l'écran, lignes moins hautes. */
.card.narrow { max-width: 980px; } .card.narrow.wide2 { max-width: 1240px; }
table.grid.compact th { padding-top: 9px; padding-bottom: 9px; line-height: 1.25; }
table.grid.compact td { padding-top: 6px; padding-bottom: 6px; }
table.grid.fit th, table.grid.fit td { padding-left: 10px; padding-right: 10px; }
table.grid th.center { text-align: center; }
.okmark { color: #8a93a6; font-weight: 700; }
tr.row-gap td { background: #fdecec !important; }
.status-map { width: auto; max-width: 1100px; }
.status-map th, .status-map td { padding: 5px 12px !important; vertical-align: middle; }
.status-map td.cat-help { max-width: 420px; }
.status-map select.cat { min-width: 250px !important; }

.status-map select.cat.todo { background: #fff7dc; border-color: #d9a400; }
td.s-price { white-space: nowrap; }
.status-map { width: auto !important; max-width: 100%; }
.status-map select.cat { width: 270px !important; min-width: 270px !important; }
.status-map td.cat-help { max-width: none; white-space: nowrap; }
.status-map td:first-child { white-space: nowrap; padding-right: 28px !important; }

/* 29/11 – commande fournisseur : dernier prix payé et écart de coût */
table.po-lines td input.gap { border-color: #e08a00; background: #fff6e5; }
table.po-lines .gap-note { color: #b36b00; font-size: 12px; white-space: nowrap; margin-top: 3px; }
table.po-lines .lp-col { background: #f6f9ff; }
table.po-lines th.lp-col .btn { margin-top: 4px; white-space: nowrap; }
table.po-lines td.lp-col .btn { display: block; margin: 3px 0 0 auto; }
.lp-toggle { margin-left: 18px; }

/* 29/11 – double authentification */
.auth-step { font-size: 14px; color: var(--ink); background: #eef4ff; border-radius: 8px; padding: 10px 12px; margin: 14px 0 4px; }

/* 30/11 – déconnexion automatique */
.idle-warn { position: fixed; inset: 0; z-index: 9999; background: rgba(15, 25, 60, .45); display: flex; align-items: center; justify-content: center; }
.idle-warn > div { background: #fff; border-radius: 14px; padding: 26px 30px; width: 380px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.idle-warn b { font-size: 18px; color: var(--ink); }
.idle-warn p { margin: 10px 0 18px; color: var(--muted); }

/* 30/11 – barres d'outils (recherche, menus) au même style que le reste ; conseil de commande */
.toolbar { align-items: center; gap: 14px; margin-bottom: 12px; }
.toolbar .tb-search, .toolbar .tb-field select { height: 38px; padding: 0 12px; border: 1px solid #b9c3d6; border-radius: 8px; background: #fff; font: inherit; color: var(--ink); }
.toolbar .tb-search { width: 260px; padding-left: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237a869f' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E") no-repeat 11px center; }
.toolbar .tb-field { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.toolbar .tb-field select { min-width: 280px; font-weight: 400; }
.toolbar .tb-search:focus, .toolbar .tb-field select:focus { outline: none; border-color: var(--blue, #2f5fd0); box-shadow: 0 0 0 3px rgba(47, 95, 208, .15); }
.advice-n { font-size: 15px; }
.advice-why { line-height: 1.25; margin-top: 2px; }
#thr-f .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#thr-f .two input { min-width: 0; width: 100%; }
#thr-f label.check { display: flex; align-items: center; gap: 9px; margin: 8px 0; font-weight: 400; }
#thr-f input[type=radio] { display: inline-block; min-width: 0; width: auto; margin: 0; padding: 0; flex: none; }

/* 30/11 – code du point relais dans la tuile Méthode de livraison */
.tile .tile-relay { display: block; margin-top: 10px; font-size: 15px; font-weight: 400; cursor: pointer; }
.tile .tile-relay b { display: inline; font-size: 16px; }
.tile .tile-relay.missing b { background: #ffd9a8; color: #6b3d00; border-radius: 5px; padding: 1px 7px; }

/* 30/11 – case « tous les employés » dans l'onglet Préparation en cours */
.grid-bar .show-all { margin-left: 18px; white-space: nowrap; }

/* 30/11 – plus aucun champ « brut » : style de base pour toutes les cases et tous les menus qui n'en avaient pas.
   (:where = priorité nulle : les pages qui ont déjà leur propre style le gardent.) */
:where(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]):not([type=hidden]), select, textarea) {
  padding: 7px 10px; border: 1px solid #b9c3d6; border-radius: 8px; background-color: #fff; font: inherit; color: inherit; box-sizing: border-box;
}
:where(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]), select, textarea):focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 87, 197, .15); }
:where(input[type=color]) { width: 44px; height: 32px; padding: 2px; border: 1px solid #b9c3d6; border-radius: 8px; background: #fff; cursor: pointer; }
/* Barres au-dessus des tableaux resserrés : compteur et pages alignés sur le bord droit du tableau. */
.toolbar.fit-narrow { max-width: 980px; }
.toolbar.fit-wide2 { max-width: 1240px; }
/* Correspondances : de l'air entre un tableau, ses boutons et le bloc suivant ; menus à la même largeur. */
.row.map-actions { margin: 16px 0 34px; align-items: center; }
#chan .c-label { width: 220px; }
#pay select.p-label { min-width: 220px; }
#pay-todo { margin-top: 6px; }
.def-ship { margin-bottom: 16px; }

/* 30/11 – commande fournisseur : les cases « Réf. four. » et « Commentaire » suivent la largeur de l'écran */
table.po-lines td.c-ref { width: 13%; min-width: 150px; }
table.po-lines td.c-com { width: 17%; min-width: 170px; }
table.po-lines input.l-ref, table.po-lines input.l-com { width: 100%; }
@media (max-width: 1500px) { table.po-lines td.c-ref { min-width: 110px; } table.po-lines td.c-com { min-width: 120px; } table.po-lines input.l-ref, table.po-lines input.l-com { width: 100%; } }
/* Historique de ventes : les trois périodes ne se chevauchent plus */
.page-achats-reappro .sales, .po-add .sales { gap: 8px; }
.page-achats-reappro .sales span, .po-add .sales span { flex: 1 1 0; min-width: 0; overflow: hidden; padding: 4px 6px; }
.page-achats-reappro .sales.hd i, .po-add .sales.hd i { font-size: 11px; white-space: nowrap; }
/* Choix d'un fichier : bouton au style de l'outil, partout */
input[type=file] { font: inherit; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid #b9c3d6; border-radius: 999px; padding: 7px 16px; margin-right: 12px; cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--blue); color: var(--blue); }
/* Pièces jointes d'une commande fournisseur */
.att-add { align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.att-add .att-field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13px; }
.att-add #att-label { width: 340px; padding: 9px 12px; font-weight: 400; }

/* Correspondances : les cases et menus suivent leur colonne (jusqu'à une largeur raisonnable) */
#chan .c-label, #ship select, #pay .p-raw, #pay select.p-label { width: 100%; max-width: 520px; min-width: 0; }
#ship select.m-store { max-width: 300px; }

/* 30/11 – une case ne dépasse jamais de sa colonne (la case « Quantité » de « Ajouter des produits » débordait du tableau) */
table.grid td input.edit, table.grid td select.edit { max-width: 100%; box-sizing: border-box; }
.po-add table.grid td input.a-qty { min-width: 0; width: 100%; text-align: center; }

/* 30/11 (soir) – numéros de série à saisir */
.serial-alert { display: inline-block; margin-top: 6px; padding: 5px 10px; border-radius: 6px; background: #fde8e8; border: 1px solid #e06666; color: #a11616; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.serial-alert[data-item] { cursor: pointer; }
.serial-alert[data-item]:hover { background: #fbd5d5; }
/* Commande fournisseur : colonnes de saisie centrées, « Réf. four. » un peu réduite */
table.po-lines td.c-ref { width: 9%; min-width: 120px; }
table.po-lines td.num:has(> input), table.po-lines td.num:has(> input) input { text-align: center; }
table.po-lines td.num:has(> input) .gap-note { text-align: center; }
table.po-lines thead th.th-c { text-align: center; }
/* Ajouter des produits : la case Quantité prend toute sa colonne ; à droite, titres et cases alignés */
.po-add table.grid td:has(> input.a-qty) { padding-left: 6px; padding-right: 6px; }
.po-add table.grid td input.a-qty { width: 100%; max-width: none; min-width: 0; padding: 7px 4px; text-align: center; }
.po-add-sel table th, .po-add-sel table td { text-align: left; }
.po-add-sel table th.num, .po-add-sel table td.num { text-align: center; }
.po-add-sel input.s-qty, .po-add-sel input.s-price { text-align: center; min-width: 0; }
.po-add-sel input.s-qty { width: 60px; }
.po-add-sel input.s-price { width: 84px; }
table.po-lines thead tr th.th-c { text-align: center !important; }

/* 30/11 (soir) – stock dormant : de l'air sous les boutons de durée ; retour fournisseur : colonne code-barres */
.row.dur-row { margin: 6px 0 18px; align-items: center; gap: 12px; }
.row.dur-row + .warn-box, .row.dur-row + .note, .row.dur-row + div { margin-top: 0; }
table.sr-lines td.bc { font-size: 13px; white-space: nowrap; }

/* 30/11 (soir) – commande fournisseur : le bouton d'export respire sous son titre */
.po-export { margin: 18px 0 8px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Lignes terminées : vertes partout (l'alternance bleue une ligne sur deux ne les recouvre plus). */
table.mini tbody tr.done-row td, table.grid tbody tr.done-row td, table.po-lines tbody tr.done-row td, table.rc-lines tbody tr.done-row td, table.st-lines tbody tr.done td { background: #eefaf1; }
/* Réception : colonnes de saisie à la taille de leur contenu, cases centrées. */
table.rc-lines th.c-loc, table.rc-lines td.c-loc, table.rc-lines th.c-rq, table.rc-lines td.c-rq, table.rc-lines th.c-bad, table.rc-lines td.c-bad { width: 1%; white-space: nowrap; text-align: center !important; }
table.rc-lines td.c-loc input.r-loc { display: block; margin: 0 auto; }
table.grid.rc-lines input.edit.r-qty { width: 60px; min-width: 0; flex: 0 0 60px; }
table.grid.rc-lines input.edit.r-bad { width: 60px; min-width: 0; display: block; margin: 0 auto; }
.rc-qty { justify-content: center; }
/* Retour fournisseur : « échangé / remboursé maintenant » avec les mêmes boutons que la réception. */
table.sr-lines th.c-now, table.sr-lines td.c-now { width: 1%; white-space: nowrap; text-align: center; }
table.sr-lines .rc-qty input { width: 54px; min-width: 0; flex: 0 0 54px; padding: 6px 2px; text-align: center; }
/* Réception, retour fournisseur, lignes d'une commande fournisseur : deux couleurs seulement.
   Ligne à traiter = blanche, ligne terminée = verte (pas d'alternance bleue sur ces trois écrans). */
table.rc-lines tbody tr:not(.done-row) td, table.sr-lines tbody tr:not(.done-row) td, table.po-lines tbody tr:not(.done-row) td { background: #fff; }

/* Retour fournisseur : cases de saisie centrées dans leur colonne. */
table.sr-lines th.c-in, table.sr-lines td.c-in { text-align: center; }
table.sr-lines td.c-in input { display: block; margin: 0 auto; text-align: center; }
table.sr-lines td.c-why input { width: 100%; box-sizing: border-box; text-align: left; }
table.sr-lines td.c-now .rc-qty { justify-content: center; }
table.sr-lines td.c-why { min-width: 150px; }

/* Déconnexion automatique : libellé, case et « minutes sans activité » sur une seule ligne. */
.settings label.idle-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; margin: 10px 0; }
.settings label.idle-row input { width: 90px; min-width: 0; flex: 0 0 90px; margin: 0; text-align: center; }
/* Réception et retours : chiffre centré dans la case, sans les flèches du navigateur. */
.rc-qty input[type=number], table.rc-lines input.r-bad { text-align: center; -moz-appearance: textfield; appearance: textfield; padding-left: 2px; padding-right: 2px; }
.rc-qty input[type=number]::-webkit-inner-spin-button, .rc-qty input[type=number]::-webkit-outer-spin-button, table.rc-lines input.r-bad::-webkit-inner-spin-button, table.rc-lines input.r-bad::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Colonne centrée : son titre est centré aussi. */
table.grid thead th.center { text-align: center !important; }

/* Tableau de bord */
.db-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.db-head h3, h3.db-sec { margin: 0; font-size: 15px; color: var(--ink); }
h3.db-sec { margin: 28px 0 12px; }
.db-head .grow { flex: 1; }
.db-head select { width: auto; }
.db-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.db-switch button { border: 0; background: #fff; padding: 7px 14px; font-size: 13px; cursor: pointer; color: var(--ink); }
.db-switch button.on { background: var(--brand, #2447b8); color: #fff; }
.db-rev { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: stretch; }
.db-chart { width: 100%; height: auto; display: block; }
.db-grid { stroke: #e6eaf5; stroke-width: 1; }
.db-axis { font-size: 11px; fill: #6b7392; }
.db-bar { fill: #3b63d6; }
.db-bar:hover { fill: #1f3fa8; }
.db-kpis { display: grid; gap: 12px; align-content: start; }
.db-kpi { background: #f2f5fc; border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; }
.db-kpi span { font-size: 13px; color: var(--muted); }
.db-kpi b { font-size: 24px; }
.db-kpi i { font-style: normal; font-size: 12px; color: var(--muted); }
.db-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
a.db-tile { display: grid; gap: 4px; text-align: center; padding: 16px 12px; border-radius: 12px; background: #eaf0fd; color: #1b2f73; text-decoration: none; border: 1px solid transparent; }
a.db-tile:hover { border-color: #3b63d6; }
a.db-tile span { font-size: 13px; }
a.db-tile b { font-size: 28px; }
a.db-tile.warn { background: #fff4d6; color: #7a5200; }
a.db-tile.bad { background: #fde8e8; color: #9b1c1c; }
.db-sup { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
table.db-po { width: 100%; }
.db-late { color: #b42318; font-weight: 600; }
@media (max-width: 1000px) { .db-rev, .db-sup { grid-template-columns: 1fr; } .db-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.db-hit { fill: transparent; cursor: default; }
.db-bar.hover { fill: #1f3fa8; }
.db-tip { position: absolute; z-index: 5; pointer-events: none; background: #1d2433; color: #fff; border-radius: 8px; padding: 8px 12px; display: grid; gap: 1px; white-space: nowrap; box-shadow: 0 6px 18px rgba(20, 30, 60, .25); }
.db-tip[hidden] { display: none; }
.db-tip span { font-size: 12px; opacity: .8; }
.db-tip b { font-size: 16px; }
.db-tip i { font-style: normal; font-size: 12px; opacity: .8; }

.st-wait { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #fff4d6; color: #7a5200; font-size: 12px; white-space: nowrap; }

/* Assistant > Configuration du compte : largeur limitée (sur grand écran les cases s'étiraient sur toute la largeur et devenaient difficiles à lire). */
#cf.settings { max-width: 1040px; }
#cf.settings .row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Repère « Filtre actif » au-dessus des tableaux (le filtre est retenu jusqu'à « Réinitialiser le filtre »). */
.grid-active { display: inline-block; padding: 2px 8px; margin-right: 6px; border-radius: 999px; background: #FFF4D6; color: #7A5200; font-size: 12px; font-weight: 600; }

/* Ventes > Clients */
.cl { display: flex; flex-direction: column; gap: 16px; max-width: 1280px; }
.cl h1 { margin: 6px 0 4px; }
.cl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cl-head p { margin: 0; }
.cl-sub { margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }
.cl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cl-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
.cl-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.cl-card span { font-size: 13px; color: var(--muted); }
.cl-card b { font-size: 26px; font-weight: 700; color: var(--navy); }
.cl-card small { font-size: 12.5px; color: var(--muted); }
.cl-card.red { border-color: #f3c9c4; background: #fff6f5; }
.cl-card.red span, .cl-card.red small { color: #8a2c22; }
.cl-card.red b { color: #a3271a; }
.cl-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cl-filters input[type=search] { flex: 1 1 320px; height: 42px; padding: 0 14px; border: 1px solid #b8c0cc; border-radius: 10px; }
.cl-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-pill { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid #b8c0cc; background: #fff; font-weight: 600; cursor: pointer; }
.cl-pill.on { border-color: var(--blue); background: var(--blue); color: #fff; }
.cl-pill.cl-debt.on { border-color: #a3271a; background: #a3271a; }
.cl-filters .btn { height: 40px; }
.cl-info { font-size: 14px; color: var(--muted); }
.cl-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.cl-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 860px; }
.cl-table th { background: #f1f4fa; color: var(--navy); text-align: left; padding: 11px 14px; font-weight: 600; white-space: nowrap; }
.cl-table th[data-s] { cursor: pointer; }
.cl-table th.sorted[data-dir=asc]::after { content: ' ▲'; font-size: 10px; }
.cl-table th.sorted[data-dir=desc]::after { content: ' ▼'; font-size: 10px; }
.cl-table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.cl-table .r { text-align: right; }
.cl-table .nw { white-space: nowrap; }
.cl-name { font-weight: 600; }
.cl-owe { color: #a3271a; font-weight: 700; }
.cl-tag { display: inline-block; margin: 1px 2px 1px 0; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eaf1fb; color: #163a8a; }
.cl-tag.cl-ebay { background: #fdecec; color: #a3271a; }
.cl-tag.cl-site { background: #eef0f4; color: var(--site); }
.cl-r-pay td { background: #f1faf4; }
.cl-r-ret td { background: #fafbfc; }
.cl-r-off td { color: #8a93a3; }
.cl-pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.cl-pager select { height: 36px; }
.cl-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.cl-tabs button { padding: 11px 18px; border: 1px solid transparent; background: none; color: var(--muted); border-radius: 8px 8px 0 0; margin-bottom: -1px; font-size: 15px; font-weight: 600; cursor: pointer; }
.cl-tabs button.on { border-color: var(--line); border-bottom-color: #fff; background: #fff; color: var(--navy); }
.cl-pane { display: flex; flex-direction: column; gap: 12px; }
.cl-info2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cl-box { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.cl-box .btn { align-self: flex-start; }
.cl-h { color: var(--navy); }
.cl-kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
@media (max-width: 900px) { .cl-cards, .cl-cards.three, .cl-info2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Commande fournisseur : numéros de suivi avec montant */
.trk-box { display: flex; flex-direction: column; gap: 8px; max-width: 640px; margin: 4px 0 12px; }
.trk-tab input { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; }
.trk-tab td.num input { text-align: right; max-width: 140px; }
.trk-box .btn { align-self: flex-start; }
input[readonly]#f-ship { background: #f1f4fa; }
.kpi > small.muted { display: block; font-size: 12px; margin-top: 2px; }
.lp-sort { display: flex; align-items: center; gap: 6px; margin-right: 14px; }
.lp-sort select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; }
.sig-prev { margin: 10px 0 14px; }
.sig-prev-box { margin-top: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; max-width: 640px; }
.sig-prev-box table { margin-top: 0 !important; }
.cl-row { cursor: pointer; }
.cl-row:hover td { background: #f6f8fc; }
.cl-float { display: flex; justify-content: flex-end; gap: 8px; }
.drawer .cl { max-width: none; }

/* Commande fournisseur : tri par clic sur l'en-tête, rapport de réception */
th.po-sort { cursor: pointer; user-select: none; white-space: nowrap; }
th.po-sort:hover { text-decoration: underline; }
.po-rr { align-items: center; gap: 12px; margin-top: 18px; }
.po-rr .po-sec { margin: 0; }
/* Produit sans photo : une image neutre au lieu d'un carré vide */
.noimg { background: #eef0f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='10' y='14' width='44' height='36' rx='4' fill='none' stroke='%23a9b1bf' stroke-width='3'/%3E%3Ccircle cx='23' cy='26' r='4.5' fill='%23a9b1bf'/%3E%3Cpath d='M13 46l13-13 9 9 7-7 9 11z' fill='%23a9b1bf'/%3E%3C/svg%3E") center / 72% no-repeat !important; }
/* Fiche client : espacements */
#cl-f { display: flex; flex-direction: column; gap: 18px; }
.cl-head { align-items: center; }
.cl h1 { margin: 0 0 6px; }
.cl-sub { margin-bottom: 0; }
.cl-tabs { margin-top: 6px; }
.cl-pane { gap: 14px; padding-top: 2px; }
.cl-float { margin-bottom: -6px; }
.cl-table th.r { text-align: right; }
.cl-table td, .cl-table th { padding-left: 16px; padding-right: 16px; }
.cl-sel { height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid #b8c0cc; background: #fff; font-weight: 600; max-width: 230px; }
.cl-sel.on { border-color: var(--blue); color: var(--blue); }
.meth-none { color: #a3271a; }
.tile .tile-relay .relay-btn { display: inline-block; background: #e08a1e; color: #fff; font-weight: 700; font-size: 14px; border-radius: 8px; padding: 7px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.tile .tile-relay .relay-btn:hover { background: #c97712; }
.tile .tile-relay .relay-pen { font-style: normal; opacity: .85; margin-left: 4px; }
/* Configuration du compte : champs compacts sur 4 colonnes */
#cf.settings .row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 12px; }
#cf.settings .row4 label { margin: 2px 0; font-size: 12.5px; color: var(--muted); }
#cf.settings .row4 input { min-width: 0 !important; width: 100%; box-sizing: border-box; padding: 5px 8px; font-size: 13.5px; border-radius: 6px; margin-top: 2px; }
#cf.settings fieldset { margin-bottom: 10px; }
@media (max-width: 900px) { #cf.settings .row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Inventaires à valider : la raison sur sa propre ligne, bien lisible */
.iv-reason { display: flex; flex-direction: column; gap: 6px; max-width: 620px; }
.iv-reason .rsn { max-width: 620px; }
/* Configuration du compte : page resserrée (largeur limitée, textes et cases plus petits, blocs du bas côte à côte) */
#cf.settings { max-width: 1040px; font-size: 13.5px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; align-items: start; }
#cf.settings > fieldset:first-of-type, #cf.settings > .row, #cf.settings > .cf-wide { grid-column: 1 / -1; }
#cf.settings fieldset { padding: 8px 12px 10px; }
#cf.settings legend { font-size: 14px; }
#cf.settings .row4 { gap: 4px 10px; }
#cf.settings .row4 label { font-size: 12px; }
#cf.settings .row4 input { padding: 4px 8px; font-size: 13px; height: 30px; }
#cf.settings .logo-set { gap: 10px; }
#cf.settings .logo-prev { width: 200px; max-width: 100%; height: 86px; box-sizing: border-box; }
#cf.settings .logo-set { flex-wrap: wrap; }
#cf.settings .muted.small { font-size: 12px; line-height: 1.4; }
#cf.settings label.check { font-size: 13.5px; }
@media (max-width: 900px) { #cf.settings { grid-template-columns: 1fr; } }
.st-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Raison d'un changement de stock : liste + case « à écrire » (identique au téléphone). */
.rsn { display: flex; flex-direction: column; gap: 6px; min-width: 170px; }
.rsn select, .rsn .rsn-txt { width: 100%; box-sizing: border-box; padding: 8px 10px; font: inherit; }
td .rsn select, td .rsn .rsn-txt { padding: 6px 8px; }
.rsn.changed select { border-color: var(--blue, #2f55c4); }
/* « Fait depuis » : pastille avec logo (ordinateur, téléphone, caisse, automatique). */
.orig { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.orig svg { flex: none; }
.orig-pc { background: #e6f1fb; color: #0c447c; } .orig-mobile { background: #eeedfe; color: #3c3489; } .orig-pos { background: #e1f5ee; color: #085041; } .orig-auto { background: #f1efe8; color: #444441; }
.ideal-warn { background: #fdf0cf; color: #6b4a00; border: 1px solid #f0d58a; border-radius: 10px; padding: 10px 12px; margin: 8px 0; max-width: 760px; font-size: 14px; }
/* État du serveur (Assistant) et son alerte en bas de l'écran. */
#server-alert { position: fixed; right: 14px; bottom: 44px; z-index: 440; background: #fde4e0; color: #8a1f14; border: 1px solid #e3a59c; border-radius: 6px; padding: 5px 14px; font-size: 13px; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
#server-alert:hover { background: #fbd3cd; }
.srv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 14px 0; max-width: 1040px; }
.srv-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.srv-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; } .srv-pct { font-size: 22px; font-weight: 800; color: var(--navy, #14205f); }
.srv-bar { position: relative; height: 10px; border-radius: 6px; background: #e6ebf5; margin-bottom: 8px; } .srv-bar i { display: block; height: 100%; border-radius: 6px; background: #2f7d4f; }
.srv-bar em { position: absolute; top: -3px; width: 2px; height: 16px; background: #8a1f14; opacity: .55; }
.srv-card.mid .srv-bar i { background: #c98a1a; } .srv-card.bad .srv-bar i { background: #b3261a; } .srv-card.bad .srv-pct { color: #b3261a; }
.srv-alert { background: #fde4e0; color: #8a1f14; border: 1px solid #e3a59c; border-radius: 10px; padding: 10px 14px; max-width: 1040px; }
.srv-fine { background: #e5f6ec; color: #0d5c31; border: 1px solid #b6dfc6; border-radius: 10px; padding: 10px 14px; max-width: 1040px; }
