/* =============================================================
   CollectAlert — Design System (source de verite unique)
   Aesthetic : "Trading Terminal for Flippers"
   Importe par : landing, live, dashboard, blog, pages legeres
   ============================================================= */

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select, button { font-family: inherit; color: inherit; }

/* ===== DESIGN TOKENS ===== */
:root {
  /* -- Surfaces (dark navy "deep ocean") -- */
  --bg-deep:      #070B14;
  --bg-surface:   #0F1420;
  --bg-elevated:  #161C2E;
  --bg-overlay:   rgba(7, 11, 20, 0.82);

  /* -- Accents (strict lime=action / data=intelligence) -- */
  --accent:         #B8FF00;
  --accent-hover:   #A3E600;
  --accent-dim:     #8BC700;
  --accent-glow:    rgba(184, 255, 0, 0.10);
  --accent-ring:    rgba(184, 255, 0, 0.25);

  --accent-data:       #00E5A0;
  --accent-data-glow:  rgba(0, 229, 160, 0.10);
  --accent-data-ring:  rgba(0, 229, 160, 0.25);

  /* -- Semantic -- */
  --danger:   #FF3B5C;
  --warning:  #FFB020;
  --info:     #3B82F6;
  --danger-glow:  rgba(255, 59, 92, 0.08);
  --warning-glow: rgba(255, 176, 32, 0.08);
  --info-glow:    rgba(59, 130, 246, 0.08);

  /* -- Text (blanc chaud, jamais #fff pur) -- */
  --text-primary:    #E8E6E3;
  --text-secondary:  #9AA3B8;
  --text-muted:      #6B7394;

  /* -- Borders (hairlines) -- */
  --border:         rgba(255, 255, 255, 0.06);
  --border-hover:   rgba(255, 255, 255, 0.12);
  --border-accent:  rgba(184, 255, 0, 0.25);

  /* -- Typography -- */
  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* -- Spacing (base 4px) -- */
  --sp-2xs: 2px;
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;
  --sp-4xl: 96px;

  /* -- Radius -- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* -- Motion -- */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
  --dur-fast:   120ms;
  --dur-base:   200ms;
  --dur-slow:   400ms;

  /* -- Shadows (subtiles, dark-first) -- */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.40);
  --shadow-accent: 0 8px 32px rgba(184, 255, 0, 0.15);

  /* -- Layout -- */
  --container: 1200px;
  --container-narrow: 860px;
  --nav-h: 64px;
  --sidebar-w: 220px;

  /* -- Legacy aliases (compat avec landing.css, blog-common.css) -- */
  --bg: var(--bg-deep);
  --surface: var(--bg-surface);
  --surface2: var(--bg-elevated);
  --surface3: #1A2235;
  --lime: var(--accent);
  --lime-hover: var(--accent-hover);
  --lime-dim: var(--accent-dim);
  --lime-glow: var(--accent-glow);
  --amber: var(--warning);
  --amber-glow: var(--warning-glow);
  --green: var(--accent-data);
  --green-glow: var(--accent-data-glow);
  --orange: var(--warning);
  --red: var(--danger);
  --blue: var(--info);
  --text: var(--text-primary);
  --radius: var(--radius-lg);
  --radius-xs: 6px;
}

/* ===== BASE ===== */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100vh;
  font-feature-settings: "ss01", "cv11";
}

/* Grain texture (fixed overlay, tres subtil) */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Selection */
::selection { background: var(--accent); color: var(--bg-deep); }

/* Focus visible (a11y) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== TYPOGRAPHY ===== */
.h-hero {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.25rem, 5.2vw, 3.6rem);
  line-height: 1.05; letter-spacing: -0.03em;
  text-wrap: balance;
}
.h-1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  line-height: 1.15; letter-spacing: -0.02em;
  text-wrap: balance;
}
.h-2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.2; letter-spacing: -0.015em;
}
.h-3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.125rem; line-height: 1.3;
}

