/* ============================================
   VANGUARD — Design System
   ============================================ */

:root {
  /* Palette : surfaces (off-black charcoal — pas de pur noir) */
  --bg-base: #0c0d10;
  --bg-surface: #14151a;
  --bg-elevated: #1b1d23;
  --bg-overlay: #23252d;
  --bg-input: #17181d;

  /* Palette : bordures */
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Palette : texte */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-muted: #52525b;

  /* Palette : accents */
  --accent: #c4f542;
  --accent-hover: #d4ff58;
  --accent-soft: rgba(196, 245, 66, 0.12);
  --accent-glow: rgba(196, 245, 66, 0.18);
  --accent-2: #7c5cff;
  --accent-2-soft: rgba(124, 92, 255, 0.12);

  /* Palette : sémantiques */
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);

  /* Palette : plateformes */
  --instagram: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
  --tiktok: #000;
  --tiktok-cyan: #25f4ee;
  --tiktok-red: #fe2c55;
  --snapchat: #fffc00;

  /* Espacement */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Rayons */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;

  /* Typographie */
  --f-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Élévations */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 280ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-w: 320px;
  --topbar-h: 64px;
  --filter-bar-h: 52px;
}

/* ============================================
   RESET
   ============================================ */

*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  font-family: var(--f-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px circle at 15% -10%, rgba(124, 92, 255, 0.06), transparent 55%),
    radial-gradient(700px circle at 85% 110%, rgba(196, 245, 66, 0.04), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; background: none; border: none; outline: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-overlay); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ============================================
   APP LAYOUT
   ============================================ */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  position: relative;
  z-index: 60;  /* must be above sidebar-backdrop (49) so children .sidebar (z:70) appears above */
}

.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
  min-width: 0;
}

/* ============================================
   BRAND
   ============================================ */

.brand {
  height: var(--topbar-h);
  padding: 0 var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.brand-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.brand-tagline {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
  letter-spacing: -0.005em;
}

/* ============================================
   FILTERS — sidebar form
   ============================================ */

.filters {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-3) 0 var(--sp-8);
}

.filter-group {
  border-bottom: 1px solid var(--border-subtle);
}
.filter-group:last-of-type { border-bottom: none; }

.filter-group__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  transition: color var(--t-fast);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(196, 245, 66, 0.15);
}
.filter-group__head:hover { color: var(--accent-hover, var(--accent)); filter: brightness(1.1); }
/* Contenu intérieur des dépliables : blanc (labels, helper texts, etc.) */
.filter-group__body,
.filter-group__body .field-label,
.filter-group__body .field-help {
  color: var(--text-primary);
}

.filter-group__chev {
  width: 14px;
  height: 14px;
  transition: transform var(--t-base);
  color: var(--text-muted);
}
.filter-group.collapsed .filter-group__chev { transform: rotate(-90deg); }

.filter-group__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  background: var(--accent);
  color: #000;
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
  margin-left: auto;
  margin-right: var(--sp-2);
}
.filter-group__count:empty { display: none; }

.filter-group__body {
  padding: 0 var(--sp-5) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.filter-group.collapsed .filter-group__body { display: none; }

.field { display: flex; flex-direction: column; gap: var(--sp-2); }

.field-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }

/* ============================================
   FORM — inputs & controls
   ============================================ */

.input,
.select,
.textarea {
  width: 100%;
  height: 36px;
  padding: 0 var(--sp-3);
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.textarea { height: auto; padding: var(--sp-2) var(--sp-3); resize: vertical; min-height: 80px; line-height: 1.5; }

.input::placeholder, .textarea::placeholder { color: var(--text-muted); }

.input:hover, .select:hover, .textarea:hover { border-color: var(--border-default); }

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-surface);
}

.select {
  appearance: none;
  padding-right: 32px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a1a1aa' d='M5 6 0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.input[type='number']::-webkit-outer-spin-button,
.input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Chips (pour multi-select) */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); }

.chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 var(--sp-3);
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: all var(--t-fast);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(196, 245, 66, 0.3);
  user-select: none;
  -webkit-user-select: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: rgba(196, 245, 66, 0.10); }

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 600;
}

/* Presets followers */
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-1); margin-top: var(--sp-1); }
.preset {
  height: 28px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
  transition: all var(--t-fast);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(196, 245, 66, 0.3);
}
.preset:hover { border-color: var(--accent); color: var(--accent); background: rgba(196, 245, 66, 0.10); }
.preset.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* Checkbox */
.checkbox {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  font-size: 13px;
  color: var(--text-primary);
  user-select: none;
  transition: color var(--t-fast);
}
.checkbox:hover { color: var(--accent); }

.checkbox input { position: absolute; opacity: 0; pointer-events: none; }

.checkbox-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  transition: all var(--t-fast);
  flex-shrink: 0;
  background: var(--bg-input);
}

.checkbox-box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #000;
  border-bottom: 2px solid #000;
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform var(--t-fast);
}

.checkbox input:checked ~ .checkbox-box {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox input:checked ~ .checkbox-box::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.checkbox input:focus-visible ~ .checkbox-box { box-shadow: 0 0 0 3px var(--accent-glow); }

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 36px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(196, 245, 66, 0.25);
  user-select: none;
  -webkit-user-select: none;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { box-shadow: 0 0 0 3px var(--accent-glow); }

.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 6px 20px var(--accent-glow); }

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-soft);
  color: var(--text-primary);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--border-default); background: var(--bg-overlay); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-soft);
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) { color: var(--text-primary); border-color: var(--border-default); background: var(--bg-elevated); }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--text-secondary);
}
.btn-icon:hover { color: var(--text-primary); border-color: var(--border-default); background: var(--bg-elevated); }

.btn-sm { height: 30px; padding: 0 var(--sp-3); font-size: 12px; }
.btn-icon-sm { width: 30px; height: 30px; }

.btn-block { width: 100%; }

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.btn-icon svg { width: 16px; height: 16px; }

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   SIDEBAR FOOTER
   ============================================ */

.sidebar-footer {
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--bg-surface);
}

.sidebar-actions { display: flex; gap: var(--sp-2); }
.sidebar-actions .btn-primary { flex: 1; }

.api-status {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 11.5px;
  color: var(--text-tertiary);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
}

.api-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.api-status.live { color: var(--accent); }
.api-status.live::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ============================================
   STATUS BAND (operator strip)
   ============================================ */

/* Le break est un wrap-trigger uniquement actif en mobile (cf. media query) */
.status-band-break { display: none; }

.status-band {
  display: flex;
  align-items: stretch;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  height: 44px;
}

.status-cell {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-5);
  border-right: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.status-cell:last-child { border-right: none; }

.status-cell .lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-primary);
}
.status-cell .val {
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.status-cell .val.accent { color: var(--accent); }
/* "profils" reste en blanc — distinction unité (texte) vs valeur numérique (jaune fluo) */
.status-cell .val .val-unit { color: var(--text-primary); }

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
  flex-shrink: 0;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.3;
  animation: pulse 1.6s ease-out infinite;
}
.live-dot.idle { background: var(--text-muted); }
.live-dot.idle::after { display: none; }
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.4; }
  100% { transform: scale(2); opacity: 0; }
}

/* ============================================
   TOPBAR
   ============================================ */

.topbar {
  height: var(--topbar-h);
  padding: 0 var(--sp-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.tab-bar { display: flex; gap: 2px; padding: 4px; background: var(--bg-input); border: 1px solid var(--border-soft); border-radius: var(--r-md); }

.tab {
  height: 28px;
  padding: 0 var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: transparent;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(196, 245, 66, 0.3);
}
.tab:hover { color: var(--text-primary); }
.tab.active { background: var(--bg-overlay); color: var(--text-primary); box-shadow: var(--shadow-xs); }
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--bg-elevated);
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.tab.active .tab-count { background: var(--accent); color: #000; }

.tab .tab-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color var(--t-fast);
}
.tab:hover .tab-icon,
.tab.active .tab-icon { color: var(--accent); }

.topbar-spacer { flex: 1; }

.topbar-actions { display: flex; gap: var(--sp-2); align-items: center; }

/* Hover desktop : tous les boutons d'action (Insights/CRM/Alertes/Sauvegarder/Exporter) virent jaune fluo, comme le bouton Accueil */
.topbar-actions .btn-ghost:hover:not(:disabled),
.topbar-actions .btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(196, 245, 66, 0.10);
}
.topbar-actions .btn-ghost:hover:not(:disabled) svg,
.topbar-actions .btn-secondary:hover:not(:disabled) svg {
  stroke: currentColor;
}

/* ============================================
   Topbar dropdowns (Workspace + Actions)
   Used to declutter the topbar — instead of 5 inline buttons we group them
   under two menu triggers. Pure CSS for show/hide on .open class set in JS.
   ============================================ */
.topbar-dropdown { position: relative; }
.topbar-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.topbar-dropdown-caret {
  transition: transform var(--t-fast);
  opacity: 0.75;
}
.topbar-dropdown.open .topbar-dropdown-caret { transform: rotate(180deg); opacity: 1; }
.topbar-dropdown.open .topbar-dropdown-trigger {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(196, 245, 66, 0.10);
}

.topbar-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
  padding: 6px;
  display: none;
  z-index: 1000;
  animation: topbarDropdownIn 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.topbar-dropdown.open .topbar-dropdown-menu { display: block; }
@keyframes topbarDropdownIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.topbar-dropdown-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 1px;
  width: 100%;
  padding: 9px 11px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.topbar-dropdown-item svg {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  color: var(--text-soft);
  flex-shrink: 0;
}
.topbar-dropdown-label {
  grid-column: 2;
  grid-row: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.topbar-dropdown-sub {
  grid-column: 2;
  grid-row: 2;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}
.topbar-dropdown-item:hover {
  background: rgba(196, 245, 66, 0.06);
  border-color: rgba(196, 245, 66, 0.18);
}
.topbar-dropdown-item:hover svg,
.topbar-dropdown-item:hover .topbar-dropdown-label { color: var(--accent); }

/* On narrow screens we hide the dropdown sublabel to keep menus compact. */
@media (max-width: 900px) {
  .topbar-dropdown-menu { min-width: 200px; }
  .topbar-dropdown-sub { display: none; }
  .topbar-dropdown-item { grid-template-rows: auto; }
  .topbar-dropdown-item svg { grid-row: 1; }
}

/* View switch */
.view-switch { display: flex; padding: 3px; background: var(--bg-input); border: 1px solid var(--border-soft); border-radius: var(--r-md); }
.view-switch button {
  width: 30px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-tertiary);
  transition: all var(--t-fast);
}
.view-switch button:hover { color: var(--text-primary); }
.view-switch button.active { background: var(--bg-overlay); color: var(--text-primary); box-shadow: var(--shadow-xs); }
.view-switch button svg { width: 14px; height: 14px; }

/* ============================================
   FILTER BAR (active filters as pills)
   ============================================ */

.filter-bar {
  height: var(--filter-bar-h);
  padding: 0 var(--sp-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--bg-base);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-bar.empty { display: none; }

.filter-bar-label {
  font-size: 11.5px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 28px;
  padding: 0 var(--sp-1) 0 var(--sp-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  transition: border-color var(--t-fast);
}
.filter-pill:hover { border-color: var(--border-default); }

.filter-pill .label { color: var(--text-tertiary); }
.filter-pill .value { color: var(--text-primary); }

.filter-pill button {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  color: var(--text-tertiary);
  transition: all var(--t-fast);
}
.filter-pill button:hover { background: var(--bg-overlay); color: var(--danger); }

.filter-bar-clear {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  padding: 0 var(--sp-2);
  height: 28px;
  margin-left: auto;
}
.filter-bar-clear:hover { color: var(--text-primary); }

/* ============================================
   RESULTS — area
   ============================================ */

.results-area {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-6);
  background: var(--bg-base);
}

/* GRID VIEW */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-4);
}

.card {
  background: linear-gradient(135deg, rgba(27, 29, 35, 0.92), rgba(20, 21, 26, 0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  cursor: pointer;
  transition: border-color 280ms ease, transform 350ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 280ms ease;
  position: relative;
  animation: card-in 320ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 24px 48px -16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
@keyframes card-in {
  from { transform: translateY(8px); }
  to { transform: translateY(0); }
}

.card:hover {
  border-color: rgba(196, 245, 66, 0.35);
  transform: translateY(-3px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 32px 60px -16px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(196, 245, 66, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card__head { display: flex; align-items: flex-start; gap: var(--sp-3); }

.card__avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-overlay);
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.card__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

.platform-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
  display: grid;
  place-items: center;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0;
}
.platform-dot.instagram { background: var(--instagram); color: #fff; }
.platform-dot.tiktok { background: var(--tiktok); color: #fff; box-shadow: inset 0 0 0 1px var(--tiktok-cyan); }
.platform-dot.snapchat { background: var(--snapchat); color: #000; }

.card .card:hover .platform-dot { border-color: var(--bg-elevated); }

.card__id { flex: 1; min-width: 0; }
.card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card__name .verified {
  color: var(--accent);
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  /* Force high-quality vector rendering so the 8-pointed badge doesn't look fuzzy at
     small sizes. Without this Chrome aliases the corners and produces a slight blur. */
  shape-rendering: geometricPrecision;
  vertical-align: -2px;
  filter: drop-shadow(0 0 4px rgba(196, 245, 66, 0.35));
}
.card__handle {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__score {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.card__bio {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
}
.stat {
  padding: var(--sp-3) var(--sp-2) var(--sp-2);
  text-align: center;
  border-right: 1px solid var(--border-subtle);
  position: relative;
}
.stat:last-child { border-right: none; }

.stat__value {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat__label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  font-weight: 500;
}

/* Empty stat (no real signal) — softer to avoid looking like a "0" reading. */
.stat--empty .stat__value {
  color: var(--text-muted);
  opacity: 0.55;
  font-weight: 500;
}
.stat--empty .stat__label {
  opacity: 0.65;
}

/* Engagement meter — visual proof inside card */
.engagement-meter {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.engagement-meter::after {
  content: '';
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  width: var(--meter, 0%);
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reserve room for 2 rows of tags so cards with/without email stay aligned in the grid.
   1 row = 22px tag height; 2 rows = 22 + 4 (gap) + 22 = 48px. */
.card__tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 48px; align-content: flex-start; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--sp-2);
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
}
.tag.country { color: var(--accent); border-color: rgba(196, 245, 66, 0.3); background: var(--accent-soft); }
.tag.email { color: var(--success); border-color: rgba(34, 197, 94, 0.25); background: var(--success-soft); }

/* Actions: 3 ghost buttons (Favoris / Compare / Audit) on row 1, then the primary CTA
   "Voir le profil" full-width on row 2. Wraps cleanly on narrow cards without overflow. */
.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: auto;
}
.entity-open-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  justify-content: center;
}
.entity-open-btn svg { opacity: 0.65; flex-shrink: 0; }
.entity-open-btn:hover svg { opacity: 1; }

.card__actions .btn-ghost {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
}
.card__actions .btn-secondary {
  flex: 1 1 100%;
  white-space: nowrap;
}
/* Texte + symboles des boutons Favoris / ⇄ en blanc par défaut */
.card__actions .btn-ghost { color: var(--text-primary); }
.card__actions .fav-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
/* Hover desktop : Favoris / Comparer / Voir le profil deviennent jaune fluo */
.card__actions .btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(196, 245, 66, 0.10);
}
.card__actions .btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(196, 245, 66, 0.10);
}

/* ============================================
   RESULTS — TABLE VIEW
   ============================================ */

.results-table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: auto;
  max-height: 100%;
}
.results-table-wrap::-webkit-scrollbar { height: 8px; }

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.results-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-elevated);
}

.results-table th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: color var(--t-fast);
}
.results-table th:hover { color: var(--text-primary); }
.results-table th.numeric { text-align: right; }
.results-table th.sorted { color: var(--accent); }
.results-table th .sort-arrow { display: inline-block; margin-left: 4px; opacity: 0; transition: opacity var(--t-fast); }
.results-table th.sorted .sort-arrow { opacity: 1; }

.results-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--t-fast);
  cursor: pointer;
}
.results-table tbody tr:last-child { border-bottom: none; }
.results-table tbody tr:hover { background: var(--bg-elevated); }

.results-table td {
  padding: var(--sp-3) var(--sp-4);
  vertical-align: middle;
}
.results-table td.numeric { text-align: right; font-variant-numeric: tabular-nums; }

.cell-profile { display: flex; align-items: center; gap: var(--sp-3); min-width: 200px; }
.cell-profile .card__avatar { width: 32px; height: 32px; }
.cell-profile .platform-dot { width: 14px; height: 14px; font-size: 7px; bottom: -1px; right: -1px; border-width: 1.5px; }
.cell-profile .name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.cell-profile .handle { font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }

