/* Socle : jetons de couleur + composants communs.
   Les pages ne codent aucune couleur en dur : uniquement var(--…). */

/* DA « verre sapin » (28/11/26) : fond profond à halos, cartes en verre très arrondies, gros chiffres,
   pilules ; vert sapin en clair, menthe lumineuse en sombre. */
:root {
  color-scheme: light;
  --bg: #edf4f2;            --surface: #ffffffe6;     --surface-alt: #f4f9f7;   --surface-sunken: #e8f0ed;
  --surface-solid: #ffffff;
  --border: #dbe7e3;        --border-strong: #c3d3ce;
  --text: #13201c;          --text-muted: #56635f;    --text-faint: #5f6c68;
  --primary: #1d5e55;       --primary-hover: #154942; --primary-bg: #e2f1ed;    --primary-border: #b5d8cf;
  --primary-ring: #14967f33; --primary-fill: #1d5e55; --primary-fill-hover: #154942;
  --primary-grad: linear-gradient(180deg, #24695f, #1a554c);
  --chiffre: #1d5e55;       --chiffre-grad: linear-gradient(180deg, #24695f 20%, #174c45);
  --glow: 0 10px 24px -10px #1d5e5566;
  --halo-1: #bfe6dc;        --halo-2: #dcefe9;
  --courbe: #1d5e55;        --courbe-aire: #1d5e5524;
  --success: #11703d;       --success-bg: #e6f4ec;    --success-border: #bfe3cc;
  --warning: #93470a;       --warning-bg: #fdf3e2;    --warning-border: #f1d7a7;
  --danger:  #b42318;       --danger-bg:  #fdeceb;    --danger-border:  #f5c5c0;
  --etsy: #b4460f;  --etsy-bg: #fdeee4;  --etsy-bord: #f4c9ae;  --amazon: #7a5200;  --amazon-bg: #fbf1dc;  --amazon-bord: #ecd39b;
  --accent:  #6d3fd1;       --accent-bg:  #f3edff;    --info: #2f62c4;          --info-bg: #ecf2fd; --info-border: #c9d8f5;
  --on-primary: #ffffff; --on-success: #fff; --on-warning: #fff; --on-danger: #fff;
  --radius-lg: 26px;  --radius: 18px;  --radius-sm: 12px;
  --shadow-xs: 0 1px 2px #13201c0a, 0 10px 30px -14px #1d5e5530;
  --shadow-sm: 0 1px 2px #13201c0f, 0 8px 22px -8px #1d5e5538;
  --shadow-md: 0 24px 50px -22px #13201c40, 0 6px 16px #13201c12;
  --glass: #ffffffcc;
  --glass-border: #ffffff;
  --backdrop: #13201c59;
  --sidebar-w: 268px;
  --sidebar-w-mini: 84px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

html.theme-sombre {
  color-scheme: dark;
  --bg: #0c1513;            --surface: #1a2724c7;     --surface-alt: #1f2d2acc; --surface-sunken: #111b19b3;
  --surface-solid: #172320;
  --border: #ffffff14;      --border-strong: #ffffff26;
  --text: #e8f1ee;          --text-muted: #a9b9b4;    --text-faint: #98a9a4;
  --primary: #86e3cb;       --primary-hover: #a6eedb; --primary-bg: #86e3cb1f;  --primary-border: #86e3cb4d;
  --primary-ring: #86e3cb55; --primary-fill: #7fdcc3; --primary-fill-hover: #9ae8d3;
  --primary-grad: linear-gradient(180deg, #a3eedb, #6fd2b8);
  --chiffre: #b8f2e2;       --chiffre-grad: linear-gradient(180deg, #e3fbf4 10%, #8fe2cb 85%);
  --glow: 0 0 0 1px #a6eedb33, 0 8px 30px -6px #6fd2b880;
  --halo-1: #1d5e5573;      --halo-2: #2a7a6b40;
  --courbe: #8ee6cf;        --courbe-aire: #8ee6cf2b;
  --success: #6cd39a;       --success-bg: #6cd39a1f;  --success-border: #6cd39a40;
  --warning: #f2b872;       --warning-bg: #f2b8721f;  --warning-border: #f2b87245;
  --danger:  #ff9187;       --danger-bg:  #ff91871f;  --danger-border:  #ff918745;
  --etsy: #ffab7a;  --etsy-bg: #ffab7a1f;  --etsy-bord: #ffab7a45;  --amazon: #f0c66b;  --amazon-bg: #f0c66b1f;  --amazon-bord: #f0c66b45;
  --accent:  #b9a2ff;       --accent-bg:  #b9a2ff1f;  --info: #93b5ff;          --info-bg: #93b5ff1a; --info-border: #93b5ff40;
  --on-primary: #0b2521; --on-success: #0c1513; --on-warning: #0c1513; --on-danger: #0c1513;
  --shadow-xs: 0 1px 0 #ffffff0d inset, 0 18px 40px -20px #000c;
  --shadow-sm: 0 1px 0 #ffffff12 inset, 0 10px 26px -10px #000d;
  --shadow-md: 0 28px 60px -24px #000e, 0 6px 16px #0007;
  --glass: #15211ecc;
  --glass-border: #ffffff1a;
  --backdrop: #000000a6;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; }
.icon { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; border-radius: 6px; }
kbd {
  font: 600 11px/1 var(--font); padding: 3px 6px; border-radius: 6px;
  background: var(--surface-sunken); border: 1px solid var(--border); color: var(--text-muted);
}
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary-fill); color: var(--on-primary); box-shadow: 0 1px 2px #0002, inset 0 1px 0 #ffffff1f; }
.btn-primary:hover { background: var(--primary-fill-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-alt); border-color: var(--text-faint); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-sunken); color: var(--text); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled], body.read-only .btn-ecrit { opacity: .5; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 0; background: transparent; color: var(--text-muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-sunken); color: var(--text); }

/* ------------------------------------------------------------------ cartes et tuiles */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs); padding: 22px;
}
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head p { color: var(--text-muted); font-size: 13.5px; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); padding: 16px 18px; color: var(--text); text-decoration: none !important;
}
a.stat:hover { border-color: var(--primary-border); }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-valeur { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ en-tête de page */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .sous-titre { color: var(--text-muted); margin-top: 6px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ badges, chips, onglets */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-sunken); color: var(--text-muted); border: 1px solid var(--border);
}
.badge-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.badge-primary { background: var(--primary-bg); color: var(--primary); border-color: var(--primary-border); }
.badge-accent  { background: var(--accent-bg);  color: var(--accent);  border-color: transparent; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 13.5px;
  font-weight: 500; cursor: pointer; text-decoration: none !important;
}
.chip:hover { border-color: var(--text-faint); }
.chip.active, .chip[aria-pressed="true"] { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary); font-weight: 600; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tab {
  padding: 10px 14px; color: var(--text-muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap; text-decoration: none !important;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ------------------------------------------------------------------ alertes */
.alert {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius);
  border: 1px solid; font-size: 14px; margin-bottom: 18px;
}
.alert .icon { margin-top: 1px; }
.alert-info    { background: var(--info-bg);    border-color: var(--info-border);    color: var(--text); }
.alert-info .icon { color: var(--info); }
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: var(--text); }
.alert-success .icon { color: var(--success); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--text); }
.alert-warning .icon { color: var(--warning); }
.alert-danger  { background: var(--danger-bg);  border-color: var(--danger-border);  color: var(--text); }
.alert-danger .icon { color: var(--danger); }

/* ------------------------------------------------------------------ formulaires */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-size: 13.5px; font-weight: 600; }
.field .aide { font-size: 12.5px; color: var(--text-muted); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring);
}
.field input::placeholder { color: var(--text-faint); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; margin-bottom: 16px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary-fill); }
.input-code { font-size: 26px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 650; }

/* ------------------------------------------------------------------ tableaux */
.table-wrap { overflow-x: auto; margin: 0 -22px; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .04em; padding: 0 12px 10px; border-bottom: 1px solid var(--border);
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table tbody tr:hover td { background: var(--surface-alt); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }

/* ------------------------------------------------------------------ fenêtres */
dialog { color: var(--text); }
.modal {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; width: min(460px, calc(100vw - 32px));
  background: var(--surface); box-shadow: var(--shadow-md);
}
.modal::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); }
.modal-head { padding: 20px 22px 0; }
.modal-body { padding: 10px 22px 4px; color: var(--text-muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px 20px; }
.modal[open] { animation: monter .18s ease-out; }

/* Recherche globale (Ctrl+K) */
.palette { width: min(560px, calc(100vw - 32px)); margin-top: 12vh; }
.palette-champ { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.palette-champ input { flex: 1; border: 0; background: transparent; font-size: 16px; color: var(--text); outline: none; min-width: 0; }
.autocomplete-list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.autocomplete-list li a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none;
}
.autocomplete-list li a .icon { color: var(--text-muted); }
.autocomplete-list li[aria-selected="true"] a { background: var(--primary-bg); color: var(--primary); }
.autocomplete-list li[aria-selected="true"] a .icon { color: var(--primary); }
.autocomplete-list .vide { padding: 14px 12px; color: var(--text-muted); font-size: 14px; }

/* ------------------------------------------------------------------ état vide */
.empty { text-align: center; padding: 48px 20px; max-width: 460px; margin: 0 auto; }
.empty-icon {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 16px;
  background: var(--primary-bg); color: var(--primary); border: 1px solid var(--primary-border);
}
.empty h3 { font-size: 17px; margin-bottom: 6px; }
.empty p { color: var(--text-muted); }
.empty .btn { margin-top: 18px; }

/* ------------------------------------------------------------------ coque : menu latéral */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); display: flex; flex-direction: column;
  padding: 18px 14px 14px; border-right: 1px solid var(--border); z-index: 20;
  transition: width .2s ease;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; color: var(--text); text-decoration: none !important; }
