/* ══════════════════════════════════════════════════════════════════════════
   Select Stock — système visuel (esprit units.supply : blanc, indigo, pilules, champs remplis)
   Noir & blanc tranchés, typographie d'affichage serrée (Inter Tight) pour titres, prix et chiffres,
   étiquettes en petites capitales espacées, photos produit sur tuile gris clair, vert profond pour le positif.
   Espacements : 4 / 8 / 12 / 16 / 24 / 32 / 48.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #ffffff; --surface: #fff; --subtle: #f4f4f5; --hover: #f7f7f8; --tile: #f4f4f5;
  --line: #ececee; --line-2: #f2f2f3; --line-strong: #dcdce0;
  --ink: #171717; --ink-2: #404040; --muted: #737373;
  --accent: #0a0a0a; --on-ink: #fff; --on-ink-2: rgba(255,255,255,.7);
  --topbar: rgba(255,255,255,.92); --row-hover: #fafafa; --bar: #d9d9d9; --board: #efefef; --btn-hover: #2b2b2b; --brand: #0a0a0a; --brand-bg: #ececee;
  --ok: #0b7a45; --ok-bg: #ecf6f0; --warn: #a15c00; --warn-bg: #fdf4e7; --danger: #d0191f; --danger-bg: #fdeeee;
  --info: #0a0a0a; --info-bg: #ececee;
  --radius: 24px; --radius-sm: 999px;
  --focus: 0 0 0 3px rgba(10,10,10,.12);
  --display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.55 "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
       -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: inherit; }
h1 { font: 700 28px/1.15 var(--display); letter-spacing: -.025em; margin: 0; }
h2 { font: 700 15px/1.3 var(--display); letter-spacing: -.01em; margin: 0 0 16px; display: flex; align-items: center; gap: 8px; }
h3 { font: 600 13px/1.3 var(--display); margin: 0 0 8px; }
.muted { color: var(--muted); }
.small-text { font-size: 12.5px; }
.eyebrow { font: 600 10.5px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
code, .mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 12.5px; letter-spacing: -.01em; }
[hidden] { display: none !important; }
[data-lucide] { width: 16px; height: 16px; stroke-width: 1.75; vertical-align: -3px; flex: none; }

/* ── Mise en page ── */
.layout { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 22px 12px 16px; position: sticky; top: 0; height: 100vh;
           overflow-y: auto; display: flex; flex-direction: column; }