.lead {
  color: var(--text-secondary);
  font-size: 1.1rem; line-height: 1.65;
  max-width: 60ch;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow.data { color: var(--accent-data); }
.eyebrow.muted { color: var(--text-muted); }
.eyebrow::before {
  content: ''; width: 12px; height: 1px; background: currentColor; opacity: 0.6;
}
.eyebrow.no-bar::before { display: none; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-secondary); }

/* ===== LAYOUT ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-sm { padding: clamp(48px, 6vw, 80px) 0; }

.grid { display: grid; gap: var(--sp-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.flex { display: flex; gap: var(--sp-md); }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ===== NAV (shared topbar) ===== */
.ca-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--bg-overlay);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.ca-nav-inner {
  max-width: var(--container);
  margin: 0 auto; padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.ca-nav-left { display: flex; align-items: center; gap: 20px; }
.ca-nav-logo {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--text-primary);
  display: inline-flex; align-items: baseline; gap: 2px;
}
.ca-nav-logo .mark { color: var(--accent); }
.ca-nav-logo:hover { color: var(--text-primary); }

.ca-nav-divider { width: 1px; height: 20px; background: var(--border); }

.ca-nav-links { display: flex; align-items: center; gap: 4px; }
.ca-nav-link {
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px; border-radius: var(--radius-md);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.ca-nav-link:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.02); }
.ca-nav-link.active { color: var(--accent); }

.ca-nav-right { display: flex; align-items: center; gap: 10px; }
.ca-nav-mobile { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px; color: var(--text-primary); cursor: pointer; }

/* Live pulse badge (used in nav or inline) */
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px;
  background: var(--accent-data-glow);
  border: 1px solid var(--accent-data-ring);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 600;
  color: var(--accent-data);
  text-transform: uppercase; letter-spacing: 0.15em;
}
.live-badge::before {
  content: ''; width: 6px; height: 6px;
  background: var(--accent-data); border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-data);
  animation: pulse-data 2s ease-in-out infinite;
}
@keyframes pulse-data {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: -0.005em;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast),
              border-color var(--dur-fast),
              box-shadow var(--dur-base);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--accent); color: var(--bg-deep);
  box-shadow: 0 2px 8px rgba(184, 255, 0, 0.10);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.btn-secondary {
  background: transparent; color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.02);
}

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

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

/* Telegram icon inline (pairs with btn-primary) */
.btn .tg-glyph { width: 16px; height: 16px; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  transition: border-color var(--dur-base), transform var(--dur-base), background var(--dur-base);
}
.card-hover:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Card scan-line (accent detail on hover) */
.card-scan { position: relative; overflow: hidden; }
.card-scan::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity var(--dur-base);
}
.card-scan:hover::before { opacity: 1; }

/* ===== DATA CARD (stat/metric) ===== */
.data-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative; overflow: hidden;
}
.data-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.25;
}
.data-card.data::before { background: linear-gradient(90deg, transparent, var(--accent-data), transparent); opacity: 0.35; }
.data-card .dc-label {
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.data-card .dc-value {
  font-family: var(--font-mono);
  font-size: 1.75rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}
.data-card.data .dc-value { color: var(--accent-data); }
.data-card .dc-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent-data); margin-top: 8px;
}
.data-card .dc-delta.down { color: var(--danger); }

/* ===== DEAL CARD (notification preview) ===== */
.deal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden; position: relative;
  transition: border-color var(--dur-base), transform var(--dur-base);
}
.deal-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-data), var(--accent));
}
.deal-card:hover { border-color: var(--border-accent); transform: translateY(-2px); }

.deal-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none; color: inherit;
  transition: border-color var(--dur-fast), transform var(--dur-fast);
}
.deal-row:hover { border-color: var(--border-accent); transform: translateX(2px); }
.deal-row img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-elevated); flex-shrink: 0; }
.deal-row .dr-body { flex: 1; min-width: 0; }
.deal-row .dr-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-row .dr-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.deal-row .dr-price {
  font-family: var(--font-mono); font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent); white-space: nowrap;
}

