@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap");

:root {
  /* ── Palette Slate & Blue ── */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --surface-muted: #e2e8f0;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text: #1e293b;
  --muted: #64748b;
  --heading: #0f172a;
  --navy: #0f172a;
  --navy-strong: #020617;
  --navy-soft: #1e293b;
  --violet: #2563eb;
  --violet-soft: rgba(37, 99, 235, 0.10);
  --accent: #0ea5e9;
  --accent-soft: rgba(14, 165, 233, 0.10);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.12);
  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, 0.12);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.12);
  --closed: #94a3b8;
  --closed-soft: rgba(148, 163, 184, 0.16);
  --danger: #ef4444;
  --shadow-soft: 0 2px 10px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.02);
  --shadow-medium: 0 12px 30px rgba(15, 23, 42, 0.06), 0 4px 10px rgba(15, 23, 42, 0.03);
  --radius-xl: 14px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --font-sans: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Roboto", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 22%);
  z-index: -1;
}

body.is-loading::after {
  content: "Actualisation des sources publiques...";
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(16, 23, 42, 0.94);
  color: #fff;
  font-size: 0.84rem;
  box-shadow: var(--shadow-medium);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

button:hover {
  transform: translateY(-1px);
}

input,
select {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
}

input::placeholder {
  color: #8ea0b2;
}

.page-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 18px 20px 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(141, 154, 176, 0.18);
  color: var(--text);
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(18px);
}

body[data-stage="landing"] .topbar {
  grid-template-columns: auto 1fr auto;
}

body[data-stage="select"] .topbar {
  grid-template-columns: auto 1fr auto;
}

body[data-stage="landing"] .search-panel,
body[data-stage="select"] .search-panel {
  display: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-logo {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(102, 80, 216, 0.14), rgba(102, 80, 216, 0.04));
  color: var(--violet);
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  border: 1px solid rgba(102, 80, 216, 0.14);
}

.brand-copy h1,
.metric-value,
.brief-card strong,
.section-head h2,
.summary-card strong {
  margin: 0;
  font-family: var(--font-display);
}

.brand-copy h1 {
  font-size: 1.32rem;
  color: var(--heading);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
}

.search-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.search-selection-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.search-selection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-selection-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-selection-copy strong {
  color: var(--heading);
  font-size: 0.84rem;
}

.search-selection-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.search-selection-entities,
.search-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.search-selection-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.search-selection-entities {
  min-height: 34px;
}

.search-selection-toggle {
  white-space: nowrap;
  flex: none;
}

.search-selection-bar.is-collapsed .search-selection-body {
  display: none;
}

.search-selection-chip,
.search-selection-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.8rem;
}

.search-selection-chip small {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.7rem;
}

.search-selection-empty {
  color: var(--muted);
}

.search-selection-chip button {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(102, 80, 216, 0.08);
  color: var(--violet);
}

.search-selection-primary {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #f07d4c);
  color: #fff;
  box-shadow: 0 10px 24px rgba(235, 95, 79, 0.2);
}

.search-selection-action {
  white-space: nowrap;
}

.field-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.field-shell span {
  flex: none;
  font-size: 0.82rem;
}

.field-shell-search {
  background: #fff;
  color: var(--text);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.field-shell-search input {
  font-size: 1rem;
  font-weight: 560;
}

.field-shell-accent {
  background: rgba(102, 80, 216, 0.08);
  color: var(--text);
  border-color: rgba(102, 80, 216, 0.14);
}

.field-shell-accent span {
  color: var(--muted);
}

.field-shell-light {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--text);
}

.field-shell-light span {
  color: var(--muted);
}

.search-icon {
  color: var(--muted);
  font-size: 1rem;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-chip,
.utility-link,
.ghost-button,
.status-chip,
.meta-pill,
.starter-chip,
.mini-action,
.doc-link,
.page-button,
.status-tab,
.source-toggle,
.suggestion-item,
.saved-cluster-item {
  border-radius: var(--radius-sm);
}

.tool-chip,
.dark-ghost {
  padding: 10px 12px;
  background: #fff;
  color: var(--heading);
  border: 1px solid var(--line);
  text-decoration: none;
}

.tool-chip-disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.tool-chip-disabled:hover {
  transform: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  background: rgba(22, 149, 111, 0.1);
  color: var(--ok);
  border: 1px solid rgba(22, 149, 111, 0.16);
  white-space: nowrap;
}

.utility-bar {
  position: sticky;
  top: 82px;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(141, 154, 176, 0.18);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.utility-link {
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}

.utility-link.active {
  color: var(--heading);
  background: rgba(102, 80, 216, 0.08);
  border-color: rgba(102, 80, 216, 0.16);
}

.starter-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.error-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: rgba(241, 154, 50, 0.14);
  border: 1px solid rgba(241, 154, 50, 0.32);
  color: #7a4b08;
  box-shadow: var(--shadow-soft);
}

.error-banner strong {
  color: #6a3f05;
}

.error-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.error-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(241, 154, 50, 0.3);
  color: #7a4a00;
  font-size: 0.84rem;
}

.starter-ribbon-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.starter-ribbon-copy strong {
  color: var(--heading);
}

.starter-actions,
.hero-focus,
.hero-themes,
.tag-row,
.record-meta-row,
.link-row,
.chip-wrap,
.year-grid,
.cluster-actions,
.saved-cluster-actions,
.status-tabs,
.pagination,
.summary-stats,
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.starter-chip {
  padding: 9px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--heading);
  transition: all 0.2s ease;
}