.side-top { display: flex; align-items: center; justify-content: space-between; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.logo { color: var(--ink); font: 800 19px/1 var(--display); letter-spacing: .32em; padding: 2px 10px 26px; text-decoration: none; display: block; text-transform: uppercase; }
.logo-img { display: block; height: 1.1em; width: auto; }
.logo small { display: block; font: 600 9.5px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 7px; }
.nav-section { font: 600 10px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #a8a8a8; padding: 18px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: var(--radius-sm); text-decoration: none;
            color: var(--ink-2); font-size: 13.5px; font-weight: 500; transition: background .12s, color .12s; }
.nav-link [data-lucide] { color: #a0a0a0; }
.nav-link:hover { background: var(--subtle); color: var(--ink); }
.nav-link.active { background: var(--ink); color: var(--on-ink); }
.nav-link.active [data-lucide] { color: var(--on-ink); }
.nav-link .count { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-link .count.alert { color: #fff; background: var(--danger); border-radius: 999px; padding: 0 6px; line-height: 17px; }
.nav-link.active .count { color: var(--on-ink-2); }
.nav-more summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: "›"; font-size: 13px; transition: transform .15s; }
.nav-more[open] summary::after { transform: rotate(90deg); }
.sidebar .spacer { flex: 1; }
.user-box { border-top: 1px solid var(--line); padding: 14px 10px 0; margin-top: 14px; font-size: 11.5px; color: var(--muted);
            display: flex; align-items: center; justify-content: space-between; }
.user-box strong { color: var(--ink); display: block; font-size: 13px; font-weight: 600; }
.menu-btn { display: none; background: transparent; border: 0; color: var(--ink); padding: 6px; }
.menu-btn:hover { background: var(--subtle); }

.content { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 44px; border-bottom: 1px solid var(--line);
          background: var(--topbar); backdrop-filter: saturate(1.4) blur(10px); position: sticky; top: 0; z-index: 5; }
.topbar form { flex: 1; max-width: 560px; position: relative; }
.topbar input { width: 100%; padding-left: 40px; background: var(--subtle); border-color: transparent; border-radius: 999px; height: 40px; }
.topbar input:focus { background: var(--surface); border-color: var(--ink); }
.topbar form > [data-lucide] { position: absolute; left: 15px; top: 12px; color: var(--muted); }
.topbar .quick { display: none; }
main { padding: 36px 44px 88px; max-width: 1360px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; }
.page-head p.muted { max-width: 720px; font-size: 14px; }
.page-head > div > p.muted:first-child { margin: 0 0 8px; font-size: 12.5px; }
.page-head > div > p.muted:first-child a { text-decoration: none; font-weight: 500; }
.page-head > div > p.muted:first-child a:hover { color: var(--ink); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Formulaires & boutons ── */
input, select, textarea, button, .btn { font: inherit; }
input, select, textarea { padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
                          color: var(--ink); min-width: 0; min-height: 40px; transition: border-color .12s, box-shadow .12s, background .12s; }
input[type=checkbox], input[type=radio], input[type=file] { min-height: 0; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: #ababab; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; min-height: 40px; border-radius: var(--radius-sm);
               border: 1px solid var(--accent); background: var(--accent); color: var(--on-ink); cursor: pointer; text-decoration: none;
               font-weight: 600; font-size: 13.5px; letter-spacing: -.005em; white-space: nowrap; transition: background .12s, border-color .12s, opacity .12s, transform .06s; }
button:hover, .btn:hover { background: var(--btn-hover); }
button:active, .btn:active { transform: translateY(1px); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); }
button:disabled { opacity: .3; cursor: not-allowed; transform: none; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--subtle); border-color: #bdbdbd; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #ad1419; }
.btn-sm { padding: 0 12px; min-height: 32px; font-size: 12.5px; }
.btn-lg { padding: 0 24px; min-height: 48px; font-size: 14.5px; }
.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; font-size: inherit; }
.link:hover { background: none; color: var(--ink); }
.link.danger { color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 7px; font: 600 10.5px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field > input, .field > select, .field > textarea, .field .muted, .field span { text-transform: none; letter-spacing: 0; }
.field > input, .field > select, .field > textarea { color: var(--ink); font-size: 14px; font-weight: 400; }
.field > .muted, .field > span.muted { font-size: 12px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 16px; }
.form-grid .full { grid-column: 1 / -1; }
/* formulaire dans une colonne étroite (une seule colonne) : un champ « span 2 » ne doit pas créer de 2e colonne qui déborde */
.form-grid { container-type: inline-size; }
@container (max-width: 431px) { .form-grid > [style*="span 2"] { grid-column: 1 / -1 !important; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > .grow { flex: 1; }
.inline { display: inline; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink); font-weight: 400; letter-spacing: 0; text-transform: none; }
.check > input { flex: none; }  /* la case garde sa taille même à côté d'un long texte */
input[type=checkbox], input[type=radio] { accent-color: var(--ink); width: 16px; height: 16px; }

/* ── Cartes, grilles, indicateurs ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.card-head h2 { margin: 0; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-2 > .card + .card, .grid-3 > .card + .card, .grid-main > .card + .card, .grid-main > div > .card + .card { margin-top: 0; }
.col-stack { display: flex; flex-direction: column; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 28px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.kpi .label { font: 600 10.5px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.kpi .label [data-lucide] { display: none; }
.kpi .value { font: 700 28px/1.1 var(--display); letter-spacing: -.03em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.alert { border-color: #f3c9ca; }
.kpi.alert .value { color: var(--danger); }
.mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; }
.mini-kpis div { display: flex; flex-direction: column; gap: 2px; }
.mini-kpis span { font: 600 10px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mini-kpis b { font: 700 21px/1.15 var(--display); letter-spacing: -.025em; }
.mini-kpis small { font-size: 12px; color: var(--muted); }

/* ── Tableaux ── */
.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 600 10.5px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
     padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--row-hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num b, .price { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
/* Photos StockX sur fond blanc : brightness(.957) transforme le blanc en gris de tuile (#f4f4f4), sans toucher au produit */
.thumb { width: 60px; height: 44px; object-fit: contain; flex: none; background: #fff; border-radius: 6px; padding: 4px; filter: brightness(.957); }
.cell-product { display: flex; align-items: center; gap: 14px; min-width: 240px; text-decoration: none; }
.cell-product b { font-weight: 600; }
.cell-product a { text-decoration: none; font-weight: 600; }
.cell-product a:hover, a.cell-product:hover b { text-decoration: underline; text-underline-offset: 3px; }
.actions { display: flex; gap: 12px; align-items: center; }

/* ── Statuts : point + texte ── */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
        background: var(--subtle); color: var(--ink-2); white-space: nowrap; border: 0; }
.pill.ok, .pill.warn, .pill.danger, .pill.info, .status-in_stock, .status-reserved, .status-lost, .status-pending_check,
.status-rejected, .status-returned { background: transparent; padding-left: 0; }
.pill.ok::before, .pill.warn::before, .pill.danger::before, .pill.info::before, .status-in_stock::before, .status-reserved::before,
.status-lost::before, .status-pending_check::before, .status-rejected::before, .status-sold::before, .status-returned::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok, .status-in_stock { color: var(--ok); }
.pill.warn, .status-reserved, .status-pending_check { color: var(--warn); }
.pill.danger, .status-lost, .status-rejected { color: var(--danger); }
.pill.info { color: var(--info); }
.status-sold, .status-returned { color: var(--muted); background: transparent; padding-left: 0; }
.pill.dark { background: var(--ink); color: var(--on-ink); }
.loc { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px;
       font-style: normal; font: 700 10.5px/1 var(--display); color: var(--on-ink); background: var(--ink); margin-right: 5px; letter-spacing: .02em; }

.flash { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid #cde5d7; background: var(--ok-bg); color: #08592f;
         margin-bottom: 18px; display: flex; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 500; }
.flash.error { border-color: #f3c9ca; background: var(--danger-bg); color: var(--danger); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty [data-lucide] { width: 24px; height: 24px; display: block; margin: 0 auto 12px; opacity: .45; }

/* ── Barres d'outils, segments ── */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar input[type=search] { flex: 1; min-width: 220px; }
.seg { display: inline-flex; background: var(--subtle); border-radius: 999px; padding: 3px; gap: 2px; }
.seg a, .seg label { padding: 6px 14px; text-decoration: none; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px;
                     border-radius: 999px; font-size: 12.5px; cursor: pointer; }
.seg a:hover, .seg label:hover { color: var(--ink); }
.seg a.active, .seg label.active { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.seg a.active .muted { color: var(--on-ink-2); }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 12px; }

/* ── Catalogue / stock ── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 24px 16px; }
.pcard { background: transparent; border: 0; border-radius: 0; overflow: visible; text-decoration: none; display: flex; flex-direction: column; }
.pcard .img { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: 22px; position: relative;
              background: var(--tile); border-radius: var(--radius); transition: background .15s; }
.pcard:hover .img { background: #ececec; }
.pcard .img img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s ease; }
.pcard:hover .img img { transform: scale(1.04); }
.pcard .img .count { position: absolute; top: 12px; right: 12px; background: var(--surface); color: var(--ink); font-weight: 700; }
.pcard .body { padding: 12px 2px 0; border-top: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .title { font: 600 14px/1.3 var(--display); letter-spacing: -.005em; }
.pcard .body .muted { font-size: 12px; }
.size-list { display: flex; flex-wrap: wrap; gap: 5px; }
.size-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px 2px 8px; border: 1px solid var(--line); border-radius: 6px;
             font-size: 12px; font-weight: 600; background: var(--surface); }
.size-chip .loc { height: 15px; min-width: 15px; font-size: 9px; padding: 0 3px; margin: 0; border-radius: 3px; }
.size-list > button { min-height: 44px; min-width: 64px; font-family: var(--display); font-weight: 700; font-size: 15px; }
.product-hero { display: grid; grid-template-columns: 320px 1fr; gap: 36px; align-items: center; margin-bottom: 28px; }
.product-hero .img { background: var(--tile); border: 0; border-radius: var(--radius); aspect-ratio: 1 / 1; display: flex;
                     align-items: center; justify-content: center; padding: 24px; }
.product-hero .img img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.meta-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; align-items: center; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.timeline li:last-child { border: 0; }
.timeline .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); margin-top: 8px; flex: none; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; }
.alert-row:last-child { border: 0; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 128px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--bar); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars .bar:hover { background: var(--ink); }
.bars .bar.zero { background: var(--line); }
.bars .bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink);
                          color: var(--on-ink); font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; margin-bottom: 6px; z-index: 2; }
.bars-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 8px; }
.progress { height: 4px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--ink); transition: width .2s; }

/* ── Scan ── */
.scan-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.scan-box label { color: var(--muted) !important; opacity: 1 !important; font: 600 10.5px/1.2 "Plus Jakarta Sans", sans-serif !important; letter-spacing: .1em; text-transform: uppercase; }
.scan-box input { font-size: 20px; min-height: 56px; padding: 14px 18px; font-family: "JetBrains Mono", Menlo, monospace; letter-spacing: .02em; border-radius: 10px; }
.scan-feed { list-style: none; padding: 0; margin: 0; max-height: 520px; overflow-y: auto; }
.scan-feed li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.has-scan { position: relative; }
.scan-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: var(--radius-sm); background: var(--surface);
            color: var(--ink); border: 1px solid var(--line-strong); cursor: pointer; min-height: 40px; flex: none; }
.scan-btn:hover { background: var(--subtle); }
.scan-field { position: relative; display: block; }
.scan-field > input { width: 100%; padding-right: 64px; }
.scan-box .scan-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-height: 40px; }
.omni .scan-btn { position: absolute; right: 48px; top: 4px; min-height: 32px; padding: 0 8px; border: 0; background: transparent; color: var(--muted); }
.omni kbd { position: absolute; right: 12px; top: 10px; font: 600 10.5px "Plus Jakarta Sans", sans-serif; color: var(--muted); border: 1px solid var(--line);
            border-radius: 5px; padding: 1px 6px; background: var(--surface); }
.omni-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: min(500px, 92vw); background: var(--surface);
                border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.1); padding: 6px; z-index: 20;
                max-height: 70vh; overflow-y: auto; }
.omni-results a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; }
.omni-results a.sel, .omni-results a:hover { background: var(--subtle); }
.omni-results img { width: 48px; height: 36px; object-fit: contain; background: #fff; border-radius: 5px; padding: 3px; filter: brightness(.957); }
.omni-results .t { flex: 1; min-width: 0; font-weight: 600; }
.omni-results .t small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.omni-results .k { font: 600 10px/1 "Plus Jakarta Sans", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.omni-results [data-lucide] { width: 16px; height: 16px; margin: 0 14px; color: var(--muted); }
#scan-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 100; display: none; align-items: flex-end; justify-content: center; }
#scan-overlay.open { display: flex; }
.scan-sheet { background: #0a0a0a; color: #fff; width: min(520px, 100vw); border-radius: 18px 18px 0 0; padding: 18px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
@media (min-width: 700px) { #scan-overlay { align-items: center; } .scan-sheet { border-radius: 18px; } }
.scan-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.scan-close { background: #222; border: 0; color: #fff; width: 34px; height: 34px; min-height: 34px; border-radius: 50%; font-size: 15px; padding: 0; }
#scan-video { width: 100%; min-height: 240px; border-radius: 12px; overflow: hidden; background: #000; }
#scan-video video { width: 100% !important; border-radius: 12px; }
.scan-status { font-size: 13px; color: #bbb; margin-top: 10px; }
.scan-last { font: 500 15px "JetBrains Mono", monospace; color: #8fe0b0; min-height: 20px; margin-top: 6px; }

/* ── À faire ── */
.todo { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.todo-title { display: flex; align-items: center; gap: 10px; font: 700 16px/1.2 var(--display); letter-spacing: -.01em; margin: 0; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.todo-title [data-lucide] { display: none; }
.todo > .todo-title .pill { background: var(--ink); color: var(--on-ink); font-family: var(--display); }
h2.todo-title { background: none; border: 0; padding: 0; margin: 36px 0 16px; font-size: 18px; }
.todo > h2.todo-title { margin: 0; padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: 16px; }  /* titre du bloc « Mes tâches » */
.todo .empty { border: 0; }
.task { display: flex; gap: 14px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line-2); transition: background .1s; }
.task:hover { background: var(--row-hover); }
.task:last-child { border-bottom: 0; }
.task-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--subtle); color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex: none; }
.task-urgent .task-icon { color: #fff; background: var(--danger); }
.task-body { flex: 1; min-width: 0; }
.task-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.task-head b { font-weight: 600; }
.task-count { color: var(--muted); font: 700 13px/1 var(--display); font-variant-numeric: tabular-nums; }
.task-urgent .task-count { color: var(--danger); }
.task-head .pill.danger { display: none; }
.task-preview { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 5px; font-size: 12.5px; color: var(--ink-2); }
.task-preview a { text-decoration: none; }
.task-preview a:hover { text-decoration: underline; text-underline-offset: 3px; }
.task > .btn { min-height: 34px; padding: 0 14px; font-size: 12.5px; }
.task-today > .btn, .task-later > .btn { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.task-today > .btn:hover, .task-later > .btn:hover { background: var(--subtle); }
.setup-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; text-decoration: none; font-size: 13px; }
.setup-row.done { color: var(--muted); }
.setup-row.done [data-lucide] { color: var(--ok); }

/* ── WTB : colonnes ── */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.board .col { background: var(--board); border-radius: var(--radius); padding: 8px; min-height: 180px; }
.board .col header { display: flex; align-items: center; gap: 6px; font: 600 10.5px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); padding: 8px 6px 12px; }
.board .col header [data-lucide] { display: none; }
.board .col header b { margin-left: auto; color: var(--muted); font-weight: 700; }
.cards { display: flex; flex-direction: column; gap: 8px; }
.wcard { display: block; background: var(--surface); border: 1px solid transparent; border-radius: 10px; padding: 12px; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.wcard:hover { border-color: var(--line-strong); box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.wcard.late { box-shadow: inset 3px 0 0 var(--danger); }
.wtop { display: flex; align-items: center; justify-content: space-between; }
.wtop img { width: 72px; height: 48px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; filter: brightness(.957); }
.wsize { font: 700 19px/1 var(--display); letter-spacing: -.02em; }
.wtitle { font-weight: 600; font-size: 12.5px; line-height: 1.35; margin: 8px 0 6px; }
.wmeta { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.wmeta .pill { padding: 0; background: transparent; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.wmeta .pill.danger { color: var(--danger); }
.wmeta .pill.warn { color: var(--warn); }
.col-empty { text-align: center; color: #c4c4c4; margin: 20px 0; }
.stepper { display: flex; gap: 0; margin-bottom: 24px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.stepper .step { flex: 1; display: flex; align-items: center; gap: 6px; padding: 12px 4px; color: #999; font: 600 10.5px/1.2 "Plus Jakarta Sans", sans-serif;
                 letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.stepper .step [data-lucide] { display: none; }
.stepper .step.done { color: var(--ink-2); border-bottom-color: var(--line-strong); }
.stepper .step.cur { color: var(--ink); border-bottom-color: var(--ink); }
.next-step { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.next-step h2 { font-size: 18px; letter-spacing: -.02em; }
.next-label { font: 600 10.5px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.next-label [data-lucide] { display: none; }
.offer-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.offer-row:last-child { border: 0; }
.offer-row b { font-family: var(--display); font-size: 16px; }
.decision { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.decision form, .decision button { width: 100%; }
.decision button { min-height: 52px; font-size: 15px; }
.decision-ko { color: var(--danger) !important; }
.refuse-panel { margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reason { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.reason:has(input:checked) { border-color: var(--danger); background: var(--danger-bg); }
.tracker { display: flex; align-items: center; margin: 4px 0; min-width: 260px; }
.tracker .st { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; font-size: 10.5px; font-weight: 500; color: #999; text-align: center; }
.tracker .st::before { content: ""; position: absolute; top: 4px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.tracker .st:first-child::before { display: none; }
.tracker .st i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); z-index: 1; margin-bottom: 5px; border: 2px solid var(--surface); }
.tracker .st.done { color: var(--ink-2); }
.tracker .st.done i, .tracker .st.done::before { background: var(--ink); }
.tracker.exception .st.cur i { background: var(--danger); }

/* ── Divers ── */
.wtb-row.late { background: var(--danger-bg); }
.wtb-row.highlight { outline: 2px solid var(--ink); outline-offset: -2px; }
.notif { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; }
.notif.unread b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin-right: 8px; vertical-align: 2px; }
.bell { position: relative; display: inline-flex; padding: 8px; border-radius: 999px; text-decoration: none; color: var(--ink-2); }
.bell:hover { background: var(--subtle); }
.bell [data-lucide] { width: 18px; height: 18px; }
.bell span { position: absolute; top: 3px; right: 3px; background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700;
             min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.lang-switch { display: inline-flex; font: 600 11px/1 "Plus Jakarta Sans", sans-serif; letter-spacing: .06em; gap: 2px; }
.lang-switch a { padding: 5px 6px; text-decoration: none; color: #b3b3b3; border-radius: 5px; }
.lang-switch a:hover, .lang-switch a.active { color: var(--ink); }
.auth-card .lang-switch { float: right; }
dialog.modal-card, dialog.confirm-dialog { border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(520px, 92vw); box-shadow: 0 24px 60px rgba(0,0,0,.18); }
dialog.confirm-dialog { width: min(400px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.35); }
.confirm-msg { margin: 0 0 18px; font: 600 16px/1.45 var(--display); letter-spacing: -.01em; }
.confirm-input { width: 100%; margin-bottom: 14px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 15px; height: 15px; border-radius: 50%;
                     border: 2px solid var(--on-ink-2); border-top-color: var(--on-ink); animation: spin .7s linear infinite; }
.btn-ghost.is-loading::after, .link.is-loading::after { border-color: rgba(0,0,0,.15); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Connexion, erreurs, pages publiques ── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--bg); }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 36px; width: 100%; max-width: 420px; }
.auth-card .logo { padding: 0 0 28px; }
.auth-card h1 { font-size: 24px; }
.error-card { text-align: left; }
.error-code { font: 800 64px/1 var(--display); letter-spacing: -.04em; color: #dcdcdc; margin: 0 0 10px; }
.public-wrap { max-width: 760px; margin: 0 auto; padding: 36px 16px 80px; }
.public-wrap .logo { padding: 0 0 28px; font-size: 18px; }

/* ── Espace vendeurs ── */
.sp-top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.sp-top .in { max-width: 1140px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.sp-top .logo { padding: 0; font-size: 17px; }
.sp-top .logo small { margin-top: 5px; }
.sp-top nav { display: flex; gap: 2px; flex-wrap: wrap; }
.sp-top nav a { color: var(--ink-2); text-decoration: none; padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.sp-top nav a:hover { color: var(--ink); background: var(--subtle); }
.sp-top nav a.active { color: var(--on-ink); background: var(--ink); }
.sp-top nav a .count { display: inline-block; background: var(--danger); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 10.5px; line-height: 16px; margin-left: 2px; }
.sp-top .who { margin-left: auto; font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; font-weight: 500; }
.sp-top .who a { color: var(--ink-2); }
.sp-top .bell { background: transparent !important; border: 0 !important; color: var(--ink-2) !important; }
.sp-top .lang-switch.dark a { color: #b3b3b3; }
.sp-top .lang-switch.dark a.active, .sp-top .lang-switch.dark a:hover { color: var(--ink); }
.sp-main { max-width: 1140px; margin: 0 auto; padding: 36px 24px 88px; }
.offer-card { display: flex; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.offer-card:last-child { border: 0; }
.offer-card img { width: 104px; height: 74px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; filter: brightness(.957); }
.offer-card .grow { flex: 1; min-width: 200px; }
.offer-card .grow b { font-family: var(--display); }
.offer-card form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.offer-card input { min-height: 36px; padding: 6px 10px; }
.big-size { font: 700 22px/1 var(--display); letter-spacing: -.02em; min-width: 56px; text-align: center; }

/* ── Mobile ── */
.bottom-bar { display: none; }
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  main { padding: 30px 24px 80px; }
  .topbar { padding: 12px 24px; }
}
@media (max-width: 860px) {
  h1 { font-size: 24px; }
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }   /* page courte : l'en-tête ne s'étire pas */
  .sidebar { display: block; padding: 10px 14px; position: sticky; top: 0; z-index: 30; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-flex; min-height: 36px; }
  .logo { width: auto; padding: 8px 4px; font-size: 17px; }
  .logo small { display: none; }
  .side-nav, .sidebar .user-box, .sidebar .spacer { display: none; }
  .sidebar.open .side-nav { display: flex; flex-direction: column; gap: 2px; max-height: 75vh; overflow-y: auto; padding-bottom: 8px; }
  .sidebar.open .user-box { display: flex; }
  .topbar { position: static; flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .topbar form { max-width: none; flex: 1 1 100%; order: 2; }
  .omni kbd { display: none; }
  .omni .scan-btn { right: 6px; }
  main { padding: 22px 16px 100px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .product-hero { grid-template-columns: minmax(0, 1fr); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .card { padding: 18px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi .value { font-size: 23px; }
  .task { flex-wrap: wrap; }
  .task > .btn { width: 100%; }
  .reasons { grid-template-columns: 1fr; }
  .bottom-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line);
                padding: 6px 4px; padding-bottom: max(6px, env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-bar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); text-decoration: none;
                  font-size: 10.5px; font-weight: 600; padding: 6px 8px; border-radius: 8px; min-width: 60px; }
  .bottom-bar a.active { color: var(--ink); }
  .bottom-bar [data-lucide] { width: 22px; height: 22px; }
  .bottom-bar b { position: absolute; top: 2px; right: 12px; background: var(--danger); color: #fff; border-radius: 8px; font-size: 9.5px; padding: 0 4px; }
  .scan-box input { font-size: 18px; }
  .page-actions .btn, .page-actions button { flex: 1 1 auto; }
  .sp-top .in { gap: 12px; padding: 12px 16px; }
  .sp-main { padding: 24px 16px 80px; }
}

/* ── Menu « Plus » ── */
.more-menu { position: relative; }
.more-menu > summary { list-style: none; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu[open] > summary { margin: 0; background: var(--subtle); }
.more-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: var(--surface); border: 1px solid var(--line);
                   border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.1); padding: 6px; z-index: 15; }
.more-menu .menu a, .more-menu .menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; min-height: 0; border-radius: var(--radius-sm);
                   text-decoration: none; color: var(--ink); background: transparent; border: 0; font-weight: 500; font-size: 13.5px; justify-content: flex-start; }
.more-menu .menu a:hover, .more-menu .menu-item:hover { background: var(--subtle); }
.more-menu .menu [data-lucide] { color: var(--muted); }
.more-menu .menu-item.is-loading { color: transparent !important; }

/* Boutons texte seuls : les icônes restent dans le menu, la recherche et les boutons icône. */
.btn > [data-lucide], button:not(.menu-btn):not(.menu-item):not(.theme-toggle) > [data-lucide] { display: none; }
.more-menu > summary [data-lucide] { display: inline-block; }

/* ── Page produit client (QR) — esprit fiche StockX ── */
.pp { max-width: 560px; margin: 0 auto; }
.pp-lang { display: flex; gap: 12px; justify-content: flex-end; font: 600 11px/1 "Plus Jakarta Sans", sans-serif; letter-spacing: .06em; margin-top: -46px; margin-bottom: 28px; }
.pp-lang a { color: #b3b3b3; text-decoration: none; }
.pp-lang a.active { color: var(--ink); }
.pp-img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border: 0; border-radius: 16px; padding: 28px; filter: brightness(.957); }
.pp-brand { margin: 24px 0 6px; font: 600 11px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pp-title { margin: 0; font: 700 28px/1.12 var(--display); letter-spacing: -.03em; }
.pp-sku { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.pp-box { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding: 16px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; }
.pp-box b { font: 700 20px/1 var(--display); letter-spacing: -.02em; }
.pp-sizes { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border: 0; background: transparent; overflow: visible; }
.pp-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; }
.pp-row:first-child { border-top: 1px solid var(--line); }
.pp-row.is-box { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pp-size { font: 700 17px/1 var(--display); letter-spacing: -.02em; order: 1; }
.pp-price { font: 700 15px/1.1 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; order: 2; }
.pp-avail { color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 6px; order: 3; line-height: 1.3; }
.pp-avail .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex: none; }
.pp-avail .dot.ok { background: var(--ok); }
.pp-note { margin-top: 24px; font-size: 13px; color: var(--muted); line-height: 1.55; border-top: 1px solid var(--line); padding-top: 18px; }
.pp-note p { margin: 0 0 10px; }
.pp-note b { color: var(--ink); font-weight: 600; }
.pp-buy { display: flex; justify-content: center; width: 100%; margin-top: 16px; min-height: 52px; font-size: 15px; letter-spacing: .02em; }
.pp-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 22px; }
@media (max-width: 420px) { .pp-sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.danger-text { color: var(--danger); }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }

/* ── Recherche par nom (suggestions) ── */
.suggest { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
           box-shadow: 0 16px 40px rgba(0,0,0,.1); padding: 5px; max-height: 440px; overflow-y: auto; }
.suggest-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; min-height: 0; border: 0; border-radius: var(--radius-sm);
                background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; font-weight: 400; justify-content: flex-start; }
.suggest-item:hover, .suggest-item.on { background: var(--subtle); }
.suggest-item img, .suggest-item .ph { width: 58px; height: 42px; object-fit: contain; flex: none; background: #fff; border-radius: 6px; padding: 3px; filter: brightness(.957); }
.suggest-item .t { display: flex; flex-direction: column; min-width: 0; }
.suggest-item b { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-item small { color: var(--muted); font-size: 12px; }
.suggest-empty { padding: 12px; color: var(--muted); font-size: 13px; }

/* ── À faire : tâches manuelles ── */
.todo-add { display: flex; gap: 8px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); background: var(--row-hover); }
.todo-add input[name=title] { flex: 1; min-width: 0; }
.todo-add input[type=date] { width: 160px; }
.task-manual form { margin: 0; }
.task-check { width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; flex: none; margin: 0 6px; }
.task-check:hover { border-color: var(--ink); background: var(--subtle); }
.task-urgent .task-check { border-color: var(--danger); }
.todo-done { padding: 12px 22px; border-top: 1px solid var(--line-2); font-size: 13px; }
.todo-done summary { cursor: pointer; color: var(--muted); }
.todo-done-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.todo-done-row form { margin: 0; }
@media (max-width: 720px) { .todo-add { flex-wrap: wrap; } .todo-add input[type=date] { width: auto; flex: 1; } }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--ink); border-radius: var(--radius-sm); background: var(--surface); font-size: 13.5px; font-weight: 600; }
.head-img { width: 176px; height: 124px; object-fit: contain; background: #fff; border-radius: 12px; padding: 10px; filter: brightness(.957); flex: none; }
.tile-img { width: 100%; max-height: 240px; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: 12px; padding: 16px; filter: brightness(.957); display: block; }

/* ── Mode sombre : data-theme est posé par static/theme.js (clair par défaut, choix mémorisé) ── */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0e0e; --surface: #161616; --subtle: #202020; --hover: #1c1c1c; --tile: #1d1d1d;
  --line: #2a2a2a; --line-2: #222; --line-strong: #3b3b3b;
  --ink: #f2f2f2; --ink-2: #c9c9c9; --muted: #8a8a8a;
  --accent: #f2f2f2; --on-ink: #0a0a0a; --on-ink-2: rgba(0,0,0,.6);
  --topbar: rgba(14,14,14,.9); --row-hover: #1b1b1b; --bar: #3a3a3a; --board: #1a1a1a; --btn-hover: #d4d4d4;
  --ok: #4cc88a; --ok-bg: #11261a; --warn: #e2a453; --warn-bg: #2a1f0f; --danger: #ff5c61; --danger-bg: #2d1416;
  --info: #93b2dc; --info-bg: #151d2a;
  --focus: 0 0 0 3px rgba(255,255,255,.2);
}
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #626262; }
[data-theme="dark"] .btn-ghost:hover { border-color: #4a4a4a; }
[data-theme="dark"] .kpi.alert, [data-theme="dark"] .flash.error { border-color: #5a2427; }
[data-theme="dark"] .flash { border-color: #1f4a33; color: var(--ok); }
[data-theme="dark"] .pcard:hover .img { background: #262626; }
[data-theme="dark"] .error-code { color: #2c2c2c; }
[data-theme="dark"] .btn-ghost.is-loading::after, [data-theme="dark"] .link.is-loading::after { border-color: rgba(255,255,255,.2); border-top-color: var(--ink); }
/* photos produit sur fond blanc : un peu moins éblouissantes */
[data-theme="dark"] :is(.thumb, .omni-results img, .wtop img, .offer-card img, .pp-img, .suggest-item img, .head-img, .tile-img) { filter: brightness(.86); }

.theme-toggle { background: transparent; border: 0; color: var(--muted); padding: 6px; min-height: 0; border-radius: 999px; cursor: pointer; }
.theme-toggle:hover { background: var(--subtle); color: var(--ink); }
.theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: inline; }
.user-box .theme-toggle { margin-left: auto; }

/* Sections d'un long formulaire (fiche vendeur, profil) */
.form-section { font: 600 10.5px/1.2 "Plus Jakarta Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
                padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line-2); }
.form-grid > .form-section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.profile-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.profile-card .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center;
                        font: 700 20px/1 var(--display); }
.profile-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 4px 0 0; font-size: 13px; width: 100%; }
.profile-card dt { color: var(--muted); }
.profile-card dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 860px) { .profile-side { order: -1; } }  /* téléphone : le résumé du profil avant le long formulaire */
/* Pad de signature : toujours encre noire sur fond blanc (c'est ce qui est imprimé) */
.sig-pad { position: relative; }
.sig-pad canvas { display: block; width: 100%; height: 150px; background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
                  touch-action: none; cursor: crosshair; }
.sig-pad::after { content: attr(data-hint); position: absolute; left: 0; right: 0; top: 62px; text-align: center; color: #b5b5b5; font-size: 13px; pointer-events: none; }
.sig-pad.signed::after { display: none; }
.sig-pad.empty canvas { border-color: var(--danger); }
.sig-pad [data-clear] { position: absolute; top: 6px; right: 6px; }
.sig-img { display: block; max-width: 100%; height: 90px; object-fit: contain; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* Statistiques */
.delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }
.kpi .value.neg, td.neg, b.neg { color: var(--danger); }
.stat-note { margin: -16px 0 24px; max-width: 900px; }
.stat-section { margin: 32px 0 14px; font-size: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart-top { text-align: right; margin-bottom: -4px; font-variant-numeric: tabular-nums; }
.stat-bars { height: 160px; gap: 2px; }
.stat-bars .bar { border-radius: 4px 4px 0 0; }
.stat-bars .bar.neg { background: var(--danger); opacity: .75; }
.share { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.share span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.size-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kpis-6 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.seg { max-width: 100%; overflow-x: auto; }
.seg a, .seg label { white-space: nowrap; }
.seller-picker { display: block; }
.seller-picker-input { width: 100%; }
.board-filters { margin-bottom: 16px; padding: 12px 16px; }
.board .wcard[hidden] { display: none; }
.pager { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.board .col-more { width: 100%; margin-top: 8px; }
.date-range { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.date-range input { width: auto; padding: 6px 8px; cursor: pointer; }

/* Liste des commandes non traitées (WTB) : compacte et lisible */
.oo-table { font-size: 13px; }
.oo-table td { padding-top: 9px; padding-bottom: 9px; vertical-align: middle; }
.oo-table .oo-ref { white-space: nowrap; }
.oo-table .oo-ref .muted, .oo-table .oo-pair .muted { font-size: 12px; }
.oo-table .thumb { width: 46px; height: 34px; padding: 3px; }
.oo-table .oo-title { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 560px; }
.oo-table .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.oo-table tbody + tbody tr:first-child td { border-top: 1px solid var(--line); }
a.pill-link { text-decoration: none; }
a.pill-link:hover { filter: brightness(.95); }
.shopify-link { font-size: 11px; font-weight: 600; text-decoration: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; margin-left: 4px; white-space: nowrap; }
.shopify-link:hover { color: var(--ink); border-color: var(--line-strong); }

/* Page WTB : onglets Commandes / Tableau, filtres sur deux lignes */
.wtb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 20px; }
.wtb-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; margin-bottom: -1px; text-decoration: none; font-weight: 600;
              color: var(--muted); border-bottom: 2px solid transparent; }
.wtb-tabs a span { font-size: 12px; font-weight: 600; background: var(--subtle); border-radius: 999px; padding: 1px 8px; color: var(--ink-2); }
.wtb-tabs a:hover { color: var(--ink); }
.wtb-tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }
.oo-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.oo-top input[type=search] { flex: 1; min-width: 220px; }
.oo-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.oo-filters select { width: auto; }
.wcard .wsku { font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcard .wtitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wtb-tabs { overflow-x: auto; }
.wtb-tabs a { white-space: nowrap; }
@media (max-width: 860px) { .wtb-tabs a { padding: 10px 10px; } #tab-orders .card-head > .muted { display: none; } }
.order-link { font-weight: 700; color: var(--ink); text-decoration: none; }
.order-link span { font-weight: 500; font-size: 11px; color: var(--muted); margin-left: 3px; }
.order-link:hover { text-decoration: underline; }
.order-link:hover span { color: var(--ink); }

/* Téléphone : rien ne doit élargir la page (tableaux hors .table-wrap, longs libellés, champs à largeur fixe) */
@media (max-width: 860px) {
  .card, .col-stack, .grid-main > *, .grid-2 > *, .grid-3 > *, .row > *, .page-head > *, .page-actions > *, .field, .check, .check > span { min-width: 0; max-width: 100%; }
  .card table { display: block; overflow-x: auto; }
  .card .table-wrap table { display: table; }
  .pill { white-space: normal; }
  .field > input, .field > select, .field > textarea { max-width: 100%; }
}

/* Accueil : une carte par sujet en attente */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--radius); color: var(--ink); text-decoration: none; min-width: 0; transition: border-color .12s, background .12s; }
.tile:hover { border-color: var(--ink); }
.tile-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.tile-top b { font: 700 28px/1.1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.tile-title { font-weight: 600; font-size: 14px; }
.tile-desc { font-size: 12px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile-urgent { border-color: var(--danger); }
.tile-urgent .tile-top, .tile-urgent .tile-top b { color: var(--danger); }
.grid-2 > .todo { align-self: start; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .tile { padding: 14px; } .tile-top b { font-size: 24px; } .tile-desc { display: none; } }

/* Tableau de gestion (WTB) : onglets à compteur, barre d'outils, colonnes triables, pagination */
.dt { padding: 0; overflow: hidden; }
.dt-tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.dt-tabs button, .dt-tabs a { text-decoration: none; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); font-weight: 600; font-size: 13.5px;
                  padding: 14px 12px 12px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; min-height: 0; box-shadow: none; }
.dt-tabs button:hover, .dt-tabs a:hover { color: var(--ink); background: none; }
.dt-tabs button.active, .dt-tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }
.dt-tabs button span, .dt-tabs a span { font-size: 11.5px; font-weight: 600; background: var(--subtle); color: var(--ink-2); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.dt-tabs button.late span, .dt-tabs a.late span { background: var(--danger); color: #fff; }
.dt-toolbar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dt-toolbar select { width: auto; min-height: 36px; padding: 6px 30px 6px 10px; font-size: 13px; }
.dt-search { position: relative; flex: 1 1 320px; min-width: 200px; }
.dt-search [data-lucide] { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.dt-search input { width: 100%; max-width: none; padding-left: 34px; min-height: 36px; font-size: 13.5px; }
.dt .table-wrap { margin: 0; padding: 0; }
.dt-table th { padding: 10px 16px; background: var(--subtle); border-bottom: 1px solid var(--line); }
.dt-table td { padding: 10px 16px; }
.dt-table .thumb { width: 52px; height: 38px; }
.dt-table .cell-product { min-width: 260px; gap: 12px; }
.dt-prod { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 420px; }
.dt-prod b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-ref { font-weight: 600; text-decoration: none; }
.dt-ref:hover { text-decoration: underline; }
.dt-age { font-variant-numeric: tabular-nums; font-weight: 600; }
.dt-age.late { color: var(--danger); }
.dt-sort { background: none; border: 0; padding: 0; min-height: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; box-shadow: none; }
.dt-sort:hover { color: var(--ink); background: none; }
.dt-sort[data-dir]::after { content: ""; }
.dt-sort[data-dir="desc"]::after { content: " ↓"; } .dt-sort[data-dir="asc"]::after { content: " ↑"; }
.dt-sort[data-dir="desc"], .dt-sort[data-dir="asc"] { color: var(--ink); }
.dt-more { display: inline-flex; vertical-align: middle; color: var(--muted); margin-left: 4px; }
.dt-more [data-lucide] { width: 18px; height: 18px; }
.live { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 12px; color: var(--ok); font-weight: 600; white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: live 2s ease-in-out infinite; }
.live.off { color: var(--muted); } .live.off i { background: var(--muted); animation: none; }
@keyframes live { 50% { opacity: .35; } }
.dt-filters { padding-top: 0; }
.dt-filters .date-range input { min-height: 36px; font-size: 13px; }
.dt-section { padding: 14px 16px 6px; font-weight: 700; font-size: 13.5px; }
.dt-hint { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.dt-hint:empty { display: none; }
.dt .empty { padding: 48px 16px; }
.dt-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); }
.dt-pages { display: flex; gap: 4px; }
.dt-pages button { min-height: 32px; padding: 0 12px; font-size: 13px; }
.dt-pages button:disabled { opacity: .4; cursor: default; }
td.nowrap, .nowrap { white-space: nowrap; }
@media (max-width: 860px) { .dt-toolbar > * { flex: 1 1 calc(50% - 4px); min-width: 0; width: auto !important; } .dt-toolbar > .dt-search { flex-basis: 100%; } .dt-toolbar > a, .dt-toolbar > button { flex: 0 0 auto; } }
@media (max-width: 1100px) {  /* petit écran / téléphone : chaque ligne devient une fiche compacte, tout reste visible sans défiler */
  .dt-cards, .dt-cards tbody { display: block; }
  .dt-cards thead { display: none; }
  .dt-cards tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  .dt-cards tr[hidden] { display: none; }
  .dt-cards td { display: block; padding: 0; border: 0; text-align: left; }
  .dt-cards td:nth-child(1) { grid-column: 1 / -1; }
  .dt-cards td:nth-child(3), .dt-cards td:nth-child(5) { text-align: right; }
  .dt-cards td:nth-child(6) { grid-column: 1 / -1; text-align: left; }
  .dt-cards .cell-product { min-width: 0; }
  .dt-cards #dt-empty { display: block; }
  .dt-cards #dt-empty[hidden] { display: none; }
}
#wtb-panel { position: relative; }
.wtb-panel { position: absolute; right: 0; z-index: 20; margin-top: 6px; width: 280px; max-width: calc(100vw - 32px); box-shadow: 0 8px 30px rgba(0,0,0,.08); }  /* aligné sur le bord droit du bouton : ne déborde pas */
#wtb-panel summary .pill { margin-left: 2px; }
.offer-note { flex-basis: 100%; text-align: right; margin-top: -4px; }


/* ══════════════════════════════════════════════════════════════════════════
   Esprit units.supply en noir : fond blanc, Plus Jakarta Sans, noir pour l'action, boutons pilule,
   champs remplis gris clair sans bordure, panneaux gris doux sans cadre, statuts en pastilles teintées.
   Versions précédentes : static/style-before-select-identity.css, static/style-select-identity.css
   ══════════════════════════════════════════════════════════════════════════ */
body { font-size: 14.5px; }
h1 { font: 800 30px/1.15 var(--display); letter-spacing: -.02em; }
h2 { font: 700 16px/1.3 var(--display); letter-spacing: -.01em; }
/* champs : remplis, sans bordure, en pilule */
input, select, textarea { background: var(--subtle); border: 1px solid transparent; border-radius: 999px; padding: 10px 16px; min-height: 44px; }
textarea { border-radius: 18px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--brand); box-shadow: var(--focus); }
input[readonly] { background: var(--subtle); }
/* boutons : pilule indigo ; secondaires gris doux */
button, .btn { border-radius: 999px; min-height: 42px; padding: 0 20px; font-weight: 600; letter-spacing: 0; }
.btn-sm, button.btn-sm { min-height: 34px; padding: 0 14px; }
.btn-ghost { background: var(--subtle); border-color: transparent; color: var(--ink); }
.btn-ghost:hover { background: #e9e9ec; border-color: transparent; }
.link, button.link { border-radius: 0; }
/* panneaux : gris doux, arrondis, sans cadre ni ombre */
.card, .kpi, .todo, .tile, .dt { border: 0; background: var(--subtle); box-shadow: none; border-radius: 24px; }
.card .card, .card .tile { background: #fff; }
.dt .table-wrap, .dt-table th { background: transparent; }
.dt-table th, th { border-bottom-color: #e4e4e7; }
td { border-bottom-color: #e9e9ec; }
tbody tr:hover { background: rgba(255,255,255,.7); }
.thumb, .wtb-row .thumb { background: #fff; border-radius: 14px; }
.tile:hover { background: var(--brand-bg); }
.tile-urgent { background: #fff1f1; }
.tile-urgent .tile-top b { color: var(--danger); }
/* menu latéral : blanc, élément actif en pilule indigo pâle */
.sidebar { background: #fff; border-right-color: var(--line-2); }
.nav-link { border-radius: 999px; padding: 8px 14px; }
.nav-link.active { background: var(--ink); color: #fff; font-weight: 700; }
.nav-link.active [data-lucide] { color: #fff; }
.nav-link.active .count { color: #fff; }
.nav-link .count.alert { border-radius: 999px; }
/* onglets et segments */
.seg { background: var(--subtle); }
.seg a.active, .seg label.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dt-tabs { border-bottom: 0; padding: 8px 12px 0; gap: 6px; }
.dt-tabs button, .dt-tabs a { border: 0; border-radius: 999px; padding: 8px 14px; margin-bottom: 4px; }
.dt-tabs button.active, .dt-tabs a.active { background: #fff; color: var(--brand); }
.dt-tabs button span, .dt-tabs a span { background: #fff; }
.dt-tabs button.active span, .dt-tabs a.active span { background: var(--brand-bg); color: var(--brand); }
.dt-toolbar, .dt-hint, .dt-foot { border-color: transparent; }
/* statuts : pastilles teintées, sans point */
.pill { border-radius: 999px; padding: 4px 10px; font-weight: 600; }
.pill.ok { background: var(--ok-bg); } .pill.warn { background: var(--warn-bg); } .pill.danger { background: var(--danger-bg); } .pill.info { background: var(--brand-bg); color: var(--brand); }
.pill.ok::before, .pill.warn::before, .pill.danger::before, .pill.info::before { display: none; }
.pill.dark { background: var(--brand); color: #fff; }
.topbar { background: rgba(255,255,255,.92); border-bottom-color: var(--line-2); }
.omni input { background: var(--subtle); }
a.link, .link { color: var(--brand); }
.flash { border-radius: 18px; }
dialog.modal-card, dialog.confirm-dialog { border: 0; border-radius: 28px; }
.dt-sort { text-transform: inherit; letter-spacing: inherit; font-size: inherit; font-weight: inherit; }
@media (max-width: 860px) { button, .btn { white-space: normal; text-align: center; max-width: 100%; } .card, .dt { border-radius: 20px; } }
/* dans un panneau gris : champs et boutons secondaires en blanc pour rester visibles */
:is(.card, .dt, .todo, .kpi) :is(input, select, textarea):not([type=checkbox]):not([type=radio]):not([type=file]) { background: #fff; }
:is(.card, .dt, .todo, .kpi) .btn-ghost, :is(.card, .dt, .todo, .kpi) button.btn-ghost { background: #fff; }
:is(.card, .dt, .todo, .kpi) .btn-ghost:hover { background: var(--brand-bg); color: var(--brand); }

/* Espace vendeurs · WTB en grille (photo d'abord, tailles en pastilles cliquables) */
.wtb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 28px 20px; }
.wtb-model { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wtb-photo { aspect-ratio: 1; background: var(--subtle); border-radius: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 6px; }
.wtb-photo img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }
.wtb-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.wtb-sku { color: var(--muted); font-size: 12px; }
.wtb-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.size-chip { min-height: 30px; padding: 0 11px; border-radius: 999px; background: #fff; color: var(--ink); border: 1px solid var(--line-strong);
             font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.size-chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.size-chip.mine { background: var(--ink); color: #fff; border-color: var(--ink); }
.size-chip.declined { text-decoration: line-through; color: var(--muted); }
.size-chip.countered { border-color: var(--ink); border-style: dashed; }
.size-chip.dim { opacity: .3; }
.wtb-model .offer-status { color: var(--muted); }
.wtb-model .offer-status:empty { display: none; }
@media (max-width: 860px) { .wtb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; } .wtb-name { font-size: 13.5px; } }
.double-box { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 4px; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--ink); color: var(--ink); font-size: 13px; }
.double-box [data-lucide] { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.pages { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 28px 0 8px; flex-wrap: wrap; }
.pages button { min-width: 38px; }
.wtb-total { margin: 10px 0 2px !important; font-size: 15px; }
.wtb-total b { font: 800 26px/1 var(--display); letter-spacing: -.02em; margin-right: 4px; }

/* Offres reçues : une ligne par offre, qui passe sur deux lignes puis s'empile quand l'écran rétrécit */
.offer-list { display: flex; flex-direction: column; }
.offer-item { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(90px, .7fr) minmax(0, 1.4fr) minmax(130px, .9fr) auto;
  grid-template-areas: "pair order seller price actions"; gap: 8px 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.offer-item:last-child { border-bottom: 0; }
.offer-item[hidden] { display: none; }
.oi-pair { grid-area: pair; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.oi-pair .thumb { width: 56px; height: 40px; padding: 3px; flex-shrink: 0; }
.oi-min { min-width: 0; }
.oi-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; font-size: 14px; line-height: 1.3; }
.oi-order { grid-area: order; white-space: nowrap; }
.oi-seller { grid-area: seller; min-width: 0; }
.oi-price { grid-area: price; display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.oi-price > b { font-size: 16px; }
.oi-actions { grid-area: actions; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.oi-accept { display: flex; gap: 6px; flex-wrap: nowrap; }
.oi-accept select { width: auto; }
.oi-links { display: flex; gap: 14px; }
@media (max-width: 1280px) {
  .offer-item { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; grid-template-areas: "pair seller price" "order order actions"; }
}
@media (max-width: 720px) {
  .offer-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "pair pair" "seller price" "order order" "actions actions"; }
  .oi-actions { align-items: stretch; }
  .oi-accept select { flex: 1; min-width: 0; }
  .oi-links { justify-content: space-between; }
}

/* Fil d'une négociation : prix successifs, le dernier en gras */
.offer-thread { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.offer-thread .ot-who { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.offer-thread .ot-step.last { color: var(--ink); font-weight: 600; }
.offer-thread .ot-arrow { opacity: .6; }
.oi-counter { position: relative; }
.oi-counter[open] { flex-basis: 100%; }
.oi-counter-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; justify-content: flex-end; }
.oi-counter-form input[name=counter_price] { width: 110px; }
.oi-counter-form select { width: auto; }
.oi-links { flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; }
.offer-item { grid-template-areas: "pair order seller price actions" "foot foot foot foot foot"; }
.oi-foot { grid-area: foot; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.oi-foot:empty { display: none; }
.oi-thread { display: flex; align-items: center; gap: 10px; }
.oi-thread .offer-thread { margin-top: 0; }
.oi-foot .oi-counter-form { margin: 0 0 0 auto; }
.oi-foot .oi-counter-form[hidden] { display: none; }
@media (max-width: 1280px) {
  .offer-item { grid-template-areas: "pair seller price" "order order actions" "foot foot foot"; }
}
@media (max-width: 720px) {
  .offer-item { grid-template-areas: "pair pair" "seller price" "order order" "actions actions" "foot foot"; }
  .oi-foot .oi-counter-form { margin: 0; justify-content: flex-start; }
}
.oi-foot:not(:has(.oi-thread)):not(:has(form:not([hidden]))) { display: none; }
.accepted-pill { display: inline-flex; width: fit-content; margin-bottom: 6px; background: var(--ok-bg); border: 1px solid #cde5d7; font-weight: 700; }
.accepted-pill + b { display: block; }
.accepted-pill svg { width: 13px; height: 13px; }
.oi-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.oi-upload { cursor: pointer; }
a.pill { text-decoration: none; }
/* colonnes de largeur fixe : toutes les offres s'alignent, quel que soit leur contenu */
.offer-item { grid-template-columns: minmax(0, 1fr) 130px minmax(0, 200px) 150px 290px; }
@media (min-width: 1281px) { .oi-accept select { max-width: 140px; } }
.oi-order { white-space: normal; }
.oi-order .order-link { white-space: nowrap; }
.oi-actions { width: 100%; text-align: right; }
@media (max-width: 1280px) { .offer-item { grid-template-columns: minmax(0, 1fr) minmax(0, 220px) 170px; } }
@media (max-width: 720px) { .offer-item { grid-template-columns: minmax(0, 1fr) auto; } .oi-actions { text-align: left; } }

/* Mis deals : une carte verticale par paire, en grille (un vendeur peut en avoir beaucoup) */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.deal-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-width: 0; }
.deal-photo { position: relative; aspect-ratio: 4 / 3; background: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 4px; }
.deal-photo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; filter: brightness(.957); }
.deal-size { position: absolute; top: 8px; right: 8px; font-size: 18px; font-weight: 800; background: var(--surface); border-radius: 8px; padding: 2px 9px; }
.deal-title { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal-card .accepted-pill { margin-bottom: 0; }
.deal-action { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line-2); }
.deal-action > div { flex-basis: auto !important; margin: 0 0 8px !important; }
.deal-action form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.deal-action form input[name=tracking] { width: 100% !important; }
.deal-action form .btn, .deal-action form button { flex: 1; justify-content: center; }
.deal-action .pill { white-space: normal; line-height: 1.35; }
@media (max-width: 560px) {
  .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .deal-card { padding: 8px; }
  .deal-size { font-size: 15px; top: 4px; right: 4px; }
}
.chrono { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 4px 10px; border-radius: 999px; background: var(--line-2); }
.chrono svg { width: 14px; height: 14px; }
.chrono.soon { color: var(--warn); background: var(--warn-bg); }
.chrono.late { color: var(--danger); background: var(--danger-bg); }

/* Ventas y pagos (vendeur) : une ligne par paire à payer, montant toujours sur une ligne */
.pay-list { display: flex; flex-direction: column; }
.pay-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.pay-row:last-child { border-bottom: 0; }
.pay-row-simple { grid-template-columns: minmax(0, 1fr) auto auto; }
.pay-photo { width: 64px; height: 46px; background: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pay-photo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; filter: brightness(.957); }
.pay-main { min-width: 0; }
.pay-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-status { text-align: right; }
.pay-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 16px; }
@media (max-width: 640px) {
  .pay-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .pay-status { grid-column: 2 / 4; text-align: left; }
  .pay-photo { width: 56px; height: 40px; }
}
.pay-photo.empty { background: var(--line-2); color: var(--muted); }
.pay-photo.empty svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .pay-row { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "photo main amount" "photo status status"; row-gap: 6px; }
  .pay-row-simple { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: none; }
  .pay-photo { grid-area: photo; width: 48px; height: 36px; align-self: start; }
  .pay-main { grid-area: main; }
  .pay-amount { grid-area: amount; align-self: start; }
  .pay-status { grid-area: status; grid-column: auto; text-align: left; }
  .pay-row-simple .pay-main, .pay-row-simple .pay-amount { grid-area: auto; }
}

/* Accueil vendeur : deals à envoyer en lignes horizontales */
.deal-rows { display: flex; flex-direction: column; }
.deal-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 70px 220px 280px; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.deal-row:last-child { border-bottom: 0; }
.deal-row-photo { width: 104px; height: 74px; background: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.deal-row-photo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; filter: brightness(.957); }
.deal-row-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.deal-row-main .accepted-pill { margin-bottom: 0; }
.deal-row .big-size { text-align: center; }
.deal-row-action > div { margin: 0 0 6px !important; }
.deal-row-action form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.deal-row-action form .btn, .deal-row-action form button { flex: 1; justify-content: center; }
.deal-row-action form input[name=tracking] { flex: 1; min-width: 120px; }
@media (max-width: 1200px) {
  .deal-row { grid-template-columns: 88px minmax(0, 1fr) 56px; grid-template-areas: "photo main size" "photo chrono chrono" "action action action"; row-gap: 8px; }
  .deal-row-photo { grid-area: photo; width: 88px; height: 64px; }
  .deal-row-main { grid-area: main; } .deal-row .big-size { grid-area: size; }
  .deal-row .chrono { grid-area: chrono; } .deal-row-action { grid-area: action; }
  .deal-row-action form { justify-content: flex-start; }
}
.scan-receive { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; padding: 16px 20px; }
.scan-receive .scan-box { position: relative; }
.scan-receive .scan-box input { width: 100%; font-size: 16px; padding-right: 56px; }
.rs-search { position: relative; margin-bottom: 12px; }
.rs-search input { width: 100%; padding-right: 56px; }
.scan-box.rs-search { background: none; border: 0; padding: 0; gap: 0; }
.scan-box.rs-search input { font: inherit; font-size: 14px; min-height: 0; padding: 12px 56px 12px 20px; letter-spacing: normal; border-radius: 999px; }
.scan-box.rs-search .scan-btn { right: 6px; min-height: 34px; }

/* ── Mode sombre (suite) : le bloc « identité Select » plus haut pose du blanc en dur ;
   on le ramène ici sur les couleurs du thème sombre ── */
:root[data-theme="dark"] { --brand: #f2f2f2; --brand-bg: #262626; }
[data-theme="dark"] input:focus, [data-theme="dark"] select:focus, [data-theme="dark"] textarea:focus { background: var(--surface); }
[data-theme="dark"] .btn-ghost:hover { background: #2a2a2a; }
[data-theme="dark"] :is(.card .card, .card .tile) { background: var(--surface); }
[data-theme="dark"] :is(.dt-table th, th) { border-bottom-color: var(--line-strong); }
[data-theme="dark"] td { border-bottom-color: var(--line); }
[data-theme="dark"] tbody tr:hover { background: rgba(255,255,255,.03); }
[data-theme="dark"] .tile-urgent { background: var(--danger-bg); }
[data-theme="dark"] .sidebar { background: var(--surface); border-right-color: var(--line); }
[data-theme="dark"] :is(.nav-link.active, .nav-link.active [data-lucide], .nav-link.active .count:not(.alert)) { color: var(--on-ink); }
[data-theme="dark"] :is(.seg a.active, .seg label.active) { background: var(--line-strong); color: var(--ink); box-shadow: none; }
[data-theme="dark"] :is(.dt-tabs button.active, .dt-tabs a.active, .dt-tabs button span, .dt-tabs a span) { background: var(--surface); }
[data-theme="dark"] .pill.dark { color: var(--on-ink); }
[data-theme="dark"] .topbar { background: var(--topbar); border-bottom-color: var(--line); }
[data-theme="dark"] :is(.card, .dt, .todo, .kpi) :is(input, select, textarea):not([type=checkbox]):not([type=radio]):not([type=file]),
[data-theme="dark"] :is(.card, .dt, .todo, .kpi) :is(.btn-ghost, button.btn-ghost) { background: var(--surface); color: var(--ink); }
[data-theme="dark"] :is(.card, .dt, .todo, .kpi) .btn-ghost:hover { background: #2a2a2a; color: var(--ink); }
[data-theme="dark"] .size-chip { background: var(--surface); }
[data-theme="dark"] :is(.size-chip:hover, .size-chip.mine) { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
[data-theme="dark"] .double-box { background: var(--surface); }
[data-theme="dark"] .accepted-pill { border-color: #1f4a33; }
[data-theme="dark"] .chrono { background: var(--subtle); }
/* tuiles photo : restent claires (photos détourées sur blanc) mais moins éblouissantes */
[data-theme="dark"] :is(.deal-photo, .deal-row-photo, .pay-photo:not(.empty), .oi-pair .thumb) { background: #e6e6e6; }
[data-theme="dark"] .deal-size { background: var(--surface); color: var(--ink); }
/* photos en « multiply » sur tuile : sur fond sombre elles deviennent noires → tuile claire, sans mélange */
[data-theme="dark"] :is(.wtb-photo, .pcard .img, .product-hero .img) { background: #e6e6e6; }
[data-theme="dark"] :is(.wtb-photo img, .pcard .img img, .product-hero .img img) { mix-blend-mode: normal; filter: brightness(.92); }
[data-theme="dark"] .pcard .img .count { background: var(--surface); color: var(--ink); }
.label-step { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.label-step .pill svg { width: 13px; height: 13px; }
/* Liste WTB : le nom de la paire passe sur 2 lignes au lieu d'élargir le tableau (plus de défilement horizontal) */
.dt-cards .dt-prod { max-width: none; }
.dt-cards .dt-prod b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.dt-cards td:first-child { width: 100%; }
.dt-cards td.num.nowrap .btn { padding: 0 12px; }
/* Offres reçues : une 2e offre sur la même paire se range sous la 1re, sans répéter la paire */
.offer-item.same-pair { border-top: 0; padding-top: 2px; margin-top: -10px; }
.offer-item.same-pair :is(.oi-pair, .oi-order) { visibility: hidden; }
.offer-list .offer-item:has(+ .same-pair) { border-bottom-color: transparent; }
/* Mis deals → ofertas en espera : prix en grand, actions empilées */
.offer-prices { font-variant-numeric: tabular-nums; }
.offer-prices b { font-size: 20px; }
.offer-actions-v { display: flex; flex-direction: column; gap: 8px; }
.offer-actions-v form button, .offer-actions-v > details > summary.btn { width: 100%; justify-content: center; }
.offer-actions-v details > summary { list-style: none; cursor: pointer; }
.offer-actions-v details > summary::-webkit-details-marker { display: none; }
.offer-actions-v .price-form { display: flex; gap: 6px; margin-top: 8px; }
.offer-actions-v .price-form input { flex: 1; min-width: 0; }
.offer-actions-v .price-form button { width: auto; }
.offer-actions-v .link.danger { align-self: center; width: auto; }
.deal-card.is-countered { box-shadow: inset 0 0 0 1.5px var(--warn); }
.seg a.active .muted, .seg label.active .muted { color: var(--muted); }
.deal-card .btn-ghost, .deal-card button.btn-ghost { background: var(--surface); border: 1px solid var(--line-strong); }
.offer-actions-v summary.btn { display: flex; align-items: center; }
.offer-actions-v .price-form button { flex: 0 0 auto; padding: 0 16px; }
.offer-actions-v .price-form input { flex: 1 1 auto; }

/* Fiche du Sheet : choix de la fiche Shopify correspondante */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.match-card { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.match-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg-soft, #f4f4f4); border-radius: 8px; }
.match-card button { margin-top: auto; }

/* Paiements par virement : couleurs et logo Wise */
.wise-logo { display: inline-block; width: 1.05em; height: 1.05em; flex: none; background-color: currentColor;
             -webkit-mask: url("https://cdn.jsdelivr.net/npm/simple-icons@13.0.0/icons/wise.svg") center/contain no-repeat;
             mask: url("https://cdn.jsdelivr.net/npm/simple-icons@13.0.0/icons/wise.svg") center/contain no-repeat; }
.btn.btn-wise, button.btn-wise, .btn-wise { background: #9fe870; border-color: #9fe870; color: #163300; }
.btn.btn-wise:hover, button.btn-wise:hover, .btn-wise:hover { background: #8fd860; border-color: #8fd860; color: #163300; }
.btn-wise .lucide-check, .btn-wise [data-lucide="check"] { display: none; }
#pay-btn:not(.btn-wise) .wise-logo { display: none; }

/* Fiche sans visuel (vêtements) : prendre ou importer une photo */
.add-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%;
             min-height: 120px; border: 1.5px dashed #cfcfcf; border-radius: 14px; color: var(--muted, #737373);
             font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; padding: 12px; }
.add-photo:hover { border-color: var(--ink, #0a0a0a); color: var(--ink, #0a0a0a); }
.add-photo [data-lucide], .add-photo svg { width: 28px; height: 28px; }
.add-photo.busy { opacity: .5; pointer-events: none; }

/* Boutons de filtre rapides (ex. reshipper sur Commandes StockX) */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--subtle);
        color: var(--ink, #0a0a0a); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.chip:hover { background: var(--hover); filter: brightness(.96); }
.chip.active { background: var(--accent, #0a0a0a); color: var(--on-ink, #fff); }
.chip.active .muted { color: var(--on-ink-2, rgba(255,255,255,.7)); }

.pay-toggle { margin-top: 4px; }
.pay-toggle button.pill { border: 0; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 600; }

/* Commandes StockX : actions de fin de ligne sur deux lignes plutôt que de déborder */
.sx-orders td:last-child { min-width: 175px; max-width: 200px; }
.sx-orders td:last-child .btn { white-space: normal; height: auto; min-height: 32px; line-height: 1.25; padding: 7px 12px; text-align: center; border-radius: 12px; }
.sx-orders td:last-child > span { display: block; text-align: right; line-height: 1.3; }

/* Ventes : en-têtes sur deux lignes si besoin, pour que le tableau tienne sans défilement */
.sales-table th { white-space: normal; line-height: 1.3; }
.sales-table .actions { flex-wrap: wrap; gap: 8px; }

/* Offres : négociation discrète, statut unique à droite */
.oi-foot { padding-top: 2px; }
.oi-thread .muted { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.oi-actions .pill { white-space: nowrap; }

/* TVA par régime : achats et ventes côte à côte s'il y a la place, l'un sous l'autre sinon */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 16px; }
.acc-grid .pill { white-space: normal; }

/* Deux cartes côte à côte seulement s'il y a la place pour leurs tableaux (sinon l'une sous l'autre) */
@media (max-width: 1180px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

input.invalid { border-color: var(--danger, #d0191f) !important; }

/* Caisse : la paire scannée, le prix et la validation */
.checkout-done { display: flex; align-items: center; gap: 14px; border: 1px solid #cde5d7; background: var(--ok-bg, #ecf6f0); }
.checkout-done [data-lucide], .checkout-done svg { width: 28px; height: 28px; color: var(--ok, #0b7a45); }
.checkout-item .ci-head { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.checkout-item .ci-head img { width: 132px; height: 96px; object-fit: contain; mix-blend-mode: multiply; flex: none; }
.checkout-item h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
.ci-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.ci-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.ci-price { flex: 0 1 200px; }
.ci-price input { font-size: 24px; font-weight: 700; }
.ci-fields .grow { flex: 1 1 220px; min-width: 0; }
.ci-actions { display: flex; gap: 10px; margin-top: 16px; }
.ci-actions .grow { flex: 1; justify-content: center; }
@media (max-width: 600px) {
  .checkout-item .ci-head { flex-direction: column; align-items: flex-start; }
  .checkout-item .ci-head img { width: 100%; height: 150px; }
  .ci-price { flex-basis: 100%; }
  .checkout-done { flex-wrap: wrap; }
}
.ci-actions button { white-space: nowrap; gap: 6px; padding-left: 16px; padding-right: 16px; }
.ci-actions button span { display: inline; }
@media (max-width: 600px) { .ci-actions .btn-ghost { flex: none; padding: 0 14px; } }

/* Entrée par scan : dernière boîte entrée, erreurs, choix de taille */
.box-added { display: flex; align-items: center; gap: 16px; border: 1px solid #cde5d7; background: var(--ok-bg, #ecf6f0); }
.box-added img { width: 96px; height: 70px; object-fit: contain; mix-blend-mode: multiply; flex: none; }
.box-added .ok-text svg, .box-added .ok-text [data-lucide] { width: 14px; height: 14px; vertical-align: -2px; }
.box-added-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.scan-error { padding: 10px 14px; border-radius: 10px; background: var(--danger-bg, #fdeeee); color: var(--danger, #d0191f); font-weight: 500; }
.size-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.size-btn { padding: 14px 0; border-radius: 12px; border: 1px solid var(--line, #e5e5e5); background: var(--surface, #fff); font-size: 16px; font-weight: 600; cursor: pointer; color: inherit; }
.size-btn:hover { background: #111; color: #fff; border-color: #111; }
@media (max-width: 600px) {
  .box-added { flex-wrap: wrap; }
  .box-added-actions { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}
.box-added > .grow { flex: 1 1 auto; }

/* Accueil : les trois gestes du quotidien */
.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.qa { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--accent, #0a0a0a); color: var(--on-ink, #fff); text-decoration: none; }
.qa:hover { opacity: .9; }
.qa [data-lucide], .qa svg { width: 26px; height: 26px; flex: none; }
.qa span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qa b { font-size: 15px; }
.qa small { font-size: 12px; color: var(--on-ink-2, rgba(255,255,255,.7)); }
.tile-go { margin-top: auto; padding-top: 6px; font-size: 12px; font-weight: 600; }
.mini-kpis small .loc { margin-right: 3px; }
@media (max-width: 860px) {
  .quick-actions { display: none; }   /* téléphone : déjà dans la barre du bas (Checkout, Stock in, Stock) */
  .tile-go { display: none; }
}

.today-total { display: flex; align-items: baseline; gap: 10px; margin: -4px 0 10px; }
.today-total b { font: 700 26px/1.1 var(--display); letter-spacing: -.02em; }
.mini-kpis small .nowrap { font: inherit; text-transform: none; letter-spacing: 0; color: inherit; display: inline; }
/* Téléphone : formulaires sur une seule colonne (un champ « sur 2 colonnes » créait une 2e colonne de 80 px) */
@media (max-width: 600px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid > * { grid-column: 1 / -1 !important; }
}

/* Consigna : plusieurs tailles et quantités en une proposition */
.ms-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ms-default { max-width: 200px; }
.ms .size-list { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.ms .size-btn { padding: 10px 0; font-size: 15px; position: relative; display: flex; justify-content: center; align-items: center; }
.ms .size-btn.picked { background: #111; color: #fff; border-color: #111; }
.ms .size-btn.picked::after { content: "×" attr(data-n); position: absolute; top: -7px; right: -6px; background: var(--ok, #1a7f37); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 6px; line-height: 16px; }
.ms-lines { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ms-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.ms-size { min-width: 74px; }
.ms-step { display: inline-flex; align-items: center; gap: 6px; }
.ms-step button { min-width: 34px; font-size: 16px; padding: 4px 0; }
.ms-q { min-width: 20px; text-align: center; font-size: 16px; }
.ms-price { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.ms-price input { width: 90px; }
.ms-total { margin-top: 8px; font-weight: 600; }
@media (max-width: 520px) { .ms-price { margin-left: 0; } }
/* espace vendeur : facture du vendeur pro (fichier + numéro) */
.inv-fields { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 360px; flex-basis: 100%; text-align: left; }
.inv-head .link { text-align: left; padding: 0; }
.inv-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13px; text-align: left; }
.inv-file { position: relative; justify-content: flex-start; overflow: hidden; }
.inv-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.inv-fields input[name=invoice_number] { width: 100%; background: var(--subtle); border: 1px solid var(--line); }
.inv-file { border: 1px solid var(--line); }
/* mobile : une carte avec le formulaire de facture prend toute la largeur (sinon champs tronqués) */
@media (max-width: 720px) { .deal-grid .deal-card:has(.inv-fields) { grid-column: 1 / -1; } }
/* inscription vendeur : panneau « pourquoi vendre ici » à gauche, formulaire en 3 étapes à droite */
.signup { max-width: 560px; margin: 0 auto; }
.signup h1 { margin-bottom: 4px; }
.su { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line);
      border-radius: 28px; overflow: hidden; max-width: 1040px; margin: 0 auto; }
.su { --su-bg: #111113; --su-fg: #fff; --su-fg-2: rgba(255,255,255,.66); }
.su-aside { background: var(--su-bg); color: var(--su-fg); border-right: 1px solid var(--line); padding: 40px 36px; display: flex; flex-direction: column; gap: 22px; }
.su-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.su-logo { color: var(--su-fg); padding: 0; font-size: 20px; }
.su-logo small { color: var(--su-fg-2); }
.su-theme { color: var(--su-fg); background: rgba(255,255,255,.08); border-color: transparent; }
.su-theme:hover { background: rgba(255,255,255,.16); }
.su-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--su-fg-2); }
.su-title { font: 800 34px/1.08 var(--display); letter-spacing: -.035em; color: var(--su-fg); text-wrap: balance; margin: 14px 0 0; }
.su-wanted { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.07); }
.su-wanted > div:last-child { font-size: 13px; line-height: 1.35; color: var(--su-fg-2); }
.su-count { display: block; font: 800 26px/1 var(--display); letter-spacing: -.03em; color: var(--su-fg); font-variant-numeric: tabular-nums; }
.su-thumbs { display: flex; flex-shrink: 0; }
.su-thumbs span { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden;
                  border: 2px solid var(--su-bg); margin-left: -12px; }
.su-thumbs span:first-child { margin-left: 0; }
.su-thumbs img { width: 40px; height: 40px; object-fit: contain; }
.su-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 14px; line-height: 1.4; }
.su-perks li { display: flex; gap: 12px; align-items: flex-start; }
.su-perks [data-lucide], .su-perks svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--su-fg-2); }
.su-main { padding: 40px 44px 32px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.su-h { font: 800 24px/1.15 var(--display); letter-spacing: -.025em; margin: 0 0 4px; }
.su-head p { margin: 0; }
.su-steps { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.su-steps li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.su-steps li + li::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--line-strong); margin-right: 2px; }
.su-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); font-size: 12px; }
.su-dot > * { grid-area: 1 / 1; }
.su-dot [data-lucide], .su-dot svg { width: 14px; height: 14px; display: none; }
.su-steps li.on { color: var(--ink); }
.su-steps li.on .su-dot { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.su-steps li.done { color: var(--ink-2); }
.su-steps li.done .su-dot { background: var(--ok-bg); border-color: var(--ok-bg); color: var(--ok); }
.su-steps li.done .su-dot b { display: none; }
.su-steps li.done .su-dot svg, .su-steps li.done .su-dot [data-lucide] { display: block; }
.su-login { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 16px; border-radius: 18px;
            background: var(--subtle); font-size: 14.5px; font-weight: 600; }
.su-login .btn { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); }
.su-login .btn:hover { border-color: var(--ink); }
.signup-form { display: flex; flex-direction: column; gap: 22px; }
.signup-step { display: flex; flex-direction: column; gap: 14px; }
.signup-step h2 { margin: 0; font-size: 17px; }
.signup-form.js .signup-step[hidden], .signup-group[hidden] { display: none; }
.signup-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.signup-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1.5px solid var(--line); border-radius: 18px;
               cursor: pointer; transition: border-color .12s, background .12s; }
.signup-card:hover { border-color: var(--line-strong); }
.signup-card:has(input:checked) { border-color: var(--ink); background: var(--subtle); }
.signup-card:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.signup-card > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.signup-card input { position: absolute; top: 16px; right: 16px; margin: 0; width: 18px; height: 18px; accent-color: var(--ink); }
.su-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--subtle); color: var(--ink); }
.signup-card:has(input:checked) .su-ic { background: var(--ink); color: var(--on-ink); }
.su-ic [data-lucide], .su-ic svg { width: 19px; height: 19px; }
.signup-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.signup-group { display: flex; flex-direction: column; gap: 14px; }
.signup-nav { display: flex; gap: 8px; justify-content: flex-end; padding-top: 4px; }
.signup-nav [data-next] { min-width: 140px; justify-content: center; }
.signup-nav [data-submit] { flex: 1; justify-content: center; }
@media (max-width: 860px) {
  .su { grid-template-columns: minmax(0, 1fr); border-radius: 22px; }
  .su-aside { padding: 26px 22px; gap: 14px; }
  .su-title { font-size: 26px; margin: 4px 0 0; }
  .su-perks { display: none; }
  .su-main { padding: 24px 20px 24px; }
}
@media (max-width: 560px) { .signup-cards, .signup-row { grid-template-columns: 1fr; } .su-steps li + li::before { width: 18px; }
  .su-steps li:not(.on) .su-lbl { display: none; } }
.pending-icon { width: 56px; height: 56px; margin: 30px auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--warn-bg); color: var(--warn); }
@media (max-width: 560px) { .signup-cards, .signup-row { grid-template-columns: 1fr; } }
/* accueil public vendeurs (templates/public/home.html) */
.lp { background: var(--bg); color: var(--ink); }
.lp-nav-wrap { position: sticky; top: 12px; z-index: 20; padding: 0 16px; }
.lp-nav { max-width: 1080px; margin: 12px auto 0; display: flex; align-items: center; gap: 18px; padding: 10px 12px 10px 22px;
          background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
          border: 1px solid var(--line); border-radius: 999px; }
.lp-logo { padding: 0; font-size: 17px; }
.lp-links { display: flex; gap: 4px; margin: 0 auto; }
.lp-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13.5px; padding: 7px 12px; border-radius: 999px; }
.lp-links a:hover { background: var(--subtle); color: var(--ink); }
.lp-actions { display: flex; align-items: center; gap: 8px; }
.lp-login { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13.5px; padding: 7px 10px; }
.lp main { max-width: 1080px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.lp-hero { text-align: center; padding: 86px 0 56px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.lp-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
            background: var(--subtle); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.lp-hero h1 { font: 800 clamp(44px, 8vw, 84px)/0.98 var(--display); letter-spacing: -.05em; margin: 0; text-wrap: balance; }
.lp-hero h1 span { color: var(--muted); }
.lp-lead { max-width: 620px; font-size: 17px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.lp-hero-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lp-perks { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.lp-perks li { display: flex; align-items: center; gap: 7px; }
.lp-perks svg, .lp-perks [data-lucide] { width: 17px; height: 17px; color: var(--ink); }
.lp-section { padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.lp-h2 { font: 800 clamp(28px, 4vw, 40px)/1.1 var(--display); letter-spacing: -.035em; margin: 0 0 26px; }
.lp-sub { color: var(--muted); margin: 6px 0 0; font-size: 14.5px; }
.lp-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-way { background: var(--subtle); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.lp-way h3 { font: 800 21px/1.2 var(--display); letter-spacing: -.02em; margin: 0; }
.lp-way p { margin: 0; color: var(--ink-2); line-height: 1.6; flex: 1; }
.lp-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); }
.lp-ic svg, .lp-ic [data-lucide] { width: 21px; height: 21px; }
.lp-more { font-weight: 700; color: var(--ink); text-decoration: none; }
.lp-more:hover { text-decoration: underline; }
.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.lp-steps li { counter-increment: s; border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.lp-steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink);
                       font: 800 14px/1 var(--display); margin-bottom: 6px; }
.lp-steps b { font-size: 16px; }
.lp-steps span { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.lp-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.lp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lp-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); padding: 12px 12px 16px; border-radius: 22px;
           border: 1px solid var(--line); transition: border-color .15s, transform .15s; min-width: 0; }
.lp-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.lp-img { aspect-ratio: 4 / 3; border-radius: 14px; background: #f4f4f5; display: grid; place-items: center; overflow: hidden; margin-bottom: 6px; }
.lp-img img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }
.lp-title { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-sku { font: 500 11.5px/1 "JetBrains Mono", monospace; color: var(--muted); }
.lp-sizes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.lp-sizes span { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); font-variant-numeric: tabular-nums; }
.lp-faq { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.lp-faq details { border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; }
.lp-faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::after { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; color: var(--muted); }
.lp-faq details[open] summary::after { content: "−"; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq p { margin: 10px 0 0; color: var(--ink-2); line-height: 1.6; }
.lp-final { margin: 20px 0 64px; padding: 54px 24px; border-radius: 30px; background: #111113; color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.lp-final h2 { font: 800 clamp(28px, 4vw, 42px)/1.1 var(--display); letter-spacing: -.035em; margin: 0; color: #fff; }
.lp-final-btn { background: #fff; color: #111113; border-color: #fff; }
.lp-final-btn:hover { background: #e9e9ea; }
.lp-foot { max-width: 1080px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-left, 0px)) 40px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
           font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.lp-foot-links { display: flex; gap: 18px; }
.lp-foot a { color: var(--muted); }
[data-theme="dark"] .lp-img { background: #ececee; }
[data-theme="dark"] .lp-final { background: var(--subtle); }
@media (max-width: 900px) { .lp-steps, .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .lp-links { display: none; } .lp-actions { margin-left: auto; gap: 4px; } .lp-actions .theme-toggle { display: none; }
  .lp-nav { padding: 8px 8px 8px 18px; }
  .lp-hero { padding: 54px 0 40px; } .lp-lead { font-size: 15.5px; }
  .lp-ways { grid-template-columns: 1fr; }
  .lp-section { padding: 42px 0; }
}
@media (max-width: 420px) { .lp-steps { grid-template-columns: 1fr; } .lp-grid { gap: 10px; } }