/* ===== DEAL SCORE ===== */
.deal-score {
  font-family: var(--font-mono); font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: 0.85rem; letter-spacing: -0.01em;
}
.deal-score.s-excellent { background: var(--accent-data-glow); color: var(--accent-data); border: 1px solid var(--accent-data-ring); }
.deal-score.s-good { background: var(--warning-glow); color: var(--warning); border: 1px solid rgba(255,176,32,0.25); }
.deal-score.s-avg { background: rgba(107,115,148,0.10); color: var(--text-muted); border: 1px solid rgba(107,115,148,0.20); }
.deal-score.s-bad { background: var(--danger-glow); color: var(--danger); border: 1px solid rgba(255,59,92,0.25); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  padding: 3px 8px; border-radius: var(--radius-sm);
  text-transform: uppercase; letter-spacing: 0.12em;
  border: 1px solid transparent;
}
.badge-accent  { background: var(--accent-glow);        color: var(--accent);      border-color: var(--accent-ring); }
.badge-data    { background: var(--accent-data-glow);   color: var(--accent-data); border-color: var(--accent-data-ring); }
.badge-warn    { background: var(--warning-glow);       color: var(--warning);     border-color: rgba(255,176,32,0.25); }
.badge-danger  { background: var(--danger-glow);        color: var(--danger);      border-color: rgba(255,59,92,0.25); }
.badge-info    { background: var(--info-glow);          color: var(--info);        border-color: rgba(59,130,246,0.25); }
.badge-muted   { background: rgba(107,115,148,0.10);    color: var(--text-muted);  border-color: rgba(107,115,148,0.20); }
.badge.active  { background: var(--accent-data-glow);   color: var(--accent-data); border-color: var(--accent-data-ring); }
.badge.paused  { background: rgba(107,115,148,0.10);    color: var(--text-secondary); border-color: rgba(107,115,148,0.20); }

/* ===== ALERTS ===== */
.alert {
  padding: 14px 18px; border-radius: var(--radius-md);
  font-size: 0.92rem; border: 1px solid;
  display: flex; align-items: flex-start; gap: 12px;
}
.alert-success { background: var(--accent-data-glow); border-color: var(--accent-data-ring); color: var(--accent-data); }
.alert-warning { background: var(--warning-glow);     border-color: rgba(255,176,32,0.25); color: var(--warning); }
.alert-error   { background: var(--danger-glow);      border-color: rgba(255,59,92,0.25); color: var(--danger); }
.alert-info    { background: var(--info-glow);        border-color: rgba(59,130,246,0.25); color: var(--info); }
.alert-accent  { background: var(--accent-glow);      border-color: var(--accent-ring); color: var(--accent); }

/* ===== FORMS ===== */
.input, .select, .textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem; color: var(--text-primary);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input::placeholder { color: var(--text-muted); }
.input-mono {
  font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700;
  text-align: center; letter-spacing: 0.25em; text-transform: uppercase;
}

.label {
  display: block;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ===== TABLE ===== */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table thead th {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted);
  text-align: left; padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.data-table tbody tr:hover td { background: rgba(255,255,255,0.015); }
.data-table .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }

/* ===== EMPTY STATE ===== */
.empty-state {
  padding: 48px 24px; text-align: center;
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.empty-state .es-icon {
  width: 40px; height: 40px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); border-radius: var(--radius-full);
  color: var(--text-muted);
}
.empty-state h3 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 6px;
}
.empty-state p { font-size: 0.9rem; max-width: 380px; margin: 0 auto; line-height: 1.55; }
.empty-state a { color: var(--accent); font-weight: 600; }
.empty-state a:hover { text-decoration: underline; }

