/* Agent de prospection — interface « bureau » Plateya.
   Barre de suite navy, navigation latérale, panneaux plats à filets fins, densité de logiciel métier.
   Marque : navy #093D65 / orange #E94E1B (logo, actions, priorité A). Texte : IBM Plex Sans ; titres : Poppins.
   Couleurs de données validées (scripts/validate_palette.js, fond blanc) : A = #E94E1B, B = #1F5F96. */

:root {
  --navy: #093D65;
  --navy-800: #072F4E;
  --navy-600: #0E4C7C;
  --navy-100: #DCE7F1;
  --navy-50: #EEF3F8;
  --orange: #E94E1B;
  --orange-700: #C93F12;
  --orange-100: #F9DCD0;
  --orange-50: #FDF2EE;

  --data-a: #E94E1B;
  --data-b: #1F5F96;
  --data-c: #98A2B3;
  --data-1: #1F5F96;

  --ink: #101828;
  --text: #1D2939;
  --text-2: #475467;
  --muted: #667085;
  --muted-2: #98A2B3;
  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --surface-3: #F2F4F7;
  --border: #E2E6EC;
  --border-2: #EDF0F3;
  --border-strong: #CDD3DB;
  --grid: #EDF0F3;
  --baseline: #CDD3DB;

  --green: #067647;
  --green-bg: #ECFDF3;
  --amber: #B54708;
  --amber-bg: #FFF8EB;
  --red: #B42318;
  --red-bg: #FEF3F2;
  --good: #0CA30C;
  --warning: #FAB219;
  --critical: #D03B3B;

  --r-sm: 4px;
  --r: 6px;
  --r-lg: 8px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 6px 16px rgba(16, 24, 40, 0.10);
  --suite-h: 52px;
  --nav-w: 232px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-title: "Poppins", "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 13.5px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--orange); }
:focus-visible { outline: 2px solid var(--navy-600); outline-offset: 2px; border-radius: var(--r-sm); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
code { font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--surface-3); color: var(--text-2); padding: 1px 6px; border-radius: var(--r-sm); }
.ico { flex: none; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.small { font-size: 12px; color: var(--muted); }
.spacer { flex: 1; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ===== Barre de suite (haut) ===== */
.suite {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--suite-h);
  display: flex; align-items: center; gap: 14px; padding: 0 16px 0 12px;
  background: var(--navy); color: #fff;
}
.suite a { color: #fff; }
.suite .brand { display: flex; align-items: center; padding: 0 6px; }
.suite .brand img { height: 24px; width: auto; display: block; }
.suite-sep { width: 1px; height: 22px; background: rgba(255, 255, 255, 0.22); }
.suite-product { font: 500 14px var(--font); letter-spacing: 0.01em; white-space: nowrap; }
.suite-search { position: relative; flex: 0 1 420px; margin: 0 auto; }
.suite-search input {
  width: 100%; height: 32px; padding: 0 12px 0 34px; border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.12); color: #fff;
  font: 400 13px var(--font); outline: none; transition: background 0.15s ease, border-color 0.15s ease;
}
.suite-search input::placeholder { color: rgba(255, 255, 255, 0.7); }
.suite-search input:focus { background: #fff; color: var(--ink); border-color: #fff; }
.suite-search input:focus::placeholder { color: var(--muted-2); }
.suite-search .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.8); pointer-events: none; }
.suite-search input:focus + .ico, .suite-search:focus-within .ico { color: var(--muted); }
.suite-meta { display: flex; align-items: center; gap: 6px; }
.suite-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: var(--r-sm);
  font-size: 12.5px; color: rgba(255, 255, 255, 0.92); white-space: nowrap;
}
a.suite-chip:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.suite-btn {
  display: none; width: 34px; height: 34px; border: 0; border-radius: var(--r-sm); background: transparent; color: #fff;
  align-items: center; justify-content: center; cursor: pointer;
}
.suite-btn:hover { background: rgba(255, 255, 255, 0.12); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); flex: none; display: inline-block; }
.dot-success { background: #12B76A; box-shadow: 0 0 0 2px rgba(18, 183, 106, 0.25); }
.dot-failed { background: #F04438; box-shadow: 0 0 0 2px rgba(240, 68, 56, 0.25); }
.dot-running { background: #F79009; box-shadow: 0 0 0 2px rgba(247, 144, 9, 0.25); }
.dot-interrupted, .dot-idle { background: var(--muted-2); box-shadow: 0 0 0 2px rgba(152, 162, 179, 0.25); }

/* ===== Navigation latérale ===== */
.nav {
  position: fixed; top: var(--suite-h); bottom: 0; left: 0; z-index: 50; width: var(--nav-w);
  display: flex; flex-direction: column; padding: 14px 10px; gap: 2px;
  background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto;
  transition: transform 0.2s ease;
}
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); padding: 0 10px; margin: 16px 0 4px; }
.nav-label:first-child { margin-top: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
  border-radius: var(--r-sm); font-size: 13.5px; font-weight: 500; color: var(--text-2);
}
.nav-item .ico { color: var(--muted); }
.nav-item:hover { background: var(--surface-3); color: var(--ink); }
.nav-item.is-active { background: var(--navy-50); color: var(--navy); font-weight: 600; }
.nav-item.is-active::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--orange); }
.nav-item.is-active .ico { color: var(--navy); }
.nav-foot { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--border-2); display: flex; flex-direction: column; gap: 4px; }
.nav-foot strong { font-size: 12.5px; color: var(--ink); }
.nav-foot a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; }
.backdrop { display: none; }

