/* ==========================================================================
   Espace administrateur BEMY. Styles repris de l'admin d'Andy & Co (1440 px),
   couleurs Atout Beauté (brun et or) à la place du rouge et de la lavande.
   ========================================================================== */

:root {
  --bg: #FAF7F2;
  --white: #FFFFFF;
  --ink: #2B1E18;
  --ink-2: #4A3A32;
  --muted: #74655C;
  --line: #E9E0D5;
  --line-soft: #F2ECE4;
  --field: #D8CCBF;
  --head: #FBF9F6;
  --red: #7A4A22;      /* brun caramel Atout Beauté : boutons principaux */
  --red-dark: #5E3818;
  --red-soft: #F6ECE0;
  --lav: #8F6C46;      /* or Atout Beauté */
  --lav-soft: #F3EADF;
  --brun: #411809;
  --rose: #E95A8D;
  --green: #2D7A3E;
  --green-ink: #2D5A24;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: Figtree, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.4; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dt, dd { margin: 0; }
fieldset { margin: 0; min-width: 0; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; }
:focus-visible { outline: 3px solid var(--lav); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Utilitaires ---------- */

.col { display: flex; flex-direction: column; }
.row { display: flex; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.baseline { align-items: baseline; }
.center-y { align-items: center; }
.center { text-align: center; }
.wrap { flex-wrap: wrap; }
.grow { flex-grow: 1; }
.grow-2 { flex-grow: 2; }
.minw0 { min-width: 0; }
.self-start { align-self: flex-start; }
.self-end { align-self: flex-end; }
.right { text-align: right; }
.cap::first-letter { text-transform: uppercase; }
.gap-2 { gap: 2px; } .gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-18 { gap: 18px; }
[class*="stack-"] { display: flex; flex-direction: column; }
.stack-6 { gap: 6px; } .stack-8 { gap: 8px; } .stack-10 { gap: 10px; } .stack-12 { gap: 12px; } .stack-14 { gap: 14px; }
.stack-16 { gap: 16px; } .stack-18 { gap: 18px; } .stack-24 { gap: 24px; }
.w-100 { width: 110px; flex-shrink: 0; } .w-110 { width: 110px; flex-shrink: 0; } .w-140 { width: 140px; } .w-340 { width: 340px; flex-shrink: 0; }

.serif { font-family: var(--serif); font-weight: 400; }
.h-32 { font-size: 32px; line-height: 36px; } .h-34 { font-size: 34px; line-height: 38px; } .h-36 { font-size: 36px; line-height: 40px; }
.h-card { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.h-14 { font-size: 14px; font-weight: 800; }
.label { font-size: 13px; font-weight: 700; }
.t-13 { font-size: 13px; } .t-14 { font-size: 14px; } .t-15 { font-size: 15px; } .t-18 { font-size: 18px; } .t-20 { font-size: 20px; }
.t-700 { font-weight: 700; } .t-800 { font-weight: 800; }
.t-600-14 { font-size: 14px; font-weight: 600; }
.t-700-13 { font-size: 13px; font-weight: 700; } .t-700-14 { font-size: 14px; font-weight: 700; } .t-800-14 { font-size: 14px; font-weight: 800; }
.t-muted { color: var(--muted); }
.t-muted-10 { font-size: 10px; color: var(--muted); } .t-muted-11 { font-size: 11px; color: var(--muted); } .t-muted-12 { font-size: 12px; color: var(--muted); }
.t-muted-13 { font-size: 13px; color: var(--muted); } .t-muted-14 { font-size: 14px; color: var(--muted); }
.t-ink { color: var(--ink); } .t-ink-2 { color: var(--ink-2); }
.t-green { color: var(--green-ink); } .t-green-13 { font-size: 13px; font-weight: 700; color: var(--green-ink); }
.t-red-13 { font-size: 13px; font-weight: 700; color: var(--red-dark); } .t-red-700 { color: var(--red-dark); font-weight: 700; }
.link-red { font-size: 14px; font-weight: 700; color: var(--red-dark); }
.link-red-13 { font-size: 13px; font-weight: 700; color: var(--red-dark); text-decoration: underline; }
.link-muted { font-size: 14px; font-weight: 700; color: var(--muted); padding: 10px 6px; }
.mono-font { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 0.02em; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }

/* ---------- Boutons, champs ---------- */

.btn {
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 0; font-size: 14px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-outline { background: var(--white); border: 1px solid var(--field); font-weight: 700; padding: 0 16px; }
.btn-outline:hover { border-color: var(--ink); }
.btn-dark-outline { background: var(--white); border: 1px solid var(--ink); font-size: 13px; }
.btn-red-outline { background: var(--white); border: 1px solid var(--red-dark); color: var(--red-dark); padding: 0 14px; }
.btn-green-outline { background: var(--white); border: 1px solid var(--green); color: var(--green-ink); padding: 0 14px; }
.btn-white { background: var(--white); color: var(--ink); min-height: 40px; font-size: 13px; padding: 0 14px; }
.btn-square { width: 44px; padding: 0; }
.btn-xs { min-height: 32px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-36 { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-40 { min-height: 40px; font-size: 13px; padding: 0 12px; }
.btn-42 { min-height: 42px; }
.btn-46 { min-height: 46px; }
.btn-lg { min-height: 52px; font-size: 16px; }
.btn-dashed { min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px dashed #B8AFA3; background: var(--white); font-size: 13px; font-weight: 700; }
.icon-btn {
  width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 8px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2);
}
.icon-btn:hover { background: var(--line-soft); }
.icon-btn.sm { width: 30px; height: 30px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 700; }
.input {
  height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: 10px; background: var(--white); font-size: 14px; min-width: 0; width: 100%;
}
textarea.input { height: auto; padding: 10px 12px; line-height: 20px; resize: vertical; }
.input.input-xs { height: 30px; padding: 0 8px; font-size: 12px; border-radius: 6px; margin-top: 4px; max-width: 220px; }
.input:focus, .input-unit:focus-within, .searchbox:focus-within { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--lav-soft); }
.sel { width: auto; font-weight: 600; padding-right: 8px; }
.input.grow { width: auto; flex: 1 1 0; }
.input.w-100 { width: 110px; flex: 0 0 110px; }
.input-unit { display: flex; align-items: center; height: 44px; border: 1px solid var(--field); border-radius: 10px; padding-right: 12px; background: var(--white); }
.input-unit input { flex-grow: 1; min-width: 0; height: 40px; border: 0; padding: 0 12px; font-size: 14px; font-weight: 700; background: transparent; outline: none; }
.input-unit span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.searchbox { flex-grow: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: var(--white); border: 1px solid var(--field); border-radius: 10px; color: var(--muted); }
.searchbox input { flex-grow: 1; min-width: 0; border: 0; outline: none; font-size: 14px; background: transparent; color: var(--ink); }
.form-error { padding: 10px 14px; border-radius: 10px; background: var(--red-soft); color: #7A0E13; font-size: 14px; font-weight: 700; }

.switch { width: 40px; height: 22px; flex-shrink: 0; border: 0; border-radius: 999px; padding: 3px; display: flex; background: var(--field); justify-content: flex-start; }
.switch.is-on { background: var(--green); justify-content: flex-end; }
.switch span { width: 16px; height: 16px; border-radius: 999px; background: var(--white); }

.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--line-soft); border-radius: 12px; }
.seg-btn { height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg-btn.is-active { background: var(--white); font-weight: 800; color: var(--ink); box-shadow: 0 1px 2px rgba(31, 26, 36, 0.08); }
.choice { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--field); background: var(--white); font-size: 14px; font-weight: 600; }
.choice.is-active { border: 2px solid var(--ink); font-weight: 800; }

.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.b-red { background: var(--red-soft); color: var(--red-dark); }
.b-red.on-tint { background: var(--white); }
.b-amber { background: #FDF0D5; color: #7A4B00; }
.b-blue { background: #E4EEF5; color: #164A70; }
.b-green { background: #E7EFE4; color: var(--green-ink); }
.b-grey { background: var(--line-soft); color: var(--ink-2); }
.b-lav { background: #F3EADF; color: #5A3E22; }
/* Marque du client : app Atout Beauté (or) ou Ma Beauté (rose, pharmacies) */
.b-gold { background: #F6ECE0; color: #5A3015; box-shadow: inset 0 0 0 1px #E6D3BC; }
.b-pink { background: #FCE4EE; color: #9E2D57; box-shadow: inset 0 0 0 1px #F5C3D7; }
.badge.b-lav { gap: 5px; }
.badge-new { display: inline-flex; padding: 2px 8px; border-radius: 999px; background: var(--red); color: var(--white); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.chip { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.sm { font-size: 11px; font-weight: 800; padding: 2px 8px; }
.dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.step { width: 26px; height: 26px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }

.card { padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.empty-card { padding: 32px; text-align: center; color: var(--muted); background: var(--white); border: 1px dashed var(--field); border-radius: 14px; font-size: 14px; }

/* ---------- Structure ---------- */

.shell { display: flex; min-height: 100vh; }
.side {
  width: 248px; flex-shrink: 0; background: var(--white); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 28px; padding: 24px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.side-brand img { width: 150px; height: auto; border-radius: 0; }
.side-tag { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.side-link:hover { background: var(--head); }
.side-link.is-active { background: var(--red-soft); color: var(--red-dark); font-weight: 800; }
.side-link.is-soon { color: #A79FAB; cursor: default; }
.side-link.is-soon:hover { background: transparent; }
.pill-v2 { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--line-soft); color: var(--muted); }
.side-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); color: var(--white); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; }
.side-avatar { width: 36px; height: 36px; flex-shrink: 0; border-radius: 999px; background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.side-reset { border: 0; background: none; font-size: 12px; color: var(--muted); text-decoration: underline; padding: 4px 8px; align-self: flex-start; }

.main { flex-grow: 1; min-width: 0; padding: 32px 40px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head.center-y { align-items: center; }
.crumbs { display: flex; gap: 6px; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: underline; }

.split { display: flex; gap: 24px; align-items: flex-start; }
.split-main { flex-grow: 1; min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2-f { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3-f { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-4-f { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: end; }

/* ---------- Connexion ---------- */

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 32px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; }
.login-logo { width: 260px; height: auto; border-radius: 0; }

/* ---------- Tableau de bord ---------- */

.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.kpi-value { font-size: 32px; font-weight: 800; line-height: 1.1; }
.kpi.sm { padding: 14px 16px; border-radius: 14px; gap: 2px; }
.kpi-value.sm { font-size: 26px; }
.legend { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.swatch.sm { width: 8px; height: 8px; border-radius: 2px; }
.chart { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 8px; }
.chart-y, .chart-area { position: relative; height: 190px; }
.chart-y span { position: absolute; right: 0; transform: translateY(50%); font-size: 12px; color: var(--muted); }
.chart-area { border-bottom: 1px solid var(--field); }
.grid-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); }
.chart-cols { position: absolute; inset: 0; display: grid; }
.chart-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bar { border-radius: 4px 4px 0 0; }
.bar-label { position: absolute; left: 50%; transform: translate(-50%, -6px); font-size: 13px; font-weight: 800; white-space: nowrap; }
.tip {
  position: absolute; left: 50%; transform: translate(-50%, -8px); z-index: 5; display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; background: var(--ink); color: var(--white); border-radius: 8px; font-size: 12px; white-space: nowrap; box-shadow: 0 6px 18px rgba(31, 26, 36, 0.2);
}
.chart-x { display: grid; padding-top: 8px; }
.chart-x span { text-align: center; font-size: 12px; color: var(--muted); }
.chart-x span.is-last { color: var(--ink); font-weight: 800; }
.progress { height: 10px; border-radius: 999px; background: var(--line-soft); display: flex; }
.progress span { border-radius: 999px; }
.pb-8 { padding-bottom: 8px; }
.thumb-40 { width: 40px; height: 40px; border-radius: 8px; background: var(--bg); object-fit: contain; flex-shrink: 0; }
.thumb-44 { width: 44px; height: 44px; border-radius: 10px; background: var(--bg); object-fit: contain; flex-shrink: 0; }

/* ---------- Tableaux ---------- */

.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: var(--head); padding: 12px 8px; }
.table td { border-top: 1px solid var(--line-soft); padding: 12px 8px; vertical-align: middle; }
.table th.right, .table td.right { text-align: right; }
.table .pl { padding-left: 16px; } .table .pr { padding-right: 16px; } .table .pl-18 { padding-left: 18px; } .table .pl-28 { padding-left: 28px; }
.table .py-8 { padding-top: 8px; padding-bottom: 8px; } .table .py-12 { padding-top: 12px; padding-bottom: 12px; }
.table .w-check { width: 52px; padding-left: 18px; }
.table.plain { border: 0; border-radius: 0; }
.table.plain th { background: transparent; padding: 10px 8px 10px 0; }
.table.plain td { padding: 12px 8px 12px 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--head); }
.table tr.is-selected td, .table tr.is-selected:hover td { background: var(--red-soft); }
.table tr.is-checked td { background: var(--head); }
.table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; }

.bulk { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 8px 6px 18px; border-radius: 12px; background: var(--ink); color: var(--white); flex-wrap: wrap; }
.bulk-btn { height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: var(--white); font-size: 13px; font-weight: 700; }
.bulk-btn.is-light { background: var(--white); color: var(--ink); border: 0; font-weight: 800; }
.bulk-x { width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--white); display: flex; align-items: center; justify-content: center; }

/* ---------- Panneaux de détail ---------- */

.panel { width: 440px; flex-shrink: 0; background: var(--white); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
.panel-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line-soft); }
.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.status-btn { height: 36px; border-radius: 8px; border: 1px solid var(--field); background: var(--white); font-size: 12px; font-weight: 600; }
.status-btn.is-active { background: var(--red); border-color: var(--red); color: var(--white); font-weight: 800; }
.panel-lines { display: flex; flex-direction: column; padding: 4px 22px; }
.panel-lines li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.panel-lines li:last-child { border-bottom: 0; }
.panel-totals { display: flex; flex-direction: column; gap: 6px; padding: 12px 22px; background: var(--head); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.panel-totals > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.panel-totals dt { color: var(--muted); }
.panel-totals dd { font-weight: 700; text-align: right; }
.panel-totals .big { font-size: 15px; }
.panel-totals .big dt { color: var(--ink); font-weight: 800; }
.panel-totals .big dd { font-weight: 800; }
.panel-note { padding: 12px 22px 0; font-size: 13px; color: var(--ink-2); }
.panel-actions { padding: 16px 22px 20px; }
.panel-sec { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.panel-sec.tint { background: var(--head); padding: 14px 20px; }
.panel-foot { margin-top: auto; display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line-soft); background: var(--head); position: sticky; bottom: 0; }
.mono { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; background: var(--red); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.grid-3-t { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.line-field { display: flex; align-items: center; gap: 10px; }
.line-field > label, .lf-label { width: 110px; flex-shrink: 0; font-size: 13px; color: var(--muted); }
.line-field .input { height: 40px; border-radius: 8px; }
.mini-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 4px 8px 4px 12px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list code { padding: 2px 6px; border-radius: 6px; background: var(--line-soft); }
.toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.toggle-card { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border-radius: 10px; text-align: left; background: var(--white); border: 1px solid var(--line); }
.toggle-card.is-on { background: var(--head); border: 2px solid var(--ink); padding: 0 9px; }
.box { width: 18px; height: 18px; flex-shrink: 0; border-radius: 5px; border: 1.5px solid #B8AFA3; background: var(--white); display: flex; align-items: center; justify-content: center; color: var(--white); }
.toggle-card.is-on .box, .box.on, .box.mixed { background: var(--ink); border: 0; }

/* ---------- Fiche produit ---------- */

.editor { display: flex; gap: 20px; align-items: flex-start; }
.editor-main { flex-grow: 1; min-width: 0; }
.editor-side { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.sticky { position: sticky; top: 24px; }
.photo { position: relative; width: 132px; height: 132px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.photo.is-main { border: 2px solid var(--ink); }
.photo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.photo-tag, .photo-main { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.photo-tag { background: var(--ink); color: var(--white); }
.photo-main { border: 1px solid var(--field); background: var(--white); opacity: 0; transition: opacity 0.15s; }
.photo:hover .photo-main, .photo-main:focus-visible { opacity: 1; }
.photo-x { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 999px; border: 0; background: rgba(31, 26, 36, 0.75); color: var(--white); display: flex; align-items: center; justify-content: center; }
.photo-wait { display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.photo-add {
  width: 132px; height: 132px; border-radius: 12px; border: 2px dashed #C9BFB1; background: var(--white); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-2); text-align: center;
}
.photo-add:hover, .photo-add.is-over { border-color: var(--ink); background: var(--head); }
.pick { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px dashed #B8AFA3; background: var(--white); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.pick.is-on { border: 0; background: var(--lav-soft); color: var(--brun); }
.pick.is-other { opacity: 0.7; }
.sep-top { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--lav); }
.check-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.check-item.is-ok { color: var(--ink); font-weight: 700; }
.check-dot { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--field); display: flex; align-items: center; justify-content: center; color: var(--white); flex-shrink: 0; }
.check-item.is-ok .check-dot { background: var(--green); border: 0; }
.phone { align-self: center; width: 200px; padding: 14px; border-radius: 28px; background: var(--bg); border: 6px solid var(--ink); }
.phone-card { display: flex; flex-direction: column; gap: 6px; }
.phone-tile { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; background: var(--white); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.phone-tile img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.badge-new.abs { position: absolute; top: 6px; left: 6px; font-size: 9px; padding: 2px 6px; }
.phone-plus { width: 34px; height: 34px; border-radius: 999px; background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: center; }

/* ---------- Collections ---------- */

.banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--ink); color: var(--white); border-radius: 14px; }
.banner.link { padding: 16px 20px; border-radius: 16px; }
.banner-text { font-size: 13px; line-height: 18px; color: #E4DFE8; }
.flow { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.flow li { height: 34px; padding: 0 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.14); font-size: 14px; font-weight: 800; display: flex; align-items: center; }
.flow li[aria-hidden] { background: none; padding: 0; color: #B7AFBD; }
.flow li.is-lav { background: var(--lav); }
.three-cols { display: flex; gap: 18px; align-items: flex-start; }
.col-list { width: 290px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.col-item { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.col-item.is-active { border-width: 2px; padding: 9px; }
.col-thumb { width: 46px; height: 62px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.swatch-btn { width: 32px; height: 32px; border-radius: 999px; border: 0; }
.swatch-btn.is-on { border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--ring); }
.cat-list { display: flex; flex-direction: column; }
.cat-list li { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line-soft); }
.cat-list li:last-child { border-bottom: 0; }
.cat-img { width: 36px; height: 36px; border-radius: 8px; display: flex; flex-shrink: 0; }
.cat-img img { width: 100%; height: 100%; object-fit: contain; background: var(--white); border-radius: 8px; border: 1px solid var(--line); }

/* ---------- Nouvel accès ---------- */

.shop-row { display: flex; gap: 12px; align-items: flex-end; }

/* ---------- Fenêtres ---------- */

.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(31, 26, 36, 0.5); }
.modal {
  position: fixed; z-index: 41; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--white); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 24px 60px rgba(31, 26, 36, 0.25);
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.cred { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--head); border: 1px solid var(--line); border-radius: 12px; }
.cred > div { display: flex; justify-content: space-between; align-items: center; }
.cred dt { font-size: 13px; color: var(--muted); }
.cred code { font-size: 15px; font-weight: 700; }
.tri-row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 14px; font-weight: 600; text-align: left; }

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translate(-50%, 12px); max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--white); font-size: 14px; font-weight: 700;
  box-shadow: 0 10px 28px rgba(31, 26, 36, 0.25); opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Commandes : refus, ajustement, suivi ---------- */

.b-refused { background: #F3E3E3; color: #7A0E13; }
.refus-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--red-soft); color: #7A0E13; font-size: 13px; line-height: 18px; }
.refus-box svg { flex-shrink: 0; margin-top: 1px; }
.panel-lines.flush { padding: 0; }
.qty-edit { display: flex; align-items: center; gap: 2px; border: 1px solid var(--field); border-radius: 10px; padding: 2px; flex-shrink: 0; }
.qty-edit strong { min-width: 44px; text-align: center; font-size: 13px; }
/* Suivi des e-mails de commande (admin-mails.js) */
.panel-mail { padding: 12px 22px 0; }
.panel-mail .mail-state + .mail-state { margin-top: 6px; } /* e-mail de la commande, puis confirmation au client (02/12/2026) */
.mail-state { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px; line-height: 18px; background: var(--head); color: var(--ink-2); }
.mail-state svg { flex-shrink: 0; margin-top: 1px; }
.mail-state.is-ok { background: #E7F2E9; color: var(--green-ink); }
.mail-state.is-ko { background: var(--red-soft); color: #7A0E13; }
.mail-state.is-wait { background: var(--lav-soft); color: #2E2250; }
.mail-log summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 4px 0 8px; }
.mail-box .btn { min-height: 44px; flex-shrink: 0; }
.panel-suivi { padding: 0 22px 18px; font-size: 13px; }
.panel-suivi summary { cursor: pointer; font-weight: 700; color: var(--ink-2); padding: 8px 0; }
.panel-suivi ol { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 0 12px; border-left: 2px solid var(--line); }
.panel-suivi li { display: flex; flex-direction: column; }
.file-btn { cursor: pointer; position: relative; }
.file-btn:focus-within { outline: 3px solid var(--lav); outline-offset: 2px; }
.modal.is-wide { width: min(860px, calc(100% - 32px)); }
.t-12 { font-size: 12px; }
.span-2 { grid-column: 1 / -1; }
.w-90 { width: 90px; flex-shrink: 0; }
.h-28 { font-size: 28px; line-height: 32px; }

/* ---------- Règles de vente, Paramètres ---------- */

.rules { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rules-wide { grid-column: 1 / -1; }
.lot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.lot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; border-bottom: 1px solid var(--line-soft); }
.lot-row .input { height: 38px; }
.rules-summary { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--lav-soft); color: #2E2250; font-size: 13px; font-weight: 600; line-height: 18px; }
.rules-summary svg { flex-shrink: 0; margin-top: 1px; }
.info-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--head); border: 1px solid var(--line-soft); }
.info-row svg { color: var(--green); flex-shrink: 0; }

/* ---------- Vitrine ---------- */

.banner-soft { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: #FDF0D5; color: #5C3A00; font-size: 14px; flex-wrap: wrap; }
.vitrine { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.vitrine-side { position: sticky; top: 24px; }
.vitrine-side .sel { max-width: 200px; }
.vb-list { display: flex; flex-direction: column; gap: 8px; }
.vb { background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.vb.is-open { border: 2px solid var(--ink); }
.vb.is-off .vb-title { opacity: 0.55; }
.vb-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 6px; }
.vb.is-open .vb-head { padding: 7px 13px 7px 5px; }
.vb-move { display: flex; flex-direction: column; }
.vb-move .icon-btn { height: 24px; }
.vb-title { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 48px; justify-content: center; border: 0; background: none; text-align: left; padding: 4px 0; }
.vb-type { background: var(--line-soft); color: var(--muted); }
.vb-body { padding: 4px 16px 16px 52px; }
.vb-thumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vb-order { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.vb-item { position: relative; width: 72px; height: 72px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); cursor: grab; user-select: none; -webkit-user-select: none; transition: opacity .15s, box-shadow .15s; }
.vb-item img { width: 100%; height: 100%; object-fit: contain; padding: 6px; border-radius: 12px; pointer-events: none; }
.vb-item:hover { box-shadow: 0 4px 12px rgba(31, 26, 36, 0.10); }
.vb-item.is-dragging { opacity: .35; }
.vb-item.is-extra { opacity: .55; }
.vb-item.drop-before { box-shadow: -4px 0 0 0 var(--red); }
.vb-item.drop-after { box-shadow: 4px 0 0 0 var(--red); }
.vb-rank { position: absolute; left: 4px; top: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; z-index: 1; }
.vb-x { position: absolute; right: -8px; top: -8px; width: 24px; height: 24px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; box-shadow: 0 2px 6px rgba(31, 26, 36, 0.12); }
.vb-x:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.vb-thumbs img { width: 56px; height: 56px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); object-fit: contain; padding: 4px; }
.vb-thumbs > span { min-width: 56px; height: 56px; border-radius: 10px; background: var(--line-soft); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--muted); }
.vb-thumbs > span.wide { padding: 0 12px; background: none; justify-content: flex-start; }
.vb-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed #B8AFA3; border-radius: 12px; background: var(--white); }
.sel-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sel-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.sel-list li:last-child { border-bottom: 0; }
.sel-thumb { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; overflow: hidden; }
.sel-thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; padding-right: 4px; }
.pick-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-align: left; }
.pick-row.is-on { border: 2px solid var(--ink); padding: 3px 9px; background: var(--head); }
.img-pick { width: 64px; height: 64px; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); }
.img-pick.is-on { border: 3px solid var(--ink); padding: 2px; }
.img-pick img { width: 100%; height: 100%; object-fit: contain; }
.img-pick.img-auto { width: auto; padding: 0 12px; font-size: 12px; font-weight: 700; color: var(--ink); }
.cat-img-btn { position: relative; padding: 0; border: 0; cursor: pointer; }
.cat-img-edit { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--ink); display: flex; align-items: center; justify-content: center; }

.pv-phone { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 390 / 820; border-radius: 34px; background: var(--white); border: 7px solid var(--ink); overflow: hidden; }
/* l'app en direct, posée sur l'emplacement du téléphone (voir admin-vitrine.js) */
.pv-live { position: fixed; z-index: 5; overflow: hidden; border-radius: 27px; background: var(--white); }
.pv-live iframe { display: block; border: 0; width: 390px; transform-origin: 0 0; }

/* ---------- Activité clients ---------- */

.kpi-6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi-6 .kpi-value.sm { font-size: 24px; }
.grid-2-1b { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.top-list { display: flex; flex-direction: column; }
.top-list li { display: grid; grid-template-columns: auto 40px minmax(0, 1.4fr) minmax(60px, 1fr) 90px 70px; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line-soft); }
.top-list li:last-child { border-bottom: 0; }
.top-rank { width: 16px; font-family: var(--serif); font-size: 18px; color: var(--red-dark); text-align: center; }
.top-name { overflow: hidden; }
.top-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-bar { height: 8px; border-radius: 999px; background: var(--line-soft); display: flex; }
.top-bar span { border-radius: 999px; background: var(--lav); }
.stack-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; gap: 2px; }
.stack-bar span { display: block; height: 100%; }
.cat-rows { display: flex; flex-direction: column; }
.cat-rows li { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.cat-rows li:last-child { border-bottom: 0; }
.act-table td, .act-table th { white-space: nowrap; }
.act-table td:first-child { white-space: normal; }
.pill-cart { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: var(--red-soft); color: var(--red-dark); font-size: 12px; font-weight: 800; }
.table tr.is-selected .pill-cart { background: var(--white); }
.fiche { scroll-margin-top: 16px; border-width: 2px; border-color: var(--ink); }
.tel-chip { gap: 6px; background: var(--line-soft); color: var(--ink); min-height: 28px; }
.kpi-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.kpi-mini { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--head); border: 1px solid var(--line-soft); }
.kpi-mini > span:first-child { font-size: 12px; font-weight: 700; color: var(--muted); }
.kpi-mini strong { font-size: 20px; font-weight: 800; }
.fiche-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.fiche-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 18px; border-top: 1px solid var(--line-soft); }
.fiche .top-list li { grid-template-columns: 40px minmax(0, 1.4fr) minmax(40px, 1fr) 80px 64px; }
.mbars { display: flex; align-items: flex-end; gap: 8px; }
.mbar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mbar-v { font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.mbar-b { width: 100%; max-width: 44px; min-height: 2px; border-radius: 6px 6px 0 0; background: #E3DCEF; }
.mbar-l { font-size: 12px; color: var(--muted); }
.mbar.is-last .mbar-b { background: var(--lav); }
.mbar.is-last .mbar-v { font-weight: 800; color: var(--ink); }
.mbar.is-last .mbar-l { color: var(--ink); font-weight: 700; }
.mbars::before { content: ''; height: var(--h); }
.legend-wrap { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.cart-box { padding: 14px; border-radius: 14px; background: var(--red-soft); }
.cart-thumbs { display: flex; }
.cart-thumbs img { width: 44px; height: 44px; border-radius: 999px; border: 2px solid var(--white); background: var(--white); object-fit: contain; padding: 3px; margin-left: -10px; }
.cart-thumbs img:first-child { margin-left: 0; }
.journal { display: flex; flex-direction: column; }
.journal li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.journal li:first-child { border-top: 0; }
.journal li.is-order { font-weight: 700; }
.journal li.is-order a { text-decoration: underline; text-underline-offset: 2px; }
.journal li.is-cart { font-weight: 700; color: var(--red-dark); }
.journal li.is-info { color: var(--ink-2); }

/* ---------- Import ---------- */

.import-cols { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--head); border: 1px solid var(--line-soft); }
.import-cols code { display: inline-block; margin: 0 4px 4px 0; padding: 2px 6px; border-radius: 6px; background: var(--white); border: 1px solid var(--line); }
.import-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 14px; border-radius: 12px; background: var(--lav-soft); color: #2E2250; font-size: 14px; }
.import-table { max-height: 42vh; overflow: auto; border-radius: 14px; }
.import-table .table th { position: sticky; top: 0; z-index: 1; }
.import-table .table td { font-size: 13px; }
.import-photos { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--field); border-radius: 12px; }

/* ---------- Écrans plus étroits ---------- */

@media (max-width: 1280px) {
  .split { flex-direction: column; }
  .vitrine { grid-template-columns: minmax(0, 1fr); }
  .vitrine-side { position: static; max-width: 360px; }
  .kpi-6, .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fiche-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .panel { width: 100%; position: static; max-height: none; }
  .three-cols { flex-wrap: wrap; }
  .three-cols > .grow { flex-basis: 100%; }
  .editor { flex-direction: column; }
  .editor-side { width: 100%; }
  .grid-4-f { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-foot { margin-top: 0; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .main { padding: 24px 16px 40px; }
  .grid-4, .grid-2-1, .grid-3, .grid-3-f, .grid-2-f { grid-template-columns: minmax(0, 1fr); }
  .table { display: block; overflow-x: auto; }
  .w-340, .col-list { width: 100%; }
  .kpi-6, .kpi-row, .grid-2-1b, .fiche-grid, .fiche-grid.three, .lot-grid { grid-template-columns: minmax(0, 1fr); }
  .vb-body { padding-left: 16px; }
}

/* ---------- Import des clients ---------- */

.warn-box { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #FDF0D5; color: #5C3A00; font-size: 13px; line-height: 19px; }
.warn-box svg { flex-shrink: 0; margin-top: 1px; }
.warn-box.info { background: #EEE8F5; color: #3D2F5E; }
.bullets { list-style: disc; padding-left: 18px; line-height: 20px; }
.seg { flex-wrap: wrap; }

/* ---------- Produits : trier et filtrer par colonne (comme Excel) ---------- */

.prod-table { overflow: visible; }
.prod-table thead th { position: sticky; top: 0; z-index: 3; padding: 6px 4px; }
.prod-table thead th:first-child { border-top-left-radius: 14px; }
.prod-table thead th:last-child { border-top-right-radius: 14px; }
.prod-table th.is-open { z-index: 41; }
.prod-table .empty-row { padding: 32px 16px; text-align: center; color: var(--muted); }
.th-f { position: relative; }
.th-f.right .th-btn { margin-left: auto; }
.th-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 6px 0 8px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: inherit; font: inherit; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer;
}
.th-btn:hover, .th-f.is-open .th-btn { background: var(--white); border-color: var(--line); color: var(--ink); }
.th-btn.is-on { color: var(--red-dark); }
.th-arrow { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 6px; background: var(--white); border: 1px solid var(--line); color: var(--ink); }
.th-btn.is-on .th-arrow { background: var(--red-soft); border-color: transparent; color: var(--red-dark); }
.th-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--red); }
.pf-scrim { position: fixed; inset: 0; z-index: 40; }
.pf-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 42; width: 300px; max-height: min(70vh, 560px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(31, 26, 36, 0.18); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--ink); text-align: left; cursor: default;
}
.pf-menu.at-right { left: auto; right: 0; }
.pf-sorts { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.pf-sort { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 600; text-align: left; color: var(--ink-2); }
.pf-sort:hover { background: var(--head); }
.pf-sort.is-on { background: var(--red-soft); color: var(--red-dark); font-weight: 800; }
.pf-sec { display: flex; flex-direction: column; gap: 2px; }
.pf-sec + .pf-sec { padding-top: 8px; border-top: 1px solid var(--line-soft); }
.pf-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 2px 8px 4px; }
.pf-list { display: flex; flex-direction: column; gap: 1px; max-height: 260px; overflow-y: auto; }
.pf-opt { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 8px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.pf-opt:hover { background: var(--head); }
.pf-opt.is-all { font-weight: 700; }
.pf-opt.is-empty { color: var(--muted); }
.pf-opt input { width: 16px; height: 16px; accent-color: var(--ink); flex-shrink: 0; }
.pf-foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.searchbox.sm { height: 36px; flex-grow: 0; padding: 0 10px; }
.pf-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px 0 12px; border: 0; border-radius: 999px;
  background: var(--red-soft); color: var(--red-dark); font-size: 13px; font-weight: 700; cursor: pointer;
}
.pf-chip.is-sort { background: var(--lav-soft); color: #2E2250; }
button.link-muted, button.link-red { border: 0; background: transparent; cursor: pointer; }
.nowrap { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.pager { flex-wrap: wrap; gap: 10px; }
.page-size { width: 84px; height: 36px; padding: 0 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.lot-perso { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px; border-radius: 10px; background: #FDF0D5; color: #5C3A00; font-size: 13px; }
.lot-perso svg { flex-shrink: 0; }
button.link-red-13 { border: 0; background: transparent; padding: 0; cursor: pointer; }
.pf-menu > * { flex-shrink: 0; }

/* ---------- Règles de vente : conditionnement par catégorie et par région ---------- */

.lot-table-wrap { overflow-x: auto; border-radius: 14px; }
.lot-table td { padding: 8px; vertical-align: top; }
.lot-table td.pl { vertical-align: middle; }
.lot-cell { min-width: 150px; }
.lot-cell .input { height: 38px; width: 100%; margin-bottom: 4px; }
.lot-cell.is-empty .input { color: var(--muted); }
.lot-cell.is-changed { background: #FDF0D5; }
.lot-cell.is-changed .input { border-color: #B08A00; font-weight: 800; }
.t-amber { color: #7A4B00; font-weight: 700; }

/* Badge « Powered by Netlify » : désactivé dans les réglages du site, masqué aussi au cas où il reviendrait */
#nl-badge-frame { display: none !important; }

/* ---------- Notifications ---------- */
.nt-todo { border-color: var(--ink); }
.nt-reach { justify-content: flex-end; padding-bottom: 4px; }
.nt-table td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }

/* ==========================================================================
   BEMY : photos du produit en groupes, lot libre, thèmes, cocher par thème
   ou par catégorie
   ========================================================================== */
.t-muted-11 { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.block { display: block; margin-top: 4px; }
.end { align-items: flex-end; }
.mt-16 { margin-top: 16px; }
.chip-btn { height: 32px; min-width: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--field); background: var(--white); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.chip-btn.is-on { background: var(--ink); color: var(--white); border-color: var(--ink); }
.photo-wrap { display: flex; flex-direction: column; gap: 6px; width: 112px; }
.photo-wrap .photo { width: 112px; height: 112px; }
.mod-nom-input { width: 112px; height: 32px; padding: 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.photo .photo-main { font-size: 11px; }
.grp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.grp-lab { min-width: 92px; }
.grp-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-size: 12.5px; font-weight: 700; color: var(--ink); }
.grp-chip .box { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--field); display: inline-flex; align-items: center; justify-content: center; color: var(--white); }
.grp-chip.is-on { border-color: var(--ink); background: var(--head); }
.grp-chip.is-mixed { border-color: var(--lav); }
.theme-list li.is-off { opacity: 0.55; }
.theme-list .cat-img { background: var(--white); border: 1px solid var(--line); }
.phone-tile { position: relative; }
.phone-tile .pc-count { position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); box-shadow: inset 0 0 0 1px var(--line); font-size: 9.5px; font-weight: 800; }

/* Pastilles d'un produit : barré au catalogue (invisible pour les clients), face de tour */
.pastilles { margin-top: 4px; }
.pastilles.is-grand { margin-top: 8px; }
.badge.b-barre { gap: 5px; background: #3D3540; color: #FFFFFF; }
.pastilles .badge svg { flex-shrink: 0; }

/* ==========================================================================
   02/12/2026 : couvertures des catalogues, précommandes, commandes d'un même
   panier pour plusieurs magasins, magasins rattachés à Odoo
   ========================================================================== */
/* Couvertures (page 1 du catalogue) : cases Accès clients et fiche du catalogue */
.tg-thumb { width: 30px; height: 40px; flex-shrink: 0; object-fit: cover; border-radius: 4px; background: var(--line-soft); box-shadow: 0 0 0 1px var(--line); }
.toggle-card.has-cover { min-height: 54px; padding: 6px 10px; }
.toggle-card.has-cover.is-on { padding: 5px 9px; }
.col-cover { width: 96px; height: 128px; flex-shrink: 0; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgba(43, 30, 24, 0.12); }

/* Précommandes : état d'un produit (liste, fiche), compteurs, lignes de commande, réservations */
.stock-tag { display: block; margin-top: 2px; font-size: 11px; font-weight: 800; letter-spacing: 0.02em; }
.stock-tag.is-preco { color: #7A4B00; }
.stock-tag.is-cache { color: var(--muted); }
.stock-counts { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--head); font-size: 13px; line-height: 18px; color: var(--ink-2); }
.stock-counts svg { flex-shrink: 0; }
.link-ink { border: 0; padding: 0; background: transparent; font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.preco-fiche { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 18px; }
.preco-fiche svg { flex-shrink: 0; margin-top: 1px; }
.preco-fiche.is-preco { background: #FDF0D5; color: #5C3A00; }
.preco-fiche.is-cache { background: var(--line-soft); color: var(--ink-2); }
.preco-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; font-size: 12px; font-weight: 700; color: #7A4B00; }
.preco-line svg { flex-shrink: 0; }
.badge.sm { height: 20px; padding: 0 8px; font-size: 11px; }
.panel-retirees { display: flex; flex-direction: column; gap: 2px; padding: 10px 22px 4px; background: var(--head); border-top: 1px solid var(--line-soft); }
.panel-lines li.is-retiree img { opacity: 0.45; }
.panel-lines li.is-retiree .t-700-13 { color: var(--muted); text-decoration: line-through; }
.preco-table td { vertical-align: top; }
.panel-lines li > strong, .panel-lines li > s { flex-shrink: 0; white-space: nowrap; }
.preco-table td .btn { margin-top: 6px; }

/* Même panier pour plusieurs magasins : lignes reliées dans la liste, encadré dans le détail */
.chip-groupe { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; height: 22px; margin-top: 4px; padding: 0 8px; border-radius: 999px; background: var(--lav-soft); color: #5A3E22; font-size: 11.5px; font-weight: 800; }
.table tr.in-groupe td:first-child { box-shadow: inset 3px 0 0 var(--lav); }
.table tr.in-groupe:not(.g-first) td { border-top-style: dashed; }
.groupe-box { background: #FBF6F0; }
.groupe-box h2 { display: inline-flex; align-items: center; gap: 6px; }
.groupe-box .mini-list { background: var(--white); }
.groupe-box .mini-list li.is-current { background: var(--red-soft); }

/* Magasins : code postal et ville, rattachement Odoo (ids) en lecture */
.grid-cp { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; }
.odoo-ids { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--head); font-size: 13px; }
.odoo-ids div { display: flex; justify-content: space-between; gap: 12px; }
.odoo-ids dt { color: var(--muted); }
.odoo-ids dd { font-weight: 700; }

/* Comptes reliés à Odoo (contrat du 02/12 §13) : liens vers les fiches Odoo, alerte discrète d'un compte relié à aucune fiche */
.link-odoo { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.link-odoo:hover { color: var(--ink); }
.odoo-ids dd .link-odoo { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.odoo-ids dd .link-odoo code { text-decoration: underline; text-underline-offset: 2px; }
.line-field .nowrap { white-space: nowrap; flex-shrink: 0; }
.odoo-alerte { display: flex; align-items: center; gap: 6px; margin: -4px 0 0 120px; font-size: 12px; line-height: 16px; color: #8A5A00; }
.odoo-alerte svg { flex-shrink: 0; }
/* « Commercial Odoo : … » sous le choix du commercial (contrat du 02/12, §15) */
.odoo-info { display: flex; align-items: flex-start; gap: 6px; margin: -4px 0 0 120px; font-size: 12px; line-height: 16px; color: var(--muted); }
.odoo-info svg { flex-shrink: 0; margin-top: 1px; }
.odoo-info strong { color: var(--ink-2); }
