:root {
  color-scheme: light;
  --bg: #f5f5f3;
  --surface: #ffffff;
  --ink: #111111;
  --ink-2: #3b3b39;
  --muted: #76766f;
  --faint: #a8a8a2;
  --line: #ededea;
  --soft: #f2f2ef;
  --soft-hover: #e8e8e4;
  --hover-row: #fafaf8;
  --accent: #0b7a6f;
  --accent-soft: #e2f3f0;
  --green: var(--accent);
  --ok: #18703f;
  --ok-bg: #e5f5eb;
  --warn: #8a5a00;
  --warn-bg: #fbf1d9;
  --red: #c2362c;
  --bad-bg: #fdecea;
  --info: #2d5aa0;
  --info-bg: #e8eefa;
  --violet: #5a45a6;
  --violet-bg: #efebfb;
  --prod-band: #e39b0b;
  --radius: 14px;
  --radius-sm: 10px;
  --ring: 0 0 0 1px rgba(17, 17, 17, .05), 0 1px 2px rgba(17, 17, 17, .04);
  --shadow-lg: 0 24px 60px rgba(17, 17, 17, .16);
  --focus: 0 0 0 3px rgba(11, 122, 111, .2);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  font-feature-settings: "cv11", "ss01";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
a { color: var(--accent); }
::selection { background: var(--accent-soft); }

main.app-shell { max-width: 1360px; margin: 0 auto; padding: 22px 28px 72px; }

/* Boutons : pas de cadre, des aplats. */
button { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, color .15s ease, opacity .15s ease, transform .1s ease, box-shadow .15s ease; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--focus); }

.btn-scan, .access button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.btn-scan:hover:not(:disabled), .access button:hover { background: #2c2c2a; }
.btn-scan:active:not(:disabled), .btn-copy:active:not(:disabled) { transform: scale(.98); }
.btn-scan:disabled, .btn-copy:disabled { opacity: .4; }

.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 550;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.btn-copy:hover:not(:disabled) { background: var(--soft-hover); color: var(--ink); }
a.btn-copy:hover { text-decoration: none; }
.btn-copy.copied { background: var(--ok-bg); color: var(--ok); }
.btn-delete, .btn-copy.btn-delete { background: var(--bad-bg); color: var(--red); }
.btn-delete:hover:not(:disabled), .btn-copy.btn-delete:hover:not(:disabled) { background: var(--red); color: #fff; }
.btn-volume { min-height: 28px; padding: 0 10px; font-size: 12px; }
.btn-volume-refresh { min-height: 28px; padding: 0 9px; line-height: 1; }
.btn-split, .category-id-edit { min-height: 24px; padding: 0 8px; font-size: 11.5px; }
#bilan-view #bilan-filters-toggle.is-on { background: var(--ink); color: #fff; }

.link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.link:hover { background: var(--soft); color: var(--ink); }

/* Champs : remplis, sans cadre visible. */
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
:where(textarea) { padding: 10px 12px; line-height: 1.55; resize: vertical; }
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover { background: var(--soft-hover); }
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus { border-color: var(--accent); background: var(--surface); outline: none; box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ink); cursor: pointer; }

/* En-tête */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--ink); color: #fff; }
.brand-mark svg { width: 20px; height: 20px; }
.brand h1 { font-size: 17px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.summary { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.summary:empty { display: none; }

.system-panel, .rate-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--ring);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rate-pill::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #2fb36b; content: ""; }
.rate-pill.warn { color: var(--warn); }
.rate-pill.warn::before { background: #e0a500; }
.rate-pill.danger { color: var(--red); }
.rate-pill.danger::before { background: var(--red); }
#vps-tabs-field::before { display: none; }
#vps-tabs { min-height: 22px; padding: 0 4px; border: 0; border-radius: 6px; background: var(--soft); color: inherit; font: inherit; }
button.rate-pill::before { display: none; }
button.rate-pill:hover { background: var(--soft); }
button.rate-pill.danger { background: var(--bad-bg); box-shadow: none; }
button.rate-pill.danger:hover { background: var(--red); color: #fff; }

/* Cartes */
.card { border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--ring); }

.access { max-width: 380px; margin: 12vh auto 0; padding: 28px; }
.access h2 { margin-bottom: 18px; font-size: 20px; }
.access label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 550; }
.access-row { display: flex; gap: 8px; }
.access input { flex: 1; min-width: 0; font-size: 16px; }

.message { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--bad-bg); color: var(--red); font-size: 13px; }
.message.info { background: var(--soft); color: var(--muted); }

/* Onglets */
.tabs {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px 0 0;
  margin-bottom: 26px;
  border-radius: 14px;
  /* Presque opaque, sans flou : le flou de la barre collée en haut se recalculait à chaque défilement (2026-10-30). */
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .05), 0 8px 24px rgba(17, 17, 17, .05);
}
/* Une seule ligne : les onglets défilent de côté quand la place manque (fondu sur le bord, niches-motion.js), les
   actions restent à droite. La marge intérieure est sur la liste, pour que l'ombre de la pastille ne soit pas coupée. */