/* ===== Zone de contenu ===== */
.content { margin-left: var(--nav-w); padding: calc(var(--suite-h) + 20px) 24px 48px; min-height: 100vh; }
.page { max-width: 1520px; margin: 0 auto; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.crumbs a:hover { color: var(--navy-600); }
.crumbs span { color: var(--text-2); }
.page-head { display: flex; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font: 600 22px/1.25 var(--font-title); color: var(--ink); }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; max-width: 820px; }
.page-head .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.section-title h2 { font-size: 14px; }
.section-title .small { margin-left: auto; }

/* ===== Panneaux ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-head { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-bottom: 1px solid var(--border-2); }
.card-head h2, .card-head h3 { font-size: 13.5px; font-weight: 600; }
.card-head .ico { color: var(--navy-600); }
.card-head .small, .card-head .head-aside { margin-left: auto; }
.card-body { padding: 14px 16px; }

/* ===== Boutons et champs ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid transparent; font: 500 13px/1 var(--font); white-space: nowrap; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-800); color: #fff; }
.btn-accent { background: var(--orange); color: #fff; }
.btn-accent:hover { background: var(--orange-700); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--navy-600); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; font: 500 12.5px/1.4 var(--font); color: var(--navy-600); cursor: pointer; }
.btn-link:hover { color: var(--orange); }
.cmd-sep { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }
.field {
  width: 100%; height: 32px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 400 13px var(--font); outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field:focus { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(14, 76, 124, 0.12); }
input::placeholder { color: var(--muted-2); }
select.field {
  appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
}

/* Onglets de vues (pivot) */
.pivot { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.pivot a {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px;
  font-size: 13.5px; font-weight: 500; color: var(--text-2); white-space: nowrap;
}
.pivot a:hover { color: var(--ink); background: var(--surface-3); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.pivot a.active { color: var(--navy); font-weight: 600; }
.pivot a.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--orange); border-radius: 2px 2px 0 0; }
.pivot .count { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-3); padding: 1px 7px; border-radius: 999px; }
.pivot a.active .count { background: var(--navy-50); color: var(--navy); }

/* Bouton segmenté */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.seg a, .seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 0; background: none;
  font: 500 12.5px var(--font); color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.seg > * + * { border-left: 1px solid var(--border-strong); }