.brand .logo { border-radius: 10px; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-txt b { font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
.brand-txt small { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.sb-search {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 12px; margin-bottom: 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-alt);
  color: var(--text-muted); cursor: pointer; font-size: 14px; text-align: left;
}
.sb-search:hover { border-color: var(--border-strong); color: var(--text); }
.sb-search .sb-label { flex: 1; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.sb-link {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px;
  border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 550; font-size: 14px;
  text-decoration: none !important; border: 0; background: transparent; cursor: pointer; white-space: nowrap; text-align: left;
}
.sb-link:hover { background: var(--surface-sunken); color: var(--text); }
.sb-link.active { background: var(--primary-bg); color: var(--primary); font-weight: 650; }
.sb-label { overflow: hidden; text-overflow: ellipsis; }
.pill {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11.5px;
  font-weight: 700; display: inline-grid; place-items: center; background: var(--danger); color: var(--on-danger);
}
.sb-foot { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.sb-foot form { margin: 0; }
.sb-user {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none !important; min-width: 0;
}
.sb-user:hover, .sb-user.active { background: var(--surface-sunken); }
.avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-fill); color: var(--on-primary); font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.sb-user-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sb-user-txt b { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.sb-user-txt small { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.sb-collapse {
  position: absolute; top: 26px; right: -13px; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .2s;
}
.sb-collapse:hover { color: var(--text); }

.si-sombre { display: none; }
html.theme-sombre .si-clair { display: none; }
html.theme-sombre .si-sombre { display: contents; }

/* Menu réduit aux icônes */
html.menu-replie .sidebar { width: var(--sidebar-w-mini); }
html.menu-replie .sidebar .sb-label,
html.menu-replie .sidebar .brand-txt,
html.menu-replie .sidebar kbd { display: none; }
html.menu-replie .sb-link, html.menu-replie .sb-search { justify-content: center; padding: 0; }
html.menu-replie .sb-user { justify-content: center; padding: 6px 0; }
html.menu-replie .brand { justify-content: center; padding-left: 0; padding-right: 0; }
html.menu-replie .pill { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
html.menu-replie .sb-collapse { transform: rotate(180deg); }

/* Contenu */
.main { margin-left: var(--sidebar-w); min-height: 100vh; transition: margin-left .2s ease; }
html.menu-replie .main { margin-left: var(--sidebar-w-mini); }
.content { max-width: 1180px; margin: 0 auto; padding: 36px 40px 64px; }
.m-top, .m-tabs, .sheet { display: none; }

/* ------------------------------------------------------------------ pages sans menu (connexion…) */
.bare-main { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; }
.bare-main .content { padding: 0; width: 100%; max-width: 440px; }
.auth-card { padding: 32px; }
.auth-card .brand { justify-content: center; padding: 0 0 22px; }
.auth-card h1 { font-size: 22px; text-align: center; }
.auth-card .intro { text-align: center; color: var(--text-muted); margin: 8px 0 24px; }
.auth-bas { text-align: center; margin-top: 18px; font-size: 14px; }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); width: fit-content; margin: 0 auto 10px; }
.secret { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 20px; word-break: break-all; }
.etapes { counter-reset: etape; list-style: none; padding: 0; margin: 0 0 18px; }
.etapes > li { counter-increment: etape; position: relative; padding-left: 38px; margin-bottom: 18px; }
.etapes > li::before {
  content: counter(etape); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--primary-bg); color: var(--primary);
  border: 1px solid var(--primary-border);
}
.etapes > li > b { display: block; margin-bottom: 4px; }
.etapes > li > p { color: var(--text-muted); font-size: 14px; }

/* ------------------------------------------------------------------ mouvement */
@keyframes monter { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes apparaitre { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .content > * { animation: apparaitre .28s ease-out both; }
  .content > *:nth-child(2) { animation-delay: .03s; }
  .content > *:nth-child(3) { animation-delay: .06s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================================================================== étape 2 : outils communs */

/* Menu : séparateur, ligne du compte, pastilles douces */
.sb-sep { height: 1px; background: var(--border); margin: 8px 10px; flex: none; }
.sb-compte { display: flex; align-items: center; gap: 2px; margin-top: 4px; }
.sb-compte .sb-user { flex: 1; }
.sb-mini { flex: none; margin: 0; }
.sb-mini .icon-btn, .icon-btn.sb-mini { width: 34px; height: 34px; }
.pill-doux { background: var(--primary-bg); color: var(--primary); border: 1px solid var(--primary-border); }
.sb-nouveau { color: var(--primary); }
html.menu-replie .sb-compte { flex-direction: column; }
html.menu-replie .pill-doux { display: none; }

.icon-btn-sm { width: 30px; height: 30px; border-radius: 8px; }
.icon.inline { display: inline-block; vertical-align: -2px; }

/* Fenêtres larges avec formulaire */
.modal-lg { width: min(600px, calc(100vw - 32px)); }
.modal-head p { margin-top: 4px; }
.modal-form { padding: 16px 22px 0; }
.modal-form .chip-group { margin-bottom: 16px; }
.modal-actions-split { align-items: center; }
.modal-actions-split .espace { flex: 1; }

/* Chips de choix exclusif (boutons radio cachés) */
.chip-radio:has(input:checked) { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary); font-weight: 600; }
.chip-radio:has(input:focus-visible) { outline: 3px solid var(--primary-ring); outline-offset: 2px; }

/* Pièces jointes */
.attach-zone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 14px 16px;
  background: var(--surface-alt); transition: border-color .15s, background-color .15s; margin-bottom: 14px;
}
.attach-zone.survol { border-color: var(--primary); background: var(--primary-bg); }
.attach-invite { display: flex; gap: 10px; align-items: flex-start; color: var(--text-muted); font-size: 14px; }
.attach-invite .icon { margin-top: 2px; }
.attach-choisir { color: var(--primary); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.attach-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.attach-liste:not(:empty) { margin-top: 12px; }
.attach-liste li {
  display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 4px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); font-size: 13px; max-width: 100%;
}
.attach-liste img { width: 34px; height: 34px; object-fit: cover; border-radius: 7px; }
.attach-liste .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.attach-liste button { border: 0; background: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.attach-liste button:hover { color: var(--danger); background: var(--danger-bg); }

/* Message furtif en bas de l'écran */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100;
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-md);
  animation: monter .2s ease-out;
}

/* Tuiles cliquables qui filtrent */
.stat-active { border-color: var(--primary-border); box-shadow: 0 0 0 3px var(--primary-ring); }
.valeur-danger { color: var(--danger); }
.filtres { margin-bottom: 18px; }

/* Liste des avis */
.card-liste { padding: 6px; }
.liste-avis { list-style: none; margin: 0; padding: 0; }
.liste-avis li + li { border-top: 1px solid var(--border); }
.ligne-avis { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); color: var(--text); text-decoration: none !important; }
.ligne-avis:hover { background: var(--surface-alt); }
.ligne-avis-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ligne-avis-message { font-weight: 550; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.type-avis { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.type-idee { background: var(--accent-bg); color: var(--accent); }
.type-probleme { background: var(--danger-bg); color: var(--danger); }
.type-question { background: var(--info-bg); color: var(--info); }

/* Fiche d'un avis */
.retour { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.boutons-ligne { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.boutons-ligne form { margin: 0; }
.texte-avis { white-space: pre-wrap; font-size: 15px; }
.lien-page { margin-top: 14px; }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 18px; }
.piece { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none !important; background: var(--surface-alt); }
.piece:hover { border-color: var(--primary-border); }
.piece img { width: 100%; height: 110px; object-fit: cover; }
.piece-icone { height: 110px; display: grid; place-items: center; color: var(--text-muted); }
.piece-nom { padding: 8px 10px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-top: 1px solid var(--border); }
.reponse { border-color: var(--primary-border); }

/* À faire : tableau en colonnes */
.tableau { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.colonne { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; min-height: 160px; }
.colonne-tete { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.colonne-tete h2 { font-size: 14.5px; }
.colonne-nb { font-size: 12px; font-weight: 700; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.colonne-tete .icon-btn { margin-left: auto; }
.colonne-cartes { display: flex; flex-direction: column; gap: 10px; min-height: 60px; border-radius: var(--radius); transition: background-color .15s; }
.colonne-cartes.survol { background: var(--primary-bg); outline: 2px dashed var(--primary-border); outline-offset: 4px; }
.colonne-vide { text-align: center; color: var(--text-faint); font-size: 13px; padding: 18px 0; }
.carte {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
  box-shadow: var(--shadow-xs); cursor: grab; transition: box-shadow .15s, border-color .15s, transform .15s;
}
.carte:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.carte.glisse { opacity: .45; transform: rotate(1.5deg); }
.carte h3 { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.carte-details { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.carte-retard { border-left: 3px solid var(--danger); }
.carte-aujourdhui { border-left: 3px solid var(--warning); }
.colonne[data-colonne="fait"] .carte h3 { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.carte-etiquettes { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.etiquette { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); }
.carte-pied { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.echeance { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.echeance-retard { color: var(--danger); }
.echeance-aujourdhui { color: var(--warning); }
.echeance-bientot { color: var(--primary); }
.avatar-sm { width: 24px; height: 24px; font-size: 11px; margin-left: auto; }

/* Tuto */
.question {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: var(--shadow-xs);
  color: var(--text-muted);
}
.question:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.question-champ { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; color: var(--text); }
.question .btn { border-radius: 999px; }
.resultats { margin-bottom: 20px; }
.resultats-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.resultats-liste a { display: flex; flex-direction: column; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-alt); color: var(--text); text-decoration: none !important; }
.resultats-liste a:hover { background: var(--primary-bg); }
.tuto { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.tuto-nav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 20px; }
.tuto-cat { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border-radius: var(--radius); border: 1px solid transparent; color: var(--text); text-decoration: none !important; }
.tuto-cat span { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.tuto-cat:hover { background: var(--surface); border-color: var(--border); }
.tuto-cat.active { background: var(--surface); border-color: var(--primary-border); box-shadow: var(--shadow-xs); }
.tuto-cat.active b { color: var(--primary); }
.tuto-titre { font-size: 22px; }
.tuto-sommaire { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 14px 0 4px; }
.tuto-sommaire a { display: inline-block; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--surface-sunken); color: var(--text-muted); }
.tuto-texte section { padding-top: 22px; scroll-margin-top: 20px; }
.tuto-texte section + section { border-top: 1px solid var(--border); margin-top: 22px; }
.tuto-texte h3 { font-size: 16.5px; margin-bottom: 8px; }
.tuto-texte h4, .tuto-texte-court h4 { font-size: 14.5px; margin: 14px 0 6px; }
.tuto-texte p, .tuto-texte-court p { margin: 0 0 10px; }
.tuto-texte ul, .tuto-texte ol, .tuto-texte-court ul { margin: 0 0 10px; padding-left: 22px; }
.tuto-texte li, .tuto-texte-court li { margin-bottom: 5px; }
.tuto-texte code, .tuto-texte-court code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--surface-sunken); padding: 1px 6px; border-radius: 6px; }
.astuce { margin: 4px 0 12px; padding: 10px 14px 10px 14px; border-left: 3px solid var(--primary); background: var(--primary-bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14px; }

/* Nouveautés */
.frise { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.frise-item { margin: 0 !important; }
.frise-date { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.frise-item h2 { margin-bottom: 10px; }
.tuto-texte-court ul { margin-bottom: 0; }

.dossier { margin-bottom: 12px; word-break: break-all; }
.tuto-texte .tuto-sommaire { padding-left: 0; }
.alert .btn .icon { color: inherit; margin-top: 0; }

/* ================================================================== étape 3 : stock */
.valeur-warning { color: var(--warning); }
.filtres-stock { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.recherche-champ {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted);
}
.recherche-champ:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.recherche-champ input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; color: var(--text); }
.select-court { width: auto; min-height: 42px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 14px; }
.card-liste-stock { padding: 10px 0 4px; }
.table tr[data-href] { cursor: pointer; }
.cell-photo { width: 56px; padding-right: 0 !important; }
.cell-photo img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-sunken); }
.lien-ligne { color: var(--text); }
.ligne-eteinte td { opacity: .55; }
.stock-nb { font-weight: 700; font-size: 15px; }
.stock-rupture { color: var(--danger); }
.stock-presque { color: var(--warning); }
.table td .badge + .badge { margin-left: 4px; }
.plus-de { padding: 10px 22px; }
.marque-bloc .card-head { flex-wrap: wrap; }
.marque-bloc .page-actions form { margin: 0; }
.marque-bloc .table-wrap { margin-bottom: -8px; }
.deja-commandes { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.deja-commandes summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-muted); }
.deja-commandes ul { margin: 10px 0 0; padding-left: 20px; font-size: 14px; }
.deja-commandes li { margin-bottom: 4px; }

.fiche-tete { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.fiche-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 18px; border: 1px solid var(--border); background: var(--surface-sunken); flex: none; }
.fiche-titres { flex: 1; min-width: 0; }
.fiche-titres h1 { margin: 2px 0; }
.badges-ligne { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fiche-shopify { flex: none; }
.fiche-grille { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; margin-bottom: 18px; }
.fiche-grille .card + .card { margin-top: 0; }
.liste-simple { list-style: none; margin: 0; padding: 0; }
.liste-simple li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.liste-simple li:last-child { border-bottom: 0; }
.historique { list-style: none; margin: 0; padding: 0; }
.historique li { display: flex; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.historique li:last-child { border-bottom: 0; }
.historique-quand { flex: none; width: 130px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
@keyframes tourner { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) { .icon.tourne { animation: tourner 1.2s linear infinite; } }
.texte-danger { color: var(--danger); }
.card-liste-stock .table-wrap { margin: 0; }
.sb-nav > .sb-link, .sb-nav > .sb-sep { flex-shrink: 0; }

/* ================================================================== étape 4 : espace par site, commandes, nuancier */
.sb-espace { display: flex; align-items: center; gap: 9px; margin: -6px 0 12px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--primary-bg); color: var(--primary); font-weight: 650; font-size: 13.5px; border: 1px solid var(--primary-border); }
details.sb-espace { display: block; padding: 0; }
details.sb-espace summary { display: flex; align-items: center; gap: 9px; padding: 8px 12px; cursor: pointer; list-style: none; }
details.sb-espace summary::-webkit-details-marker { display: none; }
.espace-fleche { margin-left: auto; transition: transform .15s; }
details[open] .espace-fleche { transform: rotate(90deg); }
.espace-point { width: 9px; height: 9px; border-radius: 50%; background: var(--primary-fill); flex: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.espace-liste { display: flex; flex-direction: column; padding: 0 6px 6px; }
.espace-liste a { padding: 7px 10px; border-radius: 8px; color: var(--text); font-weight: 550; }
.espace-liste a.active, .espace-liste a:hover { background: var(--surface); text-decoration: none; }
html.menu-replie .sb-espace { justify-content: center; padding: 10px 0; }
.pill-attention { background: var(--warning); color: var(--on-warning); }
.sheet-espace { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 14px 12px; }

/* Fil d'Ariane */
.ariane { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13.5px; margin-bottom: 14px; color: var(--text-muted); }
.ariane a { font-weight: 600; }
.ariane .icon { color: var(--text-faint); }
.ariane [aria-current] { color: var(--text); font-weight: 600; }

/* Blocs de page */
.bloc { margin-bottom: 28px; }
.bloc-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bloc-tete h2 { font-size: 18px; }
.bloc-intro { margin: -6px 0 12px; font-size: 14px; }
.lien-fort { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.lien-discret { color: var(--text); }
.lien-titre { color: var(--text); }

/* Légende des couleurs de stock (toujours accompagnée de mots) */
.legende-stock { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-muted); margin: 0; }
.legende-stock > span { display: inline-flex; align-items: center; gap: 6px; }
.point { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.point-ok, .pastille-ok .point { background: var(--success); }
.point-presque, .pastille-presque .point { background: var(--warning); }
.point-rupture, .pastille-rupture .point { background: var(--danger); }

/* Maisons */
.maisons { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.maison, .fil-carte {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; color: var(--text); text-decoration: none !important;
  box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .2s, transform .2s;
}
.maison:hover, .fil-carte:hover { border-color: var(--primary-border); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.maison-vignettes { display: grid; aspect-ratio: 2 / 1; background: var(--surface-sunken); gap: 2px; }
.maison-vignettes img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignettes-2 { grid-template-columns: 1fr 1fr; }
.vignettes-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.vignettes-3 img:first-child { grid-row: span 2; }
.vignettes-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.maison-initiale { display: grid; place-items: center; font-size: 38px; font-weight: 800; color: var(--primary); }
.maison-corps, .fil-corps { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.maison-nom, .fil-nom { font-size: 16px; font-weight: 700; }
.maison-etats { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }

/* Barre des états (chaque part nommée à côté) */
.barre-etats { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-sunken); width: 100%; }
.badges-ligne .barre-etats { max-width: 320px; }
.seg { display: block; height: 100%; }
.seg-ok { background: var(--success); }
.seg-presque { background: var(--warning); }
.seg-rupture { background: var(--danger); }
.barre-legende { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--text-muted); }
.texte-rupture { color: var(--danger); font-weight: 650; }
.texte-presque { color: var(--warning); font-weight: 650; }
.badges-ligne { align-items: center; }

/* Fils d'une maison */
.fils { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.fil-photo { aspect-ratio: 4 / 3; background: var(--surface-sunken); }
.fil-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Nuancier : une pastille par coloris */
.nuancier { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.nuancier-rangee { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pastille {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none !important;
  box-shadow: var(--shadow-xs); transition: transform .15s, box-shadow .2s, border-color .15s;
}
.pastille:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.pastille-photo { position: relative; aspect-ratio: 1; background: var(--surface-sunken); display: grid; place-items: center; color: var(--text-faint); }
.pastille-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pastille-texte { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px 11px; }
.pastille-nom { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille-fil { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille-etat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.pastille-rupture { border-color: var(--danger-border); }
.pastille-rupture .pastille-etat { color: var(--danger); }
.pastille-presque .pastille-etat { color: var(--warning); }
.pastille-rupture .pastille-photo img { filter: saturate(.55); }
.pastille-eteinte { opacity: .55; }
.pastille-ruban { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--primary-fill); color: var(--on-primary); }

/* Commandes : colis à préparer */
.tab-nb { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px;
  font-size: 11.5px; background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.barre-outils { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.colis { display: flex; flex-direction: column; gap: 16px; }
.colis-carte { margin: 0 !important; scroll-margin-top: 20px; }
.colis-pret { border-color: var(--primary-border); background: linear-gradient(var(--primary-bg), var(--surface) 90px); }
.colis-attente { border-left: 4px solid var(--danger); }
.colis-tete { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.colis-tete h2 a { color: var(--text); }
.colis-pays { font-size: 18px; }
.colis-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.colis-note { font-size: 14px; background: var(--surface-alt); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 10px; }
.colis-pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.colis-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.colis-actions form { margin: 0; }
.articles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.article { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--border); }
.article-attente { border-color: var(--danger-border); background: var(--danger-bg); }
.article-photo { width: 64px; height: 64px; flex: none; border-radius: 12px; overflow: hidden; background: var(--surface-sunken); }
.article-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.article-texte b { font-size: 15px; }
.article-qte { font-size: 22px; font-weight: 800; padding: 0 8px; font-variant-numeric: tabular-nums; }
.recherche-commande { min-width: 260px; }
/* Commandes en lignes (28/11/26) : une ligne par commande, détail dépliable. */
.filtres-canaux { margin-bottom: 14px; }
.chip b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.chip-marge { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--border-strong); font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.chip-inactif { opacity: .6; cursor: default; }
.chip.active .chip-marge { color: inherit; border-left-color: currentColor; opacity: .85; }
.pastille-canal { width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--canal); }
.canal { display: inline-block; font-size: 11px; font-weight: 600; line-height: 1; padding: 3px 7px; border-radius: 999px; margin-left: 6px;
  vertical-align: 2px; color: var(--canal); background: var(--canal-bg); border: 1px solid var(--canal-bord); white-space: nowrap; }
.canal-shopify { --canal: var(--primary); --canal-bg: var(--primary-bg); --canal-bord: var(--primary-border); }
.canal-etsy { --canal: var(--etsy); --canal-bg: var(--etsy-bg); --canal-bord: var(--etsy-bord); }
.canal-amazon { --canal: var(--amazon); --canal-bg: var(--amazon-bg); --canal-bord: var(--amazon-bord); }
.cmd-liste { padding: 6px 0 !important; overflow: hidden; }
.cmd { border-bottom: 1px solid var(--border); scroll-margin-top: 20px; }
.cmd:last-child { border-bottom: 0; }
.cmd-ligne { list-style: none; cursor: pointer; display: grid; align-items: center; gap: 14px; padding: 10px 18px;
  grid-template-columns: minmax(150px, 1.1fr) minmax(150px, 1.3fr) minmax(0, 2.2fr) 92px 92px 150px 20px; }
.cmd-ligne::-webkit-details-marker { display: none; }
.cmd-ligne:hover { background: var(--surface-alt); }
.cmd-attente .cmd-ligne { box-shadow: inset 3px 0 0 var(--danger); }
.cmd-pret .cmd-ligne { background: linear-gradient(90deg, var(--primary-bg), transparent 60%); }
.cmd-num b { font-variant-numeric: tabular-nums; font-size: 14.5px; }
.cmd-num .canal { margin-left: 8px; }
.cmd-client { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cmd-client-nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.cmd-articles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.vignette { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--surface-sunken);
  border: 1px solid var(--border); font-size: 12.5px; white-space: nowrap; }
.vignette img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: block; }
.vignette-attente { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger); }
.cmd-montant, .cmd-marge { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; line-height: 1.3; }
.cmd-etat { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; color: var(--text-muted); }
.cmd-chevron { color: var(--text-faint); transition: transform .15s; display: grid; place-items: center; }
.cmd[open] .cmd-chevron { transform: rotate(180deg); }
.cmd[open] .cmd-ligne { background: var(--surface-alt); }
.cmd-detail { padding: 6px 18px 16px; background: var(--surface-alt); border-top: 1px dashed var(--border); }
.cmd-detail-grille { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 8px; }
.cmd-articles-defile { overflow-x: auto; min-width: 0; }
.cmd-articles-table td, .cmd-articles-table th { padding: 6px 8px; font-size: 13.5px; }
.cmd-photo { width: 44px; }
.cmd-photo img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; display: block; }
.ligne-attente td { background: var(--danger-bg); }
.cmd-marge-detail .cascade { max-width: none; }
.cmd-marge-detail .cascade li { font-size: 13.5px; padding: 5px 0; }
.cascade-frais span { padding-left: 12px; color: var(--text-muted); }
.cmd-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.cmd-actions form { margin: 0; }
.cmd-actions-fin { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.lien-suivi { font-size: 13px; }

/* Activité */
.activite-grille { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.activite-grille .card + .card { margin-top: 0; }
.graphique { position: relative; }
.graphique svg { width: 100%; height: auto; display: block; overflow: visible; }
.g-grille { stroke: var(--border); stroke-width: 1; }
.g-axe { stroke: var(--border-strong); stroke-width: 1; }
.g-texte { fill: var(--text-muted); font-size: 11px; font-family: var(--font); }
.g-zone { fill: transparent; }
.g-barre { fill: var(--primary-fill); opacity: .72; transition: opacity .12s; }
.g-barre-aujourdhui { opacity: 1; }
.g-jour { outline: none; cursor: default; }
.g-jour.actif .g-zone { fill: var(--surface-sunken); }
.g-jour.actif .g-barre { opacity: 1; }
.g-bulle { position: absolute; top: -6px; transform: translate(-50%, -100%); white-space: nowrap; padding: 6px 10px; border-radius: 8px;
  background: var(--text); color: var(--bg); font-size: 12.5px; font-weight: 600; pointer-events: none; box-shadow: var(--shadow-sm); }
.g-tableau { margin-top: 14px; }
.g-tableau summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text-muted); }
.g-tableau .table { margin-top: 8px; }
.pays { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pays li { display: grid; grid-template-columns: 130px 1fr 28px; align-items: center; gap: 10px; font-size: 14px; }
.pays-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pays-barre { height: 8px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; }
.pays-barre span { display: block; height: 100%; background: var(--primary-fill); opacity: .72; border-radius: 0 4px 4px 0; }
.pays b { text-align: right; font-variant-numeric: tabular-nums; }

/* Impression de la liste à préparer : seulement les colis. */
@media print {
  .sidebar, .m-top, .m-tabs, .page-actions, .tabs, .barre-outils, .colis-actions, .alert, .toast, dialog { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0; max-width: none; }
  body, body.avec-menu { background: #fff !important; color: #000; }
  .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .colis-pret { opacity: .5; }
  .article { background: #fff; }
}
.pastille-photo { overflow: hidden; }
.pastille-photo img { position: absolute; inset: 0; }
.fil-photo { position: relative; overflow: hidden; }
.fil-photo img { position: absolute; inset: 0; }

/* ================================================================== nouveaux produits */
.tab-nb-neutre { background: var(--surface-sunken); color: var(--text-muted); border-color: var(--border); }
.demandes, .fiches-controle { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.demande, .fiche-controle { margin: 0 !important; scroll-margin-top: 20px; }
.demande-tete, .fiche-controle-tete { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.demande-titres, .fiche-controle-titres { flex: 1; min-width: 0; }
.demande-titres h2, .fiche-controle-titres h2 { font-size: 17px; margin: 2px 0; }
.demande-type { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.type-produit { background: var(--accent-bg); color: var(--accent); }
.type-coloris { background: var(--primary-bg); color: var(--primary); }
.coloris-demandes { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.coloris-demandes li { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--border); font-size: 13.5px; }
.coloris-demandes li span { color: var(--text-muted); font-weight: 600; }
.demande-infos { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 10px; font-size: 14px; }
.demande-infos dt { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.demande-infos dd { margin: 0; }
.demande-details, .demande-reponse { white-space: pre-wrap; font-size: 14px; margin-bottom: 10px; }
.demande-reponse { background: var(--primary-bg); border-radius: var(--radius-sm); padding: 8px 12px; }
.pieces-petites { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); margin: 4px 0 12px; }
.pieces-petites .piece img, .pieces-petites .piece-icone { height: 80px; }
.demande-fiche { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.demande-fiche-tete { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.demande-fiche-tete img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; }
.demande-maj { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; }
.demande-maj summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-muted); }
.demande-maj form { margin-top: 12px; }

.fiche-incomplete { border-color: var(--danger-border); }
.fiche-controle-photo { flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: var(--surface-sunken); }
.fiche-controle-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nouveaux-coloris { font-size: 13.5px; margin-bottom: 10px; }
.controle-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.avancement { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; }
.avancement span { display: block; height: 100%; background: var(--primary-fill); border-radius: 4px; }
.etapes-fiche { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.etape-fiche { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 3px 0; cursor: default; }
.etape-icone { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.etape-ok .etape-icone { background: var(--success-bg); color: var(--success); }
.etape-ok b { font-weight: 500; color: var(--text-muted); }
.etape-manque .etape-icone { background: var(--danger-bg); color: var(--danger); }
.etape-manque b { color: var(--danger); }
.etape-finition .etape-icone { background: var(--warning-bg); color: var(--warning); }
.etape-texte { display: flex; flex-direction: column; min-width: 0; }
.etape-detail { font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.fiche-controle-liens { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13.5px; font-weight: 600; }

.form-demande { max-width: 760px; }
.chip-grand { height: 44px; padding: 0 18px; font-size: 14.5px; }
.input-fichier { padding: 9px !important; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.etapes-faites { margin-top: 8px; }
.etapes-faites summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--success); }
.etapes-faites .etapes-fiche { margin-top: 8px; }

/* ================================================================== fournisseurs */
.ajout-maison { position: relative; }
.ajout-maison summary { list-style: none; }
.ajout-maison summary::-webkit-details-marker { display: none; }
.ajout-maison-form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: 300px; padding: 16px !important; box-shadow: var(--shadow-md); }
.fournisseur-infos { display: flex; flex-direction: column; gap: 3px; font-size: 13px; margin-top: 6px; }
.texte-primary { color: var(--primary); font-weight: 650; }
.contact-liste { display: grid; gap: 10px; margin: 0; }
.contact-liste > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 14px; }
.contact-liste dt { color: var(--text-muted); font-weight: 600; font-size: 13px; }
.contact-liste dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; }
.form-notes { margin-bottom: 14px; }
.documents { list-style: none; margin: 0 0 14px; padding: 0; }
.documents li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.documents form { margin: 0 0 0 auto; }
.document-icone { color: var(--text-muted); }
.document-nom { font-weight: 600; }
.depot-document { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 12px; border-top: 1px solid var(--border); }
.depot-document .input { flex: 1 1 180px; min-height: 38px; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); font-size: 14px; }
.cmd-fournisseur { list-style: none; margin: 0; padding: 0; }
.cmd-fournisseur a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 8px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none !important; font-size: 14px; border-radius: 8px; }
.cmd-fournisseur a:hover { background: var(--surface-alt); }
.lignes-commande { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lignes-commande li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--border); }
.qte input { width: 86px; min-height: 44px; text-align: center; font-size: 18px; font-weight: 700; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); }
.qte input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.ligne-etat { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.autres-coloris { margin-top: 14px; }
.autres-coloris summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--primary); margin-bottom: 10px; }
.fiche-grille > div > .card + .card { margin-top: 18px; }

/* ================================================================== chiffres clés */
.barre-chiffres { align-items: flex-start; }
.chip-inactif { cursor: default; color: var(--text-muted); border-style: dashed; }
.chip-inactif:hover { border-color: var(--border-strong); }
.chip-inactif .badge { height: 18px; font-size: 11px; padding: 0 6px; }
.ecart { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; font-weight: 650; }
.ecart .faint { font-weight: 400; font-size: 12px; }
.ecart-hausse { color: var(--success); }
.ecart-hausse .ecart-fleche { transform: rotate(-45deg); }
.ecart-baisse { color: var(--danger); }
.ecart-baisse .ecart-fleche { transform: rotate(45deg); }
.ecart-vide { margin-top: 6px; font-size: 12.5px; }
.classement { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.classement li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.classement li:first-child { border-top: 0; }
.classement-rang { width: 22px; text-align: center; font-weight: 750; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.classement-photo { width: 44px; height: 44px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-sunken); }
.classement-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.classement-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.classement-texte b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.classement-montant { font-variant-numeric: tabular-nums; white-space: nowrap; }
.canaux { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.canaux li { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr auto; align-items: center; gap: 12px; font-size: 14px; }
.canal-nom { display: flex; flex-direction: column; min-width: 0; }
.canal-inactif { opacity: .8; }
.canal-inactif .canal-nom { grid-column: span 2; }
.pays li .pays-montant { white-space: nowrap; }
.pays:has(.pays-montant) li { grid-template-columns: 130px 1fr 90px; }
.pays li { grid-template-columns: 130px 1fr minmax(28px, auto); }
.pays b { white-space: nowrap; }
.ecart { flex-wrap: wrap; }
.card + .activite-grille, .activite-grille + .activite-grille, .activite-grille + .card { margin-top: 18px; }

/* ================================================================== clients */
.tri { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-muted); }
.client-cellule { display: flex; align-items: center; gap: 10px; }
.avatar-client { width: 36px; height: 36px; font-size: 12.5px; background: var(--primary-bg); color: var(--primary); border: 1px solid var(--primary-border); }
.avatar-grand { width: 72px; height: 72px; font-size: 24px; flex: none; }
.badges-cellule { text-align: right; white-space: nowrap; }
.badges-cellule .badge + .badge { margin-left: 4px; }
.stat-valeur-petite { font-size: 20px; }
.demandes-clients { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.demande-client { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--border); }
.demande-prete { border-color: var(--success-border); background: var(--success-bg); }
.demande-close { opacity: .7; }
.demande-client-photo { width: 52px; height: 52px; flex: none; border-radius: 12px; overflow: hidden; background: var(--surface-sunken); display: grid; place-items: center; color: var(--text-muted); }
.demande-client-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.demande-client-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; align-items: flex-start; }
.demande-client-detail { white-space: pre-wrap; }
.demande-client-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.demande-client-actions form { margin: 0; }
.form-demande-client { margin-top: 12px; }
.fidelite { display: flex; flex-direction: column; gap: 8px; }
.fidelite-points { font-size: 15px; }
.fidelite-points b { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.codes { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.codes li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--accent-bg); font-size: 14px; }

/* ================================================================== calendrier */
.calendrier-nav { display: flex; align-items: center; gap: 4px; }
.calendrier-titre { font-size: 20px; min-width: 170px; text-align: center; }
.calendrier-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.calendrier-cote .card + .card { margin-top: 18px; }
.calendrier-carte { padding: 12px; }
.calendrier-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendrier-entete { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 0 6px; }
.jour { min-height: 104px; border-radius: 10px; background: var(--surface-alt); border: 1px solid var(--border); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.jour-hors { background: transparent; border-style: dashed; opacity: .55; }
.jour-aujourdhui { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.jour-num { align-self: flex-start; font-size: 12.5px; font-weight: 650; color: var(--text-muted); padding: 1px 6px; border-radius: 6px; text-decoration: none !important; }
.jour-num:hover { background: var(--primary-bg); color: var(--primary); }
.jour-aujourdhui .jour-num { background: var(--primary-fill); color: var(--on-primary); }
.puce { display: flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 1.35;
  color: var(--text); text-decoration: none !important; border-left: 3px solid; min-width: 0; }
.puce span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.puce .icon { flex: none; }
.puce-promo { background: var(--accent-bg); border-color: var(--accent); }
.puce-promo .icon { color: var(--accent); }
.puce-newsletter { background: var(--info-bg); border-color: var(--info); }
.puce-newsletter .icon { color: var(--info); }
.puce-reseau { background: var(--primary-bg); border-color: var(--primary); }
.puce-reseau .icon { color: var(--primary); }
.puce-temps_fort { background: var(--warning-bg); border-color: var(--warning); }
.puce-temps_fort .icon { color: var(--warning); }
.puce-faite span { text-decoration: line-through; color: var(--text-muted); }
.puce-suggestion { background: transparent; border: 1px dashed var(--border-strong); color: var(--text-muted); font-weight: 500; }
.puce-suggestion:hover { border-color: var(--warning); color: var(--warning); }
.calendrier-liste { display: none; list-style: none; margin: 0; padding: 0; }
.a-venir { list-style: none; margin: 0; padding: 0; }
.a-venir a { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none !important; border-radius: 8px; }
.a-venir li:first-child a { border-top: 0; }
.a-venir a:hover { background: var(--surface-alt); }
.a-venir-icone { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; }
.type-promo { background: var(--accent-bg); color: var(--accent); }
.type-newsletter { background: var(--info-bg); color: var(--info); }
.type-reseau { background: var(--primary-bg); color: var(--primary); }
.type-temps_fort { background: var(--warning-bg); color: var(--warning); }
.a-venir-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.a-venir-texte b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-evenement { max-width: 760px; }
.form-actions .espace { flex: 1; }
.effet-promo .stats { margin-bottom: 0; }

/* ================================================================== compta */
.trimestre-nav { margin-bottom: 16px; flex-wrap: wrap; }
.compta-urssaf { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 18px; border-color: var(--primary-border);
  background: linear-gradient(135deg, var(--primary-bg), var(--surface) 70%); }
.compta-urssaf-corps { display: flex; flex-direction: column; gap: 4px; }
.compta-urssaf-label { font-size: 13.5px; font-weight: 650; color: var(--primary); }
.compta-urssaf-montant { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.compta-secondaire { font-size: 28px; color: var(--text-muted); }
.marge-ligne { display: flex; justify-content: space-between; gap: 12px; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--border); font-size: 15px; }
.marge-ligne b { font-size: 18px; }
.avancement-alerte span { background: var(--warning); }
.lignes-depenses { list-style: none; margin: 14px 0 0; padding: 0; }
.lignes-depenses li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.lignes-depenses form { margin: 0; }
.depense-date { width: 70px; flex: none; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.depense-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.depense-montant { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sans-justif { color: var(--warning); cursor: default; }
.pays-categories { margin-bottom: 6px; }
.pays-categories li { grid-template-columns: 190px 1fr 90px; }
.declarations { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.declaration { margin: 0 !important; scroll-margin-top: 20px; }
.declaration-retard { border-color: var(--danger-border); }
.declaration-tete { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.declaration-tete h2 { font-size: 16px; }
.declaration-chiffres { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 10px; }
.declaration-chiffres > span { display: flex; flex-direction: column; font-size: 13px; }
.declaration-chiffres b { font-size: 17px; font-variant-numeric: tabular-nums; }
.champ-bouton { justify-content: flex-end; }
.activite-grille > div > .card + .card { margin-top: 18px; }

/* ================================================================== marges */
.bloc-marges { margin-bottom: 18px; }
.bloc-marges .stats { margin-bottom: 4px; }
.marge-note { margin-top: 10px; }
.form-cout { display: flex; align-items: center; gap: 6px; }
.input-cout { width: 100px; min-height: 38px; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); text-align: right; font-variant-numeric: tabular-nums; }
.input-cout:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.source-cout { font-size: 12px; }
.carte-marge { margin-bottom: 18px; }
.marge-ligne-coloris { display: flex; flex-wrap: wrap; gap: 10px 32px; }
.marge-ligne-coloris > span { display: flex; flex-direction: column; font-size: 13px; }
.marge-ligne-coloris b { font-size: 18px; font-variant-numeric: tabular-nums; }

/* Marge d'une vente */
.marge-vente { margin-bottom: 18px; }
.marge-vente-total { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.marge-vente-total .faint { font-size: 15px; font-weight: 500; }
.cascade { list-style: none; margin: 0 0 10px; padding: 0; max-width: 560px; }
.cascade li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.cascade b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cascade-sous { font-weight: 600; }
.cascade-total { border-bottom: 0 !important; border-top: 2px solid var(--border-strong); font-size: 16px !important; }
.cascade-total b { font-size: 18px; }

/* Étiquettes */
.apercu-pdf { padding: 8px; }
.apercu-pdf iframe { width: 100%; height: 760px; border: 0; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.cout-estime { font-size: 14.5px; }
.lot-liste { list-style: none; margin: 0; padding: 0; }
.lot-liste li { padding: 4px 0; border-top: 1px solid var(--border); }
.lot-liste li:first-child { border-top: 0; }
.lot-liste .check { margin: 8px 0; align-items: flex-start; }
.lot-liste .badge { margin-left: 4px; }

/* Calcul des prix (29/11/26) */
.px-lecture { margin: -4px 0 14px; max-width: 900px; }
.px-table td { vertical-align: top; }
.px-gain, .px-conseil, .px-prix { white-space: nowrap; }
.px-prix { font-weight: 600; font-variant-numeric: tabular-nums; }
.px-gain { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.px-gain span { font-weight: 500; }
.px-ok { color: var(--success); }
.px-bas { color: var(--warning); }
.px-perte { color: var(--danger); }
.px-case { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 8px 0; cursor: pointer; }
.px-cartes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.px-carte { padding: 18px; border-top: 3px solid var(--canal); }
.px-carte-tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.px-carte-tete .canal { margin-left: 0; font-size: 12px; padding: 4px 10px; }
.px-verdict { display: flex; flex-direction: column; margin: 6px 0 8px; }
.px-verdict-gain { font: 800 30px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.px-verdict span:last-child { font-size: 13px; color: var(--text-muted); }
.px-jauge { height: 6px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; margin-bottom: 8px; }
.px-jauge span { display: block; height: 100%; border-radius: 999px; background: currentColor; }
.px-cascade li { font-size: 13px; padding: 5px 0; }
.px-cascade .cascade-total { font-size: 14.5px !important; }
.px-detail-titre { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin: 10px 0 2px; text-transform: uppercase; letter-spacing: .03em; }
.px-commissions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.px-commissions .card + .card { margin-top: 0; }
.px-commissions .card { scroll-margin-top: 20px; }
.px-gros { font: 800 30px/1 var(--font); color: var(--chiffre); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.px-commissions .card-head { flex-wrap: nowrap; align-items: flex-start; }
.px-gros span { display: block; font: 500 12px var(--font); color: var(--text-muted); margin-top: 4px; }
.px-surcharge { margin-top: 14px; }
.px-surcharge summary { cursor: pointer; color: var(--primary); font-size: 14px; }
.px-reglages { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 18px; align-items: start; }
.px-reglages .btn { justify-self: start; }
@media (max-width: 1200px) {
  .px-commissions { grid-template-columns: minmax(0, 1fr); }
  }
@media (max-width: 1000px) {
  .px-cartes { grid-template-columns: minmax(0, 1fr); }
}
.px-table th:nth-child(2) { width: 46%; }
.px-chevron { color: var(--text-faint); width: 28px; }
.px-tete-produit { display: flex; gap: 16px; align-items: center; }
.px-tete-produit img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; }
.px-colis { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 16px; }
.px-colis select { min-height: 36px; border-radius: 999px; padding: 0 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 500 14px var(--font); }
.px-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.px-prix-ligne { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 6px; }
.px-prix-ligne input { width: 100%; font: 800 34px/1.1 var(--font); color: var(--text); background: transparent; border: 0;
  border-bottom: 2px solid var(--border-strong); padding: 2px 0; font-variant-numeric: tabular-nums; }
.px-prix-ligne input:focus { outline: none; border-bottom-color: var(--canal); }
.px-prix-ligne span { font: 700 24px var(--font); color: var(--text-muted); }
.px-verdict-zone { min-height: 72px; }
.px-raccourcis { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 12px; }
.px-raccourcis .chip { height: 30px; font-size: 13px; }
.px-bouton { width: 100%; justify-content: center; }
.px-pose { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 10px;
  border-radius: var(--radius-sm); background: var(--primary-bg); color: var(--primary); font-size: 13.5px; }
.px-pose form { margin: 0; }
.px-calcul { margin-top: 12px; }
.px-calcul summary { cursor: pointer; color: var(--text-muted); font-size: 13.5px; }
.px-cartes { align-items: start; margin-bottom: 18px; }
.px-cartes .card + .card { margin-top: 0; }

/* Fiche produit (Stock → fil) : infos et calcul de prix (29/11/26) */
.fp-encarts { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 18px; }
.fp-encarts .card + .card { margin-top: 0; }
.fp-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 4px 14px; align-items: end; margin-bottom: 6px; }
.fp-form .field { margin-bottom: 0; }
.fp-form .aide { min-height: 18px; }
.fp-form .btn { margin-bottom: 22px; }
.fp-canaux li { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; align-items: baseline; }
.fp-canaux .canal { margin-left: 0; }
.fp-bouton { margin-top: 12px; }

/* Produits (29/11/26) : liste unique, brouillons, images */
.pr-filtres { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pr-rouge { --canal: var(--danger); }
.pr-orange { --canal: var(--warning); }
.pr-recherche { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pr-recherche .recherche-champ { flex: 1 1 320px; max-width: 460px; }
.barre-outils .pr-recherche { flex: 1; }
.pr-recherche select { min-height: 38px; border-radius: 999px; padding: 0 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.pr-table th:nth-child(2) { width: 42%; }
.pr-table td { vertical-align: top; }
.pr-table .badge { margin-top: 4px; }
.pr-sans-photo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--surface-sunken); color: var(--text-faint); }
.pr-brouillon td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
.pr-h3 { font-size: 14px; margin: 14px 0 8px; }
.pr-titre-section { font-size: 18px; margin: 8px 0 12px; }
.pr-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pr-image { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-alt); display: flex; flex-direction: column; }
.pr-image img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--surface-sunken); }
.pr-image figcaption { padding: 6px 8px; font-size: 12.5px; color: var(--text-muted); display: flex; flex-direction: column; gap: 6px; }
.pr-principale { border-color: var(--primary-border); box-shadow: 0 0 0 2px var(--primary-ring); }
.pr-actions { display: flex; gap: 2px; align-items: center; }
.pr-actions form { margin: 0; }
.pr-actions .icon-btn { width: 32px; height: 32px; }
.pr-coloris { margin: 0; }
.pr-coloris select { width: 100%; min-height: 30px; font-size: 12.5px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.pr-ajout-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.pr-fichier { position: relative; cursor: pointer; }
.pr-fichier input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pr-form { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.pr-form .card + .card { margin-top: 0; }
.pr-form textarea { width: 100%; }
.pr-boutons { display: flex; gap: 10px; margin-top: 8px; }
.pr-check li { justify-content: flex-start; gap: 8px; }
.pr-supprimer { margin: 18px 0 0; }
.pr-images-bas { margin-top: 18px; }
.pr-boutique summary { cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; }
.pr-boutique summary::-webkit-details-marker { display: none; }
.pr-apercu { display: inline-flex; gap: 4px; }
.pr-apercu img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.pr-boutique[open] .pr-apercu { display: none; }
.pr-boutique .pr-galerie { margin-bottom: 8px; }

/* Sites (29/11/26) : page d'entrée « Sur quel site ? », bandeau du site, logo dans le menu.
   --site = la couleur de marque du site (donnée du site, posée sur l'élément). */
.sites { max-width: 1080px; margin: 0 auto; padding: 22px 16px 48px; }
.sites-tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 34px; }
.sites-tete .brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.sites-moi { display: flex; align-items: center; gap: 6px; }
.sites-moi form { margin: 0; }
.sites-qui { color: var(--text-muted); font-weight: 500; padding: 0 6px; }
.sites-titre { margin-bottom: 22px; }
.sites-titre h1 { font-size: clamp(30px, 4vw, 42px); }
.sites-titre .sous-titre { font-size: 18px; }
.sites-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.site-carte { display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none !important;
  transition: transform .15s, box-shadow .15s; }
a.site-carte:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.site-logo { background: var(--site); aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 26px 34px; }
.site-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.site-initiale { font: 800 64px var(--font); color: #fff; }
.site-corps { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.site-nom b { font-size: 19px; }
.site-chiffres { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--text-muted); }
.site-chiffres b { color: var(--text); font-size: 16px; }
.site-alerte, .site-alerte b { color: var(--warning) !important; }
.site-canaux { display: flex; flex-wrap: wrap; gap: 6px; }
.site-canaux .canal { margin-left: 0; font-size: 12px; padding: 4px 10px; }
.canal-eteint { opacity: .55; }
.site-entrer { align-self: flex-start; margin-top: 6px; }
.site-nouveau { border-style: dashed; border-width: 2px; background: transparent; box-shadow: none; align-items: center; justify-content: center;
  text-align: center; padding: 28px; gap: 6px; min-height: 260px; }
.site-nouveau-icone { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunken); color: var(--text-faint); margin-bottom: 6px; }
.sites-communs { margin-top: 38px; }
.sites-communs h2 { font-size: 15px; color: var(--text-muted); font-weight: 600; margin-bottom: 12px; }
.sites-outils { display: flex; flex-wrap: wrap; gap: 10px; }
.site-outil { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text); font-weight: 500; }
.site-outil:hover { border-color: var(--primary-border); }

.site-bandeau { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.site-bandeau-logo { background: var(--site); border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; padding: 16px 22px; color: #fff; text-decoration: none !important; box-shadow: var(--shadow-sm); }
.site-bandeau-logo img { max-width: 100%; max-height: 92px; object-fit: contain; }
.site-bandeau-changer { font-size: 12px; opacity: .85; display: inline-flex; align-items: center; gap: 4px; }
.site-bandeau-logo:hover .site-bandeau-changer { opacity: 1; text-decoration: underline; }
.site-bandeau-canaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.canal-tuile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); border-top: 3px solid var(--canal); box-shadow: var(--shadow-xs); color: var(--text); text-decoration: none !important; }
a.canal-tuile:hover { border-color: var(--canal-bord); }
.canal-tuile .canal { margin: 0 0 6px; align-self: flex-start; }
.canal-tuile b { font: 800 24px/1.15 var(--font); font-variant-numeric: tabular-nums; }
.canal-tuile-pied { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.sb-site { text-decoration: none !important; color: var(--text); }
.sb-site:hover { background: var(--surface-sunken); }
.sb-site-logo { width: 30px; height: 30px; border-radius: 9px; background: var(--site); display: grid; place-items: center; flex: none;
  color: #fff; font-weight: 800; overflow: hidden; padding: 3px; }
.sb-site-logo img { width: 100%; height: 100%; object-fit: contain; }
.bare-main:has(.sites) { place-items: start center; padding-top: 0; }
.bare-main .content:has(.sites) { max-width: none; }

/* Colis du jour (29/11/26) : petit logo du site sur chaque colis, tuile de la page d'entrée */
.cmd-site { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--site);
  color: #fff; font-weight: 800; font-size: 12px; margin-right: 8px; vertical-align: middle; overflow: hidden; padding: 2px; flex: none; }
.cmd-site img { width: 100%; height: 100%; object-fit: contain; }
.cmd-source { background: none; }
.cmd-site-petit { width: 20px; height: 20px; border-radius: 6px; margin-right: 6px; }
.cmd-num { display: flex; align-items: center; flex-wrap: wrap; }
.sites-colis { display: flex; align-items: center; gap: 18px; padding: 18px 22px; margin-bottom: 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--warning-border); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none !important; }
.sites-colis:hover { box-shadow: var(--shadow-md); }
.sites-colis-icone { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--warning-bg); color: var(--warning); flex: none; }
.sites-colis-texte { display: flex; flex-direction: column; flex: 1; font-size: 17px; }
.sites-colis-texte b { font: 800 30px/1.1 var(--font); }
.sites-colis-vide { border-color: var(--border); }
.sites-colis-vide .sites-colis-icone { background: var(--success-bg); color: var(--success); }

/* Prix : chaque commande rentable, ports par pays, prix dégressifs (29/11/26) */
.px-des { font-size: 12px; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.px-intro { max-width: 900px; margin: 0 0 16px; color: var(--text-muted); }
.px-sous-titre { font-size: 15px; font-weight: 700; margin: 18px 0 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.px-sous-titre .canal { margin-left: 0; }
.px-pile { display: grid; gap: 14px; }
.px-pile .card + .card { margin-top: 0; }
.px-degressif td, .px-degressif th { white-space: nowrap; }
.px-case-n { display: inline-block; min-width: 30px; padding: 3px 8px; border-radius: 999px; font-weight: 700; text-align: center;
  background: color-mix(in srgb, currentColor 12%, transparent); cursor: help; }

.sans-coupure { white-space: nowrap; }

/* Colis du jour : sélection de plusieurs colis et expédition groupée (29/11/26) */
.cmd-coche { display: inline-grid; place-items: center; width: 30px; height: 30px; margin: -4px 4px -4px -8px; border-radius: 8px; cursor: pointer; flex: none; }
.cmd-coche:hover { background: var(--surface-sunken); }
.cmd-coche input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary-fill); cursor: pointer; }
.cmd-ligne .cmd-coche input { pointer-events: none; }   /* le clic va au libellé : on coche sans déplier la ligne */
.cmd-tete-selection { display: flex; align-items: center; gap: 6px; padding: 4px 18px 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
.cmd-choisi > .cmd-ligne { background: var(--primary-bg); }
.barre-selection { position: fixed; left: calc(50% + var(--sidebar-w) / 2); bottom: 24px; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 20px; border-radius: 999px; max-width: calc(100vw - var(--sidebar-w) - 40px);
  background: var(--glass, var(--surface)); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border: 1px solid var(--border); box-shadow: var(--shadow-md); animation: monter .2s ease-out; }
.barre-selection[hidden] { display: none; }
.barre-selection b { white-space: nowrap; }
.barre-selection-fin { display: flex; gap: 8px; margin-left: 6px; }
html.menu-replie .barre-selection { left: calc(50% + var(--sidebar-w-mini) / 2); max-width: calc(100vw - var(--sidebar-w-mini) - 40px); }
body:has(.barre-selection:not([hidden])) .content { padding-bottom: 110px; }
.exp-liste { padding: 0 !important; }
.exp-ligne { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(160px, 1.3fr) minmax(190px, 1.2fr) 178px 90px; gap: 14px;
  align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.exp-ligne:last-child { border-bottom: 0; }
.exp-hors { opacity: .7; }
.exp-hors .exp-raison { grid-column: 3 / -1; }
.exp-coche { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.exp-coche input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary-fill); flex: none; }
.exp-service select { width: 100%; }
.exp-poids { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.exp-poids input { width: 90px; }
.exp-cout { text-align: right; font-variant-numeric: tabular-nums; }

/* Réception des arrivages (29/11/26) */
.rc-depot form { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 18px 0 6px; }
.rc-camera { position: relative; min-height: 76px; padding: 18px 34px; font-size: 19px; gap: 12px; border-radius: 22px; width: min(100%, 460px); justify-content: center; }
.rc-camera input, .rc-choisir input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rc-choisir { position: relative; color: var(--primary); font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rc-en-cours .rc-camera, .rc-en-cours .rc-choisir { opacity: .5; pointer-events: none; }
.rc-attente { margin: 0; font-weight: 600; }
.rc-plus { width: min(100%, 460px); text-align: left; }
.rc-plus summary { cursor: pointer; color: var(--text-muted); font-size: 14px; text-align: center; }
.rc-plus .field { margin-top: 10px; }
.rc-conseil { margin: 10px 0 0; text-align: center; }
.rc-entete { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 18px; }
.rc-ligne-champ { display: flex; gap: 8px; align-items: center; }
.rc-ligne-champ select { flex: 1; }
.rc-table td { vertical-align: middle; }
.rc-case { width: 34px; }
.rc-case input { width: 20px; height: 20px; }
.rc-vignette img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; display: block; }
.input.rc-pelotes { width: 84px; text-align: right; font-size: 16px; }
.input.rc-coloris { width: auto; max-width: 300px; font-size: 16px; }
.rc-lu { font-size: 12.5px; color: var(--text-muted); word-break: break-word; }
.rc-ecartee td:not(.rc-case) { opacity: .45; }
.rc-ajout { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rc-ajout .input.rc-nb { width: 110px; font-size: 16px; }
.rc-barre { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: space-between; margin-top: 16px; padding: 12px 16px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.rc-total { font-size: 15px; }
.rc-total b { font-size: 22px; }
.rc-boutons { display: flex; flex-wrap: wrap; gap: 8px; }

/* Où je le vends (29/11/26) : un interrupteur et un prix par canal */
.oc-carte { margin-bottom: 18px; }
.oc-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.oc-canal { border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: opacity .15s; }
.oc-eteint { opacity: .62; }
.oc-eteint:hover, .oc-eteint:focus-within { opacity: 1; }
.oc-haut { display: flex; justify-content: space-between; align-items: center; }
.oc-haut .canal { margin-left: 0; font-size: 13px; padding: 5px 10px; }
.oc-etat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 14px; }
.oc-etat .badge { margin-left: auto; }
.oc-prix label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.oc-prix-ligne { display: flex; align-items: center; gap: 6px; }
.oc-prix-ligne input { width: 100%; min-width: 0; font-size: 16px; }
.oc-euro { color: var(--text-muted); }
.oc-plus { margin: 0; font-size: 13px; }
.pr-vert { --canal: var(--success); }
.pr-gris { --canal: var(--border-strong); }

/* Interrupteur (bouton role="switch") */
.interrupteur { position: relative; width: 50px; height: 30px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--border); cursor: pointer; padding: 0; flex: none; transition: background .15s, border-color .15s; }
.interrupteur span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-solid); box-shadow: 0 1px 3px #0003; transition: transform .15s; }
.interrupteur[aria-checked="true"] { background: var(--primary); border-color: var(--primary); }
.interrupteur[aria-checked="true"] span { transform: translateX(20px); }
.interrupteur:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Liste Produits : pastilles des canaux */
.pr-canaux { display: flex; flex-wrap: wrap; gap: 4px; }
.pr-canaux .canal { margin-left: 0; }
.pr-canaux .canal-off { --canal: var(--text-muted); --canal-bg: transparent; --canal-bord: var(--border); text-decoration: line-through; opacity: .7; }
.pr-canaux .canal-ecart { box-shadow: 0 0 0 2px var(--warning); }
.chip-radio input[type="checkbox"] { margin: 0 2px 0 0; }
.exp-off .exp-service, .exp-off .exp-colis, .exp-off .exp-cout { opacity: .45; }
.exp-deja { display: block; margin-top: 3px; font-size: 12.5px; color: var(--primary); }
.exp-colis { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.exp-poids-liste { display: flex; flex-direction: column; gap: 6px; }
.exp-n { width: 16px; text-align: right; font-size: 12.5px; }
.exp-retirer { border: 0; background: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px; display: grid; place-items: center; }
.exp-retirer:hover { color: var(--danger); background: var(--danger-bg); }
.exp-retirer[hidden], .exp-n[hidden] { display: none; }
.exp-ajouter { padding-left: 6px; }
.exp-cout { display: flex; flex-direction: column; align-items: flex-end; }
.rc-mobile { display: none; }
.rc-abandon { margin: 8px 0 0; text-align: right; }
@media (max-width: 743px) {
  .rc-ordi, .rc-table th.rc-ordi, .rc-table td.rc-ordi { display: none !important; }
  .rc-mobile { display: block; margin-top: 2px; font-size: 13px; }
  .rc-table thead { display: none; }
  .rc-table tr { display: grid; grid-template-columns: 26px 44px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border); }
  .rc-table tr:last-child { border-bottom: 0; }
  .rc-table td { display: block; border: 0; padding: 0 !important; text-align: left; }
  .rc-verifier .rc-table tr { grid-template-columns: 26px minmax(0, 1fr) 84px; }
  .rc-verifier .rc-table td:nth-child(3) { grid-column: 2 / 4; }
  .rc-verifier .rc-table td:nth-child(4) { grid-row: 1; grid-column: 3; }
  .input.rc-coloris { max-width: none; width: 100%; }
  .rc-barre { bottom: calc(74px + env(safe-area-inset-bottom)); padding: 10px 12px; }
  .rc-boutons { width: 100%; }
  .rc-boutons .btn { flex: 1; }
}

/* Visuels (29/11/26) : vitrine en haut de la fiche, plusieurs photos par coloris, visionneuse en pleine résolution */
.vs-carte { margin-bottom: 18px; }
.vs-vitrine { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.vs-grande { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-solid); aspect-ratio: 1; border: 1px solid var(--border); }
.vs-grande .vs-ouvrir, .vs-grande img { width: 100%; height: 100%; }
.vs-grande img { object-fit: contain; display: block; }
.vs-vide { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-faint); }
.vs-ouvrir { display: block; border: 0; padding: 0; margin: 0; background: none; cursor: zoom-in; width: 100%; }
.vs-resume h2 { margin: 0 0 4px; }
.vs-chiffres { margin: 0 0 10px; color: var(--text-muted); }
.vs-alerte { margin: 0 0 10px; color: var(--warning); font-size: 14px; }
.vs-conseil { display: block; margin: 8px 0 14px; }
.vs-resume .vs-ajout-zone { min-height: 64px; flex-direction: row; font-weight: 600; }
.vs-bande { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.vs-bande > * { flex: none; scroll-snap-align: start; }
.vs-tuile { position: relative; margin: 0; width: 132px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-solid); }
.vs-tuile img { width: 132px; height: 132px; object-fit: cover; display: block; }
.vs-est-principale { box-shadow: 0 0 0 2px var(--primary-ring); border-color: var(--primary-border); }
.vs-badges { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; pointer-events: none; }
.vs-q { font-size: 10.5px; font-weight: 700; line-height: 1; padding: 4px 6px; border-radius: 999px; background: #000000a6; color: #fff; letter-spacing: .02em; }
.vs-q-4k { background: #11703de6; }
.vs-q-petite { background: #b42318e6; }
.vs-q-boutique { background: #ffffffd9; color: #13201c; }
.vs-q-principale { background: var(--primary); }
.vs-grande .vs-badges { top: 10px; left: 10px; }
.vs-grande .vs-q { font-size: 12px; padding: 5px 9px; }
.vs-actions { display: flex; align-items: center; gap: 0; padding: 2px; border-top: 1px solid var(--border); }
.vs-actions form { margin: 0; }
.vs-actions .icon-btn { width: 28px; height: 28px; }
.vs-deplacer { flex: 1; min-width: 0; }
.vs-deplacer select { width: 100%; min-height: 26px; font-size: 11.5px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.vs-ajout { margin: 0; }
.vs-ajout-zone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 132px; height: 132px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 13px; text-align: center; cursor: pointer; padding: 8px; }
.vs-resume .vs-ajout-zone { width: 100%; height: auto; }
.vs-ajout-zone:hover, .vs-ajout-zone:focus-within { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.vs-ajout-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.vs-tete-coloris { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 22px 0 10px; }
.vs-tete-coloris h3 { margin: 0; font-size: 17px; }
.vs-coloris-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.vs-coloris { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-width: 0; transition: border-color .15s, background .15s; }
.vs-coloris-tete { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.vs-coloris-vide { border-style: dashed; }
.vs-survol { border-color: var(--primary) !important; background: var(--primary-bg); }
.vs-envoi { opacity: .55; pointer-events: none; }
.vs-envoi::after { content: "Envoi des photos…"; display: block; margin-top: 6px; font-weight: 600; color: var(--primary); }

/* Visionneuse plein écran */
.vs-visionneuse { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0b0f0ef2; color: #fff; }
.vs-visionneuse[open] { display: flex; align-items: center; justify-content: center; }
.vs-visionneuse::backdrop { background: #000c; }
.vs-visionneuse figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; }
.vs-visionneuse img { max-width: 94vw; max-height: calc(100dvh - 90px); object-fit: contain; transition: opacity .2s; }
.vs-charge img { opacity: .35; }
.vs-visionneuse figcaption { font-size: 14px; color: #ffffffcc; text-align: center; padding: 0 16px; }
.vs-visionneuse figcaption span { margin-left: 8px; color: #ffffff99; }
.vs-visionneuse button { position: absolute; border: 0; border-radius: 999px; width: 48px; height: 48px; display: grid; place-items: center;
  background: #ffffff1f; color: #fff; cursor: pointer; }
.vs-visionneuse button:hover { background: #ffffff38; }
.vs-v-fermer { top: 14px; right: 14px; }
.vs-v-prec { left: 14px; top: 50%; transform: translateY(-50%); }
.vs-v-suiv { right: 14px; top: 50%; transform: translateY(-50%); }

/* Mode atelier (copie du Mac après la bascule) */
.atelier { margin: 0 0 14px; padding: 9px 14px; border-radius: 14px; font-size: 13.5px;
  background: repeating-linear-gradient(135deg, var(--warning-bg), var(--warning-bg) 12px, transparent 12px, transparent 24px), var(--surface);
  border: 1px dashed var(--warning-border); color: var(--text); }
.atelier a { font-weight: 600; }

/* Mise en ligne (Paramètres) */
.mel-versions .stat-valeur.mono { font-size: 22px; }
.mel-etapes { margin: 12px 0 14px 18px; padding: 0; font-size: 13.5px; line-height: 1.7; }
.mel-boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.mel-fichiers { margin: 10px 0; }
.mel-fichiers summary { cursor: pointer; color: var(--primary); font-size: 14px; }
.mel-journal { margin: 0; max-height: 420px; overflow: auto; padding: 14px; border-radius: 12px; background: var(--surface-sunken);
  font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