.starter-chip:hover {
  background: var(--violet);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 154px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card,
.panel-card,
.metric-card,
.brief-card,
.relation-card,
.report-card,
.summary-card,
.partner-item,
.source-item,
.empty-state {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.sidebar-card,
.panel-card {
  border-radius: var(--radius-lg);
}

.sidebar-card,
.panel-card,
.metric-card,
.brief-card,
.relation-card,
.report-card {
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  font-size: 1rem;
  color: var(--heading);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  color: var(--heading);
  white-space: nowrap;
}

.inline-note,
.cluster-summary,
.metric-foot,
.brief-card p,
.table-note,
.note-list,
.partner-copy p,
.source-item p,
.source-item small,
.saved-cluster-item small,
.suggestion-item small,
.summary-copy p,
.legend-copy,
.summary-card small {
  color: var(--muted);
}

.category-list,
.source-filter-list,
.suggestion-list,
.saved-cluster-list,
.source-matrix,
.signal-list,
.partner-list,
.note-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-button,
.source-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
}

.category-button-active,
.source-toggle-active {
  border-color: rgba(102, 80, 216, 0.24);
  background: var(--violet-soft);
  box-shadow: inset 0 0 0 1px rgba(102, 80, 216, 0.1);
}

.source-toggle:disabled {
  opacity: 0.64;
  cursor: not-allowed;
}

.category-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-copy strong {
  color: var(--heading);
}

.category-copy small,
.category-count {
  color: var(--muted);
}

.merge-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  color: var(--heading);
  font-weight: 700;
}

.merge-drawer summary::-webkit-details-marker {
  display: none;
}

.merge-drawer-body {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.merge-search {
  min-height: 46px;
}

.suggestion-item,
.saved-cluster-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
}

.saved-cluster-actions {
  flex: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--danger);
  border: 1px solid rgba(235, 95, 79, 0.18);
}

.chip button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(235, 95, 79, 0.18);
  color: var(--danger);
}

#saveClusterButton {
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--accent), #d84d3d);
  color: #fff;
  border-radius: var(--radius-sm);
}

.ghost-button {
  padding: 10px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
}

/* ─── Search suggestions dropdown ─── */

.search-input-wrap {
  position: relative;
  min-width: 0;
}

.search-input-wrap .global-search {
  width: 100%;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-align: left;
  border-radius: 0;
  font-size: 0.92rem;
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-item:hover {
  background: var(--surface-muted);
  transform: none;
}

.suggestion-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.suggestion-name {
  font-weight: 580;
  color: var(--heading);
}

.suggestion-count {
  font-size: 0.8rem;
  color: var(--muted);
  flex: none;
}

.suggestion-action {
  flex: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--violet);
}

.search-suggestion-empty {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.84rem;
  background: var(--surface);
}

/* ─── Landing state ─── */

.landing-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42vh;
  padding: 36px 20px 40px;
}

.landing-inner {
  text-align: center;
  max-width: 1100px;
}

.landing-hero-search {
  position: relative;
  max-width: 760px;
  margin: 0 auto 18px;
}

.landing-eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
}

.landing-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
  color: var(--heading);
  font-weight: 700;
  line-height: 1.14;
}

.landing-subtitle {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.landing-search {
  min-height: 58px;
  padding: 0 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.landing-search input {
  font-size: 1.02rem;
}

.landing-hero-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-medium);
  text-align: left;
}

.landing-hero-suggestion-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.landing-hero-suggestion-item strong {
  color: var(--heading);
  font-size: 0.92rem;
}

.landing-hero-suggestion-item span,
.landing-hero-suggestion-empty {
  color: var(--muted);
  font-size: 0.8rem;
}

.landing-hero-suggestion-item:hover {
  background: rgba(102, 80, 216, 0.06);
}

.landing-hero-suggestion-empty {
  padding: 12px 14px;
}

.landing-entity-flow {
  display: none;
}

.landing-state.landing-idle {
  min-height: 22vh;
  padding-top: 18px;
  padding-bottom: 20px;
}

body[data-stage="select"] .landing-state {
  align-items: flex-start;
  min-height: 0;
  padding-top: 22px;
}

.landing-search {
  min-height: 52px;
  padding: 0 14px;
}

.landing-search input {
  font-size: 1rem;
}

.landing-selected-entities,
.landing-entity-actions,
.landing-entity-results,
.landing-selection-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.landing-selected-entities {
  flex-direction: column;
  gap: 10px;
}

.landing-selection-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.landing-selection-head strong {
  color: var(--heading);
  font-size: 0.9rem;
}

.landing-selection-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.landing-selection-empty,
.landing-results-empty {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.84rem;
}

.landing-entity-actions {
  justify-content: flex-start;
}

.landing-results-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.landing-results-head strong {
  color: var(--heading);
  font-size: 0.92rem;
}

.landing-results-head span {
  color: var(--muted);
  font-size: 0.8rem;
}

.landing-entity-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.landing-entity-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(248, 249, 252, 0.96);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.landing-entity-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(37, 99, 235, 0.3);
}

.landing-entity-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.landing-entity-copy strong {
  color: var(--heading);
  font-size: 0.88rem;
}

.landing-entity-copy span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.landing-entity-select {
  flex: none;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--violet-soft);
  border: 1px solid rgba(102, 80, 216, 0.22);
  color: var(--violet);
  font-weight: 600;
  font-size: 0.82rem;
}