.seg a:hover, .seg button:hover { background: var(--surface-3); color: var(--ink); }
.seg .on { background: var(--navy); color: #fff; }
.seg .on:hover { background: var(--navy-800); color: #fff; }

/* ===== Badges, puces ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-sm);
  font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1;
}
.badge .ico { width: 12px; height: 12px; }
.b-A { background: var(--orange-50); color: var(--orange-700); box-shadow: inset 0 0 0 1px var(--orange-100); }
.b-B { background: var(--navy-50); color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy-100); }
.b-C, .b-none { background: var(--surface-3); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }
.b-x { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px #FECDCA; }
.b-new { background: var(--navy); color: #fff; letter-spacing: 0.04em; text-transform: uppercase; font-size: 10px; }
.b-outline { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); font-weight: 500; }
.c-haute { background: var(--green-bg); color: var(--green); }
.c-moyenne { background: var(--amber-bg); color: var(--amber); }
.c-faible { background: var(--red-bg); color: var(--red); }
.prio { display: inline-grid; place-items: center; width: 24px; height: 22px; border-radius: var(--r-sm); font-weight: 700; font-size: 12px; }
.prio.b-A { background: var(--orange); color: #fff; box-shadow: none; }
.prio.b-B { background: var(--data-b); color: #fff; box-shadow: none; }
.prio.b-C, .prio.b-none { background: var(--surface-3); color: var(--text-2); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); font-size: 12px; color: var(--text-2); white-space: nowrap;
}
.chip .ico { width: 12px; height: 12px; color: var(--muted-2); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-pos { background: var(--green-bg); border-color: transparent; color: var(--green); }
.chip-neg { background: var(--red-bg); border-color: transparent; color: var(--red); }
.chip-plain { background: var(--surface-3); border-color: transparent; }
.src-line { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.src-line .ico { width: 13px; height: 13px; color: var(--muted-2); }
.src-group { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.src-label { font-weight: 500; color: var(--muted); }
.src-label::after { content: " :"; }
.src-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); font-size: 11.5px; font-weight: 500; white-space: nowrap; }

/* ===== Liste : panneau de filtres + résultats ===== */
.list-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 16px; align-items: start; }
.fpane { position: sticky; top: calc(var(--suite-h) + 16px); max-height: calc(100vh - var(--suite-h) - 32px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.fpane-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border-2); }
.fpane-head h2 { font-size: 13.5px; }
.fpane-head .count-badge { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.fpane-head a { margin-left: auto; font-size: 12px; }
.fsec { border-bottom: 1px solid var(--border-2); }
.fsec:last-child { border-bottom: 0; }
.fsec > summary {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px; cursor: pointer; list-style: none;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink); user-select: none;
}
.fsec > summary::-webkit-details-marker { display: none; }
.fsec > summary .ico { margin-left: auto; color: var(--muted); transition: transform 0.15s ease; }
.fsec[open] > summary .ico { transform: rotate(180deg); }
.fsec > summary:hover { background: var(--surface-2); }
.fsec-body { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.fsec-body label.lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); font-weight: 500; }
.fsub { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-2); margin-top: 2px; }
.fopt { display: flex; align-items: center; gap: 8px; min-height: 26px; font-size: 13px; color: var(--text); cursor: pointer; border-radius: var(--r-sm); padding: 0 4px; margin: 0 -4px; }
.fopt:hover { background: var(--surface-2); }
.fopt input { width: 15px; height: 15px; margin: 0; accent-color: var(--navy); flex: none; cursor: pointer; }
.fopt .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcount { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fopt.is-empty { color: var(--muted-2); }
.fopt input:checked ~ .fname { font-weight: 600; color: var(--ink); }
.fswatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.fpane-toggle { display: none; }

.active-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.active-filters .lead { font-size: 12px; color: var(--muted); margin-right: 2px; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 9px; border-radius: 999px;
  background: var(--navy-50); color: var(--navy); font-size: 12px; border: 1px solid var(--navy-100);
}
.fchip b { font-weight: 600; }
.fchip a { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--navy); }
.fchip a:hover { background: var(--navy); color: #fff; }
.active-filters .clear { font-size: 12px; margin-left: 4px; }

.results-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border-2); }
.results-count { font-size: 13px; color: var(--text-2); }
.results-count strong { color: var(--ink); font-weight: 600; }
.results-note { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--amber); }
.results-head .sort { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.results-head .sort select { width: auto; min-width: 150px; height: 28px; font-size: 12.5px; }
#results { transition: opacity 0.15s ease; }
#results.htmx-request { opacity: 0.55; pointer-events: none; }

/* Tableau de données */
.table-wrap { overflow-x: auto; }
.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.grid th {
  position: sticky; top: 0; z-index: 1; text-align: left; white-space: nowrap;
  padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: 11.5px; font-weight: 600; color: var(--text-2);
}
.grid td { padding: 9px 10px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr { cursor: pointer; }
.grid tbody tr:hover td { background: #F7F9FC; }
.grid tbody tr:hover .co-name { color: var(--orange); }
.grid .ta-r { text-align: right; }
.grid .co-name { font-weight: 600; color: var(--ink); display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid td.sector { min-width: 140px; max-width: 190px; }
.grid td.sector .sub { white-space: normal; }
.grid .co-sub, .grid .sub { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.grid .sig { display: flex; align-items: center; gap: 8px; }
.grid .sig .ico { color: var(--navy-600); }
.grid .sig-label { font-weight: 500; white-space: nowrap; }
.grid .more { font-size: 11px; font-weight: 600; color: var(--navy-600); background: var(--navy-50); padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.grid .chev { color: var(--muted-2); }
.scorecell { display: flex; align-items: center; gap: 8px; }
.scorecell b { width: 26px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.meter { position: relative; width: 40px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.meter > span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--muted-2); }
.meter.p-A > span { background: var(--data-a); }
.meter.p-B > span { background: var(--data-b); }
.src-mini { display: inline-flex; gap: 3px; }
.src-mini span { display: inline-grid; place-items: center; height: 18px; padding: 0 5px; border-radius: 3px; background: var(--surface-3); color: var(--text-2); font-size: 10.5px; font-weight: 600; }

.empty { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-600); margin-bottom: 6px; }
.empty h3 { font-size: 15px; }
.empty p { color: var(--muted); font-size: 13px; max-width: 460px; }
.empty .btn { margin-top: 8px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-top: 1px solid var(--border-2); }

/* Vue cartes */
.opp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; padding: 12px; }
.opp-card { --accent: var(--muted-2); position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-left: 3px solid var(--accent); }
.opp-card.p-A { --accent: var(--data-a); }
.opp-card.p-B { --accent: var(--data-b); }
.opp-card.p-x { --accent: var(--red); }
.opp-card:hover { box-shadow: var(--shadow-2); }
.opp-head { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.opp-title h3 { font-size: 14.5px; margin-top: 6px; overflow-wrap: anywhere; }
.opp-title h3 a { color: var(--ink); }
.opp-title h3 a:hover { color: var(--orange); }
.badges { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.meta > span { display: inline-flex; align-items: center; gap: 4px; }
.meta .ico { width: 13px; height: 13px; color: var(--muted-2); }
.score-ring { --p: 0; --ring: var(--accent, var(--navy)); position: relative; width: 48px; height: 48px; border-radius: 50%; flex: none; background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; }
.score-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.score-ring b { position: relative; font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.score-ring > span { position: relative; text-align: center; line-height: 1.1; }
.score-ring small { position: relative; display: block; font-size: 9px; color: var(--muted-2); }
.score-ring.lg { width: 84px; height: 84px; }
.score-ring.lg::before { inset: 7px; }
.score-ring.lg b { font-size: 26px; }
.opp-signal { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border-2); }
.sig-icon { width: 32px; height: 32px; border-radius: var(--r); display: grid; place-items: center; flex: none; background: var(--surface); border: 1px solid var(--border); color: var(--navy-600); }
.opp-signal strong { display: block; font-size: 13px; color: var(--ink); }
.opp-signal .small { display: block; }
.why-label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.why { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.need { display: flex; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: var(--r); background: var(--navy-50); color: var(--navy); font-size: 12.5px; line-height: 1.5; }
.need .ico { margin-top: 2px; }
.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.need .clamp { -webkit-line-clamp: 2; line-clamp: 2; }
.opp-card.expanded .clamp { -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
.more-toggle { margin-top: 4px; }
.opp-foot { margin-top: auto; display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border-2); }
.opp-foot .links { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.link-muted { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.link-muted:hover { color: var(--orange); }
.link-muted .ico { width: 13px; height: 13px; }

/* ===== Tableau de bord ===== */
.today { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; color: inherit; }
a.tile:hover { color: inherit; border-color: var(--navy-100); box-shadow: var(--shadow-2); }
.tile-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.tile-label .ico { color: var(--navy-600); }
.tile-value { font-size: 28px; font-weight: 600; color: var(--ink); line-height: 1.15; }
.tile-foot { font-size: 12px; color: var(--muted); }
.tile-foot strong { color: var(--text-2); font-weight: 600; }
.tile.hero { flex-direction: row; align-items: center; gap: 18px; background: var(--navy); border-color: var(--navy); color: #fff; }
.tile.hero .tile-label, .tile.hero .tile-label .ico { color: rgba(255, 255, 255, 0.85); }
.tile.hero .tile-value { font-size: 52px; color: #fff; line-height: 1; }
.tile.hero .tile-foot { color: rgba(255, 255, 255, 0.78); }
.tile.hero .tile-foot strong { color: #fff; }
.tile.hero .go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); background: var(--orange); color: #fff; font-weight: 500; font-size: 13px; white-space: nowrap; }
a.tile.hero:hover { box-shadow: var(--shadow-2); }
a.tile.hero:hover .go { background: var(--orange-700); }
.run-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }

.dash-filters { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; }
.dash-filters .lbl { font-size: 12px; font-weight: 600; color: var(--text-2); }
.dash-filters .scope-note { margin-left: auto; font-size: 12px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }

/* Graphiques (gabarit : barres fines, extrémités arrondies 4px, écart de 2px, grille en filet) */
.chart { margin: 0; display: flex; flex-direction: column; }
.chart-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 44px; padding: 10px 16px; border-bottom: 1px solid var(--border-2); }
.chart-head h3 { font-size: 13.5px; }
.chart-head .small { margin-left: 2px; }
.chart-head .head-aside { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.chart-body { padding: 14px 16px 12px; }
.legend { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw-A { background: var(--data-a); }
.sw-B { background: var(--data-b); }
.sw-C { background: var(--data-c); }
.table-toggle { font-size: 12px; }

.cols { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: 220px auto; column-gap: 8px; }
.cols-axis { position: relative; }
.cols-axis span { position: absolute; right: 0; transform: translateY(50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cols-plot { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-items: end; border-bottom: 1px solid var(--baseline); }
.gridline { position: absolute; left: 0; right: 0; height: 1px; background: var(--grid); pointer-events: none; }
.col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; }
.col:hover, .col:focus-visible { background: rgba(14, 76, 124, 0.05); }
.col-stack { width: min(24px, 72%); display: flex; flex-direction: column; gap: 2px; }
.col-stack > span { display: block; min-height: 2px; }
.col-stack > span:first-child { border-radius: 4px 4px 0 0; }
.seg-A { background: var(--data-a); }
.seg-B { background: var(--data-b); }
.seg-C { background: var(--data-c); }
.col-label { position: absolute; transform: translateY(-100%); margin-top: -4px; font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cols-x { grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding-top: 6px; }
.cols-x span { font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; }

.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hbars li { display: grid; grid-template-columns: minmax(120px, 46%) 1fr auto; align-items: center; gap: 10px; padding: 3px 4px; border-radius: var(--r-sm); outline: none; }
.hbars li:hover, .hbars li:focus-visible { background: var(--surface-2); }
.hb-label { font-size: 12.5px; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }
.hb-track { position: relative; height: 14px; border-left: 1px solid var(--baseline); }
.hb-bar { position: absolute; left: 0; top: 0; bottom: 0; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--data-1); }
.hb-value { font-size: 12px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.hb-share { font-weight: 400; color: var(--muted); margin-left: 4px; }

.stack-meter { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; margin: 6px 0 12px; }
.stack-meter > span { display: block; outline: none; }
.st-haute { background: var(--good); }
.st-moyenne { background: var(--warning); }
.st-faible { background: var(--critical); }
.conf-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.conf-rows li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.conf-rows .ico { width: 15px; height: 15px; }
.conf-rows .val { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.conf-rows .share { min-width: 40px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.i-good { color: var(--green); }
.i-warn { color: var(--amber); }
.i-crit { color: var(--red); }

.chart-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
.chart-table th, .chart-table td { padding: 5px 8px; border-bottom: 1px solid var(--border-2); text-align: left; }
.chart-table th { color: var(--muted); font-weight: 600; background: var(--surface-2); }
.chart-table td.n, .chart-table th.n { text-align: right; font-variant-numeric: tabular-nums; }
.chart-scroll { max-height: 260px; overflow: auto; }

.tip {
  position: fixed; z-index: 100; pointer-events: none; max-width: 280px;
  padding: 8px 10px; border-radius: var(--r); background: var(--ink); color: #fff; box-shadow: var(--shadow-2);
  font-size: 12px; line-height: 1.45; opacity: 0; transform: translateY(4px); transition: opacity 0.1s ease, transform 0.1s ease;
}
.tip.on { opacity: 1; transform: none; }
.tip .tip-title { color: rgba(255, 255, 255, 0.7); margin-bottom: 2px; }
.tip .tip-row { display: flex; align-items: center; gap: 8px; }
.tip .tip-row i { width: 12px; height: 2px; border-radius: 1px; display: inline-block; }
.tip .tip-row b { font-variant-numeric: tabular-nums; min-width: 34px; }

/* ===== Fiche entreprise ===== */
.hero { --accent: var(--muted-2); display: grid; grid-template-columns: auto 1fr auto auto; gap: 18px; align-items: center; padding: 16px 18px; margin-bottom: 12px; border-top: 3px solid var(--accent); }
.hero.p-A { --accent: var(--data-a); }
.hero.p-B { --accent: var(--data-b); }
.hero.p-x { --accent: var(--red); }
.hero h1 { font: 600 21px/1.25 var(--font-title); margin: 6px 0 2px; overflow-wrap: anywhere; }
.hero-icon { width: 52px; height: 52px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--navy-50); color: var(--navy); }
.hero-score { display: flex; align-items: center; gap: 12px; padding-left: 18px; border-left: 1px solid var(--border-2); }
.hero-score .lbl { font-size: 12px; color: var(--muted); }
.hero-score .lbl b { display: block; color: var(--ink); font-size: 13px; }
.hero-actions { display: flex; flex-direction: column; gap: 6px; }
.callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 12px; }
.callout { display: flex; gap: 12px; padding: 14px 16px; }
.callout h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 4px; }
.callout p { font-size: 13.5px; color: var(--text); line-height: 1.55; }
.callout-icon { width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; flex: none; background: var(--navy-50); color: var(--navy); }
.c-why .callout-icon { background: var(--orange-50); color: var(--orange-700); }
.c-excl .callout-icon { background: var(--red-bg); color: var(--red); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.comp-list { display: flex; flex-direction: column; }
.comp { display: grid; grid-template-columns: 120px 1fr 90px 44px; gap: 10px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--border-2); font-size: 12.5px; }
.comp-name { font-weight: 600; color: var(--ink); }
.comp-label { color: var(--text-2); }
.comp-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.comp-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--data-1); }
.comp-bar.neg > span { background: var(--critical); }
.comp-pts { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.comp-total { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.comp-total b { font-size: 18px; color: var(--ink); }
.note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 16px; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); font-size: 12px; color: var(--text-2); }
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 8px 16px; border-bottom: 1px solid var(--border-2); font-size: 12.5px; }
.kv dt { color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kv dt .ico { width: 14px; height: 14px; color: var(--muted-2); }
.kv dd { margin: 0; color: var(--text); }
.kv-chips { margin-top: 4px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 54px; padding: 12px 16px 0; }
.spark span { flex: 1; max-width: 18px; min-height: 3px; border-radius: 3px 3px 0 0; background: var(--data-c); }
.spark .p-A { background: var(--data-a); }
.spark .p-B { background: var(--data-b); }
.hist { list-style: none; margin: 0; padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.hist li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.hist li .num { margin-left: auto; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 12px 16px 14px 34px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 18px; bottom: 18px; width: 1px; background: var(--border); }
.timeline li { position: relative; padding: 4px 0 12px; }
.tl-dot { position: absolute; left: -17px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--data-b); box-shadow: 0 0 0 3px var(--surface); }
.timeline li.excl .tl-dot { background: var(--critical); }
.tl-date { font-size: 11.5px; color: var(--muted); }
.tl-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; color: var(--ink); font-size: 13px; }
.tl-excerpt { margin-top: 3px; font-size: 12px; color: var(--text-2); line-height: 1.5; }
.tl-sources { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }

/* ===== Exécutions, configuration ===== */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { text-align: left; padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 11.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.table th:first-child { border-top-left-radius: var(--r-lg); }
.table th:last-child { border-top-right-radius: var(--r-lg); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border-2); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #F7F9FC; }
.status { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status.s-success { background: var(--green-bg); color: var(--green); }
.status.s-failed { background: var(--red-bg); color: var(--red); }
.status.s-running { background: var(--amber-bg); color: var(--amber); }
.status.s-interrupted, .status.s-idle { background: var(--surface-3); color: var(--text-2); }
.run-summary { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.run-summary.muted { opacity: 0.75; }
.nowrap { white-space: nowrap; }
.run-metrics { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; font-size: 12.5px; }
.run-metrics dt { color: var(--muted); }
.run-metrics dd { margin: 0; color: var(--text-2); }
.run-metrics dd b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.run-nothing { display: flex; gap: 5px; align-items: flex-start; margin-top: 6px; font-size: 12px; color: var(--muted); }
.run-nothing .ico { flex: none; margin-top: 2px; }
.alert-line { display: flex; gap: 6px; align-items: flex-start; color: var(--red); font-size: 12px; margin-top: 6px; }
details.stats summary { cursor: pointer; font-size: 12px; color: var(--navy-600); margin-top: 6px; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
details.stats summary::-webkit-details-marker { display: none; }
details.stats[open] summary .ico { transform: rotate(180deg); }
pre.stats { white-space: pre-wrap; font-size: 11.5px; margin: 6px 0 0; max-height: 260px; overflow: auto; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r); padding: 8px; }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r); margin-bottom: 14px; font-size: 13px; border: 1px solid transparent; }
.flash-success { background: var(--green-bg); color: var(--green); border-color: #ABEFC6; }
.flash-warning { background: var(--amber-bg); color: var(--amber); border-color: #FEDF89; }
.flash-error { background: var(--red-bg); color: var(--red); border-color: #FECDCA; }
.cfg-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.cfg-section { margin-bottom: 12px; }
.cfg-form { display: flex; flex-direction: column; gap: 16px; }
.cfg-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.cfg-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text-2); min-width: 0; }
.cfg-hint { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.cfg-actions, .cfg-run-now { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cfg-switch { position: relative; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.cfg-switch > span:last-child { display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.cfg-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cfg-switch-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--border-strong); flex: none; transition: background 0.15s ease; }
.cfg-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform 0.15s ease; }
.cfg-switch input:checked + .cfg-switch-track { background: var(--navy); }
.cfg-switch input:checked + .cfg-switch-track::after { transform: translateX(18px); }
.cfg-switch input:focus-visible + .cfg-switch-track { box-shadow: 0 0 0 3px rgba(14, 76, 124, 0.25); }
.cfg-kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; margin: 0 0 16px; font-size: 13px; align-items: center; }
.cfg-kv dt { color: var(--muted); }
.cfg-kv dd { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cfg-warning { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--red-bg); color: var(--red); font-size: 12.5px; margin: 0 0 14px; }
.cfg-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cfg-rules > div { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: var(--r); background: var(--surface-2); }
.cfg-rules strong { font-size: 17px; color: var(--ink); font-weight: 600; }
.cfg-note { margin-top: 12px; }
.src-loading { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.src-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.src-head { display: flex; align-items: flex-start; gap: 10px; }
.src-icon { width: 36px; height: 36px; border-radius: var(--r); display: grid; place-items: center; background: var(--navy-50); color: var(--navy); flex: none; }
.src-title { flex: 1; min-width: 0; }
.src-title h3 { font-size: 13.5px; }
.src-detail { font-size: 12.5px; color: var(--text-2); }
.src-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin: 0; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); }
.src-stats dt { font-size: 11px; color: var(--muted); }
.src-stats dd { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.src-foot { margin-top: auto; }
.src-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.export-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ===== Adaptatif ===== */
@media (max-width: 1680px) {
  .col-src, .col-chev { display: none; }
  .grid th, .grid td { padding-left: 8px; padding-right: 8px; }
  .grid .co-name, .grid .co-sub, .grid .sub { max-width: 225px; }
  .grid td.sector { min-width: 130px; }
  .meter { width: 30px; }
}
@media (max-width: 1280px) {
  .span-8, .span-4, .span-6 { grid-column: span 12; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .list-layout { grid-template-columns: 1fr; }
  .fpane { position: fixed; z-index: 70; top: var(--suite-h); left: 0; bottom: 0; width: min(320px, 90vw); max-height: none; border-radius: 0; transform: translateX(-102%); transition: transform 0.2s ease; }
  body.filters-open .fpane { transform: none; box-shadow: var(--shadow-2); }
  body.filters-open .backdrop { display: block; position: fixed; inset: var(--suite-h) 0 0 0; z-index: 65; background: rgba(16, 24, 40, 0.35); }
  .fpane-toggle { display: inline-flex; }
  .cfg-grid, .grid2 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: auto 1fr; }
  .hero-score, .hero-actions { grid-column: 1 / -1; }
  .hero-score { border-left: 0; padding-left: 0; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .suite-btn { display: inline-flex; }
  .suite-product, .suite-sep, .hide-sm { display: none; }
  .nav { transform: translateX(-100%); box-shadow: var(--shadow-2); }
  body.nav-open .nav { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: var(--suite-h) 0 0 0; z-index: 45; background: rgba(16, 24, 40, 0.35); }
  .content { margin-left: 0; padding: calc(var(--suite-h) + 14px) 14px 40px; }
  .today { grid-template-columns: 1fr; }
  .tile.hero .tile-value { font-size: 44px; }
}
@media (max-width: 600px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .page-head .actions { margin-left: 0; }
  .suite-search { flex: 1; }
  .comp { grid-template-columns: 90px 1fr 40px; }
  .comp-bar { display: none; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { border-bottom: 0; padding-bottom: 0; }
  .cols { grid-template-rows: 180px auto; }
}
@media print {
  .suite, .nav, .fpane, .page-head .actions, .pivot { display: none !important; }
  .content { margin: 0; padding: 0; }
}

/* --- Opportunités sauvegardées ------------------------------------------------------------------------ */
.save-form { display: inline-flex; margin: 0; }
.save-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 28px; height: 28px; padding: 0;
  border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--muted-2); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.save-btn:hover { background: var(--navy-50); color: var(--navy-600); }
.save-btn.is-saved { color: var(--orange); }
.save-btn.is-saved .ico { fill: currentColor; }
.save-btn.is-saved:hover { background: var(--orange-50); color: var(--orange-700); }
.save-btn[disabled] { opacity: 0.6; cursor: progress; }
.save-btn.save-full { width: auto; height: 28px; padding: 0 10px; }
.save-btn.save-full.btn-outline { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.save-btn.save-full.btn-outline:hover { border-color: var(--navy-600); background: var(--surface-2); color: var(--navy); }
.save-btn.save-full.is-saved { background: var(--orange-50); border-color: var(--orange-100); color: var(--orange-700); }
th.col-save, td.col-save { width: 40px; padding-left: 4px; padding-right: 4px; text-align: center; }
.opp-foot .links .save-form { margin-right: 2px; }
.nav-count {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-3);
  font: 600 11.5px/18px var(--font); color: var(--text-2); text-align: center; font-variant-numeric: tabular-nums;
}
.nav-count:empty { display: none; }
.nav-item.is-active .nav-count { background: #fff; color: var(--navy); }

/* --- Utilisateur connecté (barre du haut) -------------------------------------------------------------- */
.suite-user { display: flex; align-items: center; gap: 4px; margin-left: 4px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, 0.18); }
.suite-user form { margin: 0; display: flex; }
.suite-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange); color: #fff; font: 600 12px/1 var(--font);
}
.suite-logout { border: 0; background: transparent; font-family: var(--font); cursor: pointer; }
.suite-logout:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* --- Connexion ------------------------------------------------------------------------------------------ */
.login-body { min-height: 100vh; background: var(--surface); }
.login { display: grid; grid-template-columns: minmax(380px, 42%) 1fr; min-height: 100vh; }
.login-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 40px 56px; background: var(--navy); color: #fff;
}
.login-brand::before, .login-brand::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.login-brand::before { width: 520px; height: 520px; right: -230px; bottom: -250px; border: 72px solid rgba(255, 255, 255, 0.045); }
.login-brand::after { width: 220px; height: 220px; right: 70px; top: -120px; border: 1px solid rgba(255, 255, 255, 0.12); }
.login-brand > * { position: relative; z-index: 1; }
.login-logo { height: 30px; width: auto; align-self: flex-start; }
.login-pitch { max-width: 440px; }
.login-kicker {
  display: inline-block; margin-bottom: 14px; padding-left: 12px; border-left: 3px solid var(--orange);
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8);
}
.login-pitch h1 { margin: 0 0 14px; font: 600 32px/1.2 var(--font-title); color: #fff; }
.login-pitch p { margin: 0 0 28px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.78); }
.login-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.login-points li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255, 255, 255, 0.9); }
.login-points .ico {
  box-sizing: content-box; padding: 7px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.08); color: #F6A285;
}
.login-foot { font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--bg); }
.login-card {
  width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; padding: 36px 36px 32px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
}
.login-card h2 { margin: 0 0 4px; font: 600 24px/1.25 var(--font-title); color: var(--ink); }
.login-sub { margin: 0; color: var(--muted); font-size: 13.5px; }
.login-card .flash { margin: 0; }
.login-logo-sm { display: none; height: 28px; width: auto; align-self: flex-start; }
.lf { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.lf-input { position: relative; display: flex; align-items: center; }
.lf-input > .ico { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.lf-input .field { height: 42px; padding: 0 42px 0 38px; font-size: 14px; }
.lf-eye {
  position: absolute; right: 5px; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer;
}
.lf-eye:hover { background: var(--surface-3); color: var(--ink); }
.lf-caps { display: flex; align-items: center; gap: 6px; margin: -10px 0 0; font-size: 12px; color: var(--amber); }
.lf-caps[hidden] { display: none; }
.login-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.login-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--navy); }
.login-submit { height: 42px; font-size: 14px; }
.login-submit[disabled] { opacity: 0.7; cursor: progress; }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-logo-sm { display: block; }
  .login-panel { padding: 32px 16px; align-items: flex-start; }
  .login-card { padding: 28px 22px; margin-top: 6vh; }
}
.hero-actions .save-form { display: flex; }
.hero-actions .save-btn.save-full { width: 100%; }