.cell-platform {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.cell-platform.instagram { background: rgba(221, 42, 123, 0.12); color: #ff7eb8; border: 1px solid rgba(221, 42, 123, 0.3); }
.cell-platform.tiktok { background: rgba(37, 244, 238, 0.08); color: var(--tiktok-cyan); border: 1px solid rgba(37, 244, 238, 0.3); }
.cell-platform.snapchat { background: rgba(255, 252, 0, 0.08); color: #fffc00; border: 1px solid rgba(255, 252, 0, 0.3); }

.cell-er { display: inline-flex; align-items: center; gap: var(--sp-2); justify-content: flex-end; }
.cell-er-bar { width: 40px; height: 4px; background: var(--bg-overlay); border-radius: 2px; overflow: hidden; }
.cell-er-bar::after { content: ''; display: block; height: 100%; background: var(--accent); border-radius: 2px; width: var(--w, 0%); }

.cell-actions { display: flex; gap: var(--sp-1); justify-content: flex-end; }

/* ============================================
   EMPTY & LOADING
   ============================================ */

.empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
  color: var(--text-secondary);
  min-height: 60vh;
}
.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--r-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-5);
  color: var(--accent);
}
.empty-icon svg { width: 28px; height: 28px; }
.empty h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.empty p {
  font-size: 13.5px;
  color: var(--text-tertiary);
  max-width: 380px;
  line-height: 1.55;
}
.empty-shortcut {
  margin-top: var(--sp-5);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Skeleton card */
.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  height: 240px;
}
.skel {
  background: linear-gradient(90deg, var(--bg-input) 0%, var(--bg-overlay) 50%, var(--bg-input) 100%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: shimmer 1.4s infinite linear;
}
.skel-row { display: flex; gap: var(--sp-3); align-items: center; }
.skel-circle { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.skel-line { height: 12px; flex: 1; }
.skel-line.short { width: 60%; }
.skel-block { height: 56px; border-radius: var(--r-md); }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   MODAL
   ============================================ */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--sp-6);
  animation: modal-in 200ms ease-out;
}
.modal[hidden] { display: none; }
@keyframes modal-in { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modal-pop 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-pop {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  color: var(--text-tertiary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  z-index: 2;
  transition: all var(--t-fast);
}
.modal-close:hover { color: var(--text-primary); border-color: var(--border-default); }
.modal-close svg { width: 14px; height: 14px; }

.modal-head {
  padding: var(--sp-6);
  border-bottom: 1px solid var(--border-subtle);
}

.detail-head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.detail-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-overlay);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.detail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.detail-avatar .platform-dot { width: 24px; height: 24px; font-size: 10px; bottom: 0; right: 0; border-width: 2.5px; }

.detail-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.detail-head .handle { font-size: 13.5px; color: var(--text-tertiary); margin-top: 2px; }
.detail-head .meta-row { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); flex-wrap: wrap; }

.modal-body { padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5); }

.modal-bio {
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
.detail-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.detail-cell {
  padding: var(--sp-3);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
}
.detail-cell .lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-tertiary);
}
.detail-cell .val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}
.detail-cell .val a { color: var(--accent); }
.detail-cell .val a:hover { text-decoration: underline; }

/* Empty stat in modal — soften so "—" doesn't compete with real numbers. */
.detail-cell--empty {
  opacity: 0.55;
  background: transparent;
  border-color: var(--border-subtle);
  border-style: dashed;
  cursor: help;
}
.detail-cell--empty .lbl { color: var(--text-muted); }
.detail-cell--empty .val {
  color: var(--text-muted);
  font-weight: 500;
}

.modal-section-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.modal-foot {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  background: var(--bg-surface);
  position: sticky;
  bottom: 0;
}
.modal-foot .btn { flex: 1; min-width: 120px; }

/* Add form modal */
.modal-add .modal-body { gap: var(--sp-4); }
.modal-add .field-row .field { width: 100%; }

/* ============================================
   TOAST
   ============================================ */

.toast-zone {
  position: fixed;
  bottom: var(--sp-5);
  right: var(--sp-5);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-primary);
  min-width: 240px;
  max-width: 380px;
  box-shadow: var(--shadow-md);
  animation: toast-in 250ms cubic-bezier(0.16, 1, 0.3, 1);
}
.toast::before {
  content: '';
  width: 6px;
  height: 24px;
  border-radius: 3px;
  flex-shrink: 0;
}
.toast.success::before { background: var(--success); }
.toast.error::before { background: var(--danger); }
.toast.info::before { background: var(--accent); }
@keyframes toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast.leaving { animation: toast-out 200ms ease-in forwards; }
@keyframes toast-out {
  to { transform: translateX(20px); opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  :root { --sidebar-w: 280px; }
}

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform var(--t-base);
  }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 0 var(--sp-4); }
  .results-area { padding: var(--sp-4); }
  .results-grid { grid-template-columns: 1fr; }
  .topbar-actions .btn span { display: none; }
}

/* Focus rings */
*:focus-visible:not(.chip):not(.preset):not(.tab) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip:focus-visible, .preset:focus-visible, .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Selection */
::selection { background: var(--accent); color: #000; }

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

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ============================================
   WELCOME (page d'accueil animée)
   ============================================ */

.welcome {
  position: relative;
  z-index: 200;
  background: var(--bg-base);
  /* `clip` au lieu de `hidden` pour ne pas créer de contexte de scroll
     (sinon position: sticky des descendants pin sur .welcome et n'animera pas au scroll window) */
  overflow-x: clip;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: transform 700ms cubic-bezier(0.65, 0, 0.35, 1), opacity 500ms ease;
}
/* When welcome is showing, hide app and let body scroll.
   `clip` au lieu de `hidden` pour ne pas créer un containing block sticky. */
body.show-welcome { overflow-x: clip; overflow-y: visible; }
body.show-welcome .app { display: none !important; }
/* When app is showing, lock body scroll (app has its own internal scroll) */
body:not(.show-welcome) { overflow: hidden; height: 100vh; }
html { background: var(--bg-base); }
.welcome.leaving {
  transform: translateY(-30px);
  opacity: 0;
  pointer-events: none;
}

/* --- Background atmosphere --- */
.welcome-bg {
  /* Fixed = l'atmosphère (auroras, particles, grid, glows) reste TOUJOURS visible
     derrière le contenu, peu importe le scroll. Plus de void noir entre les chapters. */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.welcome-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 30%, transparent 80%);
}

.welcome-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  animation: glow-drift 18s ease-in-out infinite;
}
.welcome-glow--1 {
  width: 520px; height: 520px;
  top: -120px; left: -120px;
  background: radial-gradient(circle, rgba(196, 245, 66, 0.35), transparent 70%);
}
.welcome-glow--2 {
  width: 600px; height: 600px;
  bottom: -100px; right: -160px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.30), transparent 70%);
  animation-delay: -9s;
  animation-duration: 22s;
}
@keyframes glow-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.1); }
}

.floating-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.float-card {
  position: absolute;
  width: 230px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(27, 29, 35, 0.92), rgba(20, 21, 26, 0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 24px 48px -16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 280ms ease,
    box-shadow 280ms ease;
  cursor: default;
  pointer-events: auto;
  animation: card-pop 700ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards, card-float 9s ease-in-out infinite;
  will-change: transform;
}
.float-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 30%, rgba(196, 245, 66, 0.12) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
}
.float-card:hover {
  border-color: rgba(196, 245, 66, 0.35);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 32px 60px -16px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(196, 245, 66, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 10;
}
.float-card:hover::before { opacity: 1; }
.float-card-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  position: relative;
  z-index: 1;
}
.float-card[data-i="1"] { animation-duration: 700ms, 8s; animation-delay: 0ms, -1.5s; }
.float-card[data-i="2"] { animation-duration: 700ms, 10s; animation-delay: 0ms, -3s; }
.float-card[data-i="3"] { animation-duration: 700ms, 11s; animation-delay: 0ms, -4.5s; }
.float-card[data-i="4"] { animation-duration: 700ms, 9.5s; animation-delay: 0ms, -6s; }
.float-card[data-i="0"] { animation-duration: 700ms, 9s; animation-delay: 0ms, 0s; }

.float-card .float-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #000;
  position: relative;
  box-shadow: 0 0 0 0 rgba(196, 245, 66, 0.5);
  animation: avatar-pulse 3.5s ease-in-out infinite;
  overflow: hidden;
}
.float-card .float-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.float-card .float-avatar-fallback {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  font-size: 12px; font-weight: 700; color: #000;
}
.float-card[data-i="1"] .float-avatar { animation-delay: -0.7s; }
.float-card[data-i="2"] .float-avatar { animation-delay: -1.4s; }
.float-card[data-i="3"] .float-avatar { animation-delay: -2.1s; }
.float-card[data-i="4"] .float-avatar { animation-delay: -2.8s; }

.float-card .float-text { min-width: 0; flex: 1; }
.float-card .float-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.005em;
}
.float-card .float-meta {
  font-size: 10.5px;
  color: var(--text-tertiary);
  font-family: var(--f-mono);
  margin-top: 2px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.float-card .float-bar {
  width: 38px; height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-pill);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.float-card .float-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: inherit;
  transform-origin: left;
  width: var(--bar, 70%);
  animation: bar-pulse 4s ease-in-out infinite;
}
.float-card .float-bar::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -30%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: bar-shimmer 2.8s linear infinite;
  pointer-events: none;
  z-index: 1;
}
.float-card[data-i="1"] .float-bar::after { animation-delay: -1s; }
.float-card[data-i="2"] .float-bar::after { animation-delay: -2s; }
.float-card[data-i="3"] .float-bar::after { animation-delay: -3s; }
.float-card[data-i="4"] .float-bar::after { animation-delay: -0.5s; }
.float-card[data-i="1"] .float-bar::before { animation-delay: -0.7s; }
.float-card[data-i="2"] .float-bar::before { animation-delay: -1.4s; }
.float-card[data-i="3"] .float-bar::before { animation-delay: -2.1s; }
.float-card[data-i="4"] .float-bar::before { animation-delay: -2.8s; }

@keyframes card-pop {
  0% { opacity: 0; transform: translateY(20px) scale(0.92); filter: blur(6px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes card-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  25% { transform: translate3d(3px, -8px, 0) rotate(0.5deg); }
  50% { transform: translate3d(0, -14px, 0) rotate(0deg); }
  75% { transform: translate3d(-3px, -7px, 0) rotate(-0.5deg); }
}
@keyframes avatar-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 245, 66, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(196, 245, 66, 0); }
}
@keyframes bar-pulse {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.62); opacity: 0.85; }
}
@keyframes bar-shimmer {
  0% { left: -40%; }
  100% { left: 130%; }
}

/* --- Welcome nav (fixed top + morphing on scroll) --- */
.welcome-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 72px;
  padding: 0 max(40px, calc((100vw - 1240px) / 2 + 40px));
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  transition: height 350ms cubic-bezier(0.22, 1, 0.36, 1),
              background 350ms ease,
              backdrop-filter 350ms ease,
              border-color 350ms ease,
              box-shadow 350ms ease;
  background: transparent;
  border-bottom: 1px solid transparent;
}
/* (padding-top de la welcome-main géré directement dans la règle principale) */
/* Quand on scroll : la nav devient compacte et glassy */
.welcome.is-scrolled .welcome-nav {
  height: 56px;
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: rgba(196, 245, 66, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.welcome.is-scrolled .welcome-brand .brand-logo {
  width: 30px;
  height: 30px;
  transition: width 300ms ease, height 300ms ease;
}
.welcome.is-scrolled .welcome-brand .brand-name { font-size: 14px; }

/* === Hero parallax (texte qui s'estompe + monte légèrement quand on scroll) === */
.hero {
  --scroll-y: 0;
  --scroll-progress: 0;
}
.hero-eyebrow,
.hero-title,
.hero-sub,
.hero-cta,
.hero-stats {
  will-change: transform, opacity;
  transition: transform 80ms linear, opacity 80ms linear;
}
.hero-title { transform: translateY(calc(var(--scroll-y) * -0.18)); }
.hero-sub { transform: translateY(calc(var(--scroll-y) * -0.12)); }
.hero-cta { transform: translateY(calc(var(--scroll-y) * -0.08)); }
.hero-stats { transform: translateY(calc(var(--scroll-y) * -0.04)); }
.hero-eyebrow { transform: translateY(calc(var(--scroll-y) * -0.22)); }
/* Au-delà de 50% du viewport scrollé, le hero s'estompe */
.hero {
  opacity: calc(1 - var(--scroll-progress) * 1.4);
}

/* === Background layers parallax === */
.welcome-bg {
  --bg-scroll: 0;
}
.welcome-grid { transform: translateY(calc(var(--bg-scroll) * 0.25)); will-change: transform; }
.welcome-glow--1 { transform: translate(calc(var(--bg-scroll) * -0.15), calc(var(--bg-scroll) * 0.15)); will-change: transform; }
.welcome-glow--2 { transform: translate(calc(var(--bg-scroll) * 0.18), calc(var(--bg-scroll) * -0.12)); will-change: transform; }
#particles-canvas { transform: translateY(calc(var(--bg-scroll) * 0.4)); will-change: transform; }

/* === Section reveal 3D bidirectionnel (joue à l'entrée + rejoue inversé en quittant) ===
   Inspiré du frontend-design skill : Disney principles (slow in/slow out, follow-through),
   3D perspective + rotateX, scroll-direction aware. */
/* Perspective déplacée du .welcome-main vers chaque .section-reveal pour ne pas
   créer un containing block qui casse position: sticky des hero-stage.
   EXCEPTION : .reveal-chapter et .hscroll-chapter ont leur propre sticky pin
   donc on évite la perspective dessus (sinon sticky cassé). */
.section-reveal:not(.reveal-chapter):not(.hscroll-chapter) {
  perspective: 1200px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
}
/* Hero, reveal-chapter et hscroll-chapter ont leur propre sticky pin → no perspective */
.welcome.cinematic .hero,
.reveal-chapter,
.hscroll-chapter {
  perspective: none;
}
.section-reveal .stagger-item {
  opacity: 0;
  transform: translateY(60px) rotateX(18deg) translateZ(-60px);
  transform-origin: center center;
  transition: opacity 850ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 1000ms cubic-bezier(0.22, 1, 0.36, 1),
              filter 850ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--stagger-delay, 0ms);
  filter: blur(8px);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}
/* Entrée par le bas (scroll vers le bas) — items émergent en remontant */
.section-reveal.in-from-bottom .stagger-item {
  opacity: 1;
  transform: translateY(0) rotateX(0) translateZ(0);
  filter: blur(0);
}
/* Entrée par le haut (scroll vers le haut, on remonte sur la section) — items émergent depuis le haut */
.section-reveal.in-from-top .stagger-item {
  opacity: 1;
  transform: translateY(0) rotateX(0) translateZ(0);
  filter: blur(0);
}
/* Sortie vers le haut (on a scrollé bas, section quitte le viewport par le haut) — items "s'envolent" */
.section-reveal.out-up .stagger-item {
  opacity: 0;
  transform: translateY(-50px) rotateX(-12deg) translateZ(-40px);
  filter: blur(6px);
}
/* Sortie vers le bas (on a remonté, section quitte par le bas) — items "redescendent" */
.section-reveal.out-down .stagger-item {
  opacity: 0;
  transform: translateY(50px) rotateX(12deg) translateZ(-40px);
  filter: blur(6px);
}
/* État initial avant 1ère intersection : items invisibles dans la position "venant du bas" */
.section-reveal:not(.in-from-bottom):not(.in-from-top):not(.out-up):not(.out-down) .stagger-item {
  opacity: 0;
  transform: translateY(60px) rotateX(18deg) translateZ(-60px);
  filter: blur(8px);
}

/* === 3D tilt sur les cards (perspective + glare) === */
.feature-card,
.platform-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --glare-x: 50%;
  --glare-y: 50%;
  transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.feature-card::after,
.platform-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--glare-x) var(--glare-y),
              rgba(196, 245, 66, 0.10) 0%,
              transparent 45%);
  opacity: 0;
  transition: opacity 250ms ease;
  pointer-events: none;
  z-index: 1;
}
.feature-card:hover::after,
.platform-card:hover::after { opacity: 1; }
.feature-card > *,
.platform-card > * { position: relative; z-index: 2; }

/* ==============================================================================
   ULTRA SCROLL EXPERIENCE — Vanguard
   Aurora mesh, mask reveals, magnetic 3D, section indicator, cinematic motion.
   ============================================================================== */

/* === Aurora mesh : 4 blobs qui dérivent et pulsent === */
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform, opacity;
  mix-blend-mode: screen;
  opacity: 0.55;
  z-index: 0;
}
.aurora--1 {
  width: 50vw; height: 50vw;
  top: -10%; left: -10%;
  background: radial-gradient(circle, rgba(196, 245, 66, 0.45) 0%, transparent 65%);
  animation: aurora-drift-1 28s ease-in-out infinite;
}
.aurora--2 {
  width: 55vw; height: 55vw;
  top: 20%; right: -15%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.38) 0%, transparent 65%);
  animation: aurora-drift-2 34s ease-in-out infinite;
}
.aurora--3 {
  width: 45vw; height: 45vw;
  bottom: 5%; left: 25%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22) 0%, transparent 65%);
  animation: aurora-drift-3 40s ease-in-out infinite;
  opacity: 0.4;
}
.aurora--4 {
  width: 40vw; height: 40vw;
  top: 50%; left: 50%;
  background: radial-gradient(circle, rgba(196, 245, 66, 0.20) 0%, transparent 70%);
  animation: aurora-drift-4 24s ease-in-out infinite;
  transform: translate(-50%, -50%);
  opacity: 0.6;
}
@keyframes aurora-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(8vw, 6vh) scale(1.15); }
  66% { transform: translate(-4vw, 12vh) scale(0.95); }
}
@keyframes aurora-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-12vw, 10vh) scale(1.2); }
}
@keyframes aurora-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(15vw, -10vh) scale(0.85); }
  80% { transform: translate(-6vw, -4vh) scale(1.1); }
}
@keyframes aurora-drift-4 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.8; }
}

/* === Hero magnetic 3D tilt (suit la souris avec perspective) ===
   Perspective déplacée du .hero vers .hero-stage pour ne pas casser le sticky positioning. */
.hero {
  --mx: 50%;
  --my: 50%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}
