/* TW — black / white street, touche d'orange du logo */

@font-face {
  font-family: 'Anton';
  src: url('/fonts/anton-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Anton';
  src: url('/fonts/anton-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --black: #0a0a0a;
  --ink: #111111;
  --ink-2: #3d3d3f;
  --muted: #707072;
  --faint: #a8a8aa;
  --line: #e5e5e5;
  --line-strong: #cacacb;
  --soft: #f5f5f5;
  --soft-2: #ededed;
  --white: #ffffff;
  --orange: #f7931e;
  --orange-soft: #fff1e0;
  --orange-ink: #a85600;
  --danger: #d30005;
  --danger-soft: #fdecec;
  --ok: #007d48;
  --ok-soft: #e6f4ed;
  --side-ink: #a3a3a6;

  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --side-w: 248px;
  --gutter: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 20px; height: 20px; flex: none; }
.icon-lg { width: 28px; height: 28px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dot-accent { color: var(--orange); }

/* ---------- titres ---------- */

h1, h2, h3 { margin: 0; font-weight: 400; }
.display {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.95;
}
h1.display { font-size: clamp(36px, 6vw, 60px); line-height: 1; }
.success .display { line-height: 1.05; }
h2.display { font-size: 26px; line-height: 1; }
h3 { font-size: 16px; font-weight: 650; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.lead { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:hover { background: #3a3a3a; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-accent { background: var(--orange); color: var(--black); }
.btn-accent:hover { background: #ffa53d; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { background: transparent; border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.btn-danger { background: transparent; color: var(--danger); border-color: #f0b5b5; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }

.link-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.link-back:hover { color: var(--ink); }

/* ---------- formulaires ---------- */

.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 600; }
.field small, .hint { color: var(--muted); font-size: 13px; }
.input, .select, .textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.input-sm, .select-sm { height: 40px; font-size: 15px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-error { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 14px; font-weight: 500; }

.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 42px; }

.seg {
  display: inline-flex;
  justify-self: start;
  max-width: 100%;
  overflow-x: auto;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--soft);
}
.seg button {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
@media (max-width: 640px) {
  .toolbar .seg { width: 100%; }
  .toolbar .seg button { flex: 1; padding: 0 8px; }
  .toolbar .select { flex: 1 1 140px; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  font-size: 14px;
  font-weight: 550;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); flex: none; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; height: 40px; }
.stepper button { width: 38px; height: 38px; border: 0; background: transparent; border-radius: 999px; display: grid; place-items: center; }
.stepper button:hover { background: var(--soft); }
.stepper input { width: 40px; border: 0; text-align: center; font-weight: 650; font-size: 16px; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- structure ---------- */

.shell { min-height: 100vh; }
.sidebar { display: none; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 var(--gutter);
  background: var(--black);
  color: var(--white);
}
.topbar .logo { width: 86px; color: var(--white); }
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #262626;
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.main { padding: 24px var(--gutter) calc(110px + var(--safe-bottom)); max-width: 1280px; }

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(64px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--black);
}
.tabbar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--side-ink);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.tabbar a.active { color: var(--white); }
.tabbar a.active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--orange);
}
.tabbar .tab-mic span.mic-bubble {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-top: -26px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--black);
  box-shadow: 0 0 0 5px var(--black);
}
.tabbar .tab-mic.active::before { display: none; }
.tabbar .tab-mic .icon { width: 24px; height: 24px; }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: var(--side-w) 1fr; }
  .topbar, .tabbar { display: none; }
  .sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 28px 18px 20px;
    background: var(--black);
    color: var(--white);
  }
  .sidebar .logo { width: 136px; margin: 0 12px 28px; color: var(--white); }
  .sidebar .btn-accent { margin: 0 4px 22px; }
  .main { padding: 44px 48px 64px; }
}