/* ===== DASHBOARD SHELL ===== */
.ca-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--nav-h));
}
.ca-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 28px 16px;
  position: sticky; top: var(--nav-h); align-self: start;
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.ca-sidebar-group {
  margin-bottom: 28px;
}
.ca-sidebar-group-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--text-muted);
  padding: 0 14px; margin-bottom: 8px;
}
.ca-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 2px;
  font-size: 0.92rem; font-weight: 500;
  transition: color var(--dur-fast), background var(--dur-fast);
  position: relative;
}
.ca-sidebar a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}
.ca-sidebar a.active {
  color: var(--accent);
  background: var(--accent-glow);
  box-shadow: inset 2px 0 0 var(--accent);
}
.ca-sidebar a .glyph { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.ca-sidebar a.active .glyph { opacity: 1; }

.ca-main {
  padding: 40px clamp(20px, 4vw, 48px);
  max-width: 1120px;
  width: 100%;
}
.ca-page-head {
  margin-bottom: 32px;
}
.ca-page-head .h-1 { margin-bottom: 6px; }
.ca-page-head .page-sub { color: var(--text-muted); font-size: 0.98rem; max-width: 60ch; }

/* User pill (topbar) */
.user-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-primary);
}
.user-pill img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.user-pill .avatar-fallback {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.78rem;
}

/* ===== FOOTER ===== */
.ca-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.ca-footer-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
}
.ca-footer-brand .ca-nav-logo { font-size: 1.2rem; margin-bottom: 12px; }
.ca-footer-brand p { color: var(--text-muted); font-size: 0.9rem; max-width: 32ch; line-height: 1.6; }
.ca-footer-col h4 {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.ca-footer-col a {
  display: block; color: var(--text-secondary); font-size: 0.9rem;
  padding: 5px 0;
  transition: color var(--dur-fast);
}
.ca-footer-col a:hover { color: var(--accent); }
.ca-footer-bottom {
  max-width: var(--container); margin: 40px auto 0; padding: 24px 24px 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text-muted); font-size: 0.82rem; font-family: var(--font-mono);
}
.ca-footer-bottom .flag-row { display: inline-flex; gap: 8px; opacity: 0.7; }

/* ===== SCAN LINE (hero accent) ===== */
.scan-line {
  position: absolute; inset: 0;
  overflow: hidden; pointer-events: none;
  border-radius: inherit;
}
.scan-line::before {
  content: ''; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 10%, var(--accent) 50%, transparent 90%);
  box-shadow: 0 0 12px var(--accent);
  animation: scan-vertical 6s linear infinite;
}
@keyframes scan-vertical {
  0%   { top: -2px; opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { top: 100%; opacity: 0; }
}

/* ===== UTILITIES ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
.no-scroll { overflow: hidden; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

.divider { height: 1px; background: var(--border); margin: var(--sp-xl) 0; }
.divider-soft { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: var(--sp-xl) 0; }

/* Animated entry (staggered reveals) */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; animation: fade-up 500ms var(--ease-out) forwards; }
.reveal-d1 { animation-delay: 80ms; }
.reveal-d2 { animation-delay: 160ms; }
.reveal-d3 { animation-delay: 240ms; }
.reveal-d4 { animation-delay: 320ms; }
.reveal-d5 { animation-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .scan-line::before { display: none; }
}

/* ===== RESPONSIVE — Mobile-first hardening ===== */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ca-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ca-nav-links { gap: 2px; }
  .ca-nav-link { padding: 8px 10px; font-size: 0.85rem; }
}