.welcome.cinematic .hero-stage {
  perspective: 1400px;
  perspective-origin: 50% 50%;
}
.hero-title,
.hero-eyebrow,
.hero-sub,
.hero-cta {
  transform-style: preserve-3d;
  transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-title {
  transform:
    translateY(calc(var(--scroll-y) * -0.18))
    rotateX(var(--tilt-x))
    rotateY(var(--tilt-y));
}
.hero-eyebrow {
  transform:
    translateY(calc(var(--scroll-y) * -0.22))
    translateZ(20px)
    rotateY(calc(var(--tilt-y) * 0.6));
}
/* Words individuels avec depth différentiée — Apple-style */
.hero-title .word {
  display: inline-block;
  transform-style: preserve-3d;
}
.hero-title .word.accent {
  transform: translateZ(30px);
}

/* === Section mask reveal (sweep fluo) === */
.section-title,
.section-eyebrow {
  position: relative;
  display: inline-block;
}
.section-reveal:not(.in-from-bottom):not(.in-from-top) .section-title,
.section-reveal:not(.in-from-bottom):not(.in-from-top) .section-eyebrow {
  clip-path: inset(0 100% 0 0);
}
.section-reveal.in-from-bottom .section-title,
.section-reveal.in-from-top .section-title,
.section-reveal.in-from-bottom .section-eyebrow,
.section-reveal.in-from-top .section-eyebrow {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* Sweep fluo qui passe de gauche à droite avant de révéler le texte */
.section-title::before,
.section-eyebrow::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent) 30%,
    var(--accent) 70%,
    transparent 100%);
  transform: translateX(-110%);
  pointer-events: none;
  opacity: 0.85;
  mix-blend-mode: difference;
}
.section-reveal.in-from-bottom .section-title::before,
.section-reveal.in-from-top .section-title::before,
.section-reveal.in-from-bottom .section-eyebrow::before,
.section-reveal.in-from-top .section-eyebrow::before {
  animation: sweep-reveal 1200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes sweep-reveal {
  0% { transform: translateX(-110%); }
  60% { transform: translateX(0%); }
  100% { transform: translateX(110%); }
}

/* === Section indicator (vertical dots à droite) === */
.section-indicator {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 30;
  pointer-events: auto;
  opacity: 1;
}
.section-indicator.fade-in {
  animation: indicator-fade-in 600ms ease-out backwards;
}
@keyframes indicator-fade-in {
  from { opacity: 0; transform: translateY(-50%) translateX(20px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}
.section-dot {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
.section-dot span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 350ms cubic-bezier(0.22, 1, 0.36, 1);
}
.section-dot:hover span {
  background: var(--accent);
  transform: scale(1.3);
}
.section-dot.active span {
  width: 10px;
  height: 10px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(196, 245, 66, 0.18),
              0 0 14px rgba(196, 245, 66, 0.5);
}
/* Trait vertical qui relie les dots */
.section-indicator::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent,
    rgba(255, 255, 255, 0.08) 20%,
    rgba(255, 255, 255, 0.08) 80%,
    transparent);
  transform: translateX(-50%);
  z-index: -1;
}

/* (Hero word entrance : géré par .hero-title .word + @keyframes word-reveal plus bas dans le fichier
   pour éviter les doubles déclarations.) */

/* === CTA primaire avec glow breathing === */
.btn-primary.btn-shine {
  position: relative;
  overflow: visible;
}
.btn-primary.btn-shine::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: var(--accent);
  filter: blur(20px);
  opacity: 0;
  z-index: -1;
  animation: cta-breathe 2.8s ease-in-out infinite;
}
@keyframes cta-breathe {
  0%, 100% { opacity: 0.18; transform: scale(0.96); }
  50% { opacity: 0.42; transform: scale(1.04); }
}

/* === Marquee scroll-velocity reactive === */
.marquee {
  --scroll-vel: 1;
}
.marquee-track {
  animation-duration: calc(40s / max(0.5, var(--scroll-vel)));
}

/* === Stat numbers : glow halo qui pulse au scroll === */
.hero-stat-num {
  background: linear-gradient(180deg, #fff 0%, #d8d8d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
}
.hero-stat-num::after {
  content: '';
  position: absolute;
  inset: -8px;
  background: radial-gradient(circle, rgba(196, 245, 66, 0.25) 0%, transparent 60%);
  filter: blur(8px);
  z-index: -1;
  opacity: 0;
  transition: opacity 400ms ease;
}
.hero-stat-num.bumping::after {
  opacity: 1;
}

/* === Reduced motion : on respecte === */
@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none !important; }
  .hero-title, .hero-eyebrow, .hero-sub, .hero-cta {
    transform: none !important;
    transition: none !important;
  }
  .section-title::before, .section-eyebrow::before { display: none !important; }
  .btn-primary.btn-shine::after { animation: none !important; }
}

.welcome-brand { display: flex; align-items: center; gap: var(--sp-3); }

.welcome-nav-links {
  display: flex;
  gap: var(--sp-6);
  margin-left: var(--sp-10);
}
.welcome-nav-links a {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  transition: color var(--t-fast);
  position: relative;
}
.welcome-nav-links a:hover { color: #fff; }
.welcome-nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.welcome-nav-links a:hover::after { transform: scaleX(1); }

#welcome-skip { margin-left: auto; }

/* --- Welcome main --- */
.welcome-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  /* padding-top: 72px pour ne pas passer sous la nav fixed */
  padding: 72px 40px 80px;
}

/* --- Cursor spotlight --- */
.cursor-spotlight {
  position: fixed;
  top: 0; left: 0;
  width: 600px;
  height: 600px;
  pointer-events: none;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 245, 66, 0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: transform 100ms ease-out;
  mix-blend-mode: screen;
  opacity: 0;
}
.welcome:hover .cursor-spotlight { opacity: 1; }

/* --- Live ticker --- */
.live-ticker {
  margin-top: var(--sp-6);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  height: 40px;
  padding: 0 var(--sp-4) 0 var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--accent);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--text-primary);
  animation: fade-up 700ms ease-out 1600ms backwards;
  overflow: hidden;
  max-width: 480px;
}
.live-ticker-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.35), 0 0 12px rgba(34, 197, 94, 0.7);
  flex-shrink: 0;
  position: relative;
  animation: live-blink 1s ease-in-out infinite;
}
.live-ticker-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--success);
  animation: live-ring 1.4s ease-out infinite;
}
@keyframes live-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}
@keyframes live-ring {
  0% { opacity: 0.8; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.8); }
}
.live-ticker-content {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 18px;
  overflow: hidden;
}
.live-ticker-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  white-space: nowrap;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), opacity 400ms ease;
  transform: translateY(20px);
  opacity: 0;
}
.live-ticker-item.active { transform: translateY(0); opacity: 1; }
.live-ticker-item.leaving { transform: translateY(-20px); opacity: 0; }
.live-ticker-item .at { color: var(--accent); font-family: var(--f-mono); font-size: 12px; }
.live-ticker-item .meta { color: var(--text-tertiary); font-family: var(--f-mono); font-size: 11.5px; }

/* --- Marquee niches --- */
.marquee {
  position: relative;
  margin: var(--sp-3) 0 var(--sp-6);
  padding: var(--sp-4) 0;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  gap: var(--sp-8);
  white-space: nowrap;
  animation: marquee-scroll 40s linear infinite;
  padding-left: var(--sp-8);
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  transition: color var(--t-fast);
}
.marquee-item:hover { color: var(--accent); }
.marquee-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Magnetic button --- */
.magnetic {
  display: inline-block;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* --- Tilt cards --- */
.tilt {
  transform-style: preserve-3d;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.tilt > * { transform-style: preserve-3d; }

/* --- Number bump on hero stats --- */
.hero-stat-num.bumping {
  animation: num-bump 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes num-bump {
  0% { transform: translateY(0); color: var(--text-primary); }
  40% { transform: translateY(-3px); color: var(--accent); }
  100% { transform: translateY(0); color: var(--text-primary); }
}

/* --- Feature card 3D number/icon --- */
.feature-card .feature-icon {
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), background 200ms ease;
}
.feature-card:hover .feature-icon {
  transform: translateZ(30px) scale(1.05);
  background: var(--accent);
  color: #000;
}

/* --- Animated underline on title accent --- */
.hero-title .word.accent {
  position: relative;
  display: inline-block;
}
.hero-title .word.accent::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0.04em;
  height: 0.08em;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: underline-grow 700ms cubic-bezier(0.16, 1, 0.3, 1) 1500ms forwards;
}
@keyframes underline-grow {
  to { transform: scaleX(1); }
}

/* --- Step number animated --- */
.step {
  position: relative;
  overflow: hidden;
}
.step::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(196, 245, 66, 0.04));
  opacity: 0;
  transition: opacity var(--t-base);
}
.step:hover::before { opacity: 1; }
.step:hover .step-num {
  transform: translateX(4px);
}
.step-num {
  display: inline-block;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Welcome scroll progress bar --- */
.welcome-progress {
  position: fixed;
  top: 0; left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 999;
  pointer-events: none;
}

/* ============================================
   CINEMATIC EFFECTS — wow layer
   ============================================ */

/* --- Lamp effect --- */
.lamp {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  height: 720px;
  pointer-events: none;
  z-index: 0;
  animation: lamp-on 1400ms cubic-bezier(0.16, 1, 0.3, 1) 200ms backwards;
}
.lamp-line {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  box-shadow: 0 0 40px var(--accent), 0 0 80px var(--accent);
  filter: blur(0.5px);
}
.lamp-cone {
  position: absolute;
  top: 80px;
  left: 50%;
  width: 480px;
  height: 480px;
  transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% 0%,
    transparent 0deg,
    transparent 145deg,
    rgba(196, 245, 66, 0.18) 165deg,
    rgba(196, 245, 66, 0.30) 180deg,
    rgba(196, 245, 66, 0.18) 195deg,
    transparent 215deg,
    transparent 360deg);
  filter: blur(20px);
  mix-blend-mode: screen;
}
.lamp-floor {
  position: absolute;
  top: 460px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 200px;
  background: radial-gradient(ellipse at center top, rgba(196, 245, 66, 0.10), transparent 60%);
  filter: blur(30px);
}
@keyframes lamp-on {
  0% { opacity: 0; }
  60% { opacity: 1.05; }
  100% { opacity: 1; }
}

/* --- Particles constellation --- */
.particles-canvas {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* --- Orbit system around hero (right side) --- */
.orbit-system {
  position: absolute;
  top: 220px;
  right: -120px;
  width: 720px;
  height: 720px;
  pointer-events: none;
  z-index: 1;
  animation: fade-up 900ms ease-out 1400ms backwards;
}
.orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.04);
}
.orbit--1 { animation: orbit-rotate 26s linear infinite; }
.orbit--2 { inset: 80px; animation: orbit-rotate 38s linear infinite reverse; }
.orbit--3 { inset: 160px; animation: orbit-rotate 22s linear infinite; }
@keyframes orbit-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.orbit-avatar {
  position: absolute;
  top: -22px;
  left: 50%;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-md), 0 0 24px rgba(196, 245, 66, 0.15);
  /* counter-rotate so the avatar stays upright */
  animation: orbit-counter 26s linear infinite reverse;
}
.orbit--2 .orbit-avatar { animation-duration: 38s; animation-direction: normal; }
.orbit--3 .orbit-avatar { animation-duration: 22s; animation-direction: reverse; }
@keyframes orbit-counter {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
.orbit-avatar.ig { background: linear-gradient(135deg, #f58529, #dd2a7b); color: #fff; border-color: transparent; }
.orbit-avatar.tt { background: #000; color: var(--tiktok-cyan); border-color: var(--tiktok-cyan); }
.orbit-avatar.sc { background: var(--snapchat); color: #000; border-color: transparent; }
.orbit-avatar.lime { background: var(--accent); color: #000; border-color: transparent; }
.orbit-avatar.violet { background: var(--accent-2); color: #fff; border-color: transparent; }
.orbit-avatar.dark { background: var(--bg-overlay); color: var(--text-primary); }

/* --- Hover border gradient on CTA --- */
.btn-shine {
  position: relative;
  isolation: isolate;
}
.btn-shine::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--btn-angle, 0deg),
    var(--accent),
    var(--accent-2),
    var(--accent),
    transparent,
    var(--accent));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: -1;
  opacity: 0;
  transition: opacity 250ms ease;
  animation: rotate-angle 4s linear infinite;
}
.btn-shine:hover::before { opacity: 1; }
@property --btn-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes rotate-angle {
  to { --btn-angle: 360deg; }
}

/* --- Glare card sweep --- */
.glare-card {
  position: relative;
  overflow: hidden;
}
.glare-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 100%);
  transform: translateX(0);
  transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 2;
}
.glare-card:hover::after {
  transform: translateX(380%);
}

/* --- Hero highlight on accent word --- */
.hero-title .word.accent::before {
  content: '';
  position: absolute;
  left: -0.05em; right: -0.05em;
  bottom: 0.05em;
  top: 0.18em;
  background: rgba(196, 245, 66, 0.18);
  z-index: -1;
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  animation: highlight-grow 800ms cubic-bezier(0.16, 1, 0.3, 1) 1100ms forwards;
}
@keyframes highlight-grow {
  to { transform: scaleX(1); }
}

/* --- Hero search demo (faux input) --- */
.hero-search-demo {
  margin-top: var(--sp-6);
  background: var(--bg-surface);
  border: 1px solid var(--accent);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  max-width: 460px;
  font-size: 14px;
  animation: fade-up 700ms ease-out 1700ms backwards;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(196, 245, 66, 0.12);
}
.hero-search-demo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(196, 245, 66, 0.06), transparent);
  transform: translateX(-100%);
  animation: search-shine 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes search-shine {
  0%, 50% { transform: translateX(-100%); }
  60% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}
.hero-search-demo svg { color: var(--accent); flex-shrink: 0; }
.hero-search-demo .typewriter {
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 18px;
  color: var(--text-primary);
  min-height: 18px;
  white-space: pre;
}
/* Caret réaliste : I-beam fin, jaune fluo, collé à la lettre. Blink dur cadence macOS.
   Quand "tape", le curseur reste plein (pas de blink) puis reprend après idle.
   margin-left négatif annule le gap flex du parent pour que le caret colle au texte. */
.hero-search-demo .cursor-blink {
  display: inline-block;
  width: 1.5px;
  height: 16px;
  background: var(--accent);
  vertical-align: text-bottom;
  margin: 0 0 0 calc(-1 * var(--sp-3));
  animation: caret-blink 1.06s steps(1, end) infinite;
}
.hero-search-demo.is-typing .cursor-blink {
  animation: none;
  opacity: 1;
}
@keyframes caret-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
/* Le hint "/ pour rechercher" est masqué — la barre suit juste le texte */
.hero-search-demo .kbd-hint { display: none; }

/* --- Curtain transition --- */
/* Simple, reliable curtain — single element, transition-based */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: var(--bg-base);
  transform: translateY(100%);
  transition: transform 500ms cubic-bezier(0.65, 0, 0.35, 1);
  display: grid;
  place-items: center;
}
.curtain.up { transform: translateY(0); }
.curtain.exit { transform: translateY(-100%); }
.curtain-half { display: none; }
.curtain-logo {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 300ms ease 200ms;
}
.curtain.up .curtain-logo { opacity: 1; }
.curtain.exit .curtain-logo { opacity: 0; transition-delay: 0ms; }

/* --- Hero compress on scroll --- */
.hero {
  transition: transform 600ms ease-out, opacity 600ms ease-out;
}

/* --- Hover trail on platform cards --- */
.platform-card { transform-style: preserve-3d; transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), border-color var(--t-base); }
.platform-card:hover {
  transform: perspective(1000px) rotateX(4deg) rotateY(-4deg) translateY(-4px);
}

/* --- Scroll indicator (pill horizontale "Découvrir ↓", non-cliquable, centrée) --- */
.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 600;
  animation: scroll-cue-appear 700ms ease-out 2000ms backwards,
             scroll-cue-glow 2.4s ease-in-out 2000ms infinite;
  /* Indicateur visuel pur : non-cliquable, ne capte ni clic ni hover */
  pointer-events: none;
  user-select: none;
  z-index: 5;
  background: rgba(12, 13, 16, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
}
.scroll-cue.hidden { opacity: 0 !important; }
.scroll-cue-arrow {
  display: inline-block;
  flex-shrink: 0;
  animation: scroll-cue-bounce 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes scroll-cue-bounce {
  0%, 100% { transform: translateY(-1px); opacity: 0.85; }
  50%      { transform: translateY(2px);  opacity: 1; }
}
/* Apparition sans translation : juste un fade — le centrage horizontal reste stable */
@keyframes scroll-cue-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Pulse fluo : halo doux symétrique qui respire */
@keyframes scroll-cue-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(196, 245, 66, 0.18);
    border-color: var(--accent);
  }
  50% {
    box-shadow: 0 0 20px rgba(196, 245, 66, 0.45);
    border-color: rgba(196, 245, 66, 0.85);
  }
}

/* --- Hero --- */
.hero {
  padding: 48px 0 24px;
  max-width: 920px;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 30px;
  padding: 0 var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: var(--sp-6);
  animation: fade-up 600ms ease-out 100ms backwards;
}
.hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.hero-eyebrow-sep { color: var(--text-muted); margin: 0 2px; }
/* "Recherche multi-plateforme" (le span sans classe, juste après le hero-dot) en blanc */
.hero-eyebrow > span:not([class]) { color: var(--text-primary); }
/* Stat "16 614 profils en base" en jaune fluo (identique sur desktop et mobile) */
.hero-eyebrow-stat {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
}

/* Hero eyebrow mobile : pill compacte, texte ne casse pas, hauteur auto */
@media (max-width: 768px) {
  .hero-eyebrow {
    height: auto;
    min-height: 28px;
    padding: 4px 12px;
    font-size: 11px;
    gap: 6px;
    max-width: 100%;
  }
  .hero-eyebrow > span { white-space: nowrap; }
  .hero-eyebrow-stat { font-size: 10.5px; }
}
@media (max-width: 380px) {
  .hero-eyebrow { font-size: 10.5px; padding: 4px 10px; }
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: var(--sp-6);
}