.landing-quick-label {
  margin: 2px 0 12px;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.landing-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.landing-state.landing-has-query .landing-quick-label,
.landing-state.landing-has-query .landing-quick-chips {
  display: none;
}

.landing-state.landing-has-query .landing-title {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  margin-bottom: 6px;
}

.landing-state.landing-has-query .landing-subtitle {
  margin-bottom: 12px;
  font-size: 0.84rem;
}

/* ─── Content column ─── */

.content-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.search-summary-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--heading);
}

.summary-copy p {
  margin: 10px 0 0;
  line-height: 1.65;
}

.hero-focus-pill,
.theme-pill,
.tag,
.mini-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.hero-focus-pill,
.theme-pill,
.tag,
.mini-badge {
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.hero-focus-pill strong,
.theme-pill strong {
  color: var(--heading);
}

.summary-stats {
  gap: 12px;
}

.summary-card {
  flex: 1 1 180px;
  padding: 12px 14px;
  border-radius: 12px;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
  color: var(--heading);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  border-radius: var(--radius-lg);
}

.accent-card {
  background: linear-gradient(135deg, rgba(235, 95, 79, 0.08), rgba(102, 80, 216, 0.08));
}

.metric-label,
.brief-label {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.metric-value {
  font-size: clamp(1.65rem, 2vw, 2.2rem);
  color: var(--heading);
}

.metric-value.compact {
  font-size: 1.28rem;
  line-height: 1.2;
}

.briefing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.brief-card {
  border-radius: var(--radius-lg);
}

.brief-card strong {
  color: var(--heading);
}

.chart-row-primary {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr 0.85fr;
  gap: 18px;
}

.chart-grid-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.wide-card {
  grid-column: span 2;
}

.chart-primary-wide {
  grid-column: span 1;
}

.chart-shell {
  position: relative;
  height: 270px;
  margin-top: 16px;
}

.chart-shell-wide {
  height: 320px;
}

.chart-shell-tall {
  height: 500px;
}

.sunburst-panel {
  margin-top: 16px;
}

.sunburst-wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 8px;
  flex-wrap: wrap;
}

.sunburst-side {
  flex: 1;
  min-width: 140px;
}

.sb-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: #475569;
}

.sb-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  flex-shrink: 0;
}

.sb-tip {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  min-height: 20px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 8px;
  display: none;
}

.sb-tip:not(:empty) {
  display: block;
}

.chart-legend {
  margin-top: 14px;
}

.legend-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.legend-button.is-active {
  background: var(--violet-soft);
  border-color: rgba(102, 80, 216, 0.24);
}

.legend-copy strong {
  display: block;
  color: var(--heading);
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}

.signal-list {
  margin-top: 16px;
}

.signal-card {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.signal-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--heading);
}

.signal-card p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.55;
}

.delta-up {
  color: var(--ok);
}

.delta-down {
  color: var(--danger);
}

.partner-panel {
  margin-top: 16px;
}

.partner-item {
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1fr) 72px 110px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
}

.partner-copy strong {
  display: block;
  color: var(--heading);
}

.partner-meter {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-muted);
}

.partner-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--accent));
}

.partner-meta {
  color: var(--muted);
  text-align: right;
}

.partner-action {
  justify-self: end;
}

.table-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.table-head {
  align-items: end;
}

.status-tabs {
  gap: 8px;
}

.status-tabs.is-hidden {
  display: none;
}

.status-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.status-tab small {
  display: inline-flex;
  min-width: 22px;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 0.72rem;
}

.status-tab.active {
  background: var(--violet-soft);
  border-color: rgba(102, 80, 216, 0.24);
  color: var(--heading);
}

.status-tab.active small {
  background: rgba(102, 80, 216, 0.14);
  color: var(--violet);
}

.table-card {
  padding-bottom: 12px;
}

.results-table {
  overflow-x: auto;
}

.results-table table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.results-table th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  white-space: nowrap;
}

.sort-header {
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
}

.sort-indicator {
  margin-left: 6px;
  color: var(--muted);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: rgba(102, 80, 216, 0.04);
}

.results-table td strong {
  display: block;
  margin-bottom: 4px;
  color: var(--heading);
}

.record-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.favorite-toggle {
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  color: #b6a547;
}

.favorite-toggle-active {
  background: rgba(255, 232, 149, 0.42);
  border-color: rgba(182, 165, 71, 0.28);
  color: #8b7a19;
}

.badge {
  background: var(--ok-soft);
  border: 1px solid rgba(22, 149, 111, 0.18);
  color: var(--ok);
}

.badge.source-alt {
  background: var(--blue-soft);
  border-color: rgba(72, 122, 166, 0.18);
  color: var(--blue);
}

.badge.pending {
  background: var(--warn-soft);
  border-color: rgba(241, 154, 50, 0.18);
  color: #b96e0a;
}

.badge.closed {
  background: var(--closed-soft);
  border-color: rgba(149, 164, 184, 0.22);
  color: #65778b;
}