.nav { display: grid; gap: 2px; }
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: var(--side-ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav a:hover { color: var(--white); background: #161616; }
.nav a.active { color: var(--white); background: #1c1c1c; }
.nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--orange);
}
.side-foot { margin-top: auto; padding: 16px 14px 0; border-top: 1px solid #222; display: flex; align-items: center; gap: 12px; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who small { color: var(--side-ink); font-size: 12px; }
.side-foot button { background: transparent; border: 0; color: var(--side-ink); padding: 8px; border-radius: 8px; }
.side-foot button:hover { color: var(--white); background: #1c1c1c; }

/* ---------- en-têtes de page ---------- */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head a { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.section-head a:hover { color: var(--ink); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.toolbar .search { flex: 1 1 260px; }
.toolbar .select { width: auto; min-width: 150px; }

/* ---------- cartes ---------- */

.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--white); }
.card-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-bottom: 16px; }
.card-title h3 { font-size: 15px; }
.card-title small { color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.grid-halves { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-halves { grid-template-columns: 1fr 1fr; } }

/* tuiles chiffres */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; display: block; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-value { margin-top: 6px; font-size: 34px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }
.stat-hero { background: var(--black); border-color: var(--black); color: var(--white); }
.stat-hero .stat-label, .stat-hero .stat-sub { color: var(--side-ink); }
.stat-hero .stat-value { font-size: 52px; }
.stat-warn .stat-value { color: var(--orange-ink); }
a.stat:hover { border-color: var(--ink); }
a.stat-hero:hover { border-color: var(--orange); }

/* ---------- produits ---------- */

.pgrid { display: grid; gap: 28px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pcard { display: block; text-decoration: none; min-width: 0; }
.pcard-img { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--soft); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.pcard:hover .pcard-img img { transform: scale(1.03); }
.pcard:hover .ph span { color: #cfcfd0; }
.pcard-flag {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--white);
  font-size: 12px;
  font-weight: 650;
}
.pcard-flag.out { background: var(--ink); color: var(--white); }
.pcard-flag.low { background: var(--orange); color: var(--black); }
.pcard-body { padding-top: 12px; }
.pcard-brand { font-size: 13px; color: var(--muted); font-weight: 500; }
.pcard-name { font-size: 16px; font-weight: 650; line-height: 1.3; }
.pcard-color { font-size: 14px; color: var(--muted); }
.pcard-total { margin-top: 6px; font-size: 14px; font-weight: 650; }
.pcard .sizes { margin-top: 10px; }

.ph { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; background: var(--soft); }
.ph span {
  font-family: var(--display);
  font-size: clamp(30px, 7vw, 54px);
  line-height: 0.9;
  text-transform: uppercase;
  color: #dcdcdd;
  text-align: center;
  padding: 0 10px;
  word-break: break-word;
  transition: color 0.2s;
}
.thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex: none; background: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph span { font-size: 15px; padding: 0 4px; }
.thumb-sm { width: 44px; height: 44px; }
.thumb-sm .ph span { font-size: 12px; }

.sizes { display: flex; flex-wrap: wrap; gap: 4px; }
.sz {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  line-height: 26px;
  white-space: nowrap;
}
.sz b { font-weight: 700; }
.sz.out { color: var(--faint); background: var(--soft); border-color: var(--soft); text-decoration: line-through; }
.sz.low { border-color: var(--orange); }
.sz.low b { color: var(--orange-ink); }
.sz.hit { border-color: var(--ink); background: var(--ink); color: var(--white); }

/* fiche produit */
.product-hero { display: grid; gap: 24px; }
@media (min-width: 900px) { .product-hero { grid-template-columns: minmax(280px, 440px) 1fr; gap: 40px; align-items: start; } }
.product-img { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--soft); }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img .ph span { font-size: clamp(48px, 10vw, 96px); }
.photo-btn { position: absolute; right: 12px; bottom: 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.meta li { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 550; }
.big-total { display: flex; align-items: baseline; gap: 10px; margin: 24px 0; }
.big-total b { font-size: 56px; font-weight: 750; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.big-total span { color: var(--muted); font-weight: 550; }

.size-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.size-tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 10px; }
.size-tile .s { font-size: 13px; color: var(--muted); font-weight: 600; }
.size-tile .q { font-size: 28px; font-weight: 750; line-height: 1.15; font-variant-numeric: tabular-nums; }
.size-tile .d { font-size: 12px; color: var(--muted); }
.size-tile.out { background: var(--soft); border-color: var(--soft); }
.size-tile.out .q { color: var(--faint); }
.size-tile.low { border-color: var(--orange); }
.size-tile.low .q { color: var(--orange-ink); }

/* ---------- listes ---------- */

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .sub { color: var(--muted); font-size: 13px; }
.list .end { text-align: right; flex: none; }
.list a.row-link { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; text-decoration: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.badge .icon { width: 14px; height: 14px; }
.badge-dark { background: var(--ink); color: var(--white); }
.badge-orange { background: var(--orange); color: var(--black); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-line { background: transparent; border: 1px solid var(--line-strong); }

.delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.plus { color: var(--ok); }
.delta.minus { color: var(--ink); }

.day-head { margin: 28px 0 6px; font-size: 12px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.day-head:first-child { margin-top: 0; }

.sale { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px; }
.sale.cancelled { background: var(--soft); border-color: var(--soft); }
.sale.cancelled .sale-lines { text-decoration: line-through; color: var(--muted); }
.sale-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.sale-top .time { font-weight: 700; font-variant-numeric: tabular-nums; }
.sale-top .who { font-weight: 600; }
.sale-top .spacer { flex: 1; }
.sale-lines { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.sale-lines li { display: flex; gap: 10px; font-size: 14px; }
.sale-lines .q { font-weight: 700; min-width: 28px; font-variant-numeric: tabular-nums; }
.sale-lines .s { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; }
.sale-note { margin-top: 8px; font-size: 13px; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--white); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table .nowrap { white-space: nowrap; }

.empty { padding: 48px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--soft) 0%, var(--soft-2) 50%, var(--soft) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- graphique ---------- */

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--ink); transition: opacity 0.12s; }
.chart .bar.today { fill: var(--orange); }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart g.col:hover .bar, .chart g.col:focus-within .bar { opacity: 0.7; }
.chart .peak-label { fill: var(--ink); font-size: 12px; font-weight: 650; font-family: var(--sans); }
.tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  white-space: nowrap;
  transform: translate(-50%, -100%);
}
.tooltip b { display: block; font-size: 16px; }

.hbar { display: grid; gap: 12px; }
.hbar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.hbar-row .name { font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-row .val { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hbar-track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--ink); }

/* ---------- vente / voix ---------- */

.sell { display: grid; gap: 24px; }
@media (min-width: 1100px) { .sell { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); align-items: start; } .sell .cart { position: sticky; top: 24px; } }

.voice-panel { display: grid; justify-items: center; gap: 18px; padding: 32px 20px; border-radius: 18px; background: var(--black); color: var(--white); text-align: center; }
.voice-panel .eyebrow { color: var(--side-ink); margin: 0; }
.mic {
  position: relative;
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  color: var(--black);
  transition: transform 0.15s, background 0.2s;
}
.mic:hover { transform: scale(1.03); }
.mic:active { transform: scale(0.97); }
.mic .icon { width: 44px; height: 44px; }
.mic.listening { background: var(--white); }
.mic.listening::before, .mic.listening::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--orange);
  animation: ring 1.6s ease-out infinite;
}
.mic.listening::after { animation-delay: 0.8s; }
@keyframes ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }
.mic-label { font-family: var(--display); text-transform: uppercase; font-size: 26px; line-height: 1; }
.mic-label .dot-accent { margin-left: 2px; }
.voice-hint { margin: 0; max-width: 420px; color: var(--side-ink); font-size: 14px; }
.voice-hint q { color: var(--white); }
.voice-text { width: 100%; max-width: 560px; text-align: left; }
.voice-text .textarea { background: #161616; border-color: #2c2c2c; color: var(--white); min-height: 104px; }
.voice-text .textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.voice-text .textarea::placeholder { color: #77777a; }
.interim { min-height: 21px; margin-top: 6px; color: var(--orange); font-size: 14px; font-style: italic; }
.voice-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.voice-panel .btn-outline { color: var(--white); border-color: #3a3a3a; }
.voice-panel .btn-outline:hover { border-color: var(--white); }
.voice-error { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); background: #2a1206; color: #ffb877; font-size: 14px; max-width: 560px; }

.picker { display: grid; gap: 14px; }
.pick-list { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.pick-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--white); text-align: left; }
.pick-list button:last-child { border-bottom: 0; }
.pick-list button:hover { background: var(--soft); }
.pick-list button[aria-pressed="true"] { background: var(--soft); box-shadow: inset 3px 0 0 var(--orange); }
.pick-sizes { padding: 16px; border-radius: var(--radius); background: var(--soft); }
.pick-sizes .sizes { gap: 8px; margin-top: 12px; }
.pick-sizes button.sz { height: 44px; padding: 0 14px; font-size: 15px; background: var(--white); border-color: var(--line-strong); line-height: 42px; cursor: pointer; }
.pick-sizes button.sz:hover { border-color: var(--ink); }
.pick-sizes button.sz:disabled { cursor: not-allowed; opacity: 0.4; background: transparent; }
.pick-sizes button.sz small { color: var(--muted); font-size: 12px; }

.cart { border: 1.5px solid var(--ink); border-radius: 18px; padding: 20px; min-width: 0; }
.cart-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cart-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 12px; align-items: start; padding: 12px; border-radius: var(--radius); background: var(--soft); }
.cart-line.warn { background: var(--orange-soft); box-shadow: inset 3px 0 0 var(--orange); }
.cart-line .info { min-width: 0; }
.cart-line .info b { display: block; font-size: 14.5px; line-height: 1.3; }
.cart-line .info span { font-size: 13px; color: var(--muted); }
.cart-line .ctrl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cart-line .ctrl .select { width: auto; min-width: 0; max-width: 100%; flex: 1 1 150px; height: 40px; font-size: 15px; background-color: var(--white); text-overflow: ellipsis; }
.cart-line .ctrl [data-product] { flex-basis: 100%; }
.cart-line .issues { grid-column: 1 / -1; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--orange-ink); font-weight: 600; }
.cart-line .heard { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.cart-line .remove { background: transparent; border: 0; padding: 6px; border-radius: 6px; color: var(--muted); }
.cart-line .remove:hover { color: var(--ink); background: rgba(0, 0, 0, 0.06); }
.cart-foot { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total b { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; }
.cart-empty { padding: 24px 8px; text-align: center; color: var(--muted); font-size: 14px; }

.success { display: grid; justify-items: center; gap: 14px; padding: 56px 20px; text-align: center; border-radius: 18px; background: var(--black); color: var(--white); }
.success .check { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--orange); color: var(--black); }
.success .check .icon { width: 40px; height: 40px; }
.success p { margin: 0; color: var(--side-ink); }
.success .btn-outline { color: var(--white); border-color: #3a3a3a; }

/* ---------- accueil revendeur ---------- */

.cta-voice { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 24px; margin-bottom: 16px; border-radius: 18px; background: var(--black); color: var(--white); text-decoration: none; }
.cta-voice h2 { font-size: clamp(28px, 4vw, 40px); }
.cta-voice p { margin: 8px 0 0; color: var(--side-ink); font-size: 14px; }
.cta-voice .mic { width: 84px; height: 84px; flex: none; }
.cta-voice .mic .icon { width: 34px; height: 34px; }

/* ---------- connexion ---------- */

.auth { min-height: 100vh; display: grid; background: var(--black); color: var(--white); }
@media (min-width: 960px) { .auth { grid-template-columns: 1.2fr 1fr; } }
.auth-brand { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 36px 24px 8px; }
@media (min-width: 960px) { .auth-brand { padding: 56px 64px; } }
.auth-brand .logo { width: 176px; color: var(--white); }
.auth-brand h1 { font-size: clamp(54px, 9vw, 128px); line-height: 0.88; }
.auth-brand p { margin: 0; color: var(--side-ink); max-width: 420px; display: none; }
@media (min-width: 960px) { .auth-brand p { display: block; } }
.auth-form { display: grid; align-content: center; padding: 32px 24px 48px; }
@media (min-width: 960px) { .auth-form { padding: 56px 64px; background: var(--white); color: var(--ink); } }
.auth-form form { display: grid; gap: 16px; width: 100%; max-width: 380px; margin: 0 auto; }
.auth-form h2 { font-size: 30px; }
.auth-form .input { background: var(--white); color: var(--ink); }
@media (max-width: 959px) {
  .auth-form .field > span { color: var(--side-ink); }
  .auth-form .btn { background: var(--orange); color: var(--black); }
  .auth-form .hint { color: var(--side-ink); }
}

/* ---------- fenêtres & notifications ---------- */

dialog.modal {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
dialog.modal.wide { width: min(760px, calc(100% - 32px)); }
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.55); }
dialog.modal form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 22px; }
.modal-body { padding: 22px; overflow-y: auto; display: grid; gap: 16px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  dialog.modal, dialog.modal.wide { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  dialog.modal form { max-height: 92vh; }
  .modal-foot { padding-bottom: calc(14px + var(--safe-bottom)); }
  .modal-foot .btn { flex: 1; }
}

.qty-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.qty-cell { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.qty-cell .top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.qty-cell .top b { font-size: 15px; }
.qty-cell .input { height: 40px; text-align: center; font-weight: 650; }
.qty-cell.filled { border-color: var(--ink); }

#toasts { position: fixed; z-index: 100; left: 50%; top: 16px; transform: translateX(-50%); display: grid; gap: 8px; width: max-content; max-width: calc(100% - 32px); }
@media (min-width: 960px) { #toasts { top: auto; bottom: 24px; left: auto; right: 24px; transform: none; } }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 14px; font-weight: 550; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); animation: toast-in 0.2s ease-out; }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.toast-error::before { background: #ff5a4f; }
.toast.out { opacity: 0; transform: translateY(-6px); transition: 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- dépôts & transferts ---------- */

.composer-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.inline-field { display: grid; gap: 4px; }
.inline-field > span { font-size: 12px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.inline-field .select { width: auto; min-width: 180px; }
.route { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.route-arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: var(--black); }
.route-me { display: flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--radius-sm); background: var(--soft); font-weight: 650; }
.route-inline { display: inline-flex; align-items: center; gap: 6px; }
.route-inline .icon { width: 16px; height: 16px; color: var(--orange-ink); }

.notice { display: flex; gap: 10px; align-items: center; margin: 0 0 20px; padding: 14px 16px; border-radius: var(--radius); background: var(--orange-soft); color: var(--orange-ink); font-weight: 600; font-size: 14px; }

.pending { margin-bottom: 24px; padding: 20px; border-radius: 18px; background: var(--orange-soft); }
.pending .section-head { margin-bottom: 12px; }
.pending .sale { background: var(--white); border-color: transparent; }
.sale.to-confirm { box-shadow: inset 3px 0 0 var(--orange); }

.holder-tabs { margin-bottom: 18px; }
.holder-tabs .chip .muted { font-weight: 500; }
.holder-tabs .chip[aria-pressed="true"] .muted { color: var(--side-ink); }

.matrix td.zero { color: var(--faint); }
.matrix tr.me td { background: var(--orange-soft); }
.matrix th, .matrix td { padding: 10px 12px; }