.tab-list { display: flex; flex: 1 1 auto; align-items: center; gap: 2px; min-width: 0; padding: 5px; overflow-x: auto; scrollbar-width: none; }
.tab-list::-webkit-scrollbar { display: none; }
.tab-list.fade-end { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.tab-list.fade-start { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px); mask-image: linear-gradient(90deg, transparent, #000 44px); }
.tab-list.fade-start.fade-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
.tab-actions { display: flex; flex: none; align-items: center; gap: 2px; padding-left: 6px; border-left: 1px solid var(--line); }
.tab { flex: 0 0 auto; min-height: 34px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-size: 13px; font-weight: 550; white-space: nowrap; }
.tab:hover { background: var(--soft); color: var(--ink); }
.tab.is-active, .tab.is-active:hover { background: var(--ink); color: #fff; }

/* Titres de vue */
.view-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 2px 14px; }
.view-heading h2 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.view-heading > p, .view-heading .sub { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 12px; font-weight: 550; }
.section-title { margin: 28px 2px 10px; font-size: 17px; font-weight: 650; }
.sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.empty { padding: 36px 16px; color: var(--muted); text-align: center; }

/* Tableau de bord */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; min-height: 120px; padding: 20px; }
.kpi-value { font-size: 36px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 500; }
/* Exploration de Vinted (niches-exploration.js) */
/* Carte « Requêtes » du Dashboard (niches-health.js, à la place de la carte Santé le 2026-11-13) : quatre tuiles, les
   requêtes des 24 dernières heures et un tableau par lecteur. */
.health-card { display: grid; gap: 14px; margin-bottom: 12px; padding: 18px 20px; }
.health-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.health-heading h2 { margin: 0; font-size: 15px; }
.health-heading > .btn-copy { margin-left: auto; }
.health-updated { color: var(--muted); font-size: 12px; }
.health-updated.is-error { color: var(--red); }
.health-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.health-tile { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 12px 14px; border-left: 3px solid var(--ok); border-radius: var(--radius-sm); background: var(--soft); }
.health-tile.health-warn { border-left-color: var(--prod-band); }
.health-tile.health-bad { border-left-color: var(--red); background: var(--bad-bg); }
.health-tile-label { color: var(--muted); font-size: 12px; }
.health-tile-value { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.health-tile-detail { color: var(--ink-2); font-size: 12px; overflow-wrap: anywhere; }
.health-bars { display: flex; align-items: flex-end; gap: 2px; height: 28px; margin-top: 6px; }
.health-bars span { position: relative; display: flex; align-items: flex-end; flex: 1; min-width: 2px; overflow: hidden; border-radius: 2px 2px 0 0; background: var(--accent); opacity: .75; }
.health-bars span.is-now { opacity: .35; }
.health-bars i { display: block; width: 100%; background: var(--red); }
.health-ok-text { color: inherit; }
.health-warn-text { color: var(--warn); font-weight: 600; }
.health-bad-text { color: var(--red); font-weight: 600; }
.health-table-wrap { max-height: 420px; overflow: auto; }
.health-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.health-table th, .health-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.health-table thead th { position: sticky; top: 0; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 500; }
.health-table thead tr + tr th { top: 26px; }
.health-table .num { text-align: right; }
.health-table tbody tr:hover { background: var(--hover-row); }
.health-table tr.is-bad td, .health-table tr.is-bad th { background: var(--bad-bg); }
.health-table tr.is-warn td:last-child { color: var(--warn); }
/* Carte « Flux complet » (niches-firehose.js) : le parcours des annonces en six étapes, les 24 h, le détail par catégorie. */
.fh-periods { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.fh-periods .btn-copy.is-active { background: var(--accent-soft); color: var(--accent); }
.fh-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; overflow: hidden; border-radius: var(--radius-sm); background: var(--soft); }
.fh-step { position: relative; display: grid; align-content: start; gap: 3px; min-width: 0; padding: 12px 14px 12px 18px; }
.fh-step + .fh-step { border-left: 1px solid var(--line); }
.fh-step + .fh-step::before { content: "›"; position: absolute; top: 50%; left: -5px; transform: translateY(-50%); color: var(--faint); font-size: 16px; line-height: 1; background: var(--soft); }
.fh-bars { height: 44px; }
.fh-live { margin: 0; }
.fh-table tr.fh-total th, .fh-table tr.fh-total td { border-top: 2px solid var(--line); font-weight: 650; }
.fh-table tbody tr.fh-total:hover { background: none; }
.explo-card { display: grid; gap: 16px; margin-bottom: 12px; padding: 20px; }
.explo-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.explo-heading h2 { margin: 0 0 2px; font-size: 15px; }
.explo-heading .sub { margin: 0; font-size: 12px; }
.explo-hero { display: grid; gap: 8px; }
.explo-hero-value { font-size: 48px; font-weight: 650; letter-spacing: -.03em; line-height: 1; }
.explo-hero-total { color: var(--ink-2); font-size: 15px; font-weight: 500; }
.explo-meter { height: 8px; overflow: hidden; border-radius: 999px; background: #dbe8f8; }
.explo-meter-fill { display: block; height: 100%; border-radius: 999px; background: #2a78d6; }
.explo-pace, .explo-now { margin: 0; color: var(--ink-2); font-size: 13px; }
.explo-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.explo-tile { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--soft); }
.explo-tile-value { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.explo-tile-label { color: var(--muted); font-size: 12px; }
.explo-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.explo-chart { display: grid; gap: 6px; min-width: 0; margin: 0; }
.explo-chart figcaption { display: grid; gap: 2px; font-size: 13px; }
.explo-chart figcaption .sub { font-size: 12px; }
.explo-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 12px; }
.explo-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.explo-key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.explo-chart-plot { position: relative; min-width: 0; border-radius: var(--radius-sm); outline: none; }
.explo-chart-plot:focus-visible { box-shadow: var(--focus); }
.explo-chart-plot svg { display: block; }
.explo-grid { stroke: var(--line); stroke-width: 1; }
.explo-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.explo-end { fill: var(--ink-2); font-size: 12px; font-weight: 600; }
.explo-crosshair { stroke: var(--faint); stroke-width: 1; }
.explo-tooltip { position: absolute; top: 6px; z-index: 2; display: grid; gap: 3px; min-width: 130px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--ring), 0 6px 18px rgba(17, 17, 17, .12); color: var(--ink-2); font-size: 12px; transform: translateX(-50%); pointer-events: none; }
.explo-tooltip[hidden] { display: none; }
.explo-tooltip-day { color: var(--ink); font-weight: 600; }
.explo-tooltip-row { display: flex; align-items: center; gap: 6px; }
.explo-tooltip-row strong { color: var(--ink); }
.explo-data summary { color: var(--ink-2); font-size: 13px; cursor: pointer; }
.explo-data .table-wrap { max-height: 320px; margin-top: 8px; overflow-y: auto; }
.explo-data table { font-size: 12.5px; }

/* Filtres et formulaires */
.filters, .scan-form, .search-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.filters { padding: 16px; margin-bottom: 14px; }
.scan-form { margin-top: 12px; }
.search-fields { margin-bottom: 14px; }
.filters label, .scan-form label, .search-fields label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 550; }
.filters label:first-child { flex: 1 1 220px; }
.filters input, .filters select { min-width: 150px; max-width: 100%; }
.count { margin-left: auto; color: var(--muted); font-size: 12px; }
.scan-select { min-width: 260px; max-width: 100%; font-size: 13px; }
.scan-input { width: 90px; font-size: 13px; }
.search-input { font-size: 13px; }
.search-input-url { flex: 1; min-width: 320px; }
.search-input-short { width: 100px; }
.scan-status { align-self: center; color: var(--muted); font-size: 13px; }
.scan-status.error { color: var(--red); }

/* Tableaux */
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--surface); box-shadow: var(--ring); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
td { overflow-wrap: anywhere; }
th { color: var(--muted); font-size: 12px; font-weight: 550; white-space: nowrap; }
thead th { background: var(--surface); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover > td, tbody tr:hover > th { background: var(--hover-row); }
.photos { display: flex; gap: 6px; }
.photos img { width: 84px; height: 112px; border-radius: 10px; background: var(--soft); object-fit: cover; }
.listing { min-width: 240px; }
.listing a { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.listing a:hover { text-decoration: underline; }
.listing p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.listing-description { max-height: 7.8em; margin-top: 8px !important; padding: 8px 10px; border-radius: 8px; background: var(--soft); font-size: 12px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; overflow-y: auto; }
.number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.number strong { font-size: 15px; }

/* Pastilles */
.badge, .volume-tag, .group-badge, .group-reason, .fiche-source, .cat-stat, .cat-count, .cat-tag, .queue-type, .queue-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.badge.sold, .volume-ok, .cat-tag-scan, .queue-type-instant-scan, .queue-status-done { background: var(--ok-bg); color: var(--ok); }
.badge.removed, .volume-low, .queue-status-error { background: var(--bad-bg); color: var(--red); }
.badge.reserved, .cat-tag-unknown, .queue-type-check-volume { background: var(--warn-bg); color: var(--warn); }
.queue-type-niche-search, .cat-tag-mother { background: var(--info-bg); color: var(--info); }
.cat-tag-custom, .cat-stat-custom { background: var(--violet-bg); color: var(--violet); }
.volume-tag { max-width: 340px; white-space: normal; overflow-wrap: anywhere; }

/* Cartes de recherche et de scan */
.search-card, .scan-card, .bilan-tier, .search-config { padding: 20px; margin-bottom: 12px; }
.search-card > p, .scan-card > p { margin: 0 0 10px; color: var(--muted); }
.search-card a { color: var(--accent); }
.search-config h2 { margin-bottom: 14px; }
.search-actions { display: flex; align-items: center; gap: 10px; }
.search-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.search-card-header h2 { flex: 1; margin: 0; }
.search-url { margin: 0 0 6px; color: var(--muted); font-size: 12px; word-break: break-all; }
.search-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.scan-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.scan-header .sub { margin: 0; }
.scan-date { color: var(--muted); font-size: 12px; }
.scan-brand-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.scan-brand-row:last-child { border-bottom: 0; }
.scan-brand-row.merged { margin: 4px 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); }
.scan-brand-name, .bilan-brand-name { min-width: 140px; font-weight: 600; }
.scan-brand-stats, .bilan-brand-stats { flex: 1; color: var(--muted); font-size: 13px; }
.scan-brand-actions, .bilan-brand-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.brand-check { margin: 0; }
.merge-bar { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.merge-names { color: var(--muted); font-size: 11px; font-weight: 400; }
.scan-couple-results { padding: 12px 0 4px; }
.scan-diagnostics { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.scan-diagnostics.error { color: var(--red); }
.scan-results-table { margin-top: 12px; }
.scan-results-table table { min-width: 960px; }
.scan-results-table td { vertical-align: middle; }
.scan-results-table th[scope="row"] { color: var(--ink); font-size: 13px; font-weight: 600; }
.scan-results-table .volume-tag { display: flex; width: fit-content; margin-top: 5px; }
.category-occurrence-row > td, .category-occurrence-row > th { background: #fbfbf9; }
.category-tag { color: var(--accent); font-size: 12px; font-weight: 600; }

/* Groupes */
.group-checkbox-cell { width: 36px; text-align: center; }
.group-select-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; margin-bottom: 12px; }
.group-select-bar > p:first-child, .group-select-bar > div:first-child { flex: 1 1 240px; margin: 0; color: var(--muted); font-size: 13px; }
.group-summary { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.group-card { box-shadow: inset 3px 0 0 var(--accent), var(--ring); }
.group-members { display: grid; gap: 6px; margin: 12px 0; }
.group-member { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--soft); font-size: 13px; }
.group-member span { color: var(--muted); }
.group-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.group-chip { display: inline-flex; align-items: center; gap: 6px; margin: 2px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 550; white-space: nowrap; }
.group-chip-remove { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--red); font-size: 11px; cursor: pointer; }
.group-chip-remove:hover { text-decoration: underline; }
.group-badge { margin-left: 8px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; cursor: help; }
.group-cell { display: flex; flex-wrap: wrap; gap: 5px; }
#bilan-view .btn-copy.group-dissolve { background: var(--bad-bg); color: var(--red); }
#bilan-view .btn-copy.group-dissolve:hover:not(:disabled) { background: var(--red); color: #fff; }
.group-panel-row > td { padding: 4px 14px 14px; background: var(--hover-row); }
.group-panel { padding: 16px; box-shadow: inset 3px 0 0 var(--accent), var(--ring); }
.group-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.group-panel-head h3 { font-size: 15px; }
.group-reason { background: var(--accent-soft); color: var(--accent); }
.group-panel-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.group-panel .group-members { margin: 12px 0 8px; padding: 0; list-style: none; }
.group-panel .group-member { align-items: center; justify-content: flex-start; }
.group-panel .group-member span { flex: 1; }
.group-panel-note { margin: 0; color: var(--muted); font-size: 12px; }
.group-dialog-summary { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: 13px; }
.group-dialog-summary dt { color: var(--muted); }
.group-dialog-summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.group-dialog .group-dialog-summary { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--soft); }
.bilan-group-line > td, .bilan-group-line > th { background: #fbfcfb; }
.bilan-group-line th[scope="row"] { box-shadow: inset 3px 0 0 var(--accent); }

/* Bilan */
.bilan-tier-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.bilan-tier-header h2 { font-size: 15px; }
.bilan-tier-count { color: var(--muted); font-size: 12px; }
.bilan-brand-wrapper { padding: 10px 0; border-bottom: 1px solid var(--line); }
.bilan-brand-wrapper:last-child { border-bottom: 0; }
.bilan-brand-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bilan-brand-volume { padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.bilan-tier-large .bilan-brand-volume, .bilan-volume-large { background: var(--ok-bg); color: var(--ok); }
.bilan-tier-medium .bilan-brand-volume, .bilan-volume-medium { background: var(--warn-bg); color: var(--warn); }
.bilan-tier-small .bilan-brand-volume, .bilan-volume-small { background: var(--bad-bg); color: var(--red); }
.bilan-weekly, .bilan-ai { opacity: .55; }
.bilan-occurrences-table { width: 100%; min-width: 1120px; table-layout: auto; }
.bilan-occurrences-table th[scope="row"] { color: var(--ink); font-size: 13px; font-weight: 600; white-space: normal; }
.bilan-occurrences-table td { vertical-align: middle; overflow-wrap: break-word; }
.bilan-occurrences-table.scans-occurrences-table th, .bilan-occurrences-table.scans-occurrences-table td { width: max-content; }
.scan-inline-results-row > td { padding: 8px 14px 16px; background: var(--hover-row); }
.scan-inline-results { padding: 14px; }
.scan-inline-results h3 { margin: 0 0 10px; font-size: 13px; }
.scan-inline-results-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.scan-inline-results-header h3 { margin: 0; }
.bilan-volume-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.bilan-volume-tier { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; white-space: nowrap; }
.bilan-volume-tier strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.bilan-volume-number { display: inline-block; min-width: 3ch; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.bilan-volume-unknown { color: var(--muted); font-size: 12px; }
.bilan-volume-cell { display: inline-flex; align-items: center; gap: 8px; }
.bilan-scan-param { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 550; white-space: nowrap; }
.bilan-likes-input, .bilan-pages-input { width: 64px; min-height: 30px !important; padding: 0 8px !important; font-size: 12px !important; text-align: center; }
.bilan-volume-legend .btn-scan { min-height: 32px; padding: 0 12px; font-size: 12px; }
.bilan-volume-legend .scan-status { font-size: 12px; }
.bilan-auto { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bilan-auto .btn-copy { min-height: 32px; padding: 0 12px; font-size: 12px; }
.bilan-auto-status.is-running { color: var(--accent); font-weight: 600; }
.category-id-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; overflow-wrap: anywhere; }
.bilan-occurrence-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bilan-occurrence-actions .btn-copy { min-height: 28px; padding: 0 10px; font-size: 12px; }
.bilan-sort-button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 6px; margin: 0 -6px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: inherit; font-weight: inherit; }
.bilan-sort-button:hover { background: var(--soft); color: var(--ink); }
.bilan-sort-button.is-sorted { color: var(--ink); }
.bilan-sort-indicator { color: var(--accent); font-size: 12px; }

.bilan-toolbar { display: grid; gap: 10px; padding: 12px; margin-bottom: 12px; }
.bilan-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bilan-search-input { flex: 1 1 260px; min-width: 0; }
.bilan-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bilan-sorts-label { color: var(--muted); font-size: 12px; font-weight: 550; }
.bilan-sort-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 3px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 12px; font-weight: 550; white-space: nowrap; }
.bilan-sort-rank { display: inline-grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
#bilan-view .bilan-sort-chip-button { min-width: 24px; min-height: 24px; padding: 0 6px; border: 0; border-radius: 999px; background: transparent; color: inherit; font-size: 13px; line-height: 1; }
#bilan-view .bilan-sort-chip-button:hover { background: var(--soft-hover); }
.bilan-sort-add { min-height: 28px !important; padding: 0 10px !important; border-radius: 999px !important; font-size: 12px !important; font-weight: 550; cursor: pointer; }
.bilan-sorts-hint { color: var(--faint); font-size: 12px; }
.bilan-filter-row td, .bilan-filter-row th { padding-top: 6px; padding-bottom: 8px; background: var(--hover-row); }
.bilan-filter-cell { display: flex; gap: 4px; }
.bilan-filter-input { width: 100%; min-width: 96px; max-width: 170px; min-height: 30px !important; padding: 0 8px !important; border-radius: 8px !important; font-size: 12px !important; font-weight: 400; }
.bilan-filter-number { min-width: 52px; max-width: 68px; text-align: right; }
.bilan-filter-input.is-invalid { border-color: var(--red) !important; background: var(--bad-bg) !important; }
.bilan-no-match { padding: 24px 12px; }
.bilan-category-cell { display: flex; flex-wrap: wrap; gap: 3px 5px; max-width: 230px; }
.bilan-category-name { font-size: 13px; }
.bilan-category-name + .bilan-category-name::before { color: var(--muted); content: "+ "; }
.vtools-cell { text-align: center; }
.vtools-check { margin: 0; }
.vtools-check:disabled { cursor: progress; }

/* Création des filtres */
.filter-creator-view { min-width: 0; }
.filter-creator-card { padding: 22px; margin-bottom: 18px; }
.filter-creator-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-width: 640px; }
.filter-creator-fields label { margin-top: 10px; color: var(--muted); font-size: 12px; font-weight: 550; }
.filter-creator-fields label:first-child { margin-top: 0; }
.filter-creator-fields select, .filter-creator-fields input, .filter-creator-fields textarea { width: 100%; min-width: 0; }
.filter-creator-fields #filter-price-max { max-width: 200px; }
.filter-creator-fields textarea { min-height: 110px; }
.filter-creator-hint { margin: 0; color: var(--faint); font-size: 12px; }
.filter-creator-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.filter-creator-info { color: var(--muted); }
.filter-results { display: grid; gap: 8px; }
.filter-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.filter-results-heading h3 { font-size: 17px; }
.filter-results-heading p { margin-top: 3px; }
.filter-result-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 14px 16px; }
.filter-result-copy { display: grid; gap: 4px; min-width: 0; }
.filter-result-label { font-weight: 650; overflow-wrap: anywhere; }
.filter-result-url { color: var(--muted); font-size: 11.5px; text-decoration: none; overflow-wrap: anywhere; }
.filter-result-url:hover { color: var(--accent); text-decoration: underline; }
.filter-open-link { flex: 0 0 auto; }
.filter-result-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; }

/* Arbre des catégories */
.cat-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px; margin-bottom: 12px; }
.cat-search { position: relative; flex: 1 1 300px; min-width: 0; }
.cat-search-icon { position: absolute; top: 50%; left: 13px; width: 17px; height: 17px; color: var(--faint); transform: translateY(-50%); pointer-events: none; }
.cat-search-icon svg, .cat-icon svg, .cat-chevron svg { display: block; width: 100%; height: 100%; }
.cat-search input { width: 100%; min-height: 42px; padding-left: 40px; }
.cat-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-stat { padding: 4px 10px; color: var(--muted); }
.cat-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.cat-add { display: inline-flex; align-items: center; gap: 7px; }
.cat-add .cat-icon { width: 14px; height: 14px; }