.subtle-badge,
.muted-tag {
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.tag-button {
  cursor: pointer;
}

.tag-active {
  background: var(--violet-soft);
  color: var(--violet);
  border-color: rgba(102, 80, 216, 0.22);
}

.record-link {
  margin-top: 8px;
}

.record-link a {
  color: var(--violet);
  font-weight: 600;
  text-decoration: none;
}

.record-source-link {
  color: var(--violet);
  font-weight: 600;
  text-decoration: none;
}

.record-link a:hover {
  text-decoration: underline;
}

.record-source-link:hover {
  text-decoration: underline;
}

.doc-link,
.mini-action,
.page-button {
  padding: 8px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.page-button.active {
  background: var(--violet-soft);
  border-color: rgba(102, 80, 216, 0.24);
  color: var(--violet);
}

.page-button:disabled {
  opacity: 0.48;
  cursor: default;
  transform: none;
}

.inline-action {
  padding-inline: 10px;
}

.tag-link {
  background: rgba(102, 80, 216, 0.08);
  color: var(--violet);
  border-color: rgba(102, 80, 216, 0.2);
}

.pagination {
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
}

.pagination-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pagination-summary {
  color: var(--muted);
}

.pagination-gap {
  color: var(--muted);
  font-size: 0.9rem;
}

.connectors-panel {
  display: none;
}

.country-footprint {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.country-map-canvas {
  min-height: 280px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(102, 80, 216, 0.06), rgba(75, 122, 166, 0.06));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.country-map-canvas svg {
  width: 100%;
  height: auto;
}

.country-map-frame {
  fill: rgba(255, 255, 255, 0.72);
  stroke: rgba(145, 163, 183, 0.28);
}

.country-map-silhouette {
  fill: rgba(75, 122, 166, 0.08);
  stroke: rgba(75, 122, 166, 0.16);
  stroke-width: 1.4;
}

.country-bubble circle {
  fill: rgba(235, 95, 79, 0.82);
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 1.5;
}

.country-bubble text {
  fill: var(--heading);
  font-size: 4px;
  text-anchor: middle;
}

.country-map-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.country-map-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.country-map-list strong {
  color: var(--heading);
}

.skeleton-map {
  min-height: 280px;
}

body[data-view="connectors"] .connectors-panel {
  display: block;
}

.source-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.source-item {
  padding: 14px;
  border-radius: 12px;
}

.source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.note-list {
  margin-top: 16px;
  padding-left: 18px;
  line-height: 1.6;
}

.relations-view,
.report-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.relations-summary,
.relations-grid,
.report-sections {
  display: grid;
  gap: 14px;
}

.relations-summary,
.report-sections {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.relations-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.relation-card,
.report-card {
  border-radius: 12px;
}

.report-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(102, 80, 216, 0.08), rgba(235, 95, 79, 0.1));
  border: 1px solid var(--line);
}

.report-download {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #d84d3d);
  color: #fff;
}

.report-header h3 {
  margin: 8px 0 6px;
  color: var(--heading);
}

.report-list {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.6;
}

.brand-link {
  text-decoration: none;
}

.subpage-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.detail-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.back-link {
  width: fit-content;
  color: var(--violet);
  text-decoration: none;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.detail-card {
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.detail-card.wide-card {
  grid-column: 1 / -1;
}

.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-stat {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.detail-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
  color: var(--heading);
}

.detail-list,
.card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-list-item,
.mini-card {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.detail-list-item h3,
.mini-card h3 {
  margin: 0 0 6px;
  color: var(--heading);
}

.subpage-empty {
  padding: 28px;
  text-align: center;
}

.detail-table table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.subpage-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-state {
  padding: 24px;
  border-radius: 12px;
  background: var(--surface-soft);
  border-style: dashed;
}

.empty-state strong {
  color: var(--heading);
}

.skeleton-grid,
.skeleton-table,
.skeleton-chart,
.skeleton-line {
  position: relative;
  overflow: hidden;
}

.skeleton-grid::after,
.skeleton-table::after,
.skeleton-chart::after,
.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shimmer 1.4s infinite;
}

.skeleton-line,
.skeleton-chart,
.skeleton-table {
  display: block;
  background: linear-gradient(180deg, #eef2f7, #f6f8fb);
  border-radius: 10px;
}

.skeleton-line {
  height: 14px;
}

.skeleton-line.short {
  width: 42%;
}

.skeleton-line.medium {
  width: 68%;
}

.skeleton-line.long {
  width: 100%;
}

.skeleton-chart {
  height: 270px;
}

.skeleton-table {
  height: 320px;
}

.chart-shell[data-loading="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef2f7, #f6f8fb);
}

.chart-shell[data-loading="true"]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shimmer 1.4s infinite;
  z-index: 1;
}

.chart-shell[data-loading="true"] canvas {
  opacity: 0;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 1220px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .search-selection-bar {
    gap: 8px;
  }

  .search-selection-body {
    grid-template-columns: 1fr;
  }

  .search-panel,
  .metric-grid,
  .briefing-grid,
  .chart-row-primary,
  .chart-grid-secondary,
  .country-footprint,
  .detail-grid,
  .detail-stat-grid,
  .relations-summary,
  .relations-grid,
  .report-sections,
  .source-matrix {
    grid-template-columns: 1fr;
  }

  .landing-entity-results {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-card {
    grid-column: span 1;
  }

  .partner-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 10px;
  }

  .topbar,
  .utility-bar,
  .starter-ribbon,
  .panel-card,
  .sidebar-card,
  .metric-card,
  .brief-card {
    padding-left: 14px;
    padding-right: 14px;
  }

  .utility-bar {
    top: 0;
    overflow-x: auto;
  }

  .search-panel,
  .sidebar,
  .metric-grid,
  .briefing-grid,
  .chart-row-primary,
  .chart-grid-secondary,
  .country-footprint,
  .detail-grid,
  .detail-stat-grid,
  .relations-summary,
  .relations-grid,
  .report-sections,
  .source-matrix {
    grid-template-columns: 1fr;
  }

  .landing-entity-flow {
    padding: 16px;
  }

  .landing-search {
    min-height: 50px;
  }

  .search-selection-bar,
  .topbar-tools,
  .starter-ribbon,
  .summary-stats,
  .status-tabs,
  .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .report-header {
    flex-direction: column;
  }

  .landing-entity-card {
    flex-direction: column;
    align-items: stretch;
  }

  .results-table th,
  .results-table td {
    padding: 12px 8px;
  }
}

/* ================================================================
   REFONTE v4 — Analyst-grade density
   Objectif : interface enterprise, dense, orientée données
   ================================================================ */

/* ── Variables de densité ── */
:root {
  --radius-xl: 10px;
  --radius-lg: 8px;
  --radius-md: 7px;
  --radius-sm: 6px;
  --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-medium: 0 6px 20px rgba(15, 23, 42, 0.09);
}

/* ── Page shell ── */
.page-shell {
  padding: 12px 16px 32px;
}

/* ── Topbar compact ── */
.topbar {
  padding: 11px 16px;
  gap: 14px;
  grid-template-columns: 210px minmax(0, 1fr) auto;
}

.brand-lockup {
  gap: 9px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  font-size: 0.82rem;
}

.brand-copy h1 {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 0.58rem;
  margin: 0;
}

.field-shell {
  min-height: 34px;
  padding: 0 11px;
  gap: 8px;
}

.field-shell-search input {
  font-size: 0.88rem;
}

.search-icon {
  font-size: 0.9rem;
}

.tool-chip,
.dark-ghost {
  padding: 8px 11px;
  font-size: 0.8rem;
}

.status-chip {
  padding: 7px 10px;
  font-size: 0.76rem;
}

.search-selection-bar {
  padding: 9px 10px;
  gap: 10px;
}

.search-selection-head {
  gap: 10px;
}

.search-selection-copy strong {
  font-size: 0.77rem;
}

.search-selection-copy p,
.search-selection-chip,
.search-selection-empty,
.search-selection-action,
.suggestion-action {
  font-size: 0.74rem;
}

/* ── Utility bar compact ── */
.utility-bar {
  top: 78px;
  padding: 8px 12px;
  gap: 8px;
}

.utility-link {
  padding: 7px 11px;
  font-size: 0.8rem;
  border-radius: 5px;
}

/* ── Workspace layout ── */
.workspace {
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.content-column {
  gap: 10px;
}

/* ── Sidebar finder-style ── */
.sidebar {
  top: 102px;
  gap: 8px;
}

.sidebar-card {
  padding: 10px 12px;
}

.section-head {
  gap: 6px;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.meta-pill {
  padding: 3px 7px;
  font-size: 0.7rem;
}

.category-button,
.source-toggle {
  padding: 6px 10px;
  font-size: 0.8rem;
  gap: 8px;
  border-radius: 5px;
}

.category-copy strong {
  font-size: 0.82rem;
}

.category-copy small,
.category-count {
  font-size: 0.72rem;
}

.inline-note {
  font-size: 0.76rem;
}

.merge-drawer summary {
  font-size: 0.84rem;
}

/* ── Panel cards ── */
.panel-card {
  padding: 12px 14px;
}

/* ── Hero — barre de contexte horizontale ── */
.search-summary-card {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 9px 14px;
}

.summary-copy {
  flex: 1;
  min-width: 0;
}

.summary-copy h2 {
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--heading);
}

#heroSummary {
  display: none;
}

#heroThemes {
  display: none;
}

.hero-focus {
  gap: 4px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.hero-focus-pill {
  padding: 2px 7px;
  font-size: 0.7rem;
  border-radius: 999px;
}

/* Summary stats — bloc horizontal serré */
.summary-stats {
  flex-wrap: nowrap !important;
  gap: 0 !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.summary-card {
  padding: 7px 13px !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-right: 1px solid var(--line) !important;
  flex: none;
  flex-basis: auto;
}

.summary-card:last-child {
  border-right: none !important;
}

.summary-card strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
  color: var(--heading);
}

.summary-card small {
  font-size: 0.68rem;
}

/* ── Metric strip — une seule ligne horizontale ── */
.metric-grid {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.metric-card {
  flex: 1;
  padding: 9px 13px !important;
  border-radius: 0 !important;
  border: none !important;
  border-right: 1px solid var(--line) !important;
  box-shadow: none !important;
  background: transparent !important;
}

.metric-card:last-child {
  border-right: none !important;
}

.accent-card {
  background: transparent !important;
}

.metric-label {
  margin: 0 0 2px;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

.metric-value {
  font-size: 1.12rem;
  line-height: 1.2;
}

.metric-value.compact {
  font-size: 0.9rem;
  line-height: 1.25;
}

.metric-foot {
  font-size: 0.66rem;
  margin-top: 2px;
  color: var(--muted);
}

/* ── Briefing grid masqué ── */
.briefing-grid {
  display: none !important;
}

/* ── Charts compacts ── */
.chart-row-primary {
  gap: 10px;
}

.chart-shell {
  height: 120px;
  margin-top: 8px;
}

.chart-shell-wide {
  height: 136px;
}

.chart-legend {
  margin-top: 6px;
  gap: 5px;
}

.legend-button {
  padding: 5px 8px;
  font-size: 0.76rem;
  gap: 7px;
}

.legend-swatch {
  width: 9px;
  height: 9px;
}

.legend-copy strong {
  font-size: 0.78rem;
}

.legend-copy small {
  font-size: 0.7rem;
}

/* ── Skeleton update ── */
.skeleton-chart {
  height: 120px;
}

/* ── Secondary analytics — grid 3 colonnes ── */
.chart-grid-secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.chart-grid-secondary .wide-card {
  grid-column: 1 / -1;
}

/* Europe footprint dans colonne étroite */
.chart-grid-secondary .country-footprint {
  grid-template-columns: 1fr;
  gap: 8px;
}

.country-map-canvas {
  min-height: 140px;
}

/* ── Table — élément principal, dense ── */
.table-section {
  gap: 8px;
}

.results-table th,
.results-table td {
  padding: 7px 10px;
  font-size: 0.82rem;
  vertical-align: middle;
}

.results-table th {
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 0.7rem;
}

.results-table td strong {
  margin-bottom: 1px;
  font-size: 0.84rem;
}

.clickable-row:hover {
  background: rgba(102, 80, 216, 0.03);
}

.record-meta-row {
  gap: 5px;
  margin-top: 2px;
}

.table-note {
  font-size: 0.74rem;
  line-height: 1.4;
  margin-top: 2px;
  display: block;
}

.tag,
.mini-badge,
.badge {
  padding: 2px 7px;
  font-size: 0.71rem;
  gap: 4px;
}

.mini-action {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.status-tab {
  padding: 8px 11px;
  font-size: 0.8rem;
}

.favorite-toggle {
  min-width: 26px;
  height: 26px;
  border-radius: 5px;
  font-size: 0.74rem;
}

.table-head {
  align-items: center;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Signals compacts ── */
.signal-list {
  margin-top: 8px;
  gap: 7px;
}

.signal-card {
  padding: 9px 11px;
}

.signal-card strong {
  font-size: 0.82rem;
  margin-bottom: 3px;
}

.signal-card p {
  font-size: 0.78rem;
  margin: 0 0 4px;
  line-height: 1.45;
}

/* ── Partners compacts ── */
.partner-panel {
  margin-top: 8px;
}

.partner-item {
  padding: 9px 12px;
  gap: 10px;
}

.partner-copy strong {
  font-size: 0.84rem;
}

.partner-copy p {
  font-size: 0.76rem;
}

/* ── Vue relations et rapport ── */
.brief-label {
  font-size: 0.66rem;
  margin-bottom: 3px;
}

.brief-card strong {
  font-size: 0.92rem;
}

.brief-card p {
  font-size: 0.8rem;
  margin: 4px 0 0;
}

/* ── Landing state — style plus net ── */
.landing-state {
  min-height: 36vh;
  padding: 28px 20px 44px;
}

.landing-title {
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
  margin-bottom: 8px;
}

.landing-subtitle {
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* ── Responsive override corrections ── */
@media (max-width: 1220px) {
  .chart-grid-secondary {
    grid-template-columns: 1fr;
  }

  .chart-grid-secondary .wide-card {
    grid-column: 1 / -1;
  }

  .landing-entity-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .metric-grid {
    flex-direction: column;
  }

  .metric-card {
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .metric-card:last-child {
    border-bottom: none !important;
  }

  .search-summary-card {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-stats {
    flex-wrap: wrap !important;
  }

  .landing-entity-results {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════
   ANALYTICS VIEWS v5 — Acteurs / Géographie / Tabs
   ═══════════════════════════════════════════════════ */

/* ── Search mode — hero becomes a scope header ── */
body.search-mode .hero-focus {
  margin-bottom: 4px;
}

body.search-mode #heroTitle {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
}

/* ── Actor grid view ── */
.actor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  padding: 12px;
}

.actor-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.actor-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow-medium);
}

.actor-name {
  font-size: 0.88rem;
  color: var(--heading);
  line-height: 1.35;
}

.actor-count {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.actor-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.actor-link-btn {
  background: var(--violet-soft);
  color: var(--violet);
  font-weight: 600;
}

.actor-link-btn:hover {
  background: var(--violet);
  color: #fff;
}

.ghost-action {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 3px 9px;
  font-size: 0.76rem;
}

.ghost-action:hover {
  border-color: var(--violet);
  color: var(--violet);
  transform: none;
}

/* ── Geography dedicated view ── */
.geography-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 12px;
  align-items: start;
}

.geo-map-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.geo-map-canvas {
  width: 100%;
  aspect-ratio: 1 / 0.9;
}

.geo-map-canvas svg {
  width: 100%;
  height: 100%;
}

.geo-table-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.geo-table-panel th {
  text-align: left;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
}

.geo-table-panel td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--surface-muted);
}

.geo-table-panel tr:last-child td {
  border-bottom: none;
}

@media (max-width: 900px) {
  .geography-view {
    grid-template-columns: 1fr;
  }
}

/* ── Page tabs (org + project fiches) ── */
.page-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 16px;
  padding: 0;
  list-style: none;
}

.page-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color 120ms ease, background-color 120ms ease;
}

.page-tab:hover {
  color: var(--text);
  background: var(--surface-muted);
  transform: none;
}

.page-tab.active {
  color: var(--violet);
  border-bottom-color: var(--violet);
  font-weight: 600;
}

/* ── Org page overview grid ── */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.overview-map-card {
  grid-row: span 1;
}

.overview-partners-card {
  grid-column: 1 / -1;
}

@media (min-width: 1100px) {
  .overview-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .overview-partners-card {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .overview-partners-card {
    grid-column: 1 / -1;
  }
}

/* ── Partner cards grid (partners tab) ── */
.partner-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  padding: 4px 0;
}

.partner-card-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 150ms ease;
}

.partner-card-item:hover {
  border-color: var(--violet);
}

.partner-card-item strong {
  font-size: 0.87rem;
  color: var(--heading);
  line-height: 1.3;
}

.partner-card-item p {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

/* ── Project detail grid (orgs + map side by side) ── */
.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 760px) {
  .project-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Keyword chips (project fiche) ── */
.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.keyword-chip {
  background: var(--violet-soft);
  color: var(--violet);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.73rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════
   VIEW PANELS — vraies vues exclusives v6
   ═══════════════════════════════════════════════ */

/* Panels masques par defaut */
.view-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}

/* Panel actif */
.view-panel.is-active {
  display: flex;
}

/* ── Projets panel : deux charts cote a cote ── */
.chart-row-programs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Géographie panel : carte grande + source chart ── */
.view-panel[data-view-panel="geography"].is-active {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
  align-items: start;
}

/* Map pleine largeur dans le panel géographie */
.country-footprint-full {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.country-footprint-full .country-map-canvas {
  min-height: 260px;
}

/* ── Tendances panel : timeline + signals stacked ── */
.view-panel[data-view-panel="signals"].is-active .chart-shell-wide {
  height: 200px;
}

/* ── Relations panel : partner panel full width ── */
.view-panel[data-view-panel="relations"].is-active .partner-panel {
  max-height: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .chart-row-programs {
    grid-template-columns: 1fr;
  }

  .view-panel[data-view-panel="geography"].is-active {
    grid-template-columns: 1fr;
  }

  .country-footprint-full {
    grid-template-columns: 1fr;
  }
}

/* ── Nettoyage : anciens selecteurs chart-grid devenus obsoletes ── */
.chart-grid-secondary {
  display: none;
}

.chart-row-primary {
  display: none;
}

/* ── Leaflet maps ── */
.leaflet-subpage-map {
  height: 300px;
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
}

/* Geography panel: full-width Leaflet map */
#countryFootprint {
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   LANDING v8 — Search-First  (Slate & Blue)
   ══════════════════════════════════════════════════════════════ */

/* --- Full-height landing stage --- */
.landing-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 68px);
  padding: 40px 20px 60px;
}

.landing-inner {
  width: 100%;
  max-width: 640px;
  text-align: center;
}

/* --- Brand block --- */
.landing-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
}

.landing-brand-copy {
  text-align: left;
}

.landing-brand-copy .landing-eyebrow {
  margin: 0 0 4px;
}

.landing-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.1;
}

.landing-title-accent {
  color: var(--violet);
}

.landing-subtitle {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* --- Mega search bar --- */
.landing-search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.landing-search-field {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 0 22px;
  height: 64px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-search-field:focus-within {
  border-color: var(--violet);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.12), 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.landing-search-icon {
  font-size: 1.4rem;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
}

.landing-search-field input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.04rem;
  color: var(--text);
  outline: none;
  font-family: inherit;
}

.landing-search-field input::placeholder {
  color: var(--muted);
}

/* --- Suggestions dropdown --- */
.landing-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: 30;
  overflow: hidden;
  max-height: 440px;
  overflow-y: auto;
  text-align: left;
}

.landing-suggestion-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.1s;
}

.landing-suggestion-item:last-child {
  border-bottom: none;
}

.landing-suggestion-item:hover {
  background: #eef3fd;
  transform: none;
}

.landing-suggestion-item.is-selected {
  background: var(--violet-soft);
}

.landing-suggestion-item.is-active,
.search-suggestion-item.is-active {
  background: #eef3fd;
}

.landing-suggestion-item:focus-visible,
.search-suggestion-item:focus-visible {
  outline: none;
  background: #eef3fd;
}

.suggestion-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: transparent;
  background: white;
  transition: all 0.15s;
}