@media (max-width: 720px) {
  :root { --nav-h: 58px; }
  html { -webkit-text-size-adjust: 100%; }

  /* Nav mobile */
  .ca-nav-inner { padding: 0 16px; gap: 10px; }
  .ca-nav-links { display: none; }
  .ca-nav-mobile { display: inline-flex; }
  .ca-nav-right .ca-nav-link { display: none; }
  .ca-nav-right .lang-selector { display: none; }

  /* Open mobile nav (set via JS class .open) */
  .ca-nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .ca-nav-links.open .ca-nav-link { padding: 14px 16px; font-size: 1rem; border-radius: var(--radius-md); }

  /* Buttons get larger tap targets on mobile */
  .btn { min-height: 44px; padding: 12px 20px; }
  .btn-sm { min-height: 40px; padding: 10px 16px; }
  .btn-lg { min-height: 52px; padding: 14px 24px; font-size: 1rem; }

  /* Container padding */
  .container, .container-narrow { padding: 0 16px; }

  /* Dashboard shell */
  .ca-app { grid-template-columns: 1fr; }
  .ca-sidebar {
    display: none; position: static; height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 16px;
  }
  .ca-sidebar.open { display: block; }
  .ca-sidebar-group { margin-bottom: 16px; }
  .ca-main { padding: 20px 16px; }
  /* Dashboard sidebar toggle (mobile only) — affiche le bouton burger a gauche de la topbar */
  .ca-sidebar-toggle { display: inline-flex; order: -1; }
}
@media (min-width: 721px) {
  .ca-sidebar-toggle { display: none; }
}

/* Bouton toggle sidebar dashboard (cache par defaut, active par la media query ci-dessus) */
.ca-sidebar-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center; justify-content: center;
  transition: border-color 150ms;
  padding: 0;
  flex-shrink: 0;
}
.ca-sidebar-toggle:hover { border-color: var(--border-hover); }

/* Fermeture du bloc mobile : on remet l'indent du media query */
@media (max-width: 720px) {
  .ca-sidebar-toggle { display: inline-flex; }

  /* Typography scales down */
  .h-hero { font-size: clamp(2rem, 8vw, 2.6rem); }
  .h-1 { font-size: clamp(1.6rem, 6vw, 2rem); }
  .h-2 { font-size: clamp(1.2rem, 4.8vw, 1.5rem); }
  .h-3 { font-size: 1.05rem; }
  .lead { font-size: 1rem; }
  .eyebrow { font-size: 10.5px; letter-spacing: 0.15em; }

  /* Grid collapse */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 12px; }

  /* Cards slim down */
  .card { padding: 18px; }
  .data-card { padding: 16px; }
  .data-card .dc-value { font-size: 1.5rem; }

  /* Deal row ultra-compact */
  .deal-row { padding: 10px 12px; gap: 10px; }
  .deal-row img { width: 48px; height: 48px; }
  .deal-row .dr-title { font-size: 0.92rem; }
  .deal-row .dr-meta { font-size: 0.76rem; }
  .deal-row .dr-price { font-size: 0.92rem; }

  /* User pill shrinks */
  .user-pill { padding: 4px 10px 4px 4px; font-size: 0.8rem; gap: 8px; }
  .user-pill img, .user-pill .avatar-fallback { width: 24px; height: 24px; font-size: 0.7rem; }
  .user-pill span:not(.avatar-fallback) { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Section padding */
  .section { padding: 56px 0; }
  .section-sm { padding: 40px 0; }

  /* Footer mobile */
  .ca-footer { padding: 40px 0 24px; margin-top: 48px; }
  .ca-footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 0 16px; }
  .ca-footer-bottom { flex-direction: column; gap: 10px; text-align: center; padding: 20px 16px 0; margin-top: 28px; }

  /* Input targets */
  .input, .select, .textarea { padding: 14px; font-size: 16px; /* évite le zoom iOS */ }
  .input-mono { font-size: 1.3rem; padding: 18px 14px; }
}

@media (max-width: 420px) {
  .container, .container-narrow { padding: 0 14px; }
  .ca-main { padding: 18px 14px; }
  .card { padding: 16px; }
  .ca-footer-inner { padding: 0 14px; }
  .hero-strip { padding: 22px 20px !important; }
  .section { padding: 44px 0; }
  .eyebrow { font-size: 10px; }
  .h-hero { font-size: 1.85rem; letter-spacing: -0.02em; }
  .btn-lg { padding: 12px 20px; font-size: 0.95rem; }
}