.cat-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 16px; margin-bottom: 12px; background: #fffaeb; box-shadow: 0 0 0 1px #f3e6bf; }
.cat-pending > div:first-child { flex: 1 1 260px; }
.cat-pending .sub { margin: 2px 0 0; font-size: 12px; }
.cat-pending-list { display: flex; flex-wrap: wrap; gap: 6px; }
#correspondance-view .cat-pending-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 11px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--ring); font-size: 12px; }
.cat-pending-chip span { color: var(--muted); font-size: 11px; }
.cat-pending-chip .cat-icon { width: 13px; height: 13px; color: var(--accent); }
/* « Maintenant » de l’onglet Recherche : en cours, en file, étape de l’Automatique. */
.search-now { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; margin-bottom: 12px; padding: 16px 18px; }
.search-now-col { min-width: 0; }
.search-now-col h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; }
.search-now-count { padding: 0 7px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.search-now-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.search-now-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; font-size: 12.5px; }
.search-now-kind { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; line-height: 1.7; }
.search-now-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-now-progress { grid-column: 2; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.search-now-summary { margin: 0 0 8px; color: var(--ink-2); font-size: 12.5px; }
.search-now-more, .search-now-empty, .search-now-last { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.search-now-steps { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.search-now-steps li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 3px 6px; border-radius: var(--radius-sm); font-size: 12.5px; counter-increment: step; }
.search-now-steps li::before { content: counter(step); display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 600; }
.search-now-steps li.is-done { color: var(--muted); }
.search-now-steps li.is-done::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.search-now-steps li.is-now { background: var(--accent-soft); font-weight: 600; }
.search-now-steps li.is-now::before { background: var(--accent); color: #fff; }
.search-now-steps li.is-later { color: var(--ink-2); }
.search-now-step-value { overflow: hidden; max-width: 220px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.cat-auto { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 18px; padding: 14px 16px; margin-bottom: 12px; }
.cat-auto > div:first-child { flex: 1 1 260px; }
.cat-auto .sub { margin: 2px 0 0; font-size: 12px; }
.cat-auto-order { flex: 1 1 360px; min-width: 0; }
.cat-auto-heading { display: block; margin: 6px 0 2px; font-size: 12px; color: var(--ink-2); }
.cat-auto-heading:first-child { margin-top: 0; }
.cat-auto-list { margin: 0; padding-left: 26px; font-size: 12.5px; }
.cat-auto-next { color: var(--muted); }
.cat-auto-actions { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; }
#correspondance-view .cat-auto-move { padding: 0 6px; border: 0; border-radius: var(--radius-sm); background: var(--soft); color: var(--ink-2); font-size: 12px; line-height: 1.5; cursor: pointer; }
#correspondance-view .cat-auto-move:hover:not(:disabled), #correspondance-view .cat-auto-move:focus-visible { background: var(--soft-hover); }
#correspondance-view .cat-auto-move:disabled { opacity: .35; cursor: default; }
.cat-tag-explored { background: var(--soft); color: var(--muted); }
.cat-tag-coverage { background: linear-gradient(90deg, var(--accent-soft) var(--coverage, 0%), var(--soft) var(--coverage, 0%)); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cat-tag-coverage.is-full { background: var(--accent-soft); color: var(--accent); }
.cat-tag-empty { background: var(--warn-bg); color: var(--warn); }
.cat-auto-list li { padding: 1px 0; }
.cat-auto-list li > span { overflow-wrap: anywhere; }
#correspondance-view .cat-auto-remove { margin-left: 2px; padding: 0 6px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); font-size: 14px; line-height: 1.2; cursor: pointer; }
#correspondance-view .cat-auto-remove:hover, #correspondance-view .cat-auto-remove:focus-visible { background: var(--soft); color: var(--ink); }
.cat-auto-check { flex: 0 0 auto; width: 16px; height: 16px; margin: 0 2px 0 4px; accent-color: var(--accent); cursor: pointer; }
.cat-auto-check:disabled { opacity: .4; cursor: default; }
.cat-tag-auto { background: var(--accent-soft); color: var(--accent); }

.cat-tree { padding: 8px; }
.cat-list, .cat-children { margin: 0; padding: 0; list-style: none; }
.cat-children { margin-left: 19px; padding-left: 10px; border-left: 1px solid var(--line); animation: cat-open .18s ease; }
.cat-row { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 2px 8px 2px 4px; border-radius: var(--radius-sm); transition: background-color .14s ease; }
.cat-row:hover, .cat-row:focus-within { background: var(--hover-row); }
.cat-main { display: inline-flex; align-items: center; gap: 9px; min-width: 0; padding: 5px 6px; color: var(--ink); font-size: 13px; font-weight: 550; text-align: left; }
#correspondance-view button.cat-main { min-height: 32px; border: 0; border-radius: 8px; background: none; }
#correspondance-view .cat-root > .cat-row .cat-main { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.cat-chevron { flex: 0 0 22px; width: 22px; height: 22px; padding: 4px; border-radius: 7px; background: hsl(var(--cat-hue, 140) 30% 93%); color: hsl(var(--cat-hue, 140) 35% 32%); transition: transform .16s ease; }
.cat-main[aria-expanded="true"] .cat-chevron { transform: rotate(90deg); }
.cat-leaf { position: relative; flex: 0 0 22px; height: 22px; }
.cat-leaf::after { position: absolute; inset: 8px; border-radius: 50%; background: hsl(var(--cat-hue, 140) 25% 78%); content: ""; }
.cat-name { overflow-wrap: anywhere; }
.cat-name mark { padding: 0 1px; border-radius: 3px; background: #fbe9a8; color: inherit; }
#correspondance-view .cat-id { min-height: 22px; padding: 0 8px; border: 0; border-radius: 999px; background: var(--soft); color: var(--muted); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 11px; font-weight: 500; white-space: nowrap; }
#correspondance-view .cat-id:hover, #correspondance-view .cat-id.is-copied { background: var(--accent-soft); color: var(--accent); }
.cat-count { padding: 1px 8px; background: hsl(var(--cat-hue, 140) 30% 94%); color: hsl(var(--cat-hue, 140) 35% 30%); font-size: 11px; }
.cat-tag { padding: 1px 8px; font-size: 10.5px; }
.cat-tag-mother { letter-spacing: 0; text-transform: none; }
.cat-actions { display: flex; gap: 2px; margin-left: 2px; opacity: 0; transition: opacity .14s ease; }
.cat-row:hover .cat-actions, .cat-row:focus-within .cat-actions { opacity: 1; }
.cat-action { display: inline-grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: var(--muted); }
#correspondance-view button.cat-action { min-height: 30px; padding: 0; border: 0; background: none; }
#correspondance-view .cat-action:hover { background: var(--soft-hover); color: var(--ink); }
#correspondance-view .cat-action-remove:hover { color: var(--red); }
.cat-action .cat-icon { width: 15px; height: 15px; }
#correspondance-view .cat-search-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; margin-left: auto; padding: 0 12px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 12px; font-weight: 550; white-space: nowrap; }
#correspondance-view .cat-search-btn:hover { background: var(--ink); color: #fff; }
.cat-search-btn .cat-icon { width: 12px; height: 12px; }
.cat-item.is-flash > .cat-row { animation: cat-flash 1.8s ease; }
.cat-empty { display: grid; justify-items: center; gap: 12px; padding: 36px 12px; color: var(--muted); text-align: center; }
.cat-empty p { margin: 0; }
@keyframes cat-open { from { opacity: 0; transform: translateY(-4px); } }
@keyframes cat-flash { 0%, 45% { background: #fbe9a8; } }

/* Fenêtres */
.cat-dialog { width: min(480px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.cat-dialog::backdrop { background: rgba(17, 17, 17, .32); }
.cat-dialog[open] { animation: cat-open .18s ease; }
.cat-dialog-form { display: grid; gap: 12px; padding: 24px; }
.cat-dialog-form h3 { font-size: 18px; }
.cat-dialog-hint { margin: -6px 0 4px; color: var(--muted); font-size: 12.5px; }
.cat-field { display: grid; gap: 5px; }
.cat-field label { color: var(--muted); font-size: 12px; font-weight: 550; }
.cat-field input, .cat-field select { width: 100%; min-height: 42px; }
.cat-field input:disabled { color: var(--muted); cursor: not-allowed; }
.cat-parent-preview { margin: -6px 0 0; color: var(--accent); font-size: 12px; overflow-wrap: anywhere; }
.cat-parent-preview.error { color: var(--red); }
.cat-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.cat-dialog-actions .scan-status { flex: 1 1 100%; }
.cat-dialog-actions .scan-status:empty { display: none; }
.search-dialog { width: min(640px, calc(100vw - 28px)); }
.search-option-fields { gap: 10px 12px; margin: 0; }
.search-option-fields label { flex: 1 1 150px; }
.search-option-fields .search-input-short { width: 100%; }
.search-option-fields .search-check { flex: 1 1 100%; flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; }
/* Cases « États » (recherche, Bilan, Kleinanzeigen) */
.condition-picker { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 6px 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.condition-picker legend { width: 100%; margin-bottom: 4px; padding: 0; color: var(--muted); font-size: 12px; font-weight: 550; }
.condition-picker .search-check { display: inline-flex; flex: 0 1 auto; flex-direction: row; align-items: center; gap: 6px; color: var(--ink); font-size: 13px; white-space: normal; }
.bilan-conditions { position: relative; }
.bilan-conditions summary { cursor: pointer; padding: 6px 10px; border-radius: 999px; background: var(--soft); color: var(--ink-2); }
.bilan-conditions-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; width: min(300px, calc(100vw - 32px)); padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--ring), 0 8px 24px rgba(0, 0, 0, 0.12); white-space: normal; }
.bilan-conditions .condition-picker { flex-direction: column; flex-wrap: nowrap; }
.bilan-conditions-hint { margin: 10px 0 0; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.search-cost { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); color: var(--ink-2); font-size: 12.5px; }
.search-cost:empty { display: none; }
.search-explain { margin: 0; }
.search-link-heading { margin-top: 40px; }
.search-field-url { flex: 1 1 320px; }
.search-config .search-option-fields, .search-config .search-cost { margin-bottom: 14px; }

/* File d’attente */
.queue-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px; }
.queue-controls.is-paused { background: #fffaeb; box-shadow: 0 0 0 1px #f3e6bf; }
.queue-state-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.queue-state-dot.running { background: #2fb36b; animation: queue-pulse 1.8s ease-in-out infinite; }
.queue-state-dot.paused { background: #e0a500; }
.queue-info { flex: 1 1 260px; margin: 0; color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.queue-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.queue-analyses { display: grid; gap: 8px; margin-bottom: 14px; }
.queue-analysis { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; box-shadow: inset 3px 0 0 var(--accent), var(--ring); }
.queue-title { margin: 24px 2px 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.queue-title-row { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.queue-title-row .queue-title { margin-bottom: 0; }
.queue-lane { display: grid; gap: 6px; margin-top: 20px; padding: 0 0 4px; }
.queue-lane .queue-title-row { margin-bottom: 2px; }
.queue-lane .queue-title { margin-top: 0; color: var(--ink); font-size: 14px; }
.queue-lane-count { color: var(--muted); font-size: 12px; }
.queue-lane-empty { margin: 0; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; }
.queue-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.queue-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; transition: opacity .14s ease, box-shadow .14s ease; }
.queue-item.pending { cursor: grab; }
.queue-item.is-dragging { opacity: .4; }
.queue-item.drop-before { box-shadow: 0 -3px 0 var(--ink), var(--ring); }
.queue-item.drop-after { box-shadow: 0 3px 0 var(--ink), var(--ring); }
.queue-item.running { background: #fffaeb; box-shadow: 0 0 0 1px #f3e6bf; }
.queue-item.error { box-shadow: 0 0 0 1px #f5d3cf; }
.queue-item.cancelled .queue-label { color: var(--muted); text-decoration: line-through; }
.queue-grip { color: var(--faint); font-size: 16px; line-height: 1; }
.queue-pos { min-width: 20px; color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.queue-type { flex: 0 0 auto; font-size: 11px; }
.queue-text { display: grid; flex: 1 1 220px; gap: 1px; min-width: 0; }
.queue-label { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.queue-sub { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.queue-sub:empty { display: none; }
.queue-row-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; }
#queue-view .queue-move { min-width: 32px; padding: 0 8px; }
.queue-status { flex: 0 0 auto; }
.queue-spinner { flex: 0 0 16px; width: 16px; height: 16px; border: 2px solid #f0dfa8; border-top-color: #9a7a1c; border-radius: 50%; animation: queue-spin .9s linear infinite; }
.queue-mark { font-size: 11.5px; }
/* Pulsations en opacité seulement : une ombre animée repeignait la page à chaque image, en continu (2026-10-30). */
@keyframes queue-pulse { 50% { opacity: .45; } }
@keyframes queue-spin { to { transform: rotate(360deg); } }

/* Fiche d’une ligne du Bilan, ouverte dans son propre onglet. */
.fiche-open-link { display: block; width: fit-content; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 550; text-decoration: none; }
.fiche-open-link:hover { color: var(--ink); text-decoration: underline; }
/* Fiche d'une ligne du Bilan : fenêtre par-dessus la page, barre du titre fixe, contenu défilant. */
.fiche-dialog { width: min(1180px, calc(100vw - 28px)); max-width: none; max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 18px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; }
.fiche-dialog[open] { display: flex; flex-direction: column; animation: cat-open .18s ease; }
.fiche-dialog::backdrop { background: rgba(17, 17, 17, .32); }
.fiche-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.fiche-dialog-bar h2 { min-width: 0; font-size: 20px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; overflow-wrap: anywhere; }
.fiche-dialog-bar .btn-copy { flex: none; }
.fiche-view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; min-height: 0; padding: 18px 20px 22px; overflow: auto; overscroll-behavior: contain; }
.fiche-view > .fiche-group-note { margin: 0; color: var(--muted); font-size: 13px; }
.fiche-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 20px; }
.fiche-summary dl { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0; }
.fiche-summary dt { color: var(--muted); font-size: 12px; }
.fiche-summary dd { margin: 2px 0 0; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fiche-section { display: grid; gap: 10px; min-width: 0; padding: 20px; }
.fiche-section h3 { font-size: 17px; }
.fiche-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.fiche-hint { margin: 0; color: var(--muted); font-size: 12px; }
.fiche-source-analysis { background: var(--accent-soft); color: var(--accent); }
.fiche-filter-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 800px; }
.fiche-filter-fields label { color: var(--muted); font-size: 12px; font-weight: 550; }
#fiche-notes, .fiche-filter-fields input, .fiche-filter-fields textarea { width: 100%; min-width: 0; }
.fiche-filter-fields input { max-width: 220px; }
#fiche-notes { min-height: 160px; }
#fiche-notes:disabled { opacity: .6; }
.fiche-filter-form .filter-creator-actions { margin-top: 12px; }
.fiche-filter-fields .fiche-filter-name { max-width: 480px; }
.fiche-filter-listing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.fiche-filter-listing select { flex: 1 1 260px; min-width: 0; max-width: 560px; }

/* Tri des annonces de la fiche en slots (niches-tri.js). */
.tri-board { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 14px; align-items: start; min-width: 0; }
.tri-slots { display: grid; gap: 12px; min-width: 0; }
.tri-slot { display: grid; gap: 8px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .12s ease, background .12s ease; }
.tri-pool { position: sticky; top: 0; max-height: calc(100vh - 180px); grid-template-rows: auto auto minmax(0, 1fr); background: var(--soft); }
.tri-pool .tri-zone { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.is-dragging .tri-slot { border-style: dashed; }
.tri-slot.is-over { border: 2px solid var(--accent); background: var(--accent-soft); }
.tri-slot-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.tri-slot-heading h4 { font-size: 15px; }
.tri-slot-name { flex: 1 1 200px; min-width: 0; font-weight: 650; }
.tri-count { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--soft-hover); color: var(--ink-2); font-size: 12px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; }
.tri-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; font-size: 12px; }
.tri-stat { display: grid; gap: 1px; padding: 5px 9px; border-radius: 8px; background: var(--soft); }
.tri-pool .tri-stat { background: var(--surface); }
.tri-stats dt { color: var(--muted); font-size: 11px; }
.tri-stats dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.tri-slot-filters { margin: 0; color: var(--ok); font-size: 12px; font-weight: 600; }
.tri-filter-host:empty { display: none; }
.tri-filter-host { display: grid; gap: 8px; }
.tri-filter-host .fiche-filter-form { padding: 14px; border: 1px solid var(--accent); border-radius: 12px; background: var(--bg); }
.fiche-filter-form { display: grid; gap: 10px; }
.fiche-filter-form[hidden] { display: none; }
.fiche-filter-form-title { font-size: 15px; }
.tri-slot-note { width: 100%; min-width: 0; min-height: 52px; font-size: 13px; }
.tri-zone { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; min-width: 0; min-height: 56px; align-content: start; }
.tri-pool .tri-zone { grid-template-columns: minmax(0, 1fr); }
.tri-empty { margin: 0; padding: 16px 8px; color: var(--muted); font-size: 12px; text-align: center; }
.tri-no-slot { padding: 28px 12px; border: 1px dashed var(--line); border-radius: 14px; }
.tri-card { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: grab; }
.tri-card[draggable="false"] { cursor: default; }
.tri-card.is-dragging { opacity: .45; }
.tri-card img, .tri-card-photo { display: block; width: 54px; height: 72px; border-radius: 7px; background: var(--soft); object-fit: cover; }
.tri-card-body { display: grid; gap: 3px; min-width: 0; font-size: 13px; }
.tri-card-body a, .tri-card-body strong { font-weight: 600; overflow-wrap: anywhere; }
.tri-card-body p { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tri-card-body .fiche-hint { color: var(--muted); }
.tri-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tri-card-tags .fiche-source:empty { display: none; }
.tri-move { width: 100%; min-width: 0; margin-top: 2px; padding: 4px 6px; font-size: 12px; }

/* Mes filtres : cartes de la fiche et de l’onglet. */
.filters-view { min-width: 0; }
.saved-filter-list-title { margin-top: 6px; font-size: 14px; }
.saved-filter-list { display: grid; gap: 10px; min-width: 0; }
.saved-filter { display: grid; gap: 8px; min-width: 0; padding: 14px 16px; }
.saved-filter-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.saved-filter-heading h4 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.saved-filter-description { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.saved-filter-keywords { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.saved-filter-keywords li { padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 12px; overflow-wrap: anywhere; }
.filter-ref { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 600; white-space: nowrap; }
.filter-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; max-width: 640px; }
.filter-name-prefix { color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.filter-name-row .fiche-filter-name { flex: 1 1 220px; }
.filters-table { min-width: 640px; }
.filters-table td, .filters-table th { vertical-align: middle; }
.filters-table th[scope="row"] { color: var(--ink); font-size: 14px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.filters-table .filter-price { white-space: nowrap; }
.filters-table .filter-pick { width: 1%; padding-right: 0; }
.filters-table tbody tr.is-selected > td, .filters-table tbody tr.is-selected > th { background: var(--accent-soft); }
.filter-export { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; padding: 10px 16px; }
.filter-export-all { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; font-weight: 550; cursor: pointer; }
.filter-export-count { flex: 1 1 auto; color: var(--muted); font-size: 13px; }
.filter-price-value { display: block; font-weight: 600; }
.filter-price-basis { display: block; color: var(--muted); font-size: 12px; }
.filter-price-impossible .filter-price-value, .filter-buy-impossible .filter-buy-value { color: var(--red); }
.filter-margin { display: grid; gap: 6px; margin-bottom: 12px; padding: 14px 16px; }
.filter-margin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.filter-margin-row label { color: var(--ink-2); font-size: 13px; font-weight: 550; }
.filter-margin-row input { width: 90px; }
.filter-margin .fiche-hint { margin: 0; }
.filter-margin-row { align-items: flex-end; }
.filter-margin-field { display: grid; gap: 4px; }
/* Frais de port par catégorie (Mes filtres) */
.shipping-panel { margin-bottom: 12px; padding: 0; }
.shipping-panel > summary { display: flex; align-items: baseline; gap: 4px; padding: 14px 16px; cursor: pointer; list-style: none; }
.shipping-panel > summary::-webkit-details-marker { display: none; }
.shipping-panel > summary::before { content: ""; width: 7px; height: 7px; margin-right: 6px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: translateY(-2px) rotate(-45deg); transition: transform 0.2s ease; }
.shipping-panel[open] > summary::before { transform: translateY(-3px) rotate(45deg); }
.shipping-title { color: var(--ink); font-size: 14px; font-weight: 600; }
.shipping-count { color: var(--muted); font-size: 13px; }
.shipping-panel > :not(summary) { margin-left: 16px; margin-right: 16px; }
.shipping-panel > .fiche-hint { margin-top: 0; }
.shipping-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.shipping-tools input[type="search"] { flex: 1 1 260px; max-width: 420px; }
.shipping-tree { max-height: 460px; margin-bottom: 16px; padding: 0; overflow: auto; list-style: none; border-top: 1px solid var(--line); }
.shipping-children { margin: 0; padding: 0 0 0 22px; list-style: none; }
.shipping-row { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 2px 4px; border-bottom: 1px solid var(--line); }
.shipping-row:hover { background: var(--hover-row); }
.shipping-name { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.shipping-value { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.shipping-input { width: 72px; padding: 3px 6px; font-variant-numeric: tabular-nums; text-align: right; }
.shipping-row.is-inherited .shipping-input { color: var(--muted); }
.shipping-row.is-custom .shipping-input { border-color: var(--accent); color: var(--ink); font-weight: 650; }
.shipping-reset { padding: 2px 8px; font-size: 12px; }
.shipping-toggle, .shipping-toggle-space { display: inline-grid; flex: none; place-items: center; width: 22px; height: 22px; }
.shipping-toggle { padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.shipping-toggle:hover { background: var(--soft-hover); color: var(--ink); }
.shipping-toggle .cat-icon svg, .shipping-toggle svg { width: 14px; height: 14px; transition: transform 0.18s ease; }
.shipping-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.shipping-found .shipping-name { white-space: normal; }
.filter-price-fields { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.filter-price-fields > div { display: grid; gap: 4px; }
.filter-buy { display: grid; gap: 2px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--soft); }
.filter-buy-line { margin: 0; font-size: 14px; }
.filter-buy-detail { margin: 0; }
.filters-table .filter-detail-row > td, .filters-table tbody tr.filter-detail-row:hover > td { padding-top: 0; background: var(--surface); }
.filter-detail { display: grid; gap: 10px; min-width: 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--accent); }

/* Prod : filtres suivis sur Vinted */
/* Bilan : boutons plus petits, logo seul pour l'analyse de chaque site, flèche des résultats, bandes « en prod » et
   « en veille » à gauche de la ligne (user, 2026-10-23). */
.bilan-occurrences-table .btn-copy { min-height: 28px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
.bilan-actions { display: flex; align-items: center; gap: 4px; }
/* Claude dans la ligne du Bilan, pour les slots à faire (2026-10-29) : logo, champ du JSON, ✓. */
.bilan-claude { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
.bilan-claude .btn-logo-claude { width: 28px; height: 28px; }
.bilan-claude .btn-logo-claude img { width: 16px; height: 16px; }
.bilan-claude-answer { width: 9rem; min-width: 0; padding: 4px 8px; font-size: 12px; }
.bilan-claude-apply { padding: 4px 6px; }
/* Lots pour Claude, dans la barre du Bilan. */
.bilan-api-batches { flex-wrap: wrap; gap: 6px; align-items: center; }
.bilan-api-batches-text { font-size: 12px; }
.group-select-bar .claude-model { max-width: 16rem; }
.bilan-claude-photo { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
#bilan-claude-send.is-sending { display: inline-flex; align-items: center; gap: 8px; }
.group-select-bar .bilan-api-status { flex: 1 1 100%; }
.bilan-api-spinner[hidden] { display: none; }
.bilan-batch { flex-wrap: wrap; gap: 6px; }
.bilan-batch-copy { display: inline-flex; align-items: center; gap: 6px; }
.bilan-batch-answer { width: 14rem; }
.bilan-batch-status { flex: 1 1 18rem; font-size: 12px; color: var(--muted, inherit); }
.bilan-batch-status.error { color: var(--danger, #b42318); }
.site-action { display: inline-flex; align-items: center; gap: 1px; }
.btn-logo { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: var(--soft); }
.market-volume-btn { width: auto; padding: 0 5px; font-size: 11px; font-weight: 600; color: var(--muted, inherit); cursor: pointer; }
.btn-logo img { display: block; width: 18px; height: 18px; border-radius: 4px; }
/* Le favicon de Leboncoin est un carré blanc au coin orange : un trait le détache du fond. */
.btn-logo-leboncoin img { box-shadow: 0 0 0 1px rgba(17, 17, 17, .12); }
.btn-logo:hover:not(:disabled) { background: var(--soft-hover); }
.btn-logo:active:not(:disabled) { transform: scale(.94); }
.btn-logo:disabled { opacity: .35; }
.btn-logo.is-queued:disabled, .btn-logo.is-running:disabled { opacity: 1; cursor: progress; }
.btn-logo.is-queued::after, .btn-logo.is-running::after { content: ""; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--surface); }
.btn-logo.is-running::after { background: var(--accent); animation: queue-pulse 1.6s ease-in-out infinite; }
.results-toggle { display: inline-flex; align-items: center; gap: 3px; min-height: 26px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.results-toggle:hover { background: var(--soft); }
.results-arrow { width: 10px; color: var(--muted); font-size: 11px; text-align: center; }
.results-toggle[aria-expanded="true"] { background: var(--ink); color: #fff; }
.results-toggle[aria-expanded="true"] .results-arrow { color: #fff; }
.bilan-in-prod > .group-checkbox-cell { box-shadow: inset 5px 0 0 var(--prod-band); }
.bilan-in-veille > .group-checkbox-cell { box-shadow: inset 5px 0 0 var(--violet); }
.bilan-in-prod.bilan-in-veille > .group-checkbox-cell { box-shadow: inset 5px 0 0 var(--prod-band), inset 7px 0 0 var(--surface), inset 12px 0 0 var(--violet); }
.bilan-band-legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.bilan-band { display: inline-block; width: 5px; height: 14px; border-radius: 2px; }
.bilan-band-prod { background: var(--prod-band); }
.bilan-band-failed { background: var(--red); }
.bilan-band-legend .bilan-band-prod, .bilan-band-legend .bilan-band-veille { margin-left: 6px; }
.bilan-band-veille { margin-left: 6px; background: var(--violet); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ka-results .prod-tiles { margin: 10px 0; }
.ka-table { min-width: 980px; }
.ka-table td { vertical-align: middle; }
.ka-photo { width: 72px; height: 72px; border-radius: 10px; background: var(--soft); object-fit: cover; }
.ka-table tr.ka-promoted td { opacity: .7; }
.prod-launch.is-running, .prod-launch.is-running:disabled { background: var(--accent-soft); color: var(--accent); opacity: 1; }
.prod-card { display: grid; gap: 12px; min-width: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.prod-card + .prod-card { margin-top: 6px; }
.prod-card-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.prod-card-heading h4 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em; overflow-wrap: anywhere; }
.prod-state-active { background: var(--accent-soft); color: var(--accent); }
.prod-state-stopped { background: var(--warn-bg); color: var(--warn); }
.prod-alert { margin: 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.prod-alert-inline { max-width: 260px; margin: 4px 0 0; color: var(--warn); font-size: 12px; white-space: normal; }
.prod-stats { display: grid; gap: 12px; min-width: 0; }
.prod-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; }
.prod-tile { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--soft); }
.prod-tile dt { color: var(--muted); font-size: 12px; }
.prod-tile dd { margin: 2px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.prod-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.prod-stat { min-width: 0; padding: 12px 14px; border-radius: var(--radius-sm); box-shadow: var(--ring); }
.prod-stat h4 { margin: 0 0 4px; font-size: 13px; font-weight: 650; }
.prod-stat th, .prod-stat td { padding: 6px 0; font-size: 13px; }
.prod-stat tbody th { color: var(--ink-2); font-weight: 500; white-space: normal; }
.prod-stat td, .prod-stat thead th:last-child { padding-left: 12px; text-align: right; }
.prod-items summary { padding: 4px 0; font-weight: 600; cursor: pointer; }
.prod-items .table-wrap { margin-top: 8px; }
.prod-items table { min-width: 760px; }
.view-heading > .prod-quota { flex-basis: 100%; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.prod-table { min-width: 1100px; }
.prod-table td { vertical-align: middle; }
.queue-type-prod-read, .queue-type-prod-check { background: var(--violet-bg); color: var(--violet); }

/* Veille : lancement dans la fiche, et page de ses annonces à marquer « cop » ou « pas cop » */
.veille-launch { display: grid; gap: 8px; }
.veille-launch-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.veille-field { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 550; }
.veille-field input, .veille-field select, .veille-field textarea { width: 100%; min-width: 0; }
.veille-launch-fields .veille-field { width: 130px; }
.veille-launch-fields .veille-name-field { width: 260px; }
.tab-badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
/* Rythme des veilles (2026-10-28) : à l’heure (3 min 30 au plus), lente (5 min au plus), en retard. */
.veille-pace { margin: 0; padding-left: 10px; border-left: 3px solid var(--line, #ddd); color: var(--ink-2); font-size: 13px; }
.veille-pace-ok { border-left-color: var(--ok); }
.veille-pace-slow { border-left-color: #e0a500; }
.veille-pace-late { border-left-color: var(--red); color: var(--red); }
.veille-rhythm { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.veille-rhythm-ok { background: var(--ok-bg); color: var(--ok); }
.veille-rhythm-slow { background: var(--warn-bg); color: var(--warn); }
.veille-rhythm-late { background: var(--bad-bg); color: var(--red); }
.veille-rhythm-target { margin-left: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; }
/* Semaine type des nouvelles annonces (carte de chaleur 7 × 24, 2026-10-28). */
.week-heatmap { margin: 4px 0 0; flex: 1 1 100%; }
.week-heatmap > summary { cursor: pointer; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.week-scroll { overflow-x: auto; padding: 8px 0 4px; }
.week-grid { display: grid; grid-template-columns: 34px repeat(24, minmax(14px, 1fr)); gap: 2px; min-width: 420px; max-width: 760px; }
.week-hour { color: var(--muted); font-size: 10px; white-space: nowrap; }
.week-day { color: var(--muted); font-size: 11px; line-height: 16px; }
.week-cell { height: 16px; border-radius: 3px; background: var(--soft); }
.week-cell.is-zero, .week-swatch.is-zero { background: var(--soft); }
.week-cell.is-unseen, .week-swatch.is-unseen { background: repeating-linear-gradient(45deg, var(--soft) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--line); }
.week-cell.is-now, .week-swatch.is-now { outline: 2px solid var(--ink); outline-offset: 1px; }
.week-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: 11px; }
.week-swatch { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.week-table { margin-top: 4px; font-size: 12px; }
.week-table summary { cursor: pointer; color: var(--muted); }
.week-table table { margin-top: 6px; }

.veille-week-row td { background: var(--hover-row); }
.veille-week-row .week-heatmap { margin: 0; }
.btn-icon.is-active { background: var(--accent-soft); color: var(--accent); }

/* Catégories exclues d’un pays (veilles à l’étranger). */
.veille-exclusions { flex: 1 1 100%; }
.veille-exclusions summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.veille-exclusions-list { display: grid; gap: 4px; max-height: 260px; margin: 8px 0; overflow-y: auto; }
.veille-exclusion { font-size: 13px; overflow-wrap: anywhere; }
.veille-exclusion-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.veille-exclusion-add input[type="text"] { flex: 1 1 260px; min-width: 0; }
.veille-to-sort { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--bad-bg); color: var(--red); font-size: 12px; font-weight: 650; white-space: nowrap; }
.veille-list-name { font-weight: 650; }
.veille-list { display: grid; gap: 10px; }
.veille-card { display: grid; gap: 8px; min-width: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.veille-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.veille-page > .view-heading { margin-bottom: 0; }
.veille-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px; }
.veille-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-width: 0; color: var(--ink-2); font-size: 13px; }
.veille-meta .prod-alert { flex-basis: 100%; }
.veille-filter { display: grid; gap: 12px; padding: 20px; }
.veille-filter h3 { font-size: 17px; }
.veille-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.veille-filter-words { display: grid; grid-template-columns: minmax(0, 1fr) 165px; gap: 8px; align-items: start; }
.veille-filter-price { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.veille-check { display: flex; grid-column: 1 / -1; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.veille-check input { margin: 0; }
.veille-search-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.veille-search-actions .fiche-hint { flex: 1 1 280px; margin: 0; }
.veille-search { display: grid; gap: 10px; min-width: 0; }
.veille-search:empty { display: none; }
.veille-search-summary { font-weight: 600; }
.veille-search-table { min-width: 760px; font-size: 13px; }
.veille-search-table td { vertical-align: top; overflow-wrap: anywhere; }
.veille-search-table tr.is-applied { background: var(--ok-bg); }
.veille-search-lost { color: var(--warn); font-weight: 650; }
.veille-tile-green { background: var(--ok-bg); }
.veille-tile-green dd { color: var(--ok); }
.veille-tile-red { background: var(--bad-bg); }
.veille-tile-red dd { color: var(--red); }
.veille-tile-orange { background: var(--warn-bg); }
.veille-tile-orange dd { color: var(--warn); }
.veille-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.veille-toolbar .veille-field { width: 240px; }
.veille-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.veille-table { min-width: 1100px; }
.veille-table td { vertical-align: top; }
.veille-row { box-shadow: inset 4px 0 0 transparent; }
.veille-row.is-green { box-shadow: inset 4px 0 0 var(--ok); background: color-mix(in srgb, var(--ok-bg) 45%, transparent); }
.veille-row.is-red { box-shadow: inset 4px 0 0 var(--red); background: color-mix(in srgb, var(--bad-bg) 45%, transparent); }
.veille-row.is-orange { box-shadow: inset 4px 0 0 var(--warn); background: color-mix(in srgb, var(--warn-bg) 45%, transparent); }
.veille-row.is-grey { opacity: .62; }
.veille-row.is-caught, .veille-row.is-todo { box-shadow: inset 4px 0 0 var(--info); }
.veille-photos { display: flex; gap: 4px; }
.veille-photos img { display: block; width: 64px; height: 86px; border-radius: 8px; background: var(--soft); object-fit: cover; }
.veille-description { max-width: 340px; max-height: 9.5em; overflow: auto; color: var(--ink-2); font-size: 13px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.veille-color { display: inline-block; padding: 3px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.veille-color-green { background: var(--ok-bg); color: var(--ok); }
.veille-color-red { background: var(--bad-bg); color: var(--red); }
.veille-color-orange { background: var(--warn-bg); color: var(--warn); }
.veille-color-caught, .veille-color-todo { background: var(--info-bg); color: var(--info); }
.veille-color-decided { background: none; color: var(--muted); }
.veille-decisions { display: flex; flex-direction: column; gap: 6px; }
.veille-decision { min-width: 84px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.veille-decision:hover { background: var(--soft-hover); }
.veille-decision:focus-visible { outline: none; box-shadow: var(--focus); }
.veille-cop.is-selected { border-color: var(--ok); background: var(--ok); color: #fff; }
.veille-pas-cop.is-selected { border-color: var(--red); background: var(--red); color: #fff; }
.veille-more { justify-self: center; }

/* Journal du worker */
.vps-logs { padding: 16px; margin-bottom: 16px; }
.vps-logs-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.vps-logs-actions { display: flex; gap: 8px; }
.vps-logs pre { max-height: 400px; margin: 0; padding: 14px; border-radius: 12px; background: #111; color: #d6d6d0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-all; overflow: auto; }

/* ===== Modernisation (user, 2026-10-26 : « modernise l'interface, avec animation, enlève le superflu »). Profondeur,
   mouvement et allègement ; rien ne change ce que fait la page. Le mouvement vient d'ici et de niches-motion.js
   (indicateur d'onglet, entrée des vues au changement d'onglet, chiffres, explications repliées). ===== */
:root {
  --radius: 16px;
  --ring: 0 0 0 1px rgba(17, 17, 17, .055), 0 1px 2px rgba(17, 17, 17, .04), 0 8px 22px -12px rgba(17, 17, 17, .12);
  --ring-hover: 0 0 0 1px rgba(17, 17, 17, .07), 0 2px 4px rgba(17, 17, 17, .05), 0 16px 34px -14px rgba(17, 17, 17, .22);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .5, 1);
}
/* Halo fixe sur un calque à part : un fond en background-attachment: fixed se repeint à chaque défilement. */
body { background: var(--bg); }
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 520px at -6% -14%, rgba(11, 122, 111, .10), transparent 62%),
    radial-gradient(900px 480px at 106% -10%, rgba(98, 80, 214, .08), transparent 60%);
  content: "";
  pointer-events: none;
}
* { scrollbar-width: thin; scrollbar-color: rgba(17, 17, 17, .2) transparent; }

/* En-tête */
.brand-mark { background: linear-gradient(140deg, #161616 0%, #0b7a6f 160%); box-shadow: 0 8px 18px -8px rgba(11, 122, 111, .7), inset 0 1px 0 rgba(255, 255, 255, .14); transition: transform .5s var(--ease-spring); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
#vps-status:not(.warn):not(.danger)::before { animation: dot-pulse 2.4s ease-in-out infinite; }
.message { animation: rise .4s var(--ease-out) both; }

/* Onglets : pastille glissante (niches-motion.js) et icônes */
.tab-list { position: relative; }
.tab { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; transition: color .3s var(--ease-out), background-color .2s ease; }
.tab::before { flex: 0 0 15px; width: 15px; height: 15px; background: currentColor; opacity: .8; content: ""; -webkit-mask: var(--tab-icon) center / contain no-repeat; mask: var(--tab-icon) center / contain no-repeat; }
.tab-list.has-indicator .tab.is-active, .tab-list.has-indicator .tab.is-active:hover { background: transparent; }
.tab-indicator { position: absolute; top: 0; left: 0; z-index: 0; border-radius: var(--radius-sm); background: linear-gradient(180deg, #2a2a28, #111); box-shadow: 0 8px 18px -8px rgba(17, 17, 17, .55), inset 0 1px 0 rgba(255, 255, 255, .1); pointer-events: none; transition: transform .5s var(--ease-spring), width .5s var(--ease-spring), height .3s ease; }
.tab-badge { animation: pop .45s var(--ease-spring) both; }
#tab-dashboard { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1.6'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.6'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.6'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1.6'/%3E%3C/svg%3E"); }
#tab-searches { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E"); }
#tab-bilan { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 10h18M9 10v10'/%3E%3C/svg%3E"); }
#tab-filters { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l-6.2 7.6V19l-3.6 1.6v-8z'/%3E%3C/svg%3E"); }
#tab-prod { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 17 6-6 4 4 8-8'/%3E%3Cpath d='M15 7h6v6'/%3E%3C/svg%3E"); }
#tab-veille, #tab-veille-uk, #tab-veille-pl, #tab-veille-se { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
/* Compteur d'un onglet (Mes filtres, Prod, File d'attente) : pastille neutre ; la pastille rouge reste aux annonces des
   veilles qui attendent leur niche, la seule chose à traiter. */
.tab-count { min-width: 18px; padding: 1px 6px; border-radius: 999px; background: rgba(17, 17, 17, .06); color: var(--muted); font-size: 11px; font-weight: 650; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; transition: background-color .2s ease, color .2s ease; }
.tab:hover .tab-count { background: rgba(17, 17, 17, .09); color: var(--ink); }
.tab-badge { margin-left: 0; background: #fbe7e5; color: var(--red); }
.tab.is-active .tab-count, .tab.is-active:hover .tab-count { background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .88); }
.tab.is-active .tab-badge { background: #e0483c; color: #fff; }
/* Les quatre veilles ensemble : « Veille », puis seulement le pays. */
.tab-group { display: flex; flex: none; align-items: center; gap: 1px; margin: 0 2px; border-radius: var(--radius-sm); background: rgba(17, 17, 17, .035); }
.tab-sub { padding: 0 10px; font-size: 12px; letter-spacing: .02em; }
.tab-sub::before { display: none; }
/* Actualiser et Changer de code : icônes, leur nom dans l'infobulle. */
.tab-action { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.tab-action::before { width: 16px; height: 16px; background: currentColor; content: ""; -webkit-mask: var(--tab-icon) center / contain no-repeat; mask: var(--tab-icon) center / contain no-repeat; transition: transform .5s var(--ease-spring); }
.tab-action:hover { background: var(--soft); color: var(--ink); }
.tab-action-refresh:active::before { transform: rotate(200deg); }
.tab-action-refresh { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.34-5.66'/%3E%3Cpath d='M20 4v5h-5'/%3E%3C/svg%3E"); }
.tab-action-key { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='m10.8 12.2 9.2-9.2M17 6l3 3M14 9l2 2'/%3E%3C/svg%3E"); }
#tab-queue { --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 8l10 5 10-5z'/%3E%3Cpath d='m2 13 10 5 10-5'/%3E%3C/svg%3E"); }

/* Boutons */
.btn-scan, .access button { background: linear-gradient(180deg, #2b2b29 0%, #111 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 1px 2px rgba(17, 17, 17, .22), 0 8px 16px -10px rgba(17, 17, 17, .55); transition: transform .2s var(--ease-out), box-shadow .2s ease, background .2s ease, opacity .15s ease; }
.btn-scan:hover:not(:disabled), .access button:hover { background: linear-gradient(180deg, #383836 0%, #171717 100%); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 2px 4px rgba(17, 17, 17, .2), 0 14px 22px -12px rgba(17, 17, 17, .6); }
.btn-scan:active:not(:disabled), .access button:active { transform: translateY(0) scale(.98); }
.btn-copy { transition: background-color .18s ease, color .18s ease, transform .2s var(--ease-out), box-shadow .2s ease; }
.btn-copy:hover:not(:disabled) { transform: translateY(-1px); }
.btn-copy.copied { animation: pop .4s var(--ease-spring); }

/* Cartes et tuiles : ombres douces, légère élévation au survol */
.card { transition: box-shadow .25s var(--ease-out), transform .25s var(--ease-out); }
.kpi, .explo-tile, .prod-tile, .saved-filter, .tri-card, .filter-result-card { transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s ease; }
.kpi:hover, .saved-filter:hover, .filter-result-card:hover { transform: translateY(-2px); box-shadow: var(--ring-hover); }
.explo-tile:hover, .prod-tile:hover { background: var(--surface); transform: translateY(-2px); box-shadow: var(--ring-hover); }
.tri-card:hover { box-shadow: var(--ring-hover); }
.queue-item { transition: opacity .14s ease, box-shadow .25s var(--ease-out), transform .25s var(--ease-out); }
.queue-item.pending:hover { transform: translateY(-1px); box-shadow: var(--ring-hover); }
.kpi-value, .explo-tile-value, .prod-tile dd { font-variant-numeric: tabular-nums; }
.kpi-value { background: linear-gradient(180deg, #111 30%, #55554f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.explo-hero-value { background: linear-gradient(120deg, #0b7a6f 0%, #2a78d6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }

/* Jauge, courbes : remplissage et tracé à la première image (classe is-first, niches-exploration.js) */
.explo-meter { position: relative; height: 10px; background: #e3ecf8; }
.explo-meter-fill { position: relative; overflow: hidden; background: linear-gradient(90deg, #0b7a6f, #2a78d6); transform-origin: left center; }
.explo-meter-fill::after { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); content: ""; transform: translateX(-100%); animation: sheen 3.2s ease-in-out 1.4s infinite; }
.is-first .explo-meter-fill { animation: meter-grow 1.3s var(--ease-out) .1s both; }
.is-first .explo-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s var(--ease-out) .2s forwards; }
.is-first .explo-area { animation: fade-in 1s ease .7s both; }
.is-first .explo-dot { transform-box: fill-box; transform-origin: center; animation: pop .5s var(--ease-spring) 1.4s both; }
.is-first .explo-end { animation: fade-in .5s ease 1.5s both; }
.is-first .explo-tile { animation: rise .55s var(--ease-out) both; }
.is-first .explo-tile:nth-child(2) { animation-delay: .04s; }
.is-first .explo-tile:nth-child(3) { animation-delay: .08s; }
.is-first .explo-tile:nth-child(4) { animation-delay: .12s; }
.is-first .explo-tile:nth-child(5) { animation-delay: .16s; }
.is-first .explo-tile:nth-child(6) { animation-delay: .2s; }
.is-first .explo-tile:nth-child(7) { animation-delay: .24s; }
.explo-tooltip { background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); animation: fade-in .15s ease; }

/* Entrée d'une vue au changement d'onglet : ses blocs montent en cascade (niches-motion.js) */
.is-entering > *, .is-entering .dash-grid > * { animation: rise .55s var(--ease-out) both; }
.is-entering > :nth-child(2), .is-entering .dash-grid > :nth-child(2) { animation-delay: .05s; }
.is-entering > :nth-child(3), .is-entering .dash-grid > :nth-child(3) { animation-delay: .1s; }
.is-entering > :nth-child(4) { animation-delay: .15s; }
.is-entering > :nth-child(5) { animation-delay: .2s; }
.is-entering > :nth-child(6) { animation-delay: .25s; }
.is-entering > :nth-child(n + 7) { animation-delay: .3s; }

/* Fenêtres */
.fiche-dialog[open], .cat-dialog[open] { animation: dialog-in .38s var(--ease-spring); }
.fiche-dialog::backdrop, .cat-dialog::backdrop { background: rgba(17, 17, 17, .38); animation: fade-in .25s ease; }
.fiche-dialog-bar { background: rgba(255, 255, 255, .97); }
.fiche-dialog[open] .fiche-view > * { animation: rise .45s var(--ease-out) both; }
.fiche-dialog[open] .fiche-view > :nth-child(2) { animation-delay: .04s; }
.fiche-dialog[open] .fiche-view > :nth-child(3) { animation-delay: .08s; }
.fiche-dialog[open] .fiche-view > :nth-child(n + 4) { animation-delay: .12s; }

/* Tableaux */
th { font-size: 11.5px; letter-spacing: .01em; }
tbody tr > td, tbody tr > th { transition: background-color .15s ease; }

/* Volets dépliables */
.explo-data summary, .prod-items summary { display: inline-flex; align-items: center; gap: 9px; margin-left: -10px; padding: 6px 12px 6px 10px; border-radius: 999px; list-style: none; transition: background-color .2s ease; }
.explo-data summary::-webkit-details-marker, .prod-items summary::-webkit-details-marker { display: none; }
.explo-data summary:hover, .prod-items summary:hover { background: var(--soft); }
.explo-data summary::before, .prod-items summary::before { width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; content: ""; transform: rotate(-45deg); transition: transform .3s var(--ease-out); }
.explo-data[open] > summary::before, .prod-items[open] > summary::before { transform: rotate(45deg); }
.explo-data[open] > :not(summary), .prod-items[open] > :not(summary), .bilan-conditions[open] > .bilan-conditions-panel { animation: rise .35s var(--ease-out) both; }

/* Moins de texte à l'écran : longues explications sur une ligne, « Plus » pour tout lire (niches-motion.js) ; le lien
   « Ouvrir la fiche » du Bilan n'apparaît qu'au survol de sa ligne (ou au clavier). */
.hint-fold:not(.is-open) { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.hint-more { display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 0; margin: 0; padding: 2px 9px; border: 0; border-radius: 999px; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; }
.hint-more:hover { background: var(--accent-soft); }
.hint-more::after { width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; content: ""; transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease-out); }
.hint-more[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.hint-fold.is-open { animation: fade-in .3s ease; }
@media (hover: hover) {
  .bilan-occurrences-table .fiche-open-link { opacity: 0; transform: translateX(-4px); transition: opacity .2s ease, transform .2s var(--ease-out); }
  .bilan-occurrences-table tr:hover .fiche-open-link, .bilan-occurrences-table .fiche-open-link:focus-visible { opacity: 1; transform: none; }
}

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 100% { opacity: 1; transform: scale(1); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes meter-grow { from { transform: scaleX(0); } }
@keyframes sheen { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
@keyframes dot-pulse { 0%, 100% { opacity: 1; } 60% { opacity: .4; } }

@media (hover: none) {
  .cat-actions { opacity: 1; }
}
@media (max-width: 720px) {
  /* Mes filtres : chaque filtre sur deux lignes (référence, nom, prix ; puis ses boutons), sans défilement de côté. */
  .filters-table { min-width: 0; }
  .filters-table thead { display: none; }
  .filters-table, .filters-table tbody, .filters-table tr, .filters-table td, .filters-table th { display: block; }
  .filters-table tbody tr:not(.filter-detail-row) { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr) auto; align-items: baseline; gap: 8px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .filters-table tbody tr:not(.filter-detail-row) > * { padding: 0; border: 0; }
  .filters-table tbody tr:not(.filter-detail-row) > td:last-child { grid-column: 1 / -1; }
  .filters-table .filter-detail-row > td { border-bottom: 1px solid var(--line); }
  .filters-table tbody tr.is-selected:not(.filter-detail-row) { background: var(--accent-soft); }
  .filters-table tbody tr.is-selected > td, .filters-table tbody tr.is-selected > th { background: none; }
  .filters-table .filter-price { white-space: normal; }
  .bilan-sorts-hint { display: none; }
  .group-panel-actions { margin-left: 0; }
  .group-dialog-summary { grid-template-columns: 1fr; }
  .group-dialog-summary dd { margin-bottom: 4px; }
}
@media (max-width: 700px) {
  main.app-shell { padding: 16px 16px 48px; }
  .tabs { top: 8px; margin-bottom: 20px; }
  .view-heading { flex-direction: column; }
  .view-heading h2 { font-size: 20px; }
  .kpi { min-height: 104px; padding: 16px; }
  .kpi-value { font-size: 30px; }
  .filters { align-items: stretch; flex-direction: column; }
  .filters input, .filters select { width: 100%; }
  .count { margin-left: 0; }
  .photos img { width: 60px; height: 80px; }
  th, td { padding: 10px; }
  .search-input-url { width: 100%; min-width: 0; }
  .search-input-short { width: 80px; }
  .scan-select { min-width: 0; width: 100%; }
  .access { margin-top: 6vh; padding: 22px 18px; }
  .access-row { flex-direction: column; }
  .access button { min-height: 42px; }
  .filter-creator-card { padding: 16px; }
  .filter-result-card { align-items: flex-start; flex-direction: column; }
  .filter-results-heading { align-items: flex-start; }
  .filter-results-heading .btn-copy { flex: 0 0 auto; }
  .cat-toolbar-actions { width: 100%; margin-left: 0; }
  .cat-toolbar-actions .cat-add { flex: 1 1 100%; }
  .cat-tree { padding: 6px; }
  .cat-children { margin-left: 11px; padding-left: 5px; }
  .cat-row { flex-wrap: wrap; gap: 4px 6px; padding-right: 4px; }
  .cat-actions { opacity: 1; }
  .cat-dialog-form { padding: 18px; }
  #correspondance-view .cat-search-btn { margin-left: 0; }
  .queue-item { flex-wrap: wrap; }
  .queue-row-actions { width: 100%; margin-left: 0; }
  .fiche-section, .fiche-summary { padding: 16px; }
  .tri-board { grid-template-columns: minmax(0, 1fr); }
  .tri-pool { position: static; max-height: 60vh; }
  .fiche-filter-fields input { max-width: none; }
  .fiche-summary dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 8px 16px; }
  .fiche-summary dd { margin: 0; }
  .fiche-dialog { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .fiche-dialog-bar { padding: 12px 16px; }
  .fiche-view { padding: 14px 12px 18px; }
  .prod-tile dd { font-size: 18px; }
  .prod-stat-grid { grid-template-columns: minmax(0, 1fr); }
  .veille-filter, .veille-summary { padding: 16px; }
  .veille-filter-words { grid-template-columns: minmax(0, 1fr); }
  .veille-toolbar .veille-field { width: 100%; }
  .veille-launch-fields .veille-name-field { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Bilan par pages de 200 lignes (niches.js, renderOccurrencesTable) */
.bilan-show-more { display: block; margin: 14px auto 0; }

/* Tri automatique avec Claude, dans la section Tri des annonces (niches-tri.js) */
.tri-claude { display: grid; gap: 8px; min-width: 0; }
.tri-claude-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tri-claude-result { width: 100%; min-height: 38px; height: 38px; resize: vertical; padding-top: 9px; padding-bottom: 9px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.tri-claude-status:empty { display: none; }
.tri-claude-status { margin: 0; }

/* Mots à exclure, filtre proposé par Claude, repère vtools (niches-filters.js, niches-tri.js) */
.saved-filter-excluded li { background: var(--bad-bg); color: var(--red); }
.filter-words-title { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.tri-slot-proposal { margin: 0; }
.filter-vtools-state { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.filter-vtools-todo { background: var(--soft); color: var(--muted); }
.filter-vtools-added { background: var(--accent-soft); color: var(--accent); }
.filter-vtools-changed { background: var(--warn-bg); color: var(--warn); }
.filter-vtools-count { color: var(--muted); font-size: 12px; }
@media (max-width: 720px) {
  .filters-table tbody tr:not(.filter-detail-row) > .filter-vtools { grid-column: 1 / -1; }
}

/* Fiche sobre (user, 2026-10-26) : logo Vinted et « Production » en haut, barre du tri sur une ligne, filtres en tableau */
.fiche-summary { flex-direction: row-reverse; justify-content: space-between; }
.fiche-summary-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.fiche-filters-table { width: 100%; }
.fiche-filters-table th, .fiche-filters-table td { padding: 8px 10px; vertical-align: middle; }
.fiche-filters-table .filter-ref { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; white-space: nowrap; }
.fiche-filters-table .filter-price, .fiche-filters-table .filter-words { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fiche-filters-table .filter-words { cursor: help; color: var(--muted); }
.filter-veille-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.filter-veille-link { color: var(--accent); font-weight: 600; white-space: nowrap; }
@media (max-width: 900px) {
  .fiche-summary { flex-direction: column; align-items: stretch; }
}
.fiche-view .btn-compact { min-height: 28px; padding: 0 10px; font-size: 12px; }
.fiche-summary dl { flex: 1 1 0; min-width: 0; }
.fiche-filters-table .filter-result-actions { flex-wrap: nowrap; }

/* Boutons à icône des filtres (niches-filters.js, user 2026-10-27) */
.filter-icon-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; }
/* Icônes fines, de la couleur du texte (lineIcon, user 2026-10-27 : « fins, sans couleur ») */
.line-icon { display: block; flex: none; }

/* Photo de l’annonce de repère sur chaque filtre, recherche de « Mes filtres » (user 2026-10-27) */
.filter-photo-cell { width: 1%; padding-right: 0; }
.filter-photo { display: block; width: 36px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--soft); }
.filter-photo img, .filter-photo-empty { display: block; width: 100%; height: 100%; object-fit: cover; }
.filter-photo-empty { box-shadow: inset 0 0 0 1px var(--line); border-radius: 6px; }
a.filter-photo { transition: transform .15s ease, box-shadow .15s ease; }
a.filter-photo:hover, a.filter-photo:focus-visible { transform: scale(1.06); box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.filter-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; }
.filter-search .bilan-search-input { flex: 1 1 260px; }
.btn-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); line-height: 1; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.btn-icon:hover:not(:disabled), .btn-icon:focus-visible { background: var(--soft); color: var(--ink); }
.btn-icon[aria-expanded="true"] { background: var(--soft); color: var(--ink); }
.btn-icon:disabled { opacity: .5; cursor: default; }

/* Tri des annonces refait (niches-tri.js, user 2026-10-27) : logo Claude à droite du titre, nouveau slot à gauche,
   réponse de Claude à droite, barre de filtre dessous ; cartes plus petites. */
.tri-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn-logo-claude { width: 34px; height: 34px; cursor: pointer; transition: background-color .15s ease, transform .15s ease; }
.btn-logo-claude img { width: 20px; height: 20px; border-radius: 0; }
.btn-logo-claude:hover:not(:disabled) { background: var(--soft-hover); transform: rotate(-12deg); }
.btn-logo-claude.is-copied { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.btn-logo-claude:disabled { opacity: .5; cursor: default; }
.tri-zone { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.tri-card { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; padding: 6px; border-radius: 9px; }
.tri-card img, .tri-card-photo { width: 40px; height: 54px; border-radius: 6px; }
.tri-card-body { gap: 2px; font-size: 12px; }
.tri-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.tri-card-title strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-weight: 600; }
.tri-card-open { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; color: var(--muted); text-decoration: none; }
.tri-card-open:hover, .tri-card-open:focus-visible { background: var(--soft); color: var(--ink); }
.tri-card .tri-move { min-height: 28px; padding: 0 8px; font-size: 12px; }

/* Claude par l’API (claude-sort.js, user 2026-10-27) : « Trier avec Claude » dans la fiche, texte de tri et annonce de
   référence de chaque slot, « Analyse par Claude » de la veille. */
.tri-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.claude-model { min-height: 34px; max-width: 290px; padding: 0 28px 0 10px; font-size: 12px; }
.tri-slot-claude { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; align-items: start; }
.tri-slot-reference-photo { display: block; width: 40px; height: 54px; overflow: hidden; border-radius: 6px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.tri-slot-reference-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tri-slot-claude-fields { display: grid; gap: 6px; min-width: 0; }
.tri-slot-reference-label { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 550; }
.tri-slot-reference-label select { flex: 1 1 auto; min-width: 0; min-height: 30px; font-size: 12px; }
.tri-slot-sort { width: 100%; min-height: 52px; font-size: 12px; }
.veille-claude { display: grid; gap: 12px; padding: 16px 18px; }
.veille-claude-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.veille-claude-heading h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.veille-claude-row { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; }
.veille-claude-row .veille-field { width: 260px; }
.veille-claude-row #veille-claude-budget { width: 90px; }
.veille-claude-row .veille-field:has(#veille-claude-budget) { width: auto; }
.veille-claude-stats { margin: 0; }
.veille-claude-cell { min-width: 150px; max-width: 260px; }
.veille-claude-cell p { margin: 4px 0 0; font-size: 12px; line-height: 1.35; }
.veille-claude-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 12px; font-weight: 650; }
.veille-claude-badge.is-good { background: var(--ok-bg); color: var(--ok); }
.veille-claude-badge.is-none { background: var(--bad-bg); color: var(--red); }
.veille-claude-badge.is-unsure { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 700px) {
  .tri-heading { flex-wrap: wrap; }
  .tri-heading-actions { justify-content: flex-start; width: 100%; }
  .claude-model { max-width: 100%; flex: 1 1 100%; }
  .veille-claude-row .veille-field { width: 100%; }
}

/* Niches de la veille (user, 2026-10-27) : la liste des niches trouvées en haut, le numéro de chaque annonce, la page
   d’une niche avec ses annonces et ses filtres. */
.tri-slot-number { flex: none; padding: 2px 7px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.veille-niches h4 { margin: 0 0 6px; font-size: 13px; }
.veille-niche-list { display: flex; flex-wrap: wrap; gap: 6px; }
.veille-niche { display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 12px; text-decoration: none; transition: background-color .15s ease; }
a.veille-niche:hover, a.veille-niche:focus-visible { background: var(--soft-hover); color: var(--ink); }
.veille-niche strong { font-variant-numeric: tabular-nums; }
.veille-niche.is-current { box-shadow: inset 0 0 0 1px var(--ink); }
.veille-niche.is-none { background: var(--bad-bg); color: var(--red); }
.veille-niche.is-unsure { background: var(--warn-bg); color: var(--warn); }
a.veille-claude-badge { text-decoration: none; }
a.veille-claude-badge:hover, a.veille-claude-badge:focus-visible { box-shadow: inset 0 0 0 1px currentColor; }
.veille-niche-card { display: grid; gap: 12px; padding: 16px 18px; }
.veille-niche-card h3 { margin: 4px 0 0; font-size: 15px; }
.veille-niche-head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: start; }
.veille-niche-photo { width: 72px; height: 96px; border-radius: 9px; }
.veille-niche-sort { margin: 0 0 6px; color: var(--ink-2); font-size: 13px; line-height: 1.45; white-space: pre-wrap; }

/* Veille dans sa fenêtre (user 2026-10-27) : le titre est dans la barre, pas répété en tête. */
.veille-dialog { width: min(1320px, calc(100vw - 28px)); }
.veille-dialog .veille-page > .view-heading h2 { display: none; }
.veille-dialog .veille-page > .view-heading { justify-content: flex-start; }

/* Veille de la ligne dans la section Filtres de la fiche (user 2026-10-27) */
.line-veille { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: 13px; }
.line-veille .fiche-hint { margin: 0; }
td.veille-good { color: var(--ok); font-weight: 600; }
td.veille-bad { color: var(--red); font-weight: 600; }

/* Marque tirée de Claude dans le tableau d'une veille, et « Tout analyser » de l'onglet Veille (user 2026-10-27) */
span.veille-decision.is-claude { display: inline-block; text-align: center; cursor: default; }
.veille-claude-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.veille-claude-all .btn-scan { display: inline-flex; align-items: center; gap: 6px; }
.veille-claude-all .scan-status { margin: 0; }

/* Niche d'une annonce de veille choisie dans un menu (user 2026-10-27) */
.veille-decision-cell { display: grid; gap: 4px; justify-items: start; }
.veille-decision-select { max-width: 220px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.veille-decision-select.is-manual { border-color: var(--ink); font-weight: 600; }
.veille-decision-select:focus-visible { outline: none; box-shadow: var(--focus); }
.veille-decision-reset { font-size: 12px; }
.veille-claude-changed { margin: 2px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); }

/* Toutes les niches de la ligne en haut de la page de veille (user 2026-10-27) */
.veille-niches.card { display: grid; gap: 8px; padding: 12px 16px; }
.veille-niches h3 { margin: 0; font-size: 14px; }
.veille-niche.is-empty { opacity: .6; }
.veille-niche.is-removed { text-decoration: line-through; }
.veille-niche.is-all { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.veille-niche.is-all.is-current { box-shadow: inset 0 0 0 1px var(--ink); }

/* Tunnel automatique et niches chiffrées (niches-tunnel.js, user 2026-10-27) */
.tunnel-card { display: grid; gap: 14px; margin-bottom: 12px; padding: 20px; }
.tunnel-card .sub.error { color: var(--red); }
.tunnel-help { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.tunnel-settings { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.tunnel-field { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.tunnel-field input { width: 84px; }
.tunnel-field select { max-width: 190px; }
.tunnel-field input, .tunnel-field select { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.tunnel-switch { display: inline-flex; gap: 6px; align-items: center; min-height: 32px; font-size: 13px; }
.tunnel-table, .niche-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tunnel-table th, .tunnel-table td, .niche-table th, .niche-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tunnel-table th, .niche-table th { color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.niche-table td:not(.niche-name):not(:nth-child(2)) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tunnel-message { min-width: 240px; color: var(--muted); }
.tunnel-actions { display: flex; gap: 6px; justify-content: flex-end; }
.tunnel-actions .btn-copy, .tunnel-candidates .btn-copy { min-height: 28px; padding: 0 10px; font-size: 12px; }
.tunnel-stage { white-space: nowrap; }
.tunnel-info { background: var(--info-bg); color: var(--info); }
.tunnel-warn { background: var(--warn-bg); color: var(--warn); }
.tunnel-ok { background: var(--ok-bg); color: var(--ok); }
.tunnel-bad { background: var(--bad-bg); color: var(--red); }
.tunnel-candidates summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.tunnel-candidates .table-wrap { max-height: 360px; margin-top: 8px; overflow-y: auto; }
.niche-name { display: flex; gap: 10px; align-items: center; min-width: 200px; }
.niche-photo { flex: none; width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--soft); }
.niche-sub { display: block; color: var(--muted); font-size: 12px; }
.niche-unreliable td:not(.niche-name) { color: var(--faint); }
.niche-alert { color: var(--red); }
.niche-profit { color: var(--ok); font-weight: 600; }
.fiche-niches { display: grid; gap: 8px; padding: 16px; }
.fiche-niches h3 { margin: 0; font-size: 15px; }
@media (max-width: 720px) {
  .tunnel-card { padding: 16px; }
  .tunnel-field select { max-width: 100%; }
}
.bilan-slots-todo { margin-left: 6px; color: var(--warn); font-size: 13px; font-weight: 600; cursor: help; }
.slots-todo { display: inline-block; margin-left: 6px; color: var(--warn); font-size: 12px; white-space: nowrap; }
.filter-unsure { text-align: right; color: var(--muted); }
.filter-unsure.has-unsure, .filter-unsure.has-unsure a { color: var(--warn); font-weight: 600; }

/* Onglet et fenêtre de prod (niches-prodview.js, user 2026-10-27 : « plus esthétique », comme la veille) */
.prod-list-table { min-width: 960px; }
.prod-list-table td, .prod-list-table th { padding: 10px 12px; }
.prod-list-line a { font-weight: 600; }
.prod-list-alert { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%; background: var(--bad-bg); color: var(--red); font-size: 12px; font-weight: 700; cursor: help; }
.prodview-view { display: grid; gap: 14px; }
.prodview-summary { display: grid; gap: 10px; }
.prodview-heading { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.prodview-line { font-size: 16px; font-weight: 600; }
.prodview-niches { display: grid; gap: 8px; }
.prodview-niches h3, .prodview-claude h3 { margin: 0; font-size: 14px; }
.prodview-niches .veille-niche { border: 0; cursor: pointer; font: inherit; }
.prodview-chip-sold { color: var(--ok); }
.prodview-claude { display: grid; gap: 6px; padding: 14px 16px; }
.prodview-claude-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.prodview-claude-row h3 { margin-right: auto; }
.prodview-claude .claude-model { max-width: 260px; }
.prodview-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 13px; }
.prodview-table th, .prodview-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.prodview-table th { color: var(--muted); font-size: 12px; font-weight: 500; }
.prodview-title { min-width: 220px; }
.prodview-reason { max-width: 280px; color: var(--muted); font-size: 12px; }
.prodview-sold td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.prodview-stats summary { cursor: pointer; color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .prodview-claude .claude-model { max-width: 100%; }
}

/* Colonne « Incertains » des onglets Veille et Prod (user 2026-10-27 : « afin que je sache lesquels je dois retrier ») */
.unsure-count { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.unsure-count:hover, .unsure-count:focus-visible { text-decoration: underline; }

/* Tri des annonces refait (niches-tri.js, user 2026-10-27) : ligne Claude (logo, réponse, ✓), annonces non rangées en
   liste, puis les slots avec leurs annonces en liste. */
.tri-heading .scan-status { margin: 0; text-align: right; }
.tri-claude-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tri-claude-line .tri-claude-result { flex: 1 1 auto; min-width: 0; }
.tri-claude-apply { flex: none; display: grid; place-items: center; width: 38px; min-height: 38px; padding: 0; }
.tri-claude-line .btn-scan:not(.tri-claude-apply) { flex: none; white-space: nowrap; }
.tri-board { grid-template-columns: minmax(0, 1fr); }
.tri-pool { position: static; max-height: none; background: var(--surface); }
.tri-pool .tri-list { max-height: 520px; overflow: auto; overscroll-behavior: contain; }
.tri-zone.tri-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 40px; margin: 0; padding: 0; list-style: none; }
.tri-card.tri-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto minmax(140px, 200px) 24px; align-items: center; gap: 10px; padding: 5px 6px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.tri-card.tri-row:last-child { border-bottom: 0; }
.tri-card.tri-row:hover { box-shadow: none; background: var(--soft); }
.tri-row img, .tri-row .tri-card-photo { width: 32px; height: 42px; border-radius: 5px; }
.tri-row-title { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tri-row-meta { color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tri-row-status:empty { display: none; }
.tri-row .tri-move { width: 100%; min-height: 28px; margin: 0; padding: 0 8px; font-size: 12px; }
.tri-list .tri-empty { padding: 12px 8px; }
@media (max-width: 760px) {
  .tri-card.tri-row { grid-template-columns: 32px minmax(0, 1fr) 24px; }
  .tri-row-meta, .tri-row-status, .tri-row .tri-move { grid-column: 2 / 4; }
  .tri-row > .tri-card-open { grid-column: 3; grid-row: 1; }
  .tri-row > img, .tri-row > .tri-card-photo { grid-row: span 2; align-self: start; }
  .tri-row-title { white-space: normal; }
  .tri-claude-line { flex-wrap: wrap; }
  .tri-claude-line .tri-claude-result { flex-basis: calc(100% - 100px); }
}

/* Veilles à l'étranger (2026-10-28) : réglages des jumelles et vendeurs d'autres pays. */
.veille-market-settings { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 20px; margin-bottom: 16px; padding: 16px 18px; }
.veille-market-settings .veille-field { width: 200px; grid-template-rows: auto auto auto; }
.veille-market-settings .veille-field small { font-weight: 400; }
.veille-market-settings > .btn-scan { margin-top: 20px; }
.veille-market-settings > .fiche-hint { flex-basis: 100%; margin: 0; }
.veille-market-switch { display: flex; align-items: center; gap: 8px; font-weight: 600; flex-basis: 100%; }
.badge.veille-us { background: var(--info-bg); color: var(--info); }
@media (max-width: 760px) { .veille-market-settings .veille-field { width: 100%; } .veille-market-settings > .btn-scan { margin-top: 0; } }

/* Fiche d’un filtre (niches-filtersheet.js, 2026-10-28 ; compacte le 2026-11-11) : en-tête avec les données générales,
   trois panneaux de chiffres côte à côte, une rangée d’annonces de prod, filtre et scan pliés. */
.filtersheet-view { display: grid; gap: 10px; padding: 12px 16px 16px; overflow-y: auto; }
.filter-sheet-link { color: inherit; font-weight: 650; text-decoration: none; }
.filter-sheet-link:hover, .filter-sheet-link:focus-visible { color: var(--accent); text-decoration: underline; }
.sheet-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; }
.sheet-head-photo { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--soft); }
.sheet-head-text { flex: 1 1 260px; min-width: 0; }
.sheet-head-text h3 { margin: 1px 0 3px; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.sheet-head-ref { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.sheet-head-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
.sheet-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.sheet-fact { display: grid; gap: 1px; padding: 6px 10px; border-radius: 9px; background: var(--soft); min-width: 0; max-width: 220px; }
.sheet-fact dt { color: var(--muted); font-size: 10.5px; font-weight: 600; }
.sheet-fact dd { margin: 0; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-panels { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); gap: 10px; align-items: start; }
.sheet-panel { display: grid; gap: 6px; padding: 9px 14px 10px; min-width: 0; }
.sheet-panel h3 { margin: 0; font-size: 14px; }
.sheet-panel .sub { margin: -4px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.sheet-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 5px 10px; border-radius: 9px; background: var(--soft); }
.sheet-hero-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.sheet-hero-value { font-size: 20px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sheet-hero-note { color: var(--muted); font-size: 11.5px; }
.sheet-hero-good { background: var(--ok-bg); }
.sheet-hero-good .sheet-hero-value { color: var(--ok); }
.sheet-stats { display: grid; }
.sheet-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 3px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.sheet-stat:first-child { border-top: 0; }
.sheet-stat-label { color: var(--muted); }
.sheet-stat-value { display: flex; align-items: baseline; gap: 6px; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; }
.sheet-stat-value strong { font-weight: 700; }
.sheet-stat-value small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.sheet-veille-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sheet-veille-table th, .sheet-veille-table td { padding: 3px 4px; border-top: 1px solid var(--line); text-align: left; white-space: nowrap; }
.sheet-veille-table thead th { border-top: 0; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.sheet-veille-table tbody th { font-weight: 700; }
.sheet-veille-table .sheet-num { text-align: right; }
.sheet-veille-table thead th:not(:first-child) { text-align: right; }
.sheet-veille-table .sheet-good { color: var(--ok); font-weight: 700; }
.sheet-veille-empty td { color: var(--muted); }
.sheet-market { padding: 8px 0 0; }
.sheet-market h4 { margin: 0 0 6px; font-size: 13px; }
.sheet-market-list summary { cursor: pointer; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.sheet-history h3 { margin-bottom: 2px; }
.sheet-listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.sheet-listing { display: grid; gap: 1px; padding: 5px; border-radius: 9px; background: var(--surface); box-shadow: var(--ring); color: inherit; text-decoration: none; min-width: 0; }
.sheet-listing[hidden] { display: none; }
.sheet-listing:hover, .sheet-listing:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.sheet-listing img, .sheet-listing-photo-empty { width: 100%; aspect-ratio: 1; border-radius: 6px; object-fit: cover; background: var(--soft); display: block; }
.sheet-head .sheet-listing-photo-empty { width: 56px; }
.sheet-listing-price { font-weight: 700; font-size: 12.5px; }
.sheet-listing-title { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-listing-meta { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-listing-sold .sheet-listing-meta, .sheet-listing-reserved .sheet-listing-meta { color: var(--ok); font-weight: 600; }
.sheet-more-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; }
.sheet-more-row .fiche-hint { margin: 0; }
.sheet-fold { padding: 0; }
.sheet-fold > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 9px 14px; cursor: pointer; border-radius: var(--radius); }
.sheet-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sheet-fold-title { font-size: 14px; font-weight: 700; }
.sheet-fold-note { color: var(--muted); font-size: 12px; }
.sheet-fold-body { display: grid; gap: 8px; padding: 0 14px 12px; }
.sheet-fold-body > .sheet-stats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); column-gap: 18px; }
.sheet-fold-body > .sheet-stats .sheet-stat { border-top: 0; }
.sheet-dl { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 4px 14px; margin: 0; font-size: 12.5px; }
.sheet-dl dt { color: var(--muted); }
.sheet-dl dd { margin: 0; overflow-wrap: anywhere; }
.sheet-fold-body > .sheet-veille-table { margin-bottom: 2px; }
@media (max-width: 980px) {
  .sheet-panels { grid-template-columns: minmax(0, 1fr); }
}
/* Téléphone (user, 2026-11-11 : « améliore l’affichage téléphone », fiches à capturer et partager) : la fiche prend tout
   l’écran, l’en-tête met la photo et le nom en avant, les chiffres clés en grille, le profit en grand. */
@media (max-width: 640px) {
  .filter-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .filter-dialog .fiche-dialog-bar { padding: 10px 14px; }
  .filter-dialog .fiche-dialog-bar h2 { font-size: 17px; }
  .filtersheet-view { padding: 10px 10px 24px; gap: 8px; }
  .sheet-head { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 10px 12px; padding: 12px; }
  .sheet-head-photo, .sheet-head .sheet-listing-photo-empty { width: 76px; height: 76px; border-radius: 12px; }
  .sheet-head-text h3 { font-size: 17px; }
  .sheet-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .sheet-fact { max-width: none; padding: 6px 8px; }
  .sheet-fact dd { font-size: 14px; }
  .sheet-panel { padding: 11px 12px 12px; gap: 8px; }
  .sheet-panel h3 { font-size: 15px; }
  .sheet-hero { padding: 8px 12px; border-radius: 12px; }
  .sheet-hero-label { font-size: 12px; }
  .sheet-hero-value { font-size: 28px; letter-spacing: -.02em; }
  .sheet-stat { font-size: 13.5px; padding: 5px 0; }
  .sheet-listings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sheet-fold > summary { padding: 11px 12px; }
  .sheet-fold-body { padding: 0 12px 12px; }
  .sheet-dl { grid-template-columns: 1fr; }
  .sheet-dl dd { margin-bottom: 6px; }
}

/* Colonne « Prêt » de Mes filtres (2026-10-28) : au moins une vente de la niche dans la prod. */
.filter-ready { white-space: nowrap; }
.filter-profit { white-space: nowrap; }
.filter-profit.is-positive { color: var(--ok); font-weight: 650; }
.filter-margin-cell { white-space: nowrap; }
.filter-margin-cell.is-positive { color: var(--ok); font-weight: 650; }
.filter-min-margin { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.filter-min-margin input { width: 5.5em; }
.filter-ready-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.filter-ready-badge.is-ready { background: var(--ok-bg); color: var(--ok); }
.filter-ready-badge.is-waiting { background: var(--soft); color: var(--muted); }
.filter-ready-detail { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.filter-ready-toggle.is-active { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.explo-subtitle { margin: 20px 0 4px; font-size: 15px; }

/* Fiche du filtre : marge sur laquelle elle est calculée. */
.sheet-target { margin: 4px 0 0; padding: 4px 8px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); font-weight: 600; font-size: 0.86em; }
.sheet-target.is-saved { background: transparent; color: var(--muted, inherit); font-weight: 400; padding: 0; }

/* Mes filtres, tableau compact (user, 2026-11-12 : « ça va à la ligne à chaque fois, c’est pas beau ») : une ligne par
   texte, les noms sur deux lignes courtes coupées par « … », des cellules plus serrées. */
.filters-table th, .filters-table td { padding: 8px 10px; }
.filters-table thead th { white-space: nowrap; font-size: 12px; }
.filters-table .filter-name { min-width: 200px; max-width: 320px; }
.filter-name-main, .filter-name-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-name-main { font-size: 14px; font-weight: 650; }
.filter-name-sub { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; }
.filters-table .filter-ready, .filters-table .filter-sale-time, .filters-table .filter-profit, .filters-table .filter-margin-cell, .filters-table .filter-unsure, .filters-table .filter-vtools { white-space: nowrap; }
.filters-table .filter-ready-detail { display: inline; margin: 0 0 0 6px; }
.filters-table .filter-margin-cell > span { display: block; }
.filters-table .filter-vtools-state { padding: 2px 8px 2px 4px; font-size: 11px; }
.filters-table td:last-child { white-space: nowrap; }
@media (max-width: 760px) {
  .filters-table .filter-name { min-width: 0; max-width: none; }
}

/* File d'attente : lecture de tout vinted.fr et ouvertures (worker). */
.firehose-card { display: grid; gap: 6px; }
.firehose-card h3, .firehose-card h4 { margin: 0; }
.firehose-roots { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: 13px; }
.firehose-big { margin: 0; font-size: 15px; font-weight: 600; }

/* Accès invité (niches-guest.js, 2026-11-22) : bouton du formulaire, liste des filtres publics, coche « Public ». */
.access-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--faint); font-size: 12px; }
.access-or::before, .access-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.access .access-guest, .access .access-guest:hover, .access .access-guest:active { width: 100%; background: var(--soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transform: none; }
.access .access-guest:hover { background: var(--soft-hover); }
.is-guest .system-panel { display: none; }
.guest-view { display: grid; gap: 16px; margin-top: 8px; }
.guest-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.guest-head h2 { font-size: 18px; }
.guest-head .sub { margin-top: 4px; color: var(--muted); font-size: 13px; }
.guest-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.guest-tools input { min-width: 0; width: 220px; max-width: 100%; }
.guest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.guest-card { display: flex; gap: 12px; padding: 12px; color: inherit; text-decoration: none; }
.guest-card:hover { box-shadow: var(--ring), 0 6px 18px rgba(17, 17, 17, .08); }
.guest-card:focus-visible { outline: none; box-shadow: var(--focus); }
.guest-card-photo { flex: none; width: 84px; height: 84px; border-radius: var(--radius-sm); object-fit: cover; background: var(--soft); }
.guest-card-body { display: grid; align-content: start; gap: 3px; min-width: 0; }
.guest-card-name { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.guest-card-sub { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.guest-card-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 6px; }
.guest-card-facts dt { color: var(--muted); font-size: 11px; }
.guest-card-facts dd { margin: 0; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.filter-public-state { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.filter-public-state.is-public { background: var(--info-bg); color: var(--info); }
@media (max-width: 600px) {
  .guest-head { padding: 14px 16px; }
  .guest-grid { grid-template-columns: 1fr; }
  .guest-tools, .guest-tools input { width: 100%; }
}