.is-selected .suggestion-check {
  background: var(--violet);
  border-color: var(--violet);
  color: white;
}

.suggestion-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.suggestion-info strong {
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-info span {
  color: var(--muted);
  font-size: 0.78rem;
}

.landing-suggestion-empty {
  padding: 16px 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* --- Selection basket --- */
.landing-basket {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.landing-basket-label {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.landing-basket-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 1;
}

.landing-basket-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--violet-soft);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--violet);
}

.landing-basket-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--violet);
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.5;
  font-family: inherit;
}

.landing-basket-chip button:hover {
  opacity: 1;
}

.landing-analyse-btn {
  padding: 10px 22px;
  background: var(--violet);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.landing-analyse-btn:hover {
  opacity: 0.88;
}

/* --- Quick chips --- */
.landing-quick-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.landing-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Hide old landing styles that conflict */
.landing-hero-search,
.landing-hero-suggestions { display: none; }

body[data-stage="landing"] .topbar {
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}

body[data-stage="select"] .topbar {
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}

body[data-stage="select"] .landing-quick-label,
body[data-stage="select"] .landing-quick-chips {
  display: none;
}

/* --- Dedicated search / selection pages --- */

.brand-link {
  color: inherit;
  text-decoration: none;
}

body[data-page="search"],
body[data-page="selection"] {
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

body[data-page="search"] .page-shell,
body[data-page="selection"] .page-shell {
  max-width: 1280px;
}

body[data-page="search"] .topbar,
body[data-page="selection"] .topbar {
  position: static;
  grid-template-columns: auto 1fr auto;
  padding: 4px 0 20px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-page="search"] .topbar-tools,
body[data-page="selection"] .topbar-tools {
  justify-self: end;
}

.entry-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 12px 0 32px;
}

.search-shell {
  min-height: calc(100vh - 180px);
  align-content: center;
}

.entry-hero {
  width: min(940px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.landing-full-logo {
  width: min(420px, 80vw);
  height: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.entry-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  color: var(--heading);
}

.entry-subtitle {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.store-status-banner {
  width: min(760px, 100%);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.45;
  box-shadow: var(--shadow-soft);
}

.store-status-content {
  display: grid;
  gap: 8px;
}

.store-status-title {
  font-size: 0.97rem;
  font-weight: 700;
}

.store-status-body {
  display: block;
}

.store-status-progress {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.store-status-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #0ea5e9);
  transition: width 360ms ease;
}

.store-status-progress-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0.9;
}

.store-status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.8rem;
  opacity: 0.88;
}

.store-status-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.store-status-banner.is-success {
  border-color: rgba(16, 185, 129, 0.25);
  background: var(--ok-soft);
  color: #065f46;
}

.store-status-banner.is-warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--warn-soft);
  color: #92400e;
}

