/* Feuille de style commune — direction « Cockpit × Apricot » (planche validée le 16/09/2026),
   reprise de Cockpit Bâtiments / Cockpit Conciergerie pour l'outil Libertium (2026-10-03).
   Thème sombre par défaut : fond en dégradé ardoise → noir, panneaux translucides, cyan pour
   l'action, rouge/orange réservés aux signaux qui appellent une décision, gris pour l'information.
   Thème clair en option (lien en bas du menu), mémorisé dans le navigateur ; le menu reste sombre.
   Les anciennes variables de l'outil (--red, --card, --border…) sont rebranchées sur la palette
   Cockpit plus bas : les styles écrits en ligne dans le code suivent le thème sans retouche. */
:root {
  --bg-grad: radial-gradient(1200px 640px at 14% -10%, rgba(165,185,200,0.38), rgba(165,185,200,0) 62%),
             radial-gradient(760px 520px at 70% 40%, rgba(120,140,155,0.14), rgba(120,140,155,0) 65%),
             radial-gradient(820px 500px at 108% 112%, rgba(25,182,198,0.16), rgba(25,182,198,0) 60%),
             linear-gradient(160deg, #2a353d 0%, #161f25 46%, #0a0f13 100%);
  --bg-solid: #131b21;
  --surface: rgba(255,255,255,0.06); --surface-solid: #1a232a; --surface-2: rgba(0,0,0,0.25);
  --ink: #e6edf0; --muted: #8ea3ae; --faint: #5f7480;
  --line: rgba(255,255,255,0.11); --line-soft: rgba(255,255,255,0.07);
  --accent: #19b6c6; --accent-ink: #06171a; --accent-soft: rgba(25,182,198,0.16); --accent-text: #6cc9d8;
  --ok: #3fbf7f; --warn: #e8a33d; --danger: #ef5d5d;
  --ok-soft: rgba(63,191,127,0.14); --warn-soft: rgba(232,163,61,0.16); --danger-soft: rgba(239,93,93,0.16);
  --shadow: 0 10px 30px rgba(0,0,0,0.30);
  --nav-bg: rgba(5,9,12,0.42); --nav-ink: #a9bcc6; --nav-active: rgba(25,182,198,0.16); --nav-line: rgba(255,255,255,0.07);
  --radius: 3px;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
  color-scheme: dark;

  /* Anciennes variables de l'outil → palette Cockpit */
  --red: var(--accent); --red-dark: var(--accent); --navy: var(--ink);
  --bg: var(--bg-solid); --card: var(--surface); --border: var(--line); --text: var(--ink);
  --green: var(--ok); --green-bg: var(--ok-soft);
  --orange: var(--warn); --orange-bg: var(--warn-soft);
  --bad: var(--danger); --bad-bg: var(--danger-soft);
}
:root[data-theme="light"] {
  --bg-grad: radial-gradient(1200px 640px at 14% -10%, rgba(255,255,255,0.9), rgba(255,255,255,0) 62%),
             radial-gradient(820px 500px at 108% 112%, rgba(25,182,198,0.10), rgba(25,182,198,0) 60%),
             linear-gradient(160deg, #eef1f4 0%, #e3e8ec 60%, #d9dfe5 100%);
  --bg-solid: #e8ecf0;
  --surface: rgba(255,255,255,0.78); --surface-solid: #ffffff; --surface-2: rgba(255,255,255,0.9);
  --ink: #1b2430; --muted: #5b6675; --faint: #8592a0;
  --line: rgba(20,30,40,0.14); --line-soft: rgba(20,30,40,0.08);
  --accent: #0f8a99; --accent-ink: #ffffff; --accent-soft: rgba(15,138,153,0.12); --accent-text: #0f7d8b;
  --ok: #2f9e6b; --warn: #c97d1a; --danger: #d64545;
  --ok-soft: rgba(47,158,107,0.12); --warn-soft: rgba(201,125,26,0.14); --danger-soft: rgba(214,69,69,0.12);
  --shadow: 0 8px 24px rgba(20,30,40,0.10);
  --nav-bg: #1b2530; --nav-ink: #b7c4cd; --nav-active: rgba(25,182,198,0.22); --nav-line: rgba(255,255,255,0.09);
  color-scheme: light;
}
:root[data-theme="light"] .nav a.active svg { color: #6cc9d8; }
:root[data-theme="light"] .nav .me .avatar { color: #6cc9d8; }

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg-grad) fixed, var(--bg-solid); color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif; line-height: 1.5;
}
a { color: var(--accent-text); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.hidden { display: none !important; }
svg.ic { width: 15px; height: 15px; flex: none; vertical-align: -2px; }
.muted { color: var(--muted); }

/* ---------- Barre supérieure ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 16px; background: var(--nav-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--nav-line); color: #e6edf0; }
.topbar .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-width: 0; }
.topbar .brand .app { font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.topbar .brand .app i { color: var(--accent); font-style: normal; }
.topbar .brand .lib-logo { display: block; height: 20px; width: auto; }
.topbar .sep { width: 1px; height: 18px; background: var(--nav-line); }
.topbar .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #a9bcc6; white-space: nowrap; }
.topbar .chip svg { color: #6cc9d8; }
.topbar .spacer { flex: 1; }
.topbar .burger { display: none; background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 5px 10px; border-radius: var(--radius); font-size: 13px; font-weight: 600; }

/* ---------- Gabarit : menu latéral + contenu ---------- */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 48px); }
.nav { position: sticky; top: 48px; align-self: start; height: calc(100vh - 48px); overflow-y: auto; background: var(--nav-bg); backdrop-filter: blur(10px); border-right: 1px solid var(--nav-line); color: var(--nav-ink); display: flex; flex-direction: column; padding: 10px 0 12px; }
.nav .group { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 12px 16px 4px; }
.nav a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 19px; font-size: 13px; border-left: 3px solid transparent; cursor: pointer; }
.nav a svg { color: inherit; opacity: .9; }
.nav a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav a.active { background: var(--nav-active); color: #fff; font-weight: 600; border-left-color: var(--accent); }
.nav a.active svg { color: #6cc9d8; }
.nav .spacer { flex: 1; }
.nav .me { display: flex; align-items: center; gap: 10px; font-size: 12px; padding: 12px 16px 4px; border-top: 1px solid var(--nav-line); margin-top: 8px; color: var(--nav-ink); min-width: 0; }
.nav .me b { color: #fff; display: block; font-size: 13px; }
.nav .me small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.nav .foot { display: flex; gap: 12px; padding: 4px 16px 0; font-size: 12px; }
.nav .foot a { padding: 4px 0; border: 0; font-size: 12px; color: var(--nav-ink); }
.nav .foot a:hover { background: transparent; color: #fff; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: #6cc9d8; font-size: 11px; font-weight: 700; flex: none; }
.main { padding: 20px 28px 64px; min-width: 0; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { display: none; position: fixed; left: 0; right: 0; top: 48px; height: auto; max-height: calc(100vh - 48px); z-index: 25; background: #0b1216; }
  .nav.open { display: flex; }
  .topbar .burger { display: inline-block; }
  .topbar .chip, .topbar .sep { display: none; }
  .main { padding: 16px; }
}

/* ---------- En-tête de page ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.page-head h1 { font-size: 22px; margin: 0; line-height: 1.2; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; max-width: 80ch; }
.crumb-nav { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.crumb-nav b { color: var(--accent-text); font-weight: 700; }

/* ---------- Panneaux ---------- */
section.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
section.panel h2 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 6px; }
section.panel h2::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none; }
section.panel h2:has(.step)::before { display: none; }
section.panel h2 .step { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; letter-spacing: 0; margin-right: 2px; }
section.panel > .sub, section.panel .sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
label.field-label { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .08em; }
input[type=text], input[type=password], input[type=search], input[type=number], textarea, select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13.5px; font-family: inherit; background: var(--surface-2); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
select option { background: var(--surface-solid); color: var(--ink); }
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 220px; }

/* ---------- Boutons ---------- */
button { cursor: pointer; border: 1px solid transparent; border-radius: var(--radius); padding: 8px 16px; font-size: 13px; font-weight: 600; font-family: inherit; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary:hover { filter: brightness(1.08); }
button.primary:disabled { background: var(--surface-2); color: var(--faint); border-color: var(--line); cursor: not-allowed; filter: none; }
button.ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
button.ghost:hover { border-color: var(--muted); }
button.ghost:disabled { opacity: .5; cursor: not-allowed; }
.key-status { font-size: 12px; color: var(--muted); margin-top: 4px; }
.key-status.ok { color: var(--ok); }
.key-status.err { color: var(--danger); }
.ref-urls textarea { height: 110px; font-family: var(--mono); font-size: 12.5px; }
#rubricBox { height: 180px; font-family: var(--mono); font-size: 12px; line-height: 1.5; }
.status-line { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 18px; }
.status-line.err { color: var(--danger); }
.status-line.ok { color: var(--ok); }

/* Choix segmenté (état, concurrents) */
.etat-toggle { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; background: var(--surface-2); }
.etat-toggle button { border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 7px 16px; font-size: 12.5px; }
.etat-toggle button:not(:last-child) { border-right: 1px solid var(--line); }
.etat-toggle button:hover { color: var(--ink); }
.etat-toggle button.active { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- Périmètre du scan ---------- */
.facet-cols { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.facet-col { flex: 1; min-width: 260px; }
.facet-toolbar { display: flex; gap: 8px; margin-bottom: 8px; }
.facet-toolbar input.search { flex: 1; margin-bottom: 0; }
.facet-toolbar select { width: auto; font-size: 12px; padding: 0 6px; }
.facet-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; background: var(--surface-2); }
.facet-item { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px; font-size: 13px; }
.facet-item label { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; }
.facet-item .count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.facet-item .avg-age { color: var(--warn); font-weight: 600; }
.scope-bar { display: flex; align-items: center; gap: 10px 12px; margin-top: 6px; flex-wrap: wrap; }
.scope-count { font-size: 13px; font-weight: 600; }
.scope-count .n { color: var(--accent-text); font-size: 20px; font-weight: 300; font-variant-numeric: tabular-nums; }
.guard-warning { color: var(--danger); font-size: 13px; font-weight: 600; }
progress { width: 100%; height: 8px; border-radius: 2px; overflow: hidden; accent-color: var(--accent); }
.progress-label { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ---------- Tableaux ---------- */
table.divtable { width: 100%; border-collapse: collapse; font-size: 13px; }
table.divtable th, table.divtable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.divtable th { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; background: rgba(0,0,0,0.18); }
:root[data-theme="light"] table.divtable th { background: rgba(20,30,40,0.05); }
table.divtable tbody tr:hover td { background: rgba(255,255,255,0.03); }
:root[data-theme="light"] table.divtable tbody tr:hover td { background: rgba(20,30,40,0.03); }
table.divtable tr.total-row td { font-weight: 700; border-top: 1px solid var(--muted); }
table.divtable th.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; position: relative; }
table.divtable th.sortable-th:hover { color: var(--ink); }
table.divtable th .sort-arrow { font-size: 10px; color: var(--accent-text); }
table.divtable th .col-filter-btn { margin-left: 4px; background: none; border: none; padding: 0 2px; font-size: 11px; color: var(--muted); cursor: pointer; }
table.divtable th .col-filter-btn:hover, table.divtable th .col-filter-btn.active { color: var(--accent-text); }
table.divtable th .col-filter-dropdown { position: absolute; top: 100%; left: 0; background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; box-shadow: var(--shadow); z-index: 20; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: normal; max-height: 240px; overflow-y: auto; min-width: 170px; cursor: default; color: var(--ink); }
table.divtable th .col-filter-dropdown label { display: block; padding: 2px 0; cursor: pointer; white-space: nowrap; font-weight: 400; }
table.divtable th .col-filter-dropdown button { display: block; width: 100%; margin-top: 6px; padding: 4px 6px; font-size: 11px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); cursor: pointer; }
.dev-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.dev-badge.up { background: var(--warn-soft); color: var(--warn); }
.dev-badge.down { background: var(--ok-soft); color: var(--ok); }
.group-note { color: var(--muted); font-style: italic; }
.badge-legend { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.badge-legend b { color: var(--ink); }

/* ---------- Résultats par annonce ---------- */
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 16px; }
.listing-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; }
.listing-card img.thumb { width: 100%; height: 150px; object-fit: cover; background: var(--surface-solid); }
.listing-card .body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.listing-card .title { font-weight: 700; font-size: 14px; }
.listing-card .meta { font-size: 12px; color: var(--muted); }
.listing-card .meta.evolution { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 6px 8px; margin-top: 2px; line-height: 1.5; }
.listing-card .price { font-size: 17px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent; }
.badge.green { background: var(--ok-soft); color: var(--ok); }
.badge.orange { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.pending, .badge.muted { background: transparent; color: var(--muted); border-color: var(--line); }
details.detail { margin-top: 6px; font-size: 12.5px; }
details.detail summary { cursor: pointer; color: var(--accent-text); font-weight: 600; }
details.detail .txt { margin-top: 6px; color: var(--ink); white-space: pre-wrap; line-height: 1.5; }
.listing-card a.link { margin-top: auto; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-note { color: var(--muted); font-size: 13px; }

/* ---------- Tableau de bord / Concurrence ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface-2); }
.kpi-card[data-kpi-idx] { cursor: pointer; }
.kpi-card[data-kpi-idx]:hover { border-color: var(--accent); }
.kpi-card .n { font-size: 32px; font-weight: 300; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-card .l { font-size: 12px; color: var(--muted); margin-top: 6px; }
.bar-track { background: var(--line-soft); border-radius: 2px; height: 8px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 2px; }
a.link { color: var(--accent-text); text-decoration: none; font-weight: 600; font-size: 12.5px; }
a.link:hover { text-decoration: underline; }
a.link-plain { color: var(--ink); text-decoration: underline; text-decoration-color: var(--faint); font-weight: 600; font-size: 12.5px; }
a.link-plain:hover { color: var(--accent-text); }
details.grp { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; background: var(--surface-2); }
details.grp summary { cursor: pointer; padding: 11px 14px; list-style: none; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
details.grp summary::-webkit-details-marker { display: none; }
details.grp summary::before { content: "▸"; color: var(--accent-text); font-size: 11px; width: 10px; }
details.grp[open] summary::before { content: "▾"; }
details.grp summary .gname { font-weight: 700; font-size: 13.5px; flex: 1; min-width: 140px; }
details.grp summary .gmeta { font-size: 12px; color: var(--muted); }
details.grp .grp-body { padding: 0 14px 12px; }
.compare-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 8px; }
.compare-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); }
.compare-card .n { font-size: 22px; font-weight: 300; font-variant-numeric: tabular-nums; }
.compare-card .t { font-weight: 600; font-size: 13px; }
.compare-card .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
details > summary { color: var(--muted); }

/* ---------- Page d'administration ---------- */
.field { margin-bottom: 16px; }
input[type=password]:disabled { opacity: .6; }

/* Stock par marque : deux lignes d'en-tête (groupes), chiffres alignés à droite */
table.divtable td.num, table.divtable th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.divtable th.grp { text-align: center; border-bottom: 1px solid var(--line); color: var(--ink); }
table.stock-table th[rowspan] { vertical-align: bottom; }
table.stock-table td:nth-child(4), table.stock-table th.grp + th.grp, table.stock-table thead tr:nth-child(2) th:nth-child(3) { border-left: 1px solid var(--line-soft); }

/* Fenêtre d'analyse des ventes */
.modal-back { position: fixed; inset: 0; background: rgba(5,9,12,.65); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; z-index: 40; overflow: auto; }
.modal { background: var(--surface-solid); border-radius: 4px; border: 1px solid var(--line); width: min(760px, 100%); padding: 18px 22px 22px; box-shadow: var(--shadow); }
.modal.modal-wide { width: min(1180px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-sub { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.sales-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .sales-grid { grid-template-columns: 1fr; } }
.sales-bar { display: flex; height: 10px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.sales-bar span { display: block; height: 100%; }
.sales-bar .neuf, .legend-dot.neuf { background: var(--accent); }
.sales-bar .occ, .legend-dot.occ { background: var(--faint); }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: 0; }
button.badge.sold-btn { cursor: pointer; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent); padding: 3px 10px; font-size: 11px; }
button.badge.sold-btn:hover { background: var(--accent); color: var(--accent-ink); }
.modal .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.modal .kpi-card .n { font-size: 26px; }

/* Champ de recherche + bouton « Lancer la recherche » sur une ligne */
.search-row { display: flex; gap: 8px; align-items: stretch; }
.search-row input { flex: 1; min-width: 0; margin: 0; }
.search-row button { flex: none; white-space: nowrap; padding: 6px 14px; }
.facet-toolbar .search-row { flex: 1; }

/* ---------- Carte concurrentielle ---------- */
/* Une couleur ET une forme par réseau (palette catégorielle validée sur fond sombre et clair ;
   sur une carte, la forme double la couleur pour les lecteurs daltoniens). */
:root { --net-libertium: #3987e5; --net-ypocamp: #d95926; --net-hunyvers: #199e70; --net-idylcar: #c98500; --net-tpl: #d55181; --net-dg8: #008300; --net-ibh: #9085e9; }
:root[data-theme="light"] { --net-libertium: #2a78d6; --net-ypocamp: #eb6834; --net-hunyvers: #1baf7a; --net-idylcar: #eda100; --net-tpl: #e87ba4; --net-dg8: #008300; --net-ibh: #6250d6; }
.mk.net-libertium { fill: var(--net-libertium); } .mk.net-ypocamp { fill: var(--net-ypocamp); } .mk.net-hunyvers { fill: var(--net-hunyvers); }
.mk.net-idylcar { fill: var(--net-idylcar); } .mk.net-tpl { fill: var(--net-tpl); } .mk.net-dg8 { fill: var(--net-dg8); } .mk.net-ibh { fill: var(--net-ibh); }
.mk { stroke: var(--surface-solid); }
.mk-icon { width: 13px; height: 13px; vertical-align: -2px; margin-right: 5px; flex: none; }
.mk-icon .mk { stroke-width: 1.2; }
.nav a.sub { padding-left: 34px; font-size: 12.5px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.map-chip { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); padding: 4px 10px; font-size: 12px; font-weight: 600; border-radius: 999px; }
.map-chip.off { opacity: .4; text-decoration: line-through; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .map-layout { grid-template-columns: 1fr; } }
.map-wrap { position: relative; }
.map-back-btn { position: absolute; top: 8px; left: 8px; z-index: 4; background: var(--accent); color: #fff; border: 0; border-radius: var(--radius); padding: 8px 14px; font-weight: 600; font-size: 13px; cursor: pointer; box-shadow: var(--shadow); }
.map-back-btn:hover { filter: brightness(1.08); }
.map-sales-btn { margin-left: 6px; padding: 1px 7px; font-size: 11px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--accent); cursor: pointer; white-space: nowrap; }
.map-sales-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.map-track { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 14px; font-size: 13px; display: grid; gap: 3px; }
.map-track.ok { border-left-color: var(--green, #3fb27f); }
.map-track.warn { border-left-color: var(--warn); }
.map-track.bad { border-left-color: var(--danger); }
svg.fr-map { width: 100%; height: auto; max-height: 76vh; display: block; }
svg.fr-map .area { fill: var(--surface-2); stroke: var(--line); stroke-width: .6; vector-effect: non-scaling-stroke; transition: fill .12s; }
svg.fr-map .area.region { cursor: pointer; stroke-width: 1; }
svg.fr-map .area:hover { fill: var(--accent-soft); stroke: var(--accent); }
svg.fr-map .region-outline { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none; }
svg.fr-map .dept-labels text { fill: var(--muted); text-anchor: middle; pointer-events: none; opacity: .8; }
svg.fr-map .mk-g { cursor: pointer; }
svg.fr-map .mk-hit { fill: transparent; }
svg.fr-map .mk-g:hover .mk, svg.fr-map .mk-g.hl .mk { stroke: var(--ink); }
.map-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; max-width: 300px; }
.map-tip .tip-grid { display: grid; grid-template-columns: auto auto; gap: 2px 12px; margin-top: 6px; }
.map-tip .tip-grid span { color: var(--muted); }
.map-tip .tip-grid b { text-align: right; font-variant-numeric: tabular-nums; }
.map-tip .tip-sites { margin: 4px 0; }
.map-crumb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; font-size: 15px; }
.map-crumb button { padding: 4px 10px; font-size: 12px; }
.map-crumb .muted { font-size: 12px; }
.map-sub { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.map-sub small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
.tablewrap-x { overflow-x: auto; }
table.map-table { font-size: 12px; }
table.map-table th, table.map-table td { padding: 6px 7px; }
table.map-table tr.lib-row td { background: rgba(57,135,229,0.07); }
table.map-table tr.hl-row td { background: var(--accent-soft); }
table.map-table tr.clickable { cursor: pointer; }
table.map-table tr.clickable:hover td { background: var(--accent-soft); }
table.map-table td.cov-alert { color: var(--warn); font-weight: 600; }
table.map-table .small { font-size: 11px; }
table.map-table td:first-child { white-space: nowrap; }
table.map-table th { white-space: normal; line-height: 1.25; }

/* Bouton « Retour » de la barre du haut (même principe que les sites audit et Mercedes) */
.topbar .back { display: inline-flex; align-items: center; gap: 6px; max-width: 46vw; padding: 5px 12px 5px 8px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-soft); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.topbar .back:hover { background: var(--accent); color: var(--accent-ink); }
.topbar .back span { overflow: hidden; text-overflow: ellipsis; }
.topbar .back small { font-size: 12px; font-weight: 400; opacity: .85; }
@media (max-width: 860px) { .topbar .back small { display: none; } }

/* Recherche avancée (veille concurrentielle) */
details.adv-search { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
details.adv-search > summary { cursor: pointer; padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: var(--accent-text); list-style: none; }
details.adv-search > summary::-webkit-details-marker { display: none; }
details.adv-search > summary::before { content: "▸ "; }
details.adv-search[open] > summary::before { content: "▾ "; }
details.adv-search > .key-status { padding: 0 12px 10px; margin: 0; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 14px; padding: 4px 12px 10px; }
.adv-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.adv-field input, .adv-field select { text-transform: none; letter-spacing: 0; font-size: 13px; padding: 7px 9px; }
.adv-pair { display: flex; gap: 6px; }
/* Reprise : case « Boîte automatique » + plus-value modifiable, aide sous un champ (2026-11-02). */
.rp-gear-row { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); }
.rp-gear-row input[type=number] { width: 5.5em; }
.rp-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.rp-field-hint { text-transform: none; letter-spacing: 0; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.adv-pair input { min-width: 0; }
.adv-actions { display: flex; gap: 8px; padding: 0 12px 10px; }

/* Reprise camping-car (cotation) */
.rp-hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.rp-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.rp-hero-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 18px; margin: 12px 0; align-items: start; }
@media (max-width: 860px) { .rp-hero-grid { grid-template-columns: 1fr; } }
.rp-main { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); align-items: flex-start; }
.rp-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rp-value { font-size: 34px; font-weight: 700; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.rp-range { font-size: 13px; color: var(--text); }
.rp-steps table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rp-steps td { padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.rp-steps td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-steps .rp-total td { font-weight: 700; border-bottom: none; border-top: 2px solid var(--line); }
.rp-alerts { margin: 0 0 12px; padding: 10px 12px 10px 28px; border-radius: var(--radius); background: var(--warn-soft); color: var(--text); font-size: 13px; }
/* Données concurrentes incomplètes : au-dessus de la cotation, bien visible. */
.rp-data-warn { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--warn); border-left-width: 4px; border-radius: var(--radius); background: var(--warn-soft); color: var(--ink); font-size: 13px; font-weight: 600; }
.rp-alerts li { margin: 3px 0; }
.rp-facts { margin-bottom: 10px; }
.rp-fact-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rp-fact-value { font-size: 20px; font-weight: 700; color: var(--ink); margin: 4px 0; }
.rp-fact-value small { font-size: 12px; font-weight: 400; color: var(--muted); }
.rp-fact-hint { font-size: 12px; color: var(--muted); }
.rp-table tr.rp-out td { opacity: .55; }
.rp-table tr.rp-sep td { background: var(--surface-2); font-size: 12px; color: var(--muted); font-weight: 600; }
.rp-weight { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; vertical-align: middle; }
.rp-weight i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
/* Fiche de cotation imprimée : une page A4, seule visible à l'impression de la vue Reprise. */
.rp-print { display: none; }
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  .topbar, .nav, .rp-noprint, .page-head { display: none !important; }
  .shell { display: block; }
  .main { padding: 0 !important; margin: 0 !important; }
  #repriseView > :not(#rpResult), #rpResult > :not(.rp-print) { display: none !important; }
  #repriseView .rp-print { display: block; }
}
.rp-print { font: 9pt/1.35 Arial, Helvetica, sans-serif; color: #111; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rp-print table { width: 100%; border-collapse: collapse; }
.rp-print caption { text-align: left; font-weight: 700; font-size: 9pt; text-transform: uppercase; letter-spacing: .05em; color: #555; padding: 0 0 2pt; }
.rpp-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #111; padding-bottom: 4pt; margin-bottom: 6pt; }
.rpp-kicker { font-size: 8pt; text-transform: uppercase; letter-spacing: .08em; color: #555; }
.rpp-head h1 { font-size: 16pt; margin: 1pt 0 0; }
.rpp-sub { font-size: 10pt; }
.rpp-date { font-size: 8pt; color: #555; text-align: right; }
.rpp-top { display: grid; grid-template-columns: 34% 1fr; gap: 10pt; align-items: start; margin-bottom: 6pt; }
.rpp-price { border: 1.5px solid #111; border-radius: 4pt; padding: 6pt 8pt; }
.rpp-label { font-size: 8pt; text-transform: uppercase; letter-spacing: .06em; color: #555; }
.rpp-value { font-size: 22pt; font-weight: 700; line-height: 1.1; }
.rpp-range { font-size: 9.5pt; margin-top: 2pt; }
.rpp-rel { font-size: 8pt; color: #555; margin-top: 2pt; }
.rpp-steps td { padding: 1.5pt 0; border-bottom: 1px solid #ddd; }
.rpp-steps td:last-child { text-align: right; white-space: nowrap; padding-left: 8pt; }
.rpp-steps .rpp-total td { font-weight: 700; border-bottom: 0; border-top: 1.5px solid #111; }
.rpp-bar { margin: 2pt 0 8pt; }
.rpp-track { position: relative; height: 14pt; border-bottom: 1px solid #999; margin: 0 6pt; }
.rpp-band { position: absolute; top: 3pt; height: 8pt; background: #d9d9d9; }
.rpp-dot { position: absolute; top: 5pt; width: 4pt; height: 4pt; margin-left: -2pt; border-radius: 50%; background: #666; }
.rpp-mark { position: absolute; top: 0; width: 2pt; height: 14pt; margin-left: -1pt; }
.rpp-market { background: #111; }
.rpp-reprise { background: #c2410c; }
.rpp-legend { display: flex; flex-wrap: wrap; gap: 3pt 12pt; font-size: 8pt; margin-top: 3pt; }
.rpp-legend i { display: inline-block; vertical-align: middle; margin-right: 3pt; }
.rpp-k-reprise { width: 2pt; height: 9pt; background: #c2410c; }
.rpp-k-market { width: 2pt; height: 9pt; background: #111; }
.rpp-k-band { width: 12pt; height: 6pt; background: #d9d9d9; }
.rpp-k-dot { width: 4pt; height: 4pt; border-radius: 50%; background: #666; }
.rpp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10pt; margin-bottom: 6pt; }
.rpp-kv th { text-align: left; font-weight: 600; width: 38%; padding: 1.5pt 6pt 1.5pt 0; vertical-align: top; border-bottom: 1px solid #eee; }
.rpp-kv td { padding: 1.5pt 0; vertical-align: top; border-bottom: 1px solid #eee; }
.rpp-comps { margin-bottom: 6pt; table-layout: fixed; font-size: 8.5pt; }
.rpp-comps th { text-align: left; font-size: 8pt; color: #555; border-bottom: 1px solid #111; padding: 1.5pt 3pt; }
.rpp-comps td { padding: 1.5pt 3pt; border-bottom: 1px solid #e5e5e5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpp-note { font-size: 7.5pt; color: #555; margin: -4pt 0 6pt; }
.rpp-comps th:nth-child(1) { width: 17%; } .rpp-comps th:nth-child(2) { width: 22%; }
.rpp-comps th:nth-child(3) { width: 6%; } .rpp-comps th:nth-child(4) { width: 9%; } .rpp-comps th:nth-child(5) { width: 6.5%; }
.rpp-comps th:nth-child(6) { width: 13.5%; } .rpp-comps th:nth-child(7), .rpp-comps th:nth-child(8) { width: 9.5%; }
.rpp-comps th:nth-child(7), .rpp-comps th:nth-child(8), .rpp-comps th:nth-child(9), .rpp-comps td:nth-child(7), .rpp-comps td:nth-child(8), .rpp-comps td:nth-child(9) { text-align: right; }
.rpp-tag { font-size: 7pt; color: #555; border: 1px solid #bbb; border-radius: 2pt; padding: 0 2pt; }
.rpp-alerts { border-left: 3px solid #c2410c; padding: 2pt 0 2pt 6pt; margin-bottom: 6pt; font-size: 8.5pt; }
.rpp-alerts ul { margin: 2pt 0 0; padding-left: 12pt; }
.rpp-decision { border: 1px solid #111; border-radius: 4pt; padding: 5pt 8pt; margin-bottom: 4pt; break-inside: avoid; }
.rpp-dtitle { font-weight: 700; text-transform: uppercase; font-size: 8.5pt; letter-spacing: .05em; margin-bottom: 2pt; }
.rpp-dgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12pt; }
.rpp-dgrid span { display: block; font-size: 8pt; color: #555; margin-top: 3pt; }
.rpp-dgrid i { display: block; height: 14pt; border-bottom: 1px dotted #777; }
.rpp-foot { font-size: 7pt; color: #666; }
#repriseView .adv-actions { margin-top: 10px; }
.rp-web { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-size: 13px; }
.rp-web > div { flex: 1 1 320px; }
.rp-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; }
.rp-web button[disabled] { opacity: .7; cursor: wait; }
.rp-sources { margin: 6px 0 4px; padding-left: 18px; font-size: 12.5px; }
.rp-sources li { margin: 2px 0; }
/* État de la collecte (veille) */
.collect-health { margin: 6px 0 10px; font-size: 13px; }
.collect-health summary { cursor: pointer; color: var(--muted); }
.collect-health table { margin-top: 6px; font-size: 12.5px; }
.collect-alert { color: var(--warn); font-weight: 600; }

/* Chasse aux affaires (chasse.js, 2026-11-04) */
.ch-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 10px; font-size: 13px; }
.ch-toolbar select { margin-left: 4px; padding: 5px 8px; font-size: 13px; }
.ch-table td { vertical-align: middle; }
.ch-table th.num, .ch-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ch-variants { font-size: 11.5px; max-width: 320px; }
.ch-thumb { display: block; width: 72px; height: 54px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.ch-old { font-size: 11.5px; color: var(--muted); text-decoration: line-through; }
.ch-good { color: var(--ok); font-weight: 700; }
.ch-status { font-size: 12.5px; padding: 4px 6px; min-width: 122px; }
.ch-notes { width: 170px; min-width: 150px; font-size: 12.5px; padding: 4px 6px; }
.ch-targets { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 6px; }
.ch-target { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.ch-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 13px; }
.ch-x:hover { color: var(--danger); }
.ch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ch-chip { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.ch-chip b { font-variant-numeric: tabular-nums; }
.ch-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.ch-table td:nth-child(2) { min-width: 230px; }

/* Historique des reprises (reprise.js, 2026-11-13) : même tableau que la chasse, mais la colonne
   large est la première (le véhicule) et non la deuxième. */
.rp-hist td:nth-child(1) { min-width: 230px; }
.rp-hist td:nth-child(2) { min-width: 0; white-space: nowrap; }
.ch-price { width: 100px; font-size: 12.5px; padding: 4px 6px; text-align: right; font-variant-numeric: tabular-nums; }

/* Veille : badge « Oui (n) » ouvrant la liste des véhicules Libertium ; tableau empilé sur mobile. */
button.badge.lib-btn { cursor: pointer; background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok); padding: 3px 10px; font-size: 11px; white-space: nowrap; }
button.badge.lib-btn:hover { background: var(--ok); color: var(--surface-solid); }
@media (max-width: 640px) {
  /* Un tableau trop large défile dans son panneau : le téléphone ne dézoome plus toute la page. */
  section.panel { overflow-x: auto; }
  button.badge.lib-btn { padding: 7px 12px; font-size: 12.5px; }
  table.stack-sm thead { display: none; }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.stack-sm td { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; border: 0; text-align: right; }
  table.stack-sm td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: 12px; }
  .modal { padding: 14px; }
}

/* Analyse sur Internet : choix du moteur (reprise.js, 2026-11-13) */
.rp-web-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-web-engine { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.rp-web-engine select { padding: 5px 8px; font-size: 13px; }

/* Carte concurrentielle — prix cassés entre collègues (2026-11-15) */
.uc-bar { margin-top: 8px; align-items: center; gap: 10px; }
.uc-bar .muted { font-size: 12px; }
.uc-toggle .uc-dot { width: 11px; height: 11px; border-radius: 50%; background: rgb(214,40,40); opacity: .75; margin-right: 6px; flex: none; }
.uc-toggle.on { border-color: rgb(214,40,40); background: rgba(214,40,40,.12); }
.uc-step { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.uc-step select { font-size: 12px; padding: 2px 6px; }
.uc-err { font-size: 12px; color: rgb(214,40,40); }
.uc-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
svg.fr-map .uc-halo { fill-opacity: .5; stroke-opacity: .9; }
svg.fr-map .uc-g:hover .uc-halo { fill-opacity: .68; }
svg.fr-map.uc-on .mk-g:not(.lib):not(.uc-g) { opacity: .2; }
.uc-podium { display: flex; align-items: flex-end; gap: 8px; margin: 8px 0 10px; }
.uc-podium button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 10px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--ink); cursor: pointer; font: inherit; }
.uc-podium button:hover { border-color: rgb(214,40,40); }
.uc-podium .uc-step-1 { padding-top: 22px; padding-bottom: 16px; border-color: rgba(214,40,40,.7); background: rgba(214,40,40,.12); }
.uc-podium .uc-step-2 { padding-top: 14px; }
.uc-podium .uc-rank { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.uc-podium .uc-step-1 .uc-rank { color: rgb(214,40,40); }
.uc-podium b { font-size: 14px; overflow-wrap: anywhere; }
.uc-podium .uc-fig { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.uc-podium .uc-sub { font-size: 11px; color: var(--muted); }
.uc-analysis { font-size: 12.5px; line-height: 1.5; margin: 0 0 10px; padding: 10px 12px; border-left: 3px solid rgb(214,40,40); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; }
.uc-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 6px; }
.uc-filter input { flex: 1; min-width: 180px; font-size: 12.5px; padding: 5px 9px; }
.uc-filter .muted { font-size: 11.5px; }
table.uc-table th.uc-sort { cursor: pointer; user-select: none; white-space: nowrap; }
table.uc-table th.uc-sort:hover, table.uc-table th.uc-sort.on { color: var(--ink); }
.uc-spark { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 10px; }
.uc-spark rect { fill: rgb(214,40,40); opacity: .75; }
/* Onglet Respect des prix (2026-11-15) */
.rs-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 6px; }
.rs-kpi { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.rs-kpi b { font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.rs-kpi span { font-size: 12.5px; }
.rs-kpi small { font-size: 11px; color: var(--muted); }
.rs-alert { border-left: 3px solid rgb(240,160,30); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; padding: 10px 12px; margin: 0 0 8px; font-size: 13px; }
.rs-alert.high { border-left-color: rgb(214,40,40); }
.rs-alert ul { margin: 6px 0 0; padding-left: 18px; }
.rs-alert li { margin: 2px 0; }
.rs-link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.rs-link:hover { text-decoration: underline; }
.rs-podium { max-width: 760px; }
.rs-sw.low { background: rgb(244,178,62); } .rs-sw.mid { background: rgb(232,112,48); } .rs-sw.high { background: rgb(214,40,40); }
.rs-trend { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; color: var(--muted); }
.rs-trend.worse, .rs-trend.steady { border-color: rgba(214,40,40,.7); color: rgb(214,40,40); }
.rs-trend.better { border-color: var(--accent); color: var(--accent-text, var(--accent)); }
.rs-chart { margin: 4px 0 10px; }
.rs-chart rect { fill: rgb(214,40,40); opacity: .78; }
.rs-chart rect:hover { opacity: 1; }
.rs-analysis { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 12px 16px; font-size: 13px; line-height: 1.55; }
.rs-analysis h3 { font-size: 13px; margin: 14px 0 4px; }
.rs-analysis p { margin: 4px 0; }
.rs-analysis ul { margin: 4px 0; padding-left: 20px; }
a.map-sales-btn { text-decoration: none; display: inline-block; }
.opt-same { color: rgb(214,40,40); font-weight: 600; }
.opt-diff { font-weight: 600; }
td.uc-opt { min-width: 200px; max-width: 320px; }