.hero-title .word {
  display: inline-block;
  animation: word-reveal 1100ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  margin-right: 0.22em;
  transform-style: preserve-3d;
}
.hero-title .word.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Cinematic blur-clear + 3D dive : chaque mot émerge d'un brouillard avec depth */
@keyframes word-reveal {
  from {
    opacity: 0;
    filter: blur(14px);
    transform: translateY(28px) translateZ(-40px) rotateX(15deg);
  }
  60% {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) translateZ(0) rotateX(0);
  }
}
/* Stagger via nth-child */
.hero-title .word:nth-child(1) { animation-delay: 250ms; }
.hero-title .word:nth-child(2) { animation-delay: 320ms; }
.hero-title .word:nth-child(3) { animation-delay: 390ms; }
.hero-title .word:nth-child(4) { animation-delay: 520ms; }
.hero-title .word:nth-child(5) { animation-delay: 590ms; }
.hero-title .word:nth-child(6) { animation-delay: 660ms; }
.hero-title .word:nth-child(7) { animation-delay: 730ms; }
.hero-title .word:nth-child(8) { animation-delay: 800ms; }
.hero-title .word:nth-child(9) { animation-delay: 870ms; }

.hero-sub {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 620px;
  margin-bottom: var(--sp-5);
  animation: fade-up 700ms ease-out 1000ms backwards;
}

.hero-cta {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  animation: fade-up 700ms ease-out 1200ms backwards;
}

.btn-lg { height: 48px; padding: 0 var(--sp-6); font-size: 14.5px; border-radius: 10px; }
.btn-lg svg { transition: transform var(--t-base); }
.btn-lg:hover svg { transform: translateX(2px); }

#welcome-start { position: relative; overflow: hidden; }
#welcome-start::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: translateX(-100%);
  transition: transform 700ms ease;
}
#welcome-start:hover::before { transform: translateX(100%); }

.hero-stats {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  animation: fade-up 700ms ease-out 1400ms backwards;
}
.hero-stat {
  padding: var(--sp-3) var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  position: relative;
}
.hero-stat::after {
  content: '';
  position: absolute;
  right: 0; top: 25%; bottom: 25%;
  width: 1px;
  background: var(--border-subtle);
}
.hero-stat:last-child::after { display: none; }