.store-status-banner.is-warning .store-status-progress {
  background: rgba(255, 255, 255, 0.58);
}

.store-status-banner.is-danger {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
}

.entry-controls {
  width: 100%;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.entry-controls-selection {
  grid-template-columns: 230px minmax(0, 1fr) auto;
}

.entry-controls .landing-search-wrap {
  margin-bottom: 0;
}

.search-shell .landing-search-field {
  height: 68px;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.selection-search-wrap .landing-search-field {
  height: 58px;
  border-radius: 14px;
  box-shadow: none;
}

.landing-quick-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.selection-shell {
  width: 100%;
  gap: 18px;
}

.selection-header,
.selection-search-bar,
.selection-layout {
  width: min(1180px, 100%);
}

.selection-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.entry-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entry-heading-centered {
  flex: 1;
  text-align: center;
  align-items: center;
}

.selection-search-bar {
  padding: 16px;
}

.selection-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.selection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.selection-results-card,
.selection-basket-card {
  min-height: 420px;
}

.selection-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selection-basket-list {
  min-height: 120px;
  align-content: flex-start;
}

.selection-basket-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

body[data-page="search"] .tool-chip,
body[data-page="selection"] .tool-chip {
  background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 1040px) {
  .entry-controls,
  .entry-controls-selection {
    grid-template-columns: 1fr;
  }

  .selection-layout {
    grid-template-columns: 1fr;
  }

  .selection-results-card,
  .selection-basket-card {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  body[data-page="search"] .topbar,
  body[data-page="selection"] .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-bottom: 12px;
  }

  body[data-page="search"] .topbar-tools,
  body[data-page="selection"] .topbar-tools {
    justify-self: start;
    flex-wrap: wrap;
  }

  .search-shell {
    min-height: 0;
    align-content: start;
  }

  .entry-title {
    font-size: 2rem;
  }

  .search-shell .landing-search-field,
  .selection-search-wrap .landing-search-field {
    height: 58px;
    padding: 0 16px;
  }
}

/* ── Cold-start banner ── */
.cold-start-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: #fef3c7;
  border-bottom: 1px solid #fcd34d;
  font-size: 0.85rem;
  color: #92400e;
}
.cold-start-banner[hidden] { display: none; }
.cold-start-icon { font-size: 1rem; flex-shrink: 0; }
.cold-start-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #92400e;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.cold-start-dismiss:hover { background: #fcd34d; }

/* ── Export CSV button ── */
.export-csv-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.export-csv-btn:hover {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

/* --- Kaila Layouts --- */
.kaila-top-charts {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* La timeline prend un peu plus de largeur */
  gap: 18px;
  margin-bottom: 18px;
}

.kaila-relations-layout {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Moitié liste, moitié carte */
  gap: 18px;
}

/* Scrollbar discrète pour la liste des collaborateurs */
.collaborator-list::-webkit-scrollbar {
  width: 6px;
}
.collaborator-list::-webkit-scrollbar-thumb {
  background-color: var(--line-strong);
  border-radius: 10px;
}

/* ══════════════════════════════════════════════════════════════
   MODE SELECTOR (Segmented Control Premium)
   ══════════════════════════════════════════════════════════════ */

.mode-selector-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 28px;
}

.search-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(226, 232, 240, 0.6); /* Couleur surface-soft avec transparence */
  border: 1px solid rgba(203, 213, 225, 0.5);
  border-radius: 999px;
  padding: 5px;
  box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.03);
  backdrop-filter: blur(10px);
}

.search-mode-btn {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

/* On cache les moches boutons radio par défaut */
.search-mode-btn input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mode-icon {
  font-size: 1.1rem;
  filter: grayscale(100%) opacity(0.6);
  transition: all 0.25s ease;
}

/* Effet au survol (quand non sélectionné) */
.search-mode-btn:hover:not(:has(input:checked)) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.4);
}

/* ── ETAT ACTIF (Sélectionné) ── */
.search-mode-btn:has(input:checked) {
  background: #ffffff;
  color: var(--violet);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
}

.search-mode-btn:has(input:checked) .mode-icon {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.1);
}

/* Ajustement de la grille pour englober tout ça proprement */
@media (max-width: 1040px) {
  .entry-controls {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