.hero-stat-num {
  font-family: var(--f-mono);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hero-stat-lbl {
  font-size: 11.5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

@keyframes fade-up {
  from { transform: translateY(16px); }
  to { transform: translateY(0); }
}

/* --- Sections --- */
.section-head {
  margin-bottom: var(--sp-4);
  max-width: 720px;
  padding-top: var(--sp-3);
}
.section-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}
.section-title {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  /* Empêche les coupes mid-mot type "frictio / n." — si le titre doit wrap, il
     wrap entre les mots (text-wrap: balance répartit aussi les lignes pour
     éviter qu'un seul mot tombe seul en bas). */
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
  text-wrap: balance;
}

/* Reveals — DISABLED to prevent black void bug. Content always visible. */
.reveal { opacity: 1 !important; transform: none !important; }

/* Features */
.features { padding: 0 0 12px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
.feature-card {
  background: linear-gradient(135deg, rgba(27, 29, 35, 0.92), rgba(20, 21, 26, 0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: border-color 280ms ease, transform 350ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 280ms ease;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 24px 48px -16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(196, 245, 66, 0.10), transparent 40%),
    linear-gradient(135deg, transparent 30%, rgba(196, 245, 66, 0.08) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}
.feature-card:hover {
  border-color: rgba(196, 245, 66, 0.35);
  transform: translateY(-3px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 32px 60px -16px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(196, 245, 66, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.feature-card:hover::before { opacity: 1; }
.feature-card > * { position: relative; z-index: 1; }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  color: var(--accent);
  position: relative;
  box-shadow: 0 0 0 0 rgba(196, 245, 66, 0.4);
  animation: avatar-pulse 4s ease-in-out infinite;
}
.feature-icon svg { width: 20px; height: 20px; }

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}
.feature-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* How it works */
.how { padding: 0 0 12px; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  counter-reset: step;
}
.step {
  background: linear-gradient(135deg, rgba(27, 29, 35, 0.92), rgba(20, 21, 26, 0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  position: relative;
  overflow: hidden;
  transition: border-color 280ms ease, transform 350ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 280ms ease;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 24px 48px -16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.step:hover {
  border-color: rgba(196, 245, 66, 0.35);
  transform: translateY(-3px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 32px 60px -16px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(196, 245, 66, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.step > * { position: relative; z-index: 1; }
.step-num {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.step h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-2);
}
.step p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Platforms */
.platforms { padding: 0 0 12px; }
.platform-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
.platform-card {
  position: relative;
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(27, 29, 35, 0.92), rgba(20, 21, 26, 0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1), border-color 280ms ease, box-shadow 280ms ease;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 24px 48px -16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.platform-card:hover {
  transform: translateY(-3px);
  border-color: rgba(196, 245, 66, 0.35);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 32px 60px -16px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(196, 245, 66, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.platform-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
}
.platform-card--ig::before { background: linear-gradient(90deg, #f58529, #dd2a7b, #8134af); }
.platform-card--tt::before { background: linear-gradient(90deg, #25f4ee, #fff, #fe2c55); }
.platform-card--sc::before { background: #fffc00; }

.platform-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.platform-mark svg {
  width: 34px;
  height: 34px;
  display: block;
  shape-rendering: geometricPrecision;
}
.platform-card--ig .platform-mark {
  background: var(--instagram);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.platform-card--tt .platform-mark {
  background: var(--tiktok);
  color: #fff;
}
.platform-card--tt .platform-mark svg {
  filter:
    drop-shadow(-1.5px 0 0 var(--tiktok-cyan))
    drop-shadow(1.5px 0 0 var(--tiktok-red));
}
.platform-card--sc .platform-mark {
  background: var(--snapchat);
  color: #fff;
}
.platform-card--sc .platform-mark svg {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.platform-card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.platform-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Final CTA */
.final-cta {
  padding: 32px 0 24px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--sp-6);
}
.final-cta h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-3);
}
.final-cta p {
  font-size: 15px;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-6);
}

.welcome-foot {
  margin-top: var(--sp-8);
  padding: var(--sp-6) 0 var(--sp-8);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 12px;
  color: var(--accent);
  border-top: 1px solid var(--border-subtle);
}
.welcome-foot .mono { font-size: 11.5px; color: var(--text-muted); }
/* Le tagline du welcome ("par Vanguard") en jaune fluo */
.welcome-brand .brand-tagline { color: var(--accent); }

/* Welcome responsive */
@media (max-width: 920px) {
  .welcome-nav { padding: 0 24px; gap: var(--sp-3); }
  .welcome-nav-links { display: none; }
  .welcome-main { padding: 0 24px 60px; }
  .hero { padding: 40px 0 60px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2)::after { display: none; }
  .feature-grid, .steps, .platform-row { grid-template-columns: 1fr; }
}

/* Brand clickable in sidebar */
.brand[role="button"] {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(196, 245, 66, 0.2);
}
.brand[role="button"]:hover .brand-name { color: var(--accent); }
.brand[role="button"]:active .brand-name { color: var(--accent); }
.brand-name, .brand-tagline { transition: color var(--t-fast); }

/* ==============================================
   MOBILE — desktop-first à mobile-first
   Hide menu toggle on desktop, show on mobile
   ============================================== */
.sidebar-close {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(196, 245, 66, 0.25);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.sidebar-close:hover, .sidebar-close:active {
  border-color: var(--accent);
  color: var(--accent);
}
.sidebar-close svg { width: 14px; height: 14px; }
@media (max-width: 768px) {
  .sidebar-close { display: inline-flex; }
  .brand { position: relative; padding-right: 60px; }
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t-fast);
  flex-shrink: 0;
}
.menu-toggle:hover { border-color: var(--border-default); }
.menu-toggle svg { width: 20px; height: 20px; }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 49;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}
.sidebar-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* === Tablet (768-1024) === */
@media (max-width: 1024px) {
  :root { --sidebar-w: 300px; }
  .results-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .topbar { gap: var(--sp-3); padding: 0 var(--sp-4); }
  .tab-bar { display: none; } /* tabs go to sidebar mobile */
}

/* === Mobile (≤ 768) — version complète === */
@media (max-width: 768px) {
  /* Layout : sidebar devient drawer */
  .app { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed !important;
    top: 0; left: 0; bottom: 0;
    width: min(86vw, 320px);
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 2px 0 32px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }

  /* Topbar mobile : compact, avec un peu d'espace entre les boutons */
  .topbar {
    height: 56px;
    padding: 0 var(--sp-3);
    gap: var(--sp-3);
  }
  .topbar-actions { gap: var(--sp-3); }

  /* Override la règle globale qui appliquait margin-left: auto au :last-child — en grid mobile elle décale Plateformes */
  .status-band .status-cell:last-child { margin-left: 0; }

  /* Cache éléments non-critiques en mobile */
  .topbar-actions select#sort-select { display: none; } /* sort dans modal */
  .topbar-actions .view-switch { display: none; } /* grid only on mobile */
  /* Tous les boutons d'action mobile à la même taille — version compacte 32×32 avec contour jaune fluo */
  .topbar-actions .btn,
  .topbar-actions .btn-secondary,
  .topbar-actions .btn-primary,
  .topbar-actions .btn-ghost {
    padding: 0;
    width: 32px;
    height: 32px;
    min-height: 32px;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--accent);
    color: var(--accent);
  }
  .topbar-actions .btn-primary {
    border-color: var(--accent);
    color: #000;
  }
  .topbar-actions .btn-ghost:hover:not(:disabled),
  .topbar-actions .btn-secondary:hover:not(:disabled) {
    border-color: var(--accent-hover, var(--accent));
    background: var(--accent-glow);
    color: var(--accent);
  }
  .topbar-actions .btn span { display: none; }
  /* Icônes 14×14, stroke 2 pour rester nettes à cette taille */
  .topbar-actions .btn svg {
    margin: 0;
    width: 14px;
    height: 14px;
    stroke-width: 2;
    stroke: currentColor;
  }
  /* Bouton Accueil même format que la rangée */
  .topbar .home-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
  }
  .topbar .home-btn:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: var(--accent);
  }
  .topbar .home-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    stroke: currentColor;
  }
  .topbar .home-btn span { display: none; }

  /* Tabs : visible mais en bas (sticky) */
  .tab-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-default);
    border-radius: 0;
    padding: 6px;
    gap: 4px;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
  }
  .tab {
    flex: 1;
    height: 44px;
    font-size: 12px;
    justify-content: center;
  }

  /* Filter bar : horizontalement scrollable */
  .filter-bar {
    height: auto;
    min-height: 44px;
    padding: 8px var(--sp-3);
    flex-wrap: nowrap;
  }
  .filter-bar-label { display: none; }

  /* Status band mobile : layout flex à 2 lignes ;
     chaque ligne distribue l'espace proportionnellement (space-evenly) : gap égal
     à gauche, au milieu, et à droite — donc parfaitement équilibré visuellement. */
  .status-band {
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    padding: 6px 0;
    row-gap: 4px;
  }
  .status-cell {
    padding: 0;
    height: 26px;
    flex: 0 0 auto;
    border-right: none !important;
  }
  .status-cell .lbl { font-size: 9.5px; color: var(--text-primary); }
  .status-cell .val { font-size: 11.5px; color: var(--accent); }
  /* "profils" reste en blanc — distinction unité vs valeur numérique */
  .status-cell .val .val-unit { color: var(--text-primary); }
  .status-band-break { display: block; flex-basis: 100%; height: 0; width: 100%; }
  /* Base masquée — son compte est fusionné dans Source via JS */
  .status-band > .status-cell:nth-of-type(2) {
    display: none;
  }

  /* Results : 1 colonne, padding réduit */
  .results-area { padding: var(--sp-3) var(--sp-3) 80px; }
  .results-grid { grid-template-columns: 1fr; gap: var(--sp-3); }

  /* Cards : ajusté mobile */
  .card { padding: var(--sp-4); }
  .card__head { gap: var(--sp-2); }
  .card__avatar { width: 40px; height: 40px; }
  .card__stats { padding: 8px 0; }
  .stat__value { font-size: 13px; }
  .stat__label { font-size: 9.5px; }

  /* Modal : plein écran */
  .modal { padding: 0; }
  .modal-content {
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
  .modal-close { top: 12px; right: 12px; }

  /* Welcome mobile — compact, sans floating chaos */
  .welcome-bg .lamp,
  .welcome-bg .orbit-system,
  .welcome-bg .floating-cards,
  .welcome-bg .particles-canvas,
  .welcome-bg .welcome-glow--2 { display: none !important; }

  .welcome-nav { padding: 0 var(--sp-4); height: 60px; gap: var(--sp-3); }
  .welcome-nav-links { display: none; }
  .welcome-main { padding: 0 var(--sp-4) 60px; }

  .hero { padding: 32px 0 24px; max-width: 100%; }
  .hero-title { font-size: clamp(36px, 9vw, 52px); line-height: 1.05; }
  .hero-sub { font-size: 14.5px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); margin-top: var(--sp-5); }
  .hero-stat:nth-child(2)::after { display: none; }
  .hero-stat-num { font-size: clamp(26px, 7vw, 32px); }
  .live-ticker { max-width: 100%; }
  .hero-search-demo { display: none !important; }

  .marquee { margin: var(--sp-5) calc(-1 * var(--sp-4)) var(--sp-5); }

  .section-head { margin-bottom: var(--sp-5); }
  /* Sur mobile on baisse la taille pour que la phrase la plus longue
     ("Un moteur, dix-huit critères, zéro friction.") tienne sur 1 ligne
     dès 360px de largeur. Mesure : 17px ≈ 323px → fits dans 343px de container. */
  .section-title { font-size: clamp(16px, 4.6vw, 24px); line-height: 1.2; }

  .feature-grid, .steps, .platform-row {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }
  .feature-card, .step, .platform-card {
    padding: var(--sp-5);
  }

  .scroll-cue { display: none; } /* mobile users savent scroller */

  .final-cta { padding: 32px 0 24px; }
  .final-cta h2 { font-size: clamp(22px, 6vw, 28px); }

  /* Sidebar mobile : ajusté */
  .filters { padding: var(--sp-2) 0 var(--sp-8); }
  .filter-group__head { padding: var(--sp-3) var(--sp-4); }
  .filter-group__body { padding: 0 var(--sp-4) var(--sp-3); }

  /* Toast position above tab bar */
  .toast-zone { bottom: 76px; right: var(--sp-3); }

  /* Larger tap targets globally */
  .btn, .chip, .preset, .tab, .menu-toggle { min-height: 38px; }
  .btn-sm { min-height: 34px; }
}

/* === Très petit (≤ 380) === */
@media (max-width: 380px) {
  .stat__value { font-size: 12px; }
}

/* === ANTI-OVERFLOW MOBILE — verrou final === */
@media (max-width: 768px) {
  /* Tout container respecte le viewport */
  .app, .main, .results-area, .welcome, .welcome-main,
  .card, .feature-card, .step, .platform-card,
  .modal-content, .topbar, .filter-bar, .status-band,
  .hero, .hero-stats, .features, .how, .platforms,
  .feature-grid, .steps, .platform-row {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Cards : gérer wrap propre du contenu */
  .card { overflow: hidden; }
  .card__head { min-width: 0; flex-wrap: nowrap; }
  .card__id { min-width: 0; flex: 1; }
  .card__name, .card__handle, .card__bio { min-width: 0; }
  .card__tags { flex-wrap: wrap; gap: 4px; }
  .card__actions {
    flex-wrap: nowrap;
    gap: 6px;
  }
  .card__actions .btn {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
    font-size: 11.5px;
  }

  /* Hero stats : pas de débordement */
  .hero-stats { overflow: hidden; }
  .hero-stat-num { font-variant-numeric: tabular-nums; }

  /* Modal sur mobile : safe-area iPhone */
  .modal-content {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* Footer toujours visible above tab-bar safe-area */
  .toast-zone { bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* Welcome footer ne déborde pas */
  .welcome-foot { flex-wrap: wrap; gap: 4px 8px; }
}

/* === Sidebar mobile : crystal clear, pas de flou === */
@media (max-width: 768px) {
  .sidebar {
    background: #0c0d10 !important;       /* fully opaque, no transparency */
    z-index: 70 !important;               /* always above backdrop (49) and any content */
  }
  .sidebar.open {
    -webkit-transform: translateX(0);
    box-shadow: 4px 0 60px rgba(0, 0, 0, 0.7);
  }
  /* Tap feedback iOS */
  .sidebar a, .sidebar button, .sidebar .chip, .sidebar .preset, .sidebar input, .sidebar select, .sidebar .checkbox {
    -webkit-tap-highlight-color: rgba(196, 245, 66, 0.18);
  }
  /* Explicitly make hamburger easily tappable */
  .menu-toggle {
    -webkit-tap-highlight-color: rgba(196, 245, 66, 0.2);
    width: 42px;
    height: 42px;
    background: var(--bg-elevated);
    border: 1px solid var(--accent);
    color: var(--accent);
  }
  .menu-toggle:active {
    background: var(--accent);
    color: #000;
  }
  /* Bigger tap targets sur les filter group heads (les sections pliables) */
  .filter-group__head {
    min-height: 48px;
    -webkit-tap-highlight-color: rgba(196, 245, 66, 0.15);
  }
  /* Chip et preset : full tap area */
  .filter-group .chip, .filter-group .preset {
    min-height: 36px;
  }
  /* Active state visible quand on touche */
  .chip:active { background: var(--accent-hover) !important; color: #000 !important; }
  .btn:active { transform: scale(0.97); }
}


/* ───────────────────────────────────────────────────────────────
   Profile Modal — Enriched View
   ─────────────────────────────────────────────────────────────── */

/* Wrap with left/right arrows for scrollable tabs */
.modal-tabs-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.modal-tabs-arrow {
  flex-shrink: 0;
  width: 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: opacity 160ms ease, color 160ms ease, background 160ms ease;
  align-self: center;
  height: 30px;
  z-index: 2;
}
.modal-tabs-arrow svg { width: 14px; height: 14px; }
.modal-tabs-arrow:hover { background: var(--accent); color: #000; border-color: var(--accent); }
.modal-tabs-arrow.hidden { opacity: 0; pointer-events: none; }
.modal-tabs-arrow--left { margin-right: 6px; }
.modal-tabs-arrow--right { margin-left: 6px; }

.modal-tabs {
  flex: 1;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0;
  scroll-behavior: smooth;
  position: relative;
  /* Edge fade — wider (32px) so the "more tabs hidden" cue is obvious. The mask is dynamic:
     classes on .modal-tabs-wrap (.at-start / .at-end) flatten the fade on the corresponding
     edge so the visible content doesn't fade when there's nothing to scroll toward. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 32px, black calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 32px, black calc(100% - 32px), transparent 100%);
}
.modal-tabs-wrap.at-start .modal-tabs {
  -webkit-mask-image: linear-gradient(90deg, black 0, black calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(90deg, black 0, black calc(100% - 32px), transparent 100%);
}
.modal-tabs-wrap.at-end .modal-tabs {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 32px, black 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 32px, black 100%);
}
.modal-tabs-wrap.at-start.at-end .modal-tabs {
  -webkit-mask-image: none;
  mask-image: none;
}
.modal-tabs::-webkit-scrollbar { display: none; }

.modal-tab {
  background: transparent;
  border: none;
  color: var(--text-soft);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.modal-tab:hover { color: var(--text); }
.modal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.modal-tab-panel { display: none; }
.modal-tab-panel.active { display: block; }

/* Tier tags */
.tag.tier-nano  { background: rgba(78,201,176,0.15); color: #4ec9b0; border-color: rgba(78,201,176,0.3); }
.tag.tier-micro { background: rgba(167,139,250,0.15); color: #a78bfa; border-color: rgba(167,139,250,0.3); }
.tag.tier-mid   { background: rgba(196,245,66,0.18); color: var(--accent); border-color: var(--accent); }
.tag.tier-macro { background: rgba(251,191,36,0.18); color: #fbbf24; border-color: rgba(251,191,36,0.3); }
.tag.tier-mega  { background: rgba(239,68,68,0.18); color: #ef4444; border-color: rgba(239,68,68,0.3); }

/* Score bars */
.score-row {
  display: grid;
  grid-template-columns: 160px 1fr 50px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.score-label { font-size: 13px; color: var(--text-soft); }
.score-bar {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 400ms ease;
}
.score-fill.lime  { background: linear-gradient(90deg, var(--accent), #84cc16); }
.score-fill.cyan  { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.score-fill.amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.score-value {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Fake follower box */
.fake-pct-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.fake-pct-box.ok { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.3); }
.fake-pct-box.warning { background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.3); }
.fake-pct-box.danger { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.3); }
.fake-pct-value {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.fake-pct-box.ok .fake-pct-value { color: #22c55e; }
.fake-pct-box.warning .fake-pct-value { color: #f59e0b; }
.fake-pct-box.danger .fake-pct-value { color: #ef4444; }
.fake-pct-label { font-size: 13px; color: var(--text-soft); }

/* Audience grid */
.audience-confidence {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 12px;
}
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.audience-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.audience-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.audience-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
  font-variant-numeric: tabular-nums;
}
.audience-empty {
  color: var(--text-soft);
  font-size: 12px;
  font-style: italic;
}

/* Price band */
.price-band {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.price-min, .price-max { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text-soft); }
.price-bar {
  position: relative;
  height: 6px;
  background: linear-gradient(90deg, rgba(196,245,66,0.2), var(--accent), rgba(196,245,66,0.2));
  border-radius: 3px;
}
.price-mid {
  position: absolute;
  top: -4px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(196,245,66,0.18);
}
.price-mid-label {
  text-align: center;
  font-size: 14px;
  color: var(--text-soft);
}
.price-mid-label strong { color: var(--accent); font-variant-numeric: tabular-nums; }

/* Contact tab */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.contact-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.contact-block-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.contact-row {
  font-size: 13px;
  padding: 3px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.contact-row a { color: var(--accent); }
.email-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.email-type.type-business { background: rgba(196,245,66,0.18); color: var(--accent); }
.email-type.type-business-personal { background: rgba(251,191,36,0.18); color: #fbbf24; }
.email-type.type-personal { background: rgba(148,163,184,0.18); color: var(--text-soft); }

/* Brand tab */
.brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.brand-tag, .brand-cat {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.brand-tag { background: rgba(196,245,66,0.10); color: var(--accent); border: 1px solid rgba(196,245,66,0.3); }
.brand-cat { background: var(--bg-elevated); color: var(--text-soft); border: 1px solid var(--border); }
.sponsored-yes { color: var(--accent); font-size: 14px; }
.sponsored-yes code { background: var(--bg-elevated); padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.sponsored-no { color: var(--text-soft); font-size: 14px; }

/* Lookalike */
.lookalike-row {
  display: grid;
  grid-template-columns: 48px 1fr 60px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  background: var(--bg-elevated);
}
.lookalike-row:hover {
  border-color: var(--accent);
  background: rgba(196,245,66,0.06);
}
.lookalike-avatar { width: 48px; height: 48px; }
.lookalike-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.lookalike-name { font-weight: 600; font-size: 14px; }
.lookalike-meta { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.lookalike-niches { margin-top: 4px; }
.tag-small {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-right: 4px;
  color: var(--text-soft);
}
.lookalike-similarity {
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Brief generator */
.brief-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.brief-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-soft);
}
.brief-form input, .brief-form select {
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
}
.brief-md {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  white-space: pre-wrap;
  font-family: ui-monospace, monospace;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 12px;
}

/* Growth chart */
.growth-chart {
  margin-top: 16px;
  padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* Empty state soft */
.empty-state-soft {
  color: var(--text-soft);
  font-size: 13px;
  text-align: center;
  padding: 20px;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px dashed var(--border);
  line-height: 1.5;
}
.empty-state-soft .hint-soft {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  opacity: 0.85;
  line-height: 1.45;
}
.empty-state-soft .hint-soft code {
  font-family: var(--f-mono);
  font-size: 10.5px;
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 3px;
  margin: 0 2px;
}
.sponsored-no .hint-soft {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  opacity: 0.85;
}
.sponsored-no .hint-soft code {
  font-family: var(--f-mono);
  font-size: 10.5px;
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 3px;
  margin: 0 2px;
}

/* Card-level micro tags */
.tag.auth-tag {
  background: rgba(34,197,94,0.10);
  color: #22c55e;
  border-color: rgba(34,197,94,0.3);
  font-variant-numeric: tabular-nums;
}
.tag.sponso-tag {
  background: rgba(168,85,247,0.10);
  color: #a78bfa;
  border-color: rgba(168,85,247,0.3);
}
.tag.price-tag {
  background: rgba(251,191,36,0.10);
  color: #fbbf24;
  border-color: rgba(251,191,36,0.3);
  font-variant-numeric: tabular-nums;
}

/* ─── Dashboards (insights / CRM / saved searches) ─── */
.dashboard-topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  background: linear-gradient(180deg, rgba(20,20,22,0.95), rgba(15,15,17,0.92));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-height: 60px;
  animation: topbar-glide 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dashboard-topbar h1 {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.topbar-logo {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 160ms ease;
}
.topbar-logo:hover { background: rgba(196,245,66,0.10); }

@keyframes topbar-glide {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 700px) {
  .dashboard-topbar {
    padding: 12px 16px;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dashboard-topbar h1 { font-size: 16px; }
  .topbar-logo { font-size: 12px; }
}

.dashboard-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.dashboard-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
}
.dashboard-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
}
.dashboard-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 18px 0 8px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dashboard-hint { color: var(--text-soft); font-size: 13px; margin-bottom: 12px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.kpi {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.kpi-value {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.kpi-label {
  font-size: 12px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.ranking-list { display: flex; flex-direction: column; gap: 6px; }
.rank-row {
  display: grid;
  grid-template-columns: 40px 140px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.rank-row:last-child { border-bottom: none; }
.rank { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 700; }
.rank-label { font-weight: 600; }
.rank-bar {
  display: block;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.rank-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
.rank-value { font-size: 12px; color: var(--text-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }

.filters-row { display: flex; gap: 8px; margin-bottom: 12px; }
.filters-row select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 10px;
  font-size: 13px;
}

.rising-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.rising-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.rising-handle { color: var(--accent); font-size: 13px; font-weight: 600; }
.rising-name { font-size: 14px; margin: 4px 0 8px; }
.rising-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}
.rising-er { color: var(--accent); font-weight: 600; }
.rising-meta {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-soft);
}

/* CRM */
.card-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.card-head-row h2 { margin: 0; }
.campaigns-list { display: flex; flex-direction: column; gap: 10px; }
.campaign-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.campaign-name { font-weight: 700; font-size: 15px; }
.campaign-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 4px;
}
.campaign-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-draft { background: rgba(148,163,184,0.18); color: var(--text-soft); }
.status-active { background: rgba(34,197,94,0.18); color: #22c55e; }
.status-paused { background: rgba(245,158,11,0.18); color: #f59e0b; }
.status-archived { background: rgba(148,163,184,0.18); color: var(--text-soft); }
.campaign-stats { display: flex; gap: 14px; }
.campaign-stat .lbl { font-size: 10px; color: var(--text-soft); text-transform: uppercase; }
.campaign-stat .val { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.pipe-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}
.pipe-head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.pipe-count {
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.pipe-body { display: flex; flex-direction: column; gap: 6px; }
.pipe-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}
.pipe-name { font-weight: 700; color: var(--accent); }
.pipe-meta { font-size: 11px; color: var(--text-soft); margin: 2px 0 4px; }
.pipe-price { font-variant-numeric: tabular-nums; font-weight: 600; }
.pipe-status {
  width: 100%;
  margin-top: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  padding: 3px 6px;
  color: var(--text);
}
.pipe-mail {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
}

/* Saved searches */
.saved-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.saved-name { font-weight: 700; }
.saved-meta { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.saved-actions { display: flex; gap: 6px; }

/* ─── Dashboard polish ─── */
.dashboard-intro {
  padding: 22px 26px;
  background: linear-gradient(135deg, rgba(196,245,66,0.08), rgba(196,245,66,0.02));
  border: 1px solid rgba(196,245,66,0.25);
  border-radius: 16px;
}
.dashboard-intro .intro-h {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--accent);
}
.dashboard-intro .intro-p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
}

/* Make rows clickable */
.kpi-link, .rank-link, .rising-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 120ms ease, transform 120ms ease;
}
.kpi-link:hover { background: rgba(196,245,66,0.06); transform: translateY(-1px); }
.rank-link { display: grid; }
.rank-link:hover { background: rgba(196,245,66,0.04); border-radius: 8px; padding-left: 8px; padding-right: 8px; margin-left: -8px; margin-right: -8px; }
.rising-link { display: block; }
.rising-link:hover { border-color: var(--accent); transform: translateY(-2px); }

.tag-mini {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-soft);
  margin-right: 3px;
  margin-top: 4px;
}

.roi-pos { color: #22c55e !important; }
.roi-neg { color: #ef4444 !important; }

/* CRM polish */
.campaign-actions { display: flex; gap: 6px; }
.empty-outreach {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-top: 12px;
}
.empty-outreach p { color: var(--text-soft); margin: 0 0 14px; }

.pipe-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pipe-edit {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 3px;
  color: var(--text-soft);
}
.pipe-edit:hover { background: var(--bg); color: var(--accent); }
.pipe-name {
  color: var(--accent);
  text-decoration: none;
}
.pipe-name:hover { text-decoration: underline; }
.pipe-stat {
  font-size: 11px;
  color: var(--text-soft);
  margin: 2px 0;
}
.pipe-empty {
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
  padding: 12px 0;
  font-style: italic;
}

/* Modal backdrop & card */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-card-wide { max-width: 760px; }
.modal-card .modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 24px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-card .modal-close:hover { background: var(--bg); color: var(--accent); }
.modal-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-soft);
}
.form-grid input, .form-grid select, .form-grid textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}
.form-row { display: flex; gap: 10px; }
.form-row .half { flex: 1; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

/* Saved searches polish */
.saved-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  align-items: start;
}
.saved-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.saved-pulse.on {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
  animation: live-blink 1.4s ease-in-out infinite;
}
.saved-pulse.off {
  background: var(--text-soft);
  opacity: 0.5;
}
.saved-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.saved-tag-disabled {
  font-size: 10px;
  color: var(--text-soft);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.saved-meta-line {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 4px;
}
.saved-meta-line strong {
  color: var(--accent);
}
.saved-criteria {
  font-size: 12px;
  color: var(--text-soft);
  font-family: ui-monospace, monospace;
  background: var(--bg-elevated);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.saved-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.alert-log-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.alert-log-row:last-child { border-bottom: none; }
.alert-log-name { font-weight: 600; }
.alert-log-date { font-size: 12px; color: var(--text-soft); }
.alert-log-result {
  font-size: 12px;
  background: rgba(196,245,66,0.10);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
}
.match-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease;
}
.match-card:hover { border-color: var(--accent); }
.match-name { color: var(--accent); font-size: 13px; font-weight: 700; }
.match-meta { font-size: 11px; color: var(--text-soft); margin: 4px 0; }
.match-niches { display: flex; flex-wrap: wrap; }

/* ─── Page entry animations (taste-skill: dashboards + dark-luxe) ─── */
.dashboard-main > * {
  animation: dashboard-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dashboard-main > *:nth-child(1) { animation-delay: 80ms; }
.dashboard-main > *:nth-child(2) { animation-delay: 180ms; }
.dashboard-main > *:nth-child(3) { animation-delay: 280ms; }
.dashboard-main > *:nth-child(4) { animation-delay: 380ms; }
.dashboard-main > *:nth-child(5) { animation-delay: 480ms; }
.dashboard-main > *:nth-child(6) { animation-delay: 580ms; }

@keyframes dashboard-rise {
  from {
    transform: translateY(24px);
    opacity: 0;
    filter: blur(8px);
  }
  to {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

/* Intro card has a subtle gradient sweep on entry */
.dashboard-intro {
  position: relative;
  overflow: hidden;
}
.dashboard-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(196,245,66,0.10) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: intro-sweep 1400ms cubic-bezier(0.22, 1, 0.36, 1) 200ms forwards;
  pointer-events: none;
}
@keyframes intro-sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(120%); }
}

/* KPI count-up reveal */
.kpi-link, .kpi {
  position: relative;
  overflow: hidden;
}
.kpi-link::after, .kpi::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(196,245,66,0.18), transparent 70%);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}
.kpi-link:hover::after, .kpi:hover::after { opacity: 1; }

.kpi-value {
  display: inline-block;
  animation: kpi-pop 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 350ms;
}
@keyframes kpi-pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Rank rows stagger fade-in */
.rank-row {
  animation: row-slide 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ranking-list .rank-row:nth-child(1) { animation-delay: 350ms; }
.ranking-list .rank-row:nth-child(2) { animation-delay: 410ms; }
.ranking-list .rank-row:nth-child(3) { animation-delay: 470ms; }
.ranking-list .rank-row:nth-child(4) { animation-delay: 530ms; }
.ranking-list .rank-row:nth-child(5) { animation-delay: 590ms; }
.ranking-list .rank-row:nth-child(6) { animation-delay: 650ms; }
.ranking-list .rank-row:nth-child(7) { animation-delay: 710ms; }
.ranking-list .rank-row:nth-child(n+8) { animation-delay: 770ms; }

@keyframes row-slide {
  from { transform: translateX(-12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Rank bars grow from left */
.rank-bar > span {
  transform-origin: left;
  animation: rank-bar-grow 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 700ms;
}
@keyframes rank-bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Rising stars cards fade-in stagger */
.rising-card {
  animation: rising-rise 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.rising-grid .rising-card:nth-child(1) { animation-delay: 500ms; }
.rising-grid .rising-card:nth-child(2) { animation-delay: 560ms; }
.rising-grid .rising-card:nth-child(3) { animation-delay: 620ms; }
.rising-grid .rising-card:nth-child(4) { animation-delay: 680ms; }
.rising-grid .rising-card:nth-child(5) { animation-delay: 740ms; }
.rising-grid .rising-card:nth-child(n+6) { animation-delay: 800ms; }

@keyframes rising-rise {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Smooth hover on links */
.rank-link, .rising-link, .kpi-link {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background 200ms ease, border-color 200ms ease;
}
.rank-link:hover { transform: translateX(6px); }
.rising-link:hover { transform: translateY(-3px); }
.kpi-link:hover { transform: translateY(-2px); }

/* Campaign rows stagger */
.campaign-row {
  animation: campaign-fade 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.campaigns-list .campaign-row:nth-child(1) { animation-delay: 200ms; }
.campaigns-list .campaign-row:nth-child(2) { animation-delay: 260ms; }
.campaigns-list .campaign-row:nth-child(3) { animation-delay: 320ms; }
.campaigns-list .campaign-row:nth-child(n+4) { animation-delay: 380ms; }
@keyframes campaign-fade {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Saved-row stagger */
.saved-row {
  animation: campaign-fade 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
#searches-list .saved-row:nth-child(1) { animation-delay: 200ms; }
#searches-list .saved-row:nth-child(2) { animation-delay: 280ms; }
#searches-list .saved-row:nth-child(n+3) { animation-delay: 360ms; }

/* Modal entry */
.modal-backdrop {
  animation: backdrop-fade 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.modal-card {
  animation: modal-pop 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes backdrop-fade {
  from { opacity: 0; backdrop-filter: blur(0); }
  to { opacity: 1; backdrop-filter: blur(6px); }
}
@keyframes modal-pop {
  from { transform: translateY(20px) scale(0.94); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  .dashboard-main > *,
  .dashboard-intro::before,
  .kpi-value,
  .rank-row,
  .rank-bar > span,
  .rising-card,
  .campaign-row,
  .saved-row,
  .modal-backdrop,
  .modal-card,
  .dashboard-topbar {
    animation: none !important;
  }
}

/* ─── Dashboard pages body (Insights/CRM/Alertes) ─── */
body.dashboard-page {
  display: block;
  height: auto;
  min-height: 100vh;
  overflow: auto;
  background: var(--bg-base);
  color: var(--text);
}
body.dashboard-page .dashboard-topbar {
  height: auto;
  min-height: 60px;
}

/* ─── Home button (return to welcome) ─── */
.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.home-btn:hover {
  background: rgba(196,245,66,0.10);
  border-color: var(--accent);
  color: var(--accent);
}
.home-btn svg { flex-shrink: 0; }
@media (max-width: 768px) {
  .home-btn span { display: none; }
  .home-btn { padding: 7px 9px; }
}

/* ─── Welcome polish: growth indicator ─── */
.hero-stat-delta {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 600ms ease 200ms;
}
.hero-stat-delta.visible {
  opacity: 1 !important;
}

/* Real avatar in float-card with subtle glow ring */
.float-card .float-avatar {
  border: 2px solid rgba(196, 245, 66, 0.4);
}
.float-card:hover .float-avatar {
  border-color: var(--accent);
}

/* Live ticker — make the rolling items more dynamic */
.live-ticker .at {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--f-mono);
}
.live-ticker .meta {
  color: var(--text-soft);
  margin-left: 6px;
}

/* Final CTA polish */
.final-cta {
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 800px 400px at 50% 100%, rgba(196,245,66,0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.final-cta > * { position: relative; z-index: 1; }

/* Cross-page transitions handled by transitions.js (themed overlays per destination).
   View Transitions API removed to avoid double-animation conflicts. */

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.01ms !important;
  }
}

/* ─── Welcome → Dashboard fast crossfade (replaces slow curtain) ─── */
.welcome-leaving {
  animation: welcome-fadeout 280ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}
@keyframes welcome-fadeout {
  from { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
  to   { opacity: 0; transform: scale(0.97) translateY(-8px); filter: blur(6px); }
}

.app-entering {
  animation: app-fadein 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes app-fadein {
  from { opacity: 0; transform: scale(1.015); }
  to   { opacity: 1; transform: scale(1); }
}

/* During the transition, both layers should be visible — override the show-welcome rule */
.welcome-leaving { display: flex !important; }

/* ─── Themed page transitions overlay ─── */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--bg-base, #0d0d0d);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 130ms cubic-bezier(0.4, 0, 0.2, 1), transform 130ms cubic-bezier(0.4, 0, 0.2, 1);
}
.page-transition.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}
.page-transition.leaving {
  opacity: 0;
  transform: scale(0.98);
}
.tx-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--tx-color, #c4f542);
}
.tx-icon {
  width: 44px;
  height: 44px;
  opacity: 0;
  transform: scale(0.6);
  animation: tx-icon-pop 200ms cubic-bezier(0.22, 1, 0.36, 1) 30ms forwards;
}
.tx-icon svg { width: 100%; height: 100%; }
.tx-label {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tx-color, #c4f542);
  opacity: 0;
  transform: translateY(6px);
  animation: tx-label-rise 180ms cubic-bezier(0.22, 1, 0.36, 1) 60ms forwards;
}
@keyframes tx-icon-pop {
  to { opacity: 1; transform: scale(1); }
}
@keyframes tx-label-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ── INSIGHTS theme : bar chart growing ── */
.tx-insights .tx-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 38px;
  margin-top: 4px;
}
.tx-insights .tx-bars span {
  width: 8px;
  background: var(--tx-color);
  border-radius: 3px;
  transform: scaleY(0);
  transform-origin: bottom;
  animation: tx-bar-grow 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tx-insights .tx-bars span:nth-child(1) { height: 16px; animation-delay: 80ms; }
.tx-insights .tx-bars span:nth-child(2) { height: 28px; animation-delay: 110ms; }
.tx-insights .tx-bars span:nth-child(3) { height: 22px; animation-delay: 140ms; }
.tx-insights .tx-bars span:nth-child(4) { height: 38px; animation-delay: 170ms; }
.tx-insights .tx-bars span:nth-child(5) { height: 30px; animation-delay: 200ms; }
@keyframes tx-bar-grow { to { transform: scaleY(1); } }

/* ── CRM theme : kanban columns sliding in ── */
.tx-crm .tx-columns {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  height: 38px;
}
.tx-crm .tx-columns span {
  width: 14px;
  background: linear-gradient(180deg, var(--tx-color), rgba(251,191,36,0.4));
  border-radius: 3px;
  transform: translateY(20px);
  opacity: 0;
  animation: tx-col-slide 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tx-crm .tx-columns span:nth-child(1) { animation-delay: 90ms; }
.tx-crm .tx-columns span:nth-child(2) { animation-delay: 130ms; }
.tx-crm .tx-columns span:nth-child(3) { animation-delay: 170ms; }
@keyframes tx-col-slide { to { transform: translateY(0); opacity: 1; } }

/* ── ALERTES theme : radar pulse rings ── */
.tx-alertes .tx-radar {
  position: relative;
  width: 80px;
  height: 80px;
  margin-top: 4px;
}
.tx-alertes .tx-radar span {
  position: absolute;
  inset: 0;
  border: 2px solid var(--tx-color);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
  animation: tx-radar-ping 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tx-alertes .tx-radar span:nth-child(1) { animation-delay: 70ms; }
.tx-alertes .tx-radar span:nth-child(2) { animation-delay: 130ms; }
.tx-alertes .tx-radar span:nth-child(3) { animation-delay: 190ms; }
@keyframes tx-radar-ping {
  0% { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ── SEARCH theme : magnifier ring + scan line ── */
.tx-search .tx-search {
  position: relative;
  width: 80px;
  height: 80px;
  margin-top: 4px;
}
.tx-search .tx-search-ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--tx-color);
  border-radius: 50%;
  transform: scale(0.4);
  opacity: 0;
  animation: tx-search-ring 280ms cubic-bezier(0.22, 1, 0.36, 1) 60ms forwards;
}
.tx-search .tx-search-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--tx-color);
  box-shadow: 0 0 8px var(--tx-color);
  transform: scaleX(0);
  transform-origin: left;
  animation: tx-search-line 280ms cubic-bezier(0.22, 1, 0.36, 1) 180ms forwards;
}
@keyframes tx-search-ring {
  to { transform: scale(1); opacity: 1; }
}
@keyframes tx-search-line {
  0% { transform: scaleX(0); }
  60% { transform: scaleX(1); transform-origin: left; }
  61% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ── HOME theme : pulse from center ── */
.tx-home .tx-home-pulse {
  position: absolute;
  inset: 50% 50%;
  width: 8px;
  height: 8px;
  background: var(--tx-color);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  box-shadow: 0 0 0 0 var(--tx-color);
  animation: tx-home-burst 380ms cubic-bezier(0.22, 1, 0.36, 1) 60ms forwards;
}
@keyframes tx-home-burst {
  0%   { box-shadow: 0 0 0 0   rgba(196, 245, 66, 0.6); transform: translate(-50%, -50%) scale(1); }
  100% { box-shadow: 0 0 0 600px rgba(196, 245, 66, 0); transform: translate(-50%, -50%) scale(1); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .page-transition, .tx-icon, .tx-label, .tx-bars span, .tx-columns span, .tx-radar span,
  .tx-search-ring, .tx-search-line, .tx-home-pulse {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Pagination "Load more" bar */
.load-more-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  margin: 18px auto;
  max-width: 480px;
  background: var(--bg-elevated, #1a1a1c);
  border: 1px solid var(--border, #2a2a2c);
  border-radius: 14px;
}
.load-more-info {
  font-size: 13px;
  color: var(--text-soft, #94a3b8);
}
.load-more-info strong {
  color: var(--accent, #c4f542);
  font-variant-numeric: tabular-nums;
}

/* ─── Brand-fit modal panel ─── */
.brand-fit-hero {
  text-align: center;
  padding: 24px;
  border-radius: 14px;
  margin-bottom: 18px;
}
.brand-fit-perfect { background: linear-gradient(135deg, rgba(34,197,94,0.18), rgba(196,245,66,0.10)); border: 1px solid rgba(196,245,66,0.4); }
.brand-fit-good { background: linear-gradient(135deg, rgba(196,245,66,0.10), rgba(34,197,94,0.05)); border: 1px solid rgba(196,245,66,0.3); }
.brand-fit-mid { background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.3); }
.brand-fit-low { background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.3); }
.brand-fit-score-num { font-size: 56px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1; }
.brand-fit-score-suffix { font-size: 22px; opacity: 0.5; font-weight: 700; }
.brand-fit-low .brand-fit-score-num { color: #ef4444; }
.brand-fit-mid .brand-fit-score-num { color: #fbbf24; }
.brand-fit-label { margin-top: 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); }

.brand-fit-breakdown { display: flex; flex-direction: column; gap: 6px; }
.brand-fit-row { display: grid; grid-template-columns: 110px 1fr 50px; gap: 10px; align-items: center; font-size: 12px; }
.brand-fit-key { color: var(--text-soft); text-transform: capitalize; }
.brand-fit-bar { background: var(--bg-elevated); height: 6px; border-radius: 3px; overflow: hidden; }
.brand-fit-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.brand-fit-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); }

.brand-fit-collab { background: var(--bg-elevated); border-radius: 10px; padding: 16px; margin-top: 10px; text-align: center; }
.brand-fit-prob { font-size: 38px; font-weight: 800; color: var(--accent); }
.brand-fit-collab-label { font-size: 12px; text-transform: uppercase; color: var(--text-soft); letter-spacing: 0.05em; margin-top: 2px; }
.brand-fit-mentions { margin-top: 12px; font-size: 12px; color: var(--text-soft); padding: 8px; background: var(--bg); border-radius: 6px; }
.brand-fit-mentions strong { color: var(--accent); }
.brand-fit-mentions.empty { font-style: italic; }

/* ─── Risk flags panel ─── */
.risk-verdict {
  display: flex; gap: 14px; align-items: center;
  padding: 16px 18px; border-radius: 12px; margin-bottom: 14px;
}
.verdict-safe { background: rgba(34,197,94,0.10); border: 1px solid rgba(34,197,94,0.3); }
.verdict-warning { background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.3); }
.verdict-danger { background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.3); }
.risk-verdict-icon { font-size: 28px; font-weight: 900; }
.verdict-safe .risk-verdict-icon { color: #22c55e; }
.verdict-warning .risk-verdict-icon { color: #fbbf24; }
.verdict-danger .risk-verdict-icon { color: #ef4444; }
.risk-verdict-label { font-size: 14px; font-weight: 800; letter-spacing: 0.04em; }
.risk-verdict-sub { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

.risk-flag { padding: 12px 14px; border-radius: 8px; margin-bottom: 8px; }
.risk-low { background: rgba(148,163,184,0.10); border-left: 3px solid #94a3b8; }
.risk-medium { background: rgba(251,191,36,0.10); border-left: 3px solid #fbbf24; }
.risk-high { background: rgba(239,68,68,0.10); border-left: 3px solid #ef4444; }
.risk-critical { background: rgba(239,68,68,0.18); border-left: 3px solid #dc2626; }
.risk-flag-head { display: flex; justify-content: space-between; align-items: center; }
.risk-flag-label { font-weight: 600; font-size: 13px; }
.risk-flag-severity { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 3px; background: var(--bg); color: var(--text-soft); font-weight: 700; }
.risk-flag-kw { margin-top: 6px; font-size: 11px; color: var(--text-soft); }
.risk-flag-kw code { background: var(--bg); padding: 1px 5px; border-radius: 3px; margin-right: 4px; }

/* "Checks effectués" — list of categories scanned, all passing (when verdict = safe). */
.risk-checks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.risk-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: 6px;
  font-size: 12px;
}
.risk-check-icon {
  color: #22c55e;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.risk-check-label {
  flex: 1;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.risk-check-sev {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .risk-checks-grid { grid-template-columns: 1fr; }
}

/* ─── Reputation panel ─── */
.reputation-hero {
  text-align: center; padding: 22px;
  background: linear-gradient(135deg, rgba(196,245,66,0.10), rgba(34,197,94,0.05));
  border: 1px solid rgba(196,245,66,0.3);
  border-radius: 14px; margin-bottom: 18px;
}
.reputation-score { font-size: 48px; font-weight: 900; color: var(--accent); line-height: 1; }
.reputation-label { font-size: 13px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.reputation-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.rep-stat { background: var(--bg-elevated); padding: 14px; border-radius: 10px; text-align: center; }
.rep-stat .lbl { font-size: 11px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.rep-stat .val { font-size: 22px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ─── Compare bar (floating) ─── */
.compare-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 0 4px rgba(196,245,66,0.10);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 100;
  animation: compare-slide-up 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes compare-slide-up {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.compare-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.compare-bar-info-text { white-space: nowrap; }
.compare-bar-actions { display: flex; gap: 6px; }
/* Avatar stack — overlapping circles with platform dot, like the entity card. */
.compare-bar-avatars { display: inline-flex; align-items: center; }
.compare-bar-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-input);
  margin-right: -8px;
  box-shadow: 0 0 0 2px var(--bg-elevated);
}
.compare-bar-avatar:last-child { margin-right: 4px; }
.compare-bar-avatar img,
.compare-bar-avatar .card__avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.compare-bar-avatar .platform-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--bg-elevated);
  font-size: 0;
}

.cmp-btn { font-size: 14px; padding: 4px 8px !important; }
.cmp-btn.active { background: var(--accent) !important; color: #000 !important; }

/* Compare modal */
.compare-modal-card { max-width: 1100px; width: 95vw; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}
.compare-table th, .compare-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  background: var(--bg);
  font-weight: 700;
  color: var(--accent);
}
.compare-table th a { color: var(--accent); text-decoration: none; }
.compare-table th a:hover { text-decoration: underline; }
.compare-platform { font-size: 11px; color: var(--text-soft); font-weight: 400; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.compare-label {
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.compare-best {
  background: rgba(196,245,66,0.10);
  color: var(--accent);
  font-weight: 700;
}

/* Compare header — rich card-style cell per profile (avatar + platform dot + name + meta). */
.compare-th-corner { width: 110px; min-width: 110px; background: transparent !important; border: 0 !important; }
.compare-th { padding: 10px !important; background: var(--bg) !important; vertical-align: top; }
.compare-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}
.compare-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: visible;
  background: var(--bg-input);
}
.compare-avatar img,
.compare-avatar .card__avatar-fallback {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.compare-avatar .platform-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  font-size: 0;
}
.compare-head-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.compare-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.compare-name:hover { color: var(--accent); text-decoration: underline; }
.compare-handle {
  font-size: 11px;
  color: var(--text-soft);
  font-family: var(--f-mono);
  font-weight: 500;
}
.compare-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

/* ==========================================================================
   CINEMATIC PRODUCT — Welcome scroll experience
   Style routing: cinematic-product (DV7 / MI8 / VD5) via taste-skill
   - Pinned hero scene with scroll-driven scale/blur/fade
   - Per-letter split-text reveal on hero title
   - Velocity-skew marquee
   - Scroll-driven stat counters with sculptural typography
   - Section title mask reveals (chapter cut feel)
   ========================================================================== */

/* Variables piloted by JS (window scroll → CSS) */
.welcome {
  --scene-progress: 0;       /* 0 → 1 over the hero stage */
  --scroll-velocity: 0;      /* px/ms, signed (negative = up) */
  --scroll-velocity-abs: 0;  /* unsigned */
}

/* Hero stage : pin la première scène pendant 100vh,
   le contenu se "lève" et s'estompe à mesure qu'on descend.
   Le footer/sections suivantes glissent par-dessus. */
.welcome .hero {
  position: relative;
}
/* Hero parent étendu à 180vh pour donner de la "scroll room" au sticky stage.
   Sans cette hauteur supplémentaire, sticky ne peut pas s'engager (parent et stage
   font la même hauteur → scroll instantané). 180vh donne 80vh de pinning effectif. */
.welcome.cinematic .hero {
  min-height: 180vh;
  position: relative;
}
.welcome.cinematic .hero-stage {
  position: sticky;
  top: 72px;            /* sous la nav fixed */
  height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
  will-change: transform, opacity, filter;
  transform: scale(calc(1 - var(--scene-progress, 0) * 0.10));
  filter: blur(calc(var(--scene-progress, 0) * 6px));
  opacity: calc(1 - var(--scene-progress, 0) * 1.1);
  transform-origin: 50% 30%;
}

/* Per-letter split — animation cinématique au load (jouera toujours, même sans JS .in)
   Le hero title révèle char par char via @keyframes (plus fiable que transition + class). */
.split-letter {
  display: inline-block;
  opacity: 0;
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
  animation: split-letter-in 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--char-delay, 0ms);
}
@keyframes split-letter-in {
  from {
    opacity: 0;
    transform: translateY(60%) translateZ(-60px) rotateX(35deg);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0) rotateX(0);
    filter: blur(0);
  }
}
.split-word { display: inline-block; white-space: nowrap; }
/* Section title letters : pas d'animation auto — révélation au scroll via .in (IntersectionObserver) */
.section-title .split-letter {
  animation: none;
  opacity: 0;
  transform: translateY(40%) translateZ(-30px) rotateX(20deg);
  filter: blur(6px);
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 800ms cubic-bezier(0.22, 1, 0.36, 1),
              filter 600ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--char-delay, 0ms);
}
.section-title .split-letter.in {
  opacity: 1;
  transform: translateY(0) translateZ(0) rotateX(0);
  filter: blur(0);
}

/* Velocity-skew marquee : la barre se cisaille selon la vitesse de scroll */
.welcome .marquee {
  --vel-skew: 0deg;
  perspective: 800px;
  overflow: hidden;
}
.welcome .marquee .marquee-track {
  transform: skewY(var(--vel-skew));
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stat slab : nombres sculpturaux (typo expressive),
   layout asymétrique, pas de cards. Premier item dominant. */
.welcome .hero-stats {
  --stat-progress: 0;
  position: relative;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(16px, 3vw, 40px);
  margin-top: clamp(28px, 5vh, 64px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.welcome .hero-stat {
  position: relative;
}
.welcome .hero-stat-num {
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  display: block;
  line-height: 0.9;
  /* Premier stat plus gros que les autres */
  font-size: clamp(42px, 5.4vw, 72px);
  font-weight: 700;
}
.welcome .hero-stat:not(:first-child) .hero-stat-num {
  font-size: clamp(28px, 3.4vw, 44px);
}
.welcome .hero-stat-lbl {
  display: block;
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}
.welcome .hero-stat::before {
  content: '';
  position: absolute;
  top: -25px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(var(--stat-progress, 0));
  transform-origin: left;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.welcome .hero-stat:nth-child(2)::before { transition-delay: 80ms; }
.welcome .hero-stat:nth-child(3)::before { transition-delay: 160ms; }
.welcome .hero-stat:nth-child(4)::before { transition-delay: 240ms; }

/* Section title : chapter-cut mask reveal (sweep diagonal fluo) */
.welcome .section-eyebrow {
  position: relative;
  overflow: hidden;
}
.welcome .section-eyebrow::after {
  content: '';
  position: absolute;
  inset: -2px -8px;
  background: linear-gradient(105deg,
    transparent 35%,
    rgba(196, 245, 66, 0.65) 50%,
    transparent 65%);
  transform: translateX(-100%);
  pointer-events: none;
}
.welcome .section-reveal.in-from-bottom .section-eyebrow::after,
.welcome .section-reveal.in-from-top .section-eyebrow::after {
  animation: chapter-sweep 1100ms cubic-bezier(0.22, 1, 0.36, 1) 200ms forwards;
}
@keyframes chapter-sweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

/* Section title : letter cascade quand la section entre */
.welcome .section-reveal .section-title .split-letter {
  transition-duration: 600ms, 800ms, 600ms;
}

/* Chapter index : petit indicateur "01 / 04" en haut à droite quand on est dans une section */
.chapter-marker {
  position: fixed;
  top: 96px;
  right: 28px;
  z-index: 25;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  text-align: right;
  pointer-events: none;
  opacity: 0;
  transition: opacity 350ms ease;
}
.welcome.is-scrolled .chapter-marker { opacity: 1; }
.chapter-marker .chapter-num {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
}
.chapter-marker .chapter-name {
  display: block;
  margin-top: 4px;
}

/* Magnetic CTA : feedback hover plus prononcé sur le primary du hero */
.welcome .hero-cta .btn-primary.magnetic:hover {
  transform: translate(0, -2px);
  box-shadow:
    0 20px 60px -16px rgba(196, 245, 66, 0.6),
    0 8px 24px -8px rgba(196, 245, 66, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Mobile/reduced-motion : on désactive le pin + variance */
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .welcome.cinematic .hero-stage {
    position: relative;
    top: 0;
    height: auto;
    transform: none;
    filter: none;
    opacity: 1;
  }
  .welcome .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .welcome .hero-stats > :first-child {
    grid-column: 1 / -1;
  }
  .chapter-marker { display: none; }
  .split-letter {
    /* Sur mobile : transition simple, pas de 3D agressif */
    transform: translateY(20px);
    filter: none;
  }
}

/* Restore accent gradient on the "parfait" word — chaque letter individuelle reçoit le gradient */
.welcome .hero-title .split-letter--accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.welcome .hero-title .split-word.accent { background: none; -webkit-text-fill-color: initial; }

/* === Fallback : si document.hidden ou animations désactivées, affiche le contenu sans transition ===
   Évite le cas "page chargée mais letters invisibles" si transitions sont paused (background tab, etc.). */
@media (prefers-reduced-motion: reduce) {
  .split-letter { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .section-reveal .stagger-item { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}

/* Boost final : couches d'atmosphère qui reagissent au scroll-progress */
.welcome.cinematic .aurora--1 {
  transform: translate(calc(var(--scene-progress, 0) * -8vw), calc(var(--scene-progress, 0) * 4vh)) scale(calc(1 - var(--scene-progress, 0) * 0.15));
  transition: transform 200ms linear;
}
.welcome.cinematic .aurora--2 {
  transform: translate(calc(var(--scene-progress, 0) * 6vw), calc(var(--scene-progress, 0) * -3vh)) scale(calc(1 + var(--scene-progress, 0) * 0.2));
  transition: transform 200ms linear;
}

/* CTA primaire qui pousse + augmente sa lumière à mesure que le hero s'efface
   (effet "le focus se concentre sur le bouton" pendant la transition) */
.welcome.cinematic .hero-cta .btn-primary {
  transform: scale(calc(1 + var(--scene-progress, 0) * 0.05));
  filter: brightness(calc(1 + var(--scene-progress, 0) * 0.15));
}

/* ============================================================================
   MASSIVE TEXT REVEAL CHAPTER
   La section pin pendant 200vh : 4 lignes apparaissent successivement avec
   scale énorme et clip-path mask. Chaque ligne reveal selon scroll progress.
   ============================================================================ */
.reveal-chapter {
  position: relative;
  height: 250vh; /* scroll room */
  /* Atmosphere fluo subtile qui pulse — laisse passer le welcome-bg fixed dessous */
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(196, 245, 66, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 30% 30%, rgba(124, 92, 255, 0.04) 0%, transparent 60%);
}
.reveal-chapter__pin {
  position: sticky;
  top: 72px;
  height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vh, 40px);
  padding: 0 clamp(20px, 4vw, 60px);
  text-align: center;
  overflow: hidden;
}
.reveal-chapter__text {
  font-family: var(--f-display, 'Inter', sans-serif);
  /* Réduit pour que les 4 lignes tiennent dans le pin (886px) sur desktop.
     4 lignes × 130px + 3 gaps × 8px = 544px, large marge dans le pin. */
  font-size: clamp(50px, 9vw, 130px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: rgba(255, 255, 255, 0.06);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2px, 0.4vh, 6px);
}
.reveal-line {
  display: block;
  position: relative;
  --line-progress: 0;
  /* Mask qui révèle de gauche à droite — scroll-driven */
  background: linear-gradient(90deg,
    var(--text-primary) 0%,
    var(--text-primary) calc(var(--line-progress) * 100%),
    rgba(255,255,255,0.06) calc(var(--line-progress) * 100%),
    rgba(255,255,255,0.06) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* Scale qui grandit légèrement avec le progress */
  transform: scale(calc(0.92 + var(--line-progress) * 0.08));
  transition: transform 200ms linear;
}
.reveal-line .reveal-fluo {
  /* Pour les mots fluo : utilise le même mask + couleur accent */
  background: linear-gradient(90deg,
    var(--accent) 0%,
    var(--accent) calc(var(--line-progress) * 100%),
    rgba(196,245,66,0.10) calc(var(--line-progress) * 100%),
    rgba(196,245,66,0.10) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.reveal-chapter__sub {
  font-size: clamp(13px, 1.4vw, 16px);
  color: var(--text-secondary, #a1a1aa);
  max-width: 560px;
  line-height: 1.6;
  opacity: calc(var(--reveal-sub-progress, 0));
  transform: translateY(calc(20px - var(--reveal-sub-progress, 0) * 20px));
  transition: opacity 200ms linear, transform 200ms linear;
}

/* ============================================================================
   HORIZONTAL SCROLL SHOWCASE
   La section pin pendant 4×100vh, le track translate horizontalement.
   Visuel : 4 cards, chacune 80vw de large, défilent horizontalement.
   ============================================================================ */
.hscroll-chapter {
  position: relative;
  height: 400vh; /* 4 cards × 100vh de scroll */
  /* Mood violet/cyan subtle — atmospher différenciée du reveal-chapter */
  background:
    radial-gradient(ellipse 70% 50% at 25% 50%, rgba(124, 92, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 75% 50%, rgba(196, 245, 66, 0.05) 0%, transparent 60%);
}
.hscroll-chapter__pin {
  position: sticky;
  top: 72px;
  height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hscroll-chapter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(24px, 4vh, 40px) clamp(24px, 5vw, 60px) clamp(16px, 3vh, 24px);
  gap: 24px;
}
.hscroll-chapter__eyebrow {
  font-family: var(--f-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--accent);
}
.hscroll-chapter__title {
  flex: 1;
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  text-align: center;
  color: var(--text-primary);
}
.hscroll-chapter__counter {
  font-family: var(--f-mono, monospace);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}
.hscroll-chapter__counter #hscroll-current { color: var(--accent); font-weight: 700; }
.hscroll-chapter__track {
  --hscroll-x: 0px;
  flex: 1;
  display: flex;
  gap: clamp(16px, 2vw, 32px);
  padding: 0 clamp(24px, 5vw, 60px) clamp(40px, 6vh, 60px);
  align-items: stretch;
  transform: translate3d(calc(var(--hscroll-x) * -1), 0, 0);
  will-change: transform;
}
.hscroll-card {
  flex: 0 0 min(80vw, 720px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(27, 29, 35, 0.95), rgba(15, 16, 20, 0.95));
  backdrop-filter: blur(20px);
  padding: clamp(28px, 4vh, 48px);
  position: relative;
  overflow: hidden;
  display: grid;
  /* Layout : texte (titre+body) à gauche, visuel à droite remplissant TOUTE la hauteur */
  grid-template-columns: 1fr 1.3fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "head visual"
    "body visual";
  gap: clamp(20px, 2.5vw, 36px);
  align-items: stretch;
}
.hscroll-card > .hscroll-card__title { grid-area: head; align-self: end; }
.hscroll-card > .hscroll-card__body  { grid-area: body; align-self: start; }
.hscroll-card > .hscroll-card__visual { grid-area: visual; align-self: stretch; height: auto; min-height: 0; }
.hscroll-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(196,245,66,0.4), transparent 35%);
  -webkit-mask:
    linear-gradient(#000, #000) content-box,
    linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
  opacity: 0.6;
}
.hscroll-card__num {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: var(--f-mono, monospace);
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: rgba(196, 245, 66, 0.6);
}
.hscroll-card__title {
  font-size: clamp(28px, 3.6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 16px;
  color: var(--text-primary);
}
.hscroll-card__body {
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.55;
  color: var(--text-secondary, #a1a1aa);
  max-width: 42ch;
  margin: 0;
}
.hscroll-card__visual {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(196,245,66,0.04), rgba(124, 92, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: clamp(20px, 2.6vw, 32px);
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  align-content: stretch;
  gap: 14px;
  overflow: hidden;
}
/* Chaque "row" interne occupe son espace équitablement.
   Les chips et stats sont regroupés en wrappers via data-art (voir sous-règles).  */
.hscroll-card__visual > * { align-self: center; }
.hscroll-card__visual::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, rgba(196,245,66,0.18), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

/* Visuels par type de card */
.art-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
}
.art-chip--1 { background: rgba(196, 245, 66, 0.12); border-color: rgba(196, 245, 66, 0.3); color: var(--accent); }
.art-chip--2 { background: rgba(124, 92, 255, 0.12); border-color: rgba(124, 92, 255, 0.3); color: #c4b8ff; }
.art-chip--3 { background: rgba(255, 255, 255, 0.06); }
.art-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-top: 8px;
}
.art-bar span {
  display: block;
  height: 100%;
  width: 78%;
  background: linear-gradient(90deg, var(--accent), rgba(196,245,66,0.6));
  border-radius: inherit;
}

.art-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c5cff);
  display: grid;
  place-items: center;
  color: #000;
  font-weight: 800;
  font-size: 22px;
}
.art-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.art-stat b {
  font-family: var(--f-mono, monospace);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.art-stat span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}
.art-flag {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--f-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.art-flag--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.art-pipe-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.art-pipe-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.art-pipe-dot--mid { background: #f59e0b; }
.art-pipe-dot--end { background: #7c5cff; }
.art-pipe-col b {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.art-pipe-col i {
  font-style: normal;
  font-family: var(--f-mono, monospace);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
}

.art-spark {
  width: 100%;
  height: 80px;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(196,245,66,0.5));
}
.art-spark svg { width: 100%; height: 100%; }
.art-trend {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--text-secondary);
}
.art-trend b {
  font-family: var(--f-mono, monospace);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.art-trend--up b { color: var(--accent); }
.art-trend--down b { color: #f87171; }

/* Mobile : ancien override désactivé — voir bloc plus bas qui préserve les pins cinématiques */

/* === POLISH FINAL — atmosphère & transitions cinématiques === */

/* Atténuer les floating profile cards dans les chapters cinématiques (pour ne pas distraire) */
.welcome.cinematic .floating-cards {
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.welcome.cinematic.is-scrolled .floating-cards {
  opacity: calc(1 - var(--scene-progress, 0) * 0.7);
}

/* Pareil pour orbit-system : il s'estompe au scroll */
.welcome.cinematic .orbit-system {
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1);
  opacity: calc(1 - var(--scene-progress, 0) * 0.85);
}

/* Le grid devient plus subtil quand on quitte le hero */
.welcome.cinematic .welcome-grid {
  opacity: calc(0.5 + var(--scene-progress, 0) * 0.3);
}

/* Body bg : tinted dark (pas pur noir) — donne un sous-ton au site complet */
.welcome.cinematic { background: #0a0a0d; }

/* Aurora globaux : intensité accrue pour qu'on les voie partout */
.welcome.cinematic .aurora { opacity: 0.7; }
.welcome.cinematic .aurora--3 { opacity: 0.55; }

/* Particles plus discrètes derrière les pinned chapters (moins distrayant) */
.welcome.cinematic #particles-canvas {
  opacity: calc(1 - var(--scene-progress, 0) * 0.5);
  transition: opacity 400ms ease;
}

/* Smooth transition entre reveal-chapter et hscroll-chapter — fade de couleur */
.reveal-chapter::after,
.hscroll-chapter::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent 0%, rgba(196, 245, 66, 0.04) 100%);
  pointer-events: none;
}
.hscroll-chapter::after {
  background: linear-gradient(to bottom, transparent 0%, rgba(124, 92, 255, 0.04) 100%);
}

/* Final CTA : big atmosphere boost avec halo */
.final-cta {
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute;
  inset: -20% -10%;
  background: radial-gradient(ellipse, rgba(196, 245, 66, 0.10) 0%, transparent 60%);
  pointer-events: none;
  animation: cta-breath 5s ease-in-out infinite;
  z-index: 0;
}
@keyframes cta-breath {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.final-cta > * { position: relative; z-index: 1; }

/* Smoothing extra : empêche les changements de section d'être abrupts */
.welcome-main {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.10) 50%,
    transparent 100%
  );
}

/* Refine les hscroll-card backgrounds — moins opaque pour laisser l'aurora respirer */
.hscroll-card {
  background: linear-gradient(180deg, rgba(15, 16, 20, 0.92), rgba(8, 9, 11, 0.88)) !important;
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

/* Animation on hscroll-card text : subtle shine on entry */
.hscroll-card__title {
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.85) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* === Hero bottom row : live-ticker + search demo côte à côte === */
.hero-bottom-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(8px, 1.2vw, 16px);
  margin-top: clamp(20px, 3vh, 32px);
  width: 100%;
  flex-wrap: wrap;
}
.hero-bottom-row > .live-ticker,
.hero-bottom-row > .hero-search-demo {
  flex: 1 1 0;
  min-width: 240px;
  margin-top: 0;
  max-width: none;
}
/* Le ticker prend ce dont il a besoin, la search demo prend le reste */
.hero-bottom-row > .live-ticker { flex: 0 1 auto; }
.hero-bottom-row > .hero-search-demo { flex: 1 1 320px; }
.live-ticker-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 768px) {
  .hero-bottom-row {
    flex-direction: column;
    gap: 10px;
  }
  .hero-bottom-row > .live-ticker,
  .hero-bottom-row > .hero-search-demo { flex: 1 1 auto; min-width: 0; }
}

/* === Mobile : adapte les dimensions sans casser l'expérience cinématique ===
   Préserve : pin hero, mask reveal, horizontal scroll, 3D reveals, atmosphere.
   Adapte : tailles de fonte, paddings, layouts grille. */
@media (max-width: 768px) {
  /* Hero stage : pin actif mais court (évite le "vide" entre fade-out hero et arrivée marquee).
     130vh = 100vh de hero visible + 30vh de scroll-room pour fade-out (~244px) */
  .welcome.cinematic .hero {
    min-height: 130vh;
  }
  .welcome.cinematic .hero-stage {
    /* pin gardé, padding réduit. padding-top = clearance welcome-nav (60) + air */
    padding: 80px 16px 32px;
    transform: scale(calc(1 - var(--scene-progress, 0) * 0.06));
    filter: blur(calc(var(--scene-progress, 0) * 4px));
    opacity: calc(1 - var(--scene-progress, 0) * 1.05);
  }
  /* Hero title : font plus compacte */
  .welcome .hero-title {
    font-size: clamp(40px, 11vw, 64px) !important;
    line-height: 1 !important;
  }
  .welcome .hero-sub {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }
  /* Hero stats : layout single column compact mais asymétrique préservé */
  .welcome .hero-stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    margin-top: 24px !important;
  }
  .welcome .hero-stats > :first-child { grid-column: 1 / -1; }
  .welcome .hero-stat-num { font-size: clamp(28px, 7vw, 40px) !important; }
  .welcome .hero-stat:not(:first-child) .hero-stat-num { font-size: clamp(20px, 5vw, 28px) !important; }
  /* CTA : pleine largeur empilées */
  .welcome .hero-cta { flex-direction: column !important; gap: 10px !important; align-items: stretch !important; }
  .welcome .hero-cta .btn { width: 100% !important; }
  /* Floating cards désactivées en mobile (trop encombrant) */
  .welcome.cinematic .floating-cards { display: none !important; }
  .welcome.cinematic .orbit-system { display: none !important; }
  /* Section indicator + chapter marker : trop encombrant en mobile */
  .section-indicator,
  .chapter-marker { display: none !important; }
  /* Aurora restent puissantes mais légèrement réduites */
  .welcome.cinematic .aurora { opacity: 0.55 !important; }
  /* Stagger items : 3D reveal préservé mais moins agressif */
  .section-reveal .stagger-item {
    transform: translateY(30px) rotateX(8deg) translateZ(-20px);
    filter: blur(4px);
  }
  .section-reveal.in-from-bottom .stagger-item,
  .section-reveal.in-from-top .stagger-item {
    transform: translateY(0) rotateX(0) translateZ(0);
    filter: blur(0);
  }
  /* Reveal chapter : pin gardé, mask reveal préservé, fontes adaptées */
  .reveal-chapter { height: 220vh; } /* un peu moins haute */
  .reveal-chapter__text {
    font-size: clamp(40px, 13vw, 70px) !important;
    gap: 4px !important;
    line-height: 0.95 !important;
  }
  .reveal-chapter__sub { font-size: 13px !important; padding: 0 16px !important; }
  /* Hscroll chapter : reste HORIZONTAL en mobile (le wow moment !) */
  .hscroll-chapter { height: 380vh; }
  .hscroll-chapter__head {
    padding: 16px 16px 12px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  .hscroll-chapter__title { font-size: 16px !important; text-align: left !important; flex: 1 1 auto !important; }
  .hscroll-chapter__counter { font-size: 10.5px !important; align-self: flex-end !important; }
  .hscroll-chapter__track {
    flex-direction: row !important; /* GARDE LA ROW HORIZONTALE */
    gap: 12px !important;
    padding: 0 16px 24px !important;
    transform: translate3d(calc(var(--hscroll-x) * -1), 0, 0) !important;
  }
  .hscroll-card {
    flex: 0 0 88vw !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto 1fr !important;
    grid-template-areas:
      "head"
      "body"
      "visual" !important;
    padding: 20px !important;
    gap: 16px !important;
  }
  .hscroll-card__title { font-size: clamp(24px, 6vw, 32px) !important; }
  .hscroll-card__body { font-size: 13px !important; }
  .hscroll-card__visual {
    min-height: 220px !important;
    padding: 20px !important;
  }
  /* Custom cursor caché (touch) */
  .custom-cursor { display: none !important; }
  /* Cards 3D tilt : off en mobile (touch) */
  .feature-card, .platform-card, .step {
    transform: none !important;
  }
  /* Particles canvas : moins coûteux en mobile */
  #particles-canvas { opacity: 0.6; }
}

/* === Custom cursor ===
   Dot fluo qui suit la souris. Modes : default (point), hover (cercle), cta (flèche). */
.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
}
.custom-cursor__inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(196, 245, 66, 0.6);
  transition:
    width 220ms cubic-bezier(0.22, 1, 0.36, 1),
    height 220ms cubic-bezier(0.22, 1, 0.36, 1),
    background 220ms ease,
    border 220ms ease,
    box-shadow 220ms ease,
    inset 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.custom-cursor__arrow {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #000;
  opacity: 0;
  transform: scale(0);
  transition:
    opacity 220ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* Hover : le dot devient un cercle plus grand, vide */
.custom-cursor[data-mode="hover"] {
  width: 36px;
  height: 36px;
}
.custom-cursor[data-mode="hover"] .custom-cursor__inner {
  background: transparent;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 18px rgba(196, 245, 66, 0.45);
}
/* CTA : devient un cercle plein avec flèche → */
.custom-cursor[data-mode="cta"] {
  width: 56px;
  height: 56px;
}
.custom-cursor[data-mode="cta"] .custom-cursor__inner {
  background: var(--accent);
  border: none;
  box-shadow: 0 0 24px rgba(196, 245, 66, 0.6);
}
.custom-cursor[data-mode="cta"] .custom-cursor__arrow {
  opacity: 1;
  transform: scale(1);
}
/* Hidden state */
.custom-cursor--hidden { opacity: 0; transition: opacity 200ms ease; }

/* Custom cursor — visible everywhere (welcome AND dashboard), tracks the mouse on every
   page. The native cursor is hidden globally on hover-capable pointer-fine devices so it
   doesn't double-up. Caret remains on text inputs so the user can see where they're typing.
   Touch devices keep their native (system) cursor: see `.custom-cursor { display:none }`
   in the (hover:none) media query below. */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  body a, body button, body [role="button"], body [data-magnetic], body .btn,
  body [data-fav], body [data-cmp], body [data-audit], body [data-open] { cursor: none !important; }
  body input, body textarea, body [contenteditable], body select { cursor: text; }
}
/* Touch / coarse pointer: rely on the system, no custom dot. */
@media (hover: none), (pointer: coarse) {
  .custom-cursor { display: none !important; }
}
/* Custom cursor must sit above EVERYTHING — modals, toasts, the welcome overlay, the audit
   modal at z-index 9000, etc. — otherwise it disappears behind those layers. */
.custom-cursor { z-index: 99999 !important; pointer-events: none !important; }

/* Hscroll-card content : exempt du stagger-item reveal (titre/body doivent rester visibles
   en permanence — la choreography hscroll est suffisante via le scroll horizontal). */
.hscroll-card .hscroll-card__title.stagger-item,
.hscroll-card .hscroll-card__body.stagger-item,
.hscroll-card .stagger-item {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}
/* Reveal-chapter pareil — son texte est piloté par --line-progress, pas par stagger */
.reveal-chapter .stagger-item {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

/* === Audit modal — fake follower score breakdown =========================
   Triggered by .audit-btn on each card. Shows the authenticity score + every
   signal that fired with real numbers. No fake values; "low confidence" surfaced
   honestly when too few signals could be computed. */
.audit-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(8, 9, 12, 0.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 24px;
  animation: audit-fadein 200ms cubic-bezier(.22,1,.36,1);
}
@keyframes audit-fadein { from { opacity: 0; } to { opacity: 1; } }
.audit-modal {
  background: linear-gradient(180deg, rgba(28,30,38,0.98), rgba(20,22,28,0.98));
  border: 1px solid rgba(255,255,255,0.08); border-radius: 18px;
  width: min(620px, 100%); max-height: 90vh; overflow: auto;
  padding: 28px 28px 24px; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  animation: audit-slideup 280ms cubic-bezier(.22,1,.36,1);
}
@keyframes audit-slideup { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.audit-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none;
  color: rgba(255,255,255,0.55); font-size: 26px; cursor: pointer; line-height: 1;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.audit-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
.audit-header { margin-bottom: 18px; }
.audit-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; }
.audit-sub { font-size: 22px; color: var(--text-primary); font-weight: 700; margin-top: 4px; }
.audit-loading, .audit-error { padding: 40px 0; text-align: center; color: var(--text-secondary); }
.audit-summary {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0 24px; border-bottom: 1px dashed rgba(255,255,255,0.08); margin-bottom: 20px;
}
.audit-bigscore { display: flex; align-items: baseline; gap: 4px; line-height: 1; }
.audit-bigscore-num { font-size: 88px; font-weight: 800; letter-spacing: -0.05em; }
.audit-bigscore-unit { font-size: 22px; color: rgba(255,255,255,0.45); font-weight: 600; }
.audit-bigscore-label { font-size: 13px; color: var(--text-secondary); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* "estimation provisoire" badge — appears next to the big score whenever confidence is
   low/medium or fewer than 3 signals fired. Visually softens the score so it doesn't read
   like a verified 100/100. */
.audit-provisional-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  cursor: help;
}
.audit-summary--provisional .audit-bigscore-num { opacity: 0.7; }
.audit-summary--provisional .audit-bigscore-unit { opacity: 0.55; }
.audit-meta {
  display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; justify-content: center;
  font-size: 12.5px; color: var(--text-secondary);
}
.audit-meta b { color: var(--text-primary); }
.audit-honest-note {
  margin-top: 14px; font-size: 11.5px; color: rgba(255,255,255,0.5);
  text-align: center; max-width: 460px; line-height: 1.5;
}
.audit-signals { display: flex; flex-direction: column; gap: 14px; }
.audit-signal {
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 12px 14px;
}
.audit-signal.audit-na { opacity: 0.5; }
.audit-signal-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.audit-signal-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.audit-signal-pct { font-size: 13px; font-weight: 700; }
.audit-signal-bar {
  height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; margin-bottom: 8px;
}
.audit-signal-bar span { display: block; height: 100%; border-radius: 2px; transition: width .35s ease; }
.audit-signal-detail { font-size: 11.5px; color: var(--text-secondary); line-height: 1.5; }

.audit-btn {
  /* small contextual tweak so the audit button reads as a "metric" action vs others */
  letter-spacing: 0.02em;
}

/* === Multi-platform entity card =========================================
   Renders a single consolidated creator entity (e.g. Kylie Jenner on TT+Snap+IG).
   totalReach + perPlatform badges. */
.card-entity .platform-dot.multi {
  background: linear-gradient(135deg, #c4f542, #7c5cff);
  color: #0b0d11;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.entity-platforms {
  display: flex; flex-direction: column; gap: 8px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.entity-platform {
  display: flex; align-items: center; gap: 10px;
}
.entity-platform .platform-dot {
  width: 22px; height: 22px; font-size: 9px;
  flex-shrink: 0;
}
.entity-platform-info {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  flex: 1; min-width: 0;
}
.entity-platform-handle {
  font-size: 12.5px; color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.entity-platform-followers {
  font-size: 12px; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums;
}

/* === Brief rendered view — clean replacement for the raw markdown <pre> ============
   Parses the brief into sections, renders each as a styled card with icon + key/value rows
   or bullets. Markdown brut still available behind a <details>. */
.brief-card {
  background: linear-gradient(180deg, rgba(28,30,38,0.85), rgba(18,20,26,0.85));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
}
.brief-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(196,245,66,0.06), transparent);
}
.brief-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); font-weight: 700;
}
.brief-title {
  margin: 4px 0 0; font-size: 19px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.01em; line-height: 1.3;
}
.brief-body { padding: 8px 6px 12px; }
.brief-section {
  padding: 16px 18px;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.brief-section:last-child { border-bottom: none; }
.brief-section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.brief-section-icon {
  font-size: 14px; line-height: 1; flex-shrink: 0;
  filter: grayscale(0.2) brightness(1.1);
}
.brief-kv { margin: 0; padding: 0; display: grid; gap: 8px; }
.brief-kv-row {
  display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 12px;
  align-items: baseline; padding: 4px 0;
}
.brief-kv-row dt {
  margin: 0; font-size: 12.5px; color: var(--text-secondary); font-weight: 500;
  white-space: nowrap;
}
.brief-kv-row dd {
  margin: 0; font-size: 13.5px; color: var(--text-primary); font-weight: 500;
  line-height: 1.5;
}
.brief-kv-row-bullet { grid-template-columns: 1fr; }
.brief-kv-row-bullet dd::before { content: '— '; color: var(--accent); margin-right: 4px; }
.brief-bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.brief-bullets li {
  font-size: 13.5px; color: var(--text-primary); line-height: 1.5;
  padding-left: 16px; position: relative;
}
.brief-bullets li::before {
  content: '▸'; color: var(--accent); position: absolute; left: 0; top: 0;
}
.brief-prose {
  margin: 0 0 8px; font-size: 13.5px; color: var(--text-primary); line-height: 1.6;
}
.brief-prose:last-child { margin-bottom: 0; }
.brief-prose-empty { color: var(--text-secondary); font-style: italic; }
.brief-footer {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.brief-raw {
  flex-basis: 100%; margin-top: 6px;
}
.brief-raw summary {
  cursor: pointer; font-size: 11.5px; color: var(--text-secondary);
  padding: 6px 0; user-select: none;
}
.brief-raw summary:hover { color: var(--text-primary); }
.brief-raw .brief-md {
  margin-top: 10px; padding: 12px;
  font-family: var(--f-mono, 'SF Mono', 'JetBrains Mono', Menlo, monospace);
  font-size: 11.5px; color: var(--text-secondary); line-height: 1.5;
  background: rgba(0,0,0,0.25); border-radius: 8px; border: 1px solid rgba(255,255,255,0.04);
  max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word;
}
@media (max-width: 600px) {
  .brief-kv-row { grid-template-columns: 1fr; gap: 2px; }
  .brief-kv-row dt { font-size: 11.5px; }
}

/* === Input modal — replacement for native prompt() ============================ */
.input-modal-field {
  width: 100%; padding: 12px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  margin: 6px 0 16px;
}
.input-modal-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196,245,66,0.18);
}
.input-modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
}

/* === Card UX peaufiné =====================================================
   - Email clickable: visible address with copy-on-click
   - Auth/Tier/Price/CRM-status: explicit colour ramp by value bucket
   - Score badge: small "/100" suffix for clarity */
.tag-clickable {
  cursor: pointer;
  font-family: inherit;
  border: 1px solid currentColor;
  background: transparent;
  transition: background .15s, color .15s, transform .12s;
}
.tag-clickable:hover { background: rgba(255,255,255,0.06); transform: translateY(-1px); }
.tag-clickable:active { transform: translateY(0); }
.tag.email.tag-clickable {
  color: #ffc566;
  border-color: rgba(255, 197, 102, 0.4);
  background: rgba(255, 197, 102, 0.06);
  /* Hug content width (the email address) — no stretching to fill the flex row.
     max-content keeps the badge tight; max-width: 100% caps it if the email is really long. */
  width: max-content;
  max-width: 100%;
  white-space: normal;
  word-break: break-all;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.3;
}
/* Zero-height 100%-wide sibling injected before the email tag — forces a flex-wrap
   so the email always sits on its own row below the other tags. The email tag itself
   keeps auto width (just the content + padding, no empty stretching). */
.email-row-break { flex-basis: 100%; height: 0; }
.tag.email.tag-clickable .email-icon {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  color: #ffc566;
  opacity: 0.9;
}
.tag.email.tag-clickable:hover { background: rgba(255, 197, 102, 0.14); }

/* Authenticity score colour ramp */
.tag.auth-good { background: rgba(15, 191, 108, 0.16); color: #5ee0a0; border: 1px solid rgba(15,191,108,0.32); }
.tag.auth-mid  { background: rgba(245, 166, 35, 0.16); color: #ffc875; border: 1px solid rgba(245,166,35,0.30); }
.tag.auth-low  { background: rgba(231, 76, 60, 0.18); color: #ff8478; border: 1px solid rgba(231,76,60,0.32); }

/* Price tier accents */
.tag.price-neutral { color: rgba(255,255,255,0.62); border: 1px solid rgba(255,255,255,0.12); }
.tag.price-accent  { color: #c4f542; border: 1px solid rgba(196,245,66,0.35); background: rgba(196,245,66,0.08); font-weight: 700; }
.tag.price-premium { color: #ffd66e; border: 1px solid rgba(255,214,110,0.38); background: rgba(255,214,110,0.10); font-weight: 700; }

/* CRM status — coloured by pipeline stage so the user spots "already contacted" at a glance */
.tag.crm-status { font-weight: 600; }
.tag.crm-contact   { background: rgba(120,120,120,0.18); color: #c8c8c8; border: 1px solid rgba(255,255,255,0.14); }
.tag.crm-contacted { background: rgba(124, 92, 255, 0.16); color: #b8a5ff; border: 1px solid rgba(124,92,255,0.35); }
.tag.crm-replied   { background: rgba(15, 191, 108, 0.14); color: #5ee0a0; border: 1px solid rgba(15,191,108,0.32); }
.tag.crm-confirmed { background: rgba(15, 191, 108, 0.22); color: #6dffae; border: 1px solid rgba(15,191,108,0.45); font-weight: 700; }
.tag.crm-live      { background: rgba(196,245,66,0.18); color: #c4f542; border: 1px solid rgba(196,245,66,0.40); font-weight: 700; }
.tag.crm-done      { background: rgba(120,120,120,0.10); color: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.10); }
.tag.crm-declined  { background: rgba(231, 76, 60, 0.18); color: #ff8478; border: 1px solid rgba(231,76,60,0.32); }

/* Score badge: explicit /100 suffix so users understand the scale */
.card__score-suffix { font-size: 0.55em; opacity: 0.55; margin-left: 1px; font-weight: 500; }
