/* ════════════════════════════════════════════════
   BÖRJA SWISS SOLUTIONS — KATASTER
   Design System v5
   Liquid Glass ultra-transparent, Apple-grade
════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&family=DM+Mono:wght@400;500&display=swap');

/* ── TOKENS ─────────────────────────────────── */
:root {
  /* Fond — noir absolu, zéro teinte */
  --bg: #080808;

  /* Gris secondaire strict */
  --g0: #ffffff;
  --g1: #f0f0f0;
  --g2: #b8b8b8;
  --g3: #6e6e6e;
  --g4: #363636;
  --g5: #1c1c1c;
  --g6: #111111;

  /* Texte */
  --t1: rgba(255,255,255,0.93);
  --t2: rgba(255,255,255,0.50);
  --t3: rgba(255,255,255,0.22);
  --t4: rgba(255,255,255,0.07);

  /* ── LIQUID GLASS — ULTRA TRANSPARENT ──
     Principe Apple :
     - fond rgba 0.005 à 0.025 MAXIMUM
     - blur 60–100px = c'est lui qui crée l'effet
     - border lumineuse = seul élément visible
     - specular rim top = effet "vitre épaisse"
  */
  --gl-card:    rgba(255,255,255,0.006);  /* cartes : quasi invisible */
  --gl-panel:   rgba(255,255,255,0.014);  /* panneaux : trace légère */
  --gl-btn:     rgba(255,255,255,0.038);  /* boutons : un peu plus visible */
  --gl-topbar:  rgba(8,8,8,0.60);         /* topbar : sombre frosted */
  --gl-modal:   rgba(10,10,10,0.82);      /* modal : plus opaque */

  --gl-border:    rgba(255,255,255,0.07);
  --gl-border-hi: rgba(255,255,255,0.14);
  --gl-shine:     rgba(255,255,255,0.18); /* specular rim */
  --gl-dark-edge: rgba(0,0,0,0.60);

  /* Type parzelles — gris différenciés */
  --c-crit:  #e4e4e4;
  --c-succ:  #9c9c9c;
  --c-state: #626262;
  --c-plq:   #c4c4c4;

  /* Radar */
  --radar-bg: #f4f4f4;

  /* Radii */
  --r-sm:   12px;
  --r-md:   18px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-2xl:  40px;
  --r-pill: 999px;
}

/* ── RESET ────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--t1);
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── FOND NOIR PUR ────────────────────────── */
.bg {
  position: fixed; inset: 0; z-index: 0;
  background: #080808;
  /* grain neutre — aucune couleur */
  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.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.022'/%3E%3C/svg%3E");
}

/* ── LIQUID GLASS CLASSES ─────────────────── */

/* Carte — quasi invisible, le blur fait tout */
.gl-card {
  position: relative;
  background: var(--gl-card);
  backdrop-filter: blur(80px) saturate(1.8) brightness(1.04);
  -webkit-backdrop-filter: blur(80px) saturate(1.8) brightness(1.04);
  border: 0.5px solid var(--gl-border);
  box-shadow:
    0 0.5px 0 var(--gl-shine) inset,   /* specular rim top */
    0.5px 0 0 rgba(255,255,255,0.05) inset,  /* reflet gauche */
    0 -0.5px 0 var(--gl-dark-edge) inset,    /* dark edge bas */
    0 28px 80px rgba(0,0,0,0.65),
    0 8px 24px rgba(0,0,0,0.45),
    0 2px 6px rgba(0,0,0,0.28);
}
.gl-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 40%; border-radius: inherit;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.07) 0%,
    rgba(255,255,255,0.015) 55%,
    transparent 100%);
  pointer-events: none; z-index: 1;
}

/* Panel léger (topbar, ticker) */
.gl-panel {
  background: var(--gl-panel);
  backdrop-filter: blur(64px) saturate(1.6);
  -webkit-backdrop-filter: blur(64px) saturate(1.6);
  border: 0.5px solid var(--gl-border);
  box-shadow:
    0 0.5px 0 rgba(255,255,255,0.12) inset,
    0 -0.5px 0 rgba(0,0,0,0.50) inset;
}

/* ── BOUTONS GLASS ────────────────────────── */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px; border-radius: var(--r-pill);
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  font-weight: 600; letter-spacing: -0.01em;
  cursor: pointer; border: 0.5px solid var(--gl-border-hi);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  /* GLASS BTN — transparent max */
  background: var(--gl-btn);
  backdrop-filter: blur(48px) saturate(1.8);
  -webkit-backdrop-filter: blur(48px) saturate(1.8);
  box-shadow:
    0 1px 0 var(--gl-shine) inset,
    0 -1px 0 var(--gl-dark-edge) inset,
    0.5px 0 0 rgba(255,255,255,0.07) inset,
    0 10px 32px rgba(0,0,0,0.50),
    0 3px 10px rgba(0,0,0,0.32),
    0 1px 3px rgba(0,0,0,0.20);
  color: var(--g1);
}
/* shine dégradé interne */
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.10) 0%,
    rgba(255,255,255,0.02) 50%,
    transparent 100%);
  border-radius: var(--r-pill);
  pointer-events: none;
}
.btn:hover {
  transform: translateY(-1.5px);
  background: rgba(255,255,255,0.065);
  border-color: rgba(255,255,255,0.20);
  color: #fff;
  box-shadow:
    0 1.5px 0 rgba(255,255,255,0.24) inset,
    0 -1.5px 0 rgba(0,0,0,0.65) inset,
    0 18px 52px rgba(0,0,0,0.60),
    0 5px 16px rgba(0,0,0,0.40),
    0 2px 5px rgba(0,0,0,0.24);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .25; cursor: default; transform: none !important; }

/* Primaire — légèrement plus blanc */
.btn-primary {
  background: rgba(255,255,255,0.065);
  border-color: rgba(255,255,255,0.18);
  color: #ffffff;
  box-shadow:
    0 1.5px 0 rgba(255,255,255,0.26) inset,
    0 -1px 0 rgba(0,0,0,0.60) inset,
    0 14px 48px rgba(0,0,0,0.55),
    0 4px 14px rgba(0,0,0,0.38);
}
.btn-primary:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.26);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.30) inset,
    0 -1.5px 0 rgba(0,0,0,0.65) inset,
    0 20px 64px rgba(0,0,0,0.65),
    0 7px 20px rgba(0,0,0,0.48);
}

/* Ghost — le plus transparent */
.btn-ghost {
  background: rgba(255,255,255,0.012);
  border-color: rgba(255,255,255,0.06);
  color: var(--t3);
  box-shadow:
    0 0.5px 0 rgba(255,255,255,0.08) inset,
    0 -0.5px 0 rgba(0,0,0,0.35) inset,
    0 3px 10px rgba(0,0,0,0.25);
}
.btn-ghost:hover {
  color: var(--t2);
  background: rgba(255,255,255,0.030);
  border-color: rgba(255,255,255,0.10);
}

/* ── LAYOUT ───────────────────────────────── */
.app {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding-bottom: 0;
}

/* ── TOPBAR ───────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 200;
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: var(--gl-topbar);
  backdrop-filter: blur(72px) saturate(1.6);
  -webkit-backdrop-filter: blur(72px) saturate(1.6);
  border-bottom: 0.5px solid rgba(255,255,255,0.06);
  box-shadow: 0 0.5px 0 rgba(255,255,255,0.07) inset;
}

.brand { display: flex; align-items: center; gap: 10px; }
.logo-wrap {
  width: 34px; height: 34px; border-radius: 8px;
  background: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(255,255,255,0.12);
}
.logo-wrap svg { width: 26px; height: 26px; }
.brand-name { font-size: 14px; font-weight: 600; letter-spacing: -0.022em; color: var(--t1); line-height: 1.1; }
.brand-sub  { font-size: 9px; color: var(--g4); letter-spacing: 0.08em; text-transform: uppercase; }

.topnav { display: flex; gap: 2px; }
.topnav-btn {
  padding: 6px 13px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 400; cursor: pointer;
  color: var(--t3); background: transparent; border: none; transition: all .16s;
  font-family: 'DM Sans', sans-serif;
}
.topnav-btn:hover { color: var(--t2); background: rgba(255,255,255,0.035); }
.topnav-btn.on {
  color: var(--t1);
  background: rgba(255,255,255,0.050);
  border: 0.5px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(20px);
  box-shadow: 0 0.5px 0 rgba(255,255,255,0.12) inset;
}

.live-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 500;
  color: var(--g2); letter-spacing: 0.02em;
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.07);
  box-shadow: 0 0.5px 0 rgba(255,255,255,0.10) inset;
}
.live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--g2); box-shadow: 0 0 6px var(--g2);
  animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 55%{opacity:.15} }

/* ── HERO ─────────────────────────────────── */
.hero {
  padding: 30px 24px 16px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
}
.hero-kicker {
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--g4); margin-bottom: 8px;
}
.hero-h1 {
  font-size: 31px; font-weight: 300; line-height: 1.07; letter-spacing: -0.035em;
  margin-bottom: 8px; color: var(--t1);
}
.hero-h1 strong { font-weight: 700; color: var(--g0); }
.hero-desc { font-size: 12.5px; color: var(--t3); line-height: 1.68; max-width: 400px; font-weight: 300; }

.kpi-row { display: flex; gap: 8px; flex-shrink: 0; }
.kpi {
  padding: 13px 16px; border-radius: var(--r-md); text-align: center; min-width: 84px;
}
.kpi-n { font-size: 25px; font-weight: 700; letter-spacing: -0.04em; font-family: 'DM Mono', monospace; color: var(--g1); }
.kpi-l { font-size: 8.5px; color: var(--t3); margin-top: 5px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── MAIN GRID ────────────────────────────── */
.main {
  padding: 0 24px 24px;
  display: grid; grid-template-columns: 1fr 304px; gap: 12px;
  align-items: start;
}
.col-left  { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.col-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* ── SCANNER CARD ─────────────────────────── */
.scanner-card { border-radius: var(--r-2xl); overflow: hidden; }

.sc-bar {
  padding: 12px 18px;
  border-bottom: 0.5px solid rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  background: rgba(255,255,255,0.008);
}
.sc-title {
  font-size: 12px; font-weight: 600; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 7px; color: var(--t1); white-space: nowrap;
}
.sc-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--g2); box-shadow: 0 0 7px var(--g2);
  animation: blink 1.8s ease-in-out infinite; flex-shrink: 0;
}

.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip {
  padding: 3px 10px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 400;
  cursor: pointer; color: var(--t3); background: transparent;
  border: 0.5px solid rgba(255,255,255,0.06); transition: all .14s;
  font-family: 'DM Sans', sans-serif;
}
.chip:hover { color: var(--t2); border-color: rgba(255,255,255,0.10); }
.chip.on {
  color: var(--g1);
  background: rgba(255,255,255,0.065);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 0.5px 0 rgba(255,255,255,0.14) inset, 0 2px 8px rgba(0,0,0,0.28);
}

/* ── RADAR BLANC ──────────────────────────── */
.radar-zone {
  position: relative; height: 320px; overflow: hidden;
  background: var(--radar-bg);
}
#radar-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  mix-blend-mode: multiply;
}
.radar-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.radar-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 64px 80px;
}
.radar-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(8,8,8,0.40) 100%);
}
.map-labels {
  position: absolute; top: 9px; left: 12px; display: flex; gap: 6px; z-index: 10;
}
.map-lab {
  font-size: 8px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px;
}
.ml-ge { background: rgba(0,0,0,0.09); color: rgba(0,0,0,0.58); border: 0.5px solid rgba(0,0,0,0.12); }
.ml-zh { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.40); border: 0.5px solid rgba(0,0,0,0.08); }
.map-legend {
  position: absolute; bottom: 8px; left: 12px; z-index: 10;
  display: flex; gap: 8px; align-items: center;
  background: rgba(255,255,255,0.80); padding: 4px 9px; border-radius: 6px;
  border: 0.5px solid rgba(0,0,0,0.06);
}
.leg-item { display: flex; align-items: center; gap: 3px; font-size: 8px; color: rgba(0,0,0,0.48); }
.leg-dot  { width: 6px; height: 6px; border-radius: 50%; }

/* ── LISTE PARZELLEN ──────────────────────── */
.list-head {
  padding: 8px 18px 3px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.008);
  border-top: 0.5px solid rgba(255,255,255,0.035);
}
.list-head-lbl { font-size: 10px; font-weight: 600; color: var(--t3); letter-spacing: 0.05em; text-transform: uppercase; }
.list-head-ct  { font-size: 10px; color: var(--t4); font-family: 'DM Mono', monospace; }

.list-wrap { max-height: 248px; overflow-y: auto; }
.list-wrap::-webkit-scrollbar { width: 2px; }
.list-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); }

.p-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; border-bottom: 0.5px solid rgba(255,255,255,0.03);
  cursor: pointer; transition: background .11s; position: relative;
}
.p-row:hover { background: rgba(255,255,255,0.018); }
.p-row.sel {
  background: rgba(255,255,255,0.030);
  border-left: 1.5px solid rgba(255,255,255,0.20);
  padding-left: 16.5px;
}
.p-row:last-child { border-bottom: none; }
.p-ring { position: relative; flex-shrink: 0; }
.p-ring svg { width: 33px; height: 33px; transform: rotate(-90deg); }
.p-ring-txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; font-family: 'DM Mono', monospace; }
.p-info { flex: 1; min-width: 0; }
.p-id   { font-size: 8.5px; color: var(--t4); font-family: 'DM Mono', monospace; margin-bottom: 1px; letter-spacing: 0.04em; }
.p-name { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--t1); }
.p-meta { font-size: 10px; color: var(--t3); font-weight: 300; }
.p-badge { font-size: 8px; padding: 2px 7px; border-radius: var(--r-pill); border: 0.5px solid; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.p-src {
  flex-shrink: 0; width: 23px; height: 23px; border-radius: 7px;
  background: transparent; border: 0.5px solid transparent;
  color: var(--t4); font-size: 9.5px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: all .14s; font-family: 'DM Mono', monospace;
}
.p-row:hover .p-src { color: var(--t2); background: rgba(255,255,255,0.055); border-color: rgba(255,255,255,0.09); }
.p-src:hover { color: var(--g1) !important; background: rgba(255,255,255,0.10) !important; }

/* ── SCAN BAR — HORS CARTE ────────────────── */
.scan-bar {
  display: flex; gap: 10px; align-items: center;
  /* flotte librement dans col-left, séparé par gap */
}
.scan-bar .btn { flex: 1; }
.scan-prog { font-size: 11px; color: var(--t4); font-family: 'DM Mono', monospace; white-space: nowrap; }

/* ── SOURCES CARD ─────────────────────────── */
.src-card { border-radius: var(--r-2xl); padding: 15px; }
.card-lbl { font-size: 9.5px; font-weight: 600; color: var(--t3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 11px; }
.api-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 0; border-bottom: 0.5px solid rgba(255,255,255,0.035);
}
.api-row:last-of-type { border-bottom: none; padding-bottom: 0; }
.api-name { font-size: 11px; color: var(--t2); font-weight: 300; }
.api-st { display: flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 500; }
.api-dot { width: 5px; height: 5px; border-radius: 50%; }
.api-ep {
  margin-top: 10px; padding: 6px 8px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.020); border: 0.5px solid rgba(255,255,255,0.055);
  box-shadow: 0 0.5px 0 rgba(255,255,255,0.06) inset;
}
.api-ep-lbl { font-size: 8px; color: var(--t4); margin-bottom: 2px; letter-spacing: 0.06em; text-transform: uppercase; }
.api-ep-val { font-size: 8px; color: var(--g3); font-family: 'DM Mono', monospace; word-break: break-all; }

/* ── DETAIL CARD ──────────────────────────── */
.detail-card { border-radius: var(--r-2xl); padding: 15px; flex: 1; }
.dc-empty { text-align: center; padding: 26px 0; color: var(--t4); font-size: 11px; line-height: 1.8; }
.dc-com   { font-size: 13.5px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 2px; }
.dc-sub   { font-size: 10px; color: var(--t3); font-weight: 300; margin-bottom: 11px; }
.dc-score-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 11px; }
.dc-score-big { font-size: 44px; font-weight: 700; letter-spacing: -0.05em; font-family: 'DM Mono', monospace; line-height: 1; }
.dc-score-lbl { font-size: 8.5px; color: var(--t4); margin-bottom: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.dc-pill { padding: 4px 9px; border-radius: var(--r-pill); font-size: 9px; font-weight: 600; border: 0.5px solid; }
.dc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 11px; }
.dc-cell {
  padding: 8px 10px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.016); border: 0.5px solid rgba(255,255,255,0.045);
  box-shadow: 0 0.5px 0 rgba(255,255,255,0.06) inset;
}
.dc-cell-v { font-size: 13px; font-weight: 700; font-family: 'DM Mono', monospace; color: var(--g1); }
.dc-cell-l { font-size: 8px; color: var(--t4); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.dc-sig-h { font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--t4); margin-bottom: 7px; }
.dc-sig { display: flex; align-items: flex-start; gap: 5px; margin-bottom: 4px; }
.dc-sig-ic { width: 14px; height: 14px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; flex-shrink: 0; margin-top: 1px; font-family: 'DM Mono', monospace; }
.dc-sig-tx { font-size: 10px; color: var(--t2); line-height: 1.45; font-weight: 300; }

/* ── DETAIL BAR — HORS CARTE ──────────────── */
.detail-bar { display: flex; gap: 7px; }
.detail-bar .btn { padding: 10px 16px; }

/* ── TICKER ───────────────────────────────── */
.ticker { margin: 0 24px 18px; border-radius: var(--r-lg); padding: 11px 15px; }
.ticker-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.10em; color: var(--t4); margin-bottom: 7px; }
.tick-list { display: flex; flex-direction: column; gap: 4px; max-height: 118px; overflow-y: auto; }
.tick-list::-webkit-scrollbar { width: 2px; }
.tick-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); }
.tick-item {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 9px; border-radius: var(--r-sm);
  border: 0.5px solid; animation: fadein .28s ease;
  cursor: pointer; transition: opacity .13s;
}
.tick-item:hover { opacity: .72; }
@keyframes fadein { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:none} }
.tick-txt { flex: 1; font-size: 10px; font-weight: 300; line-height: 1.4; }
.tick-txt b { font-weight: 600; display: block; font-size: 10.5px; }
.tick-time { font-size: 9px; color: var(--t4); font-family: 'DM Mono', monospace; white-space: nowrap; }
.tick-src {
  width: 18px; height: 18px; border-radius: 5px;
  background: transparent; border: 0.5px solid transparent;
  color: rgba(0,0,0,0.18); font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: all .13s; flex-shrink: 0;
  font-family: 'DM Mono', monospace;
}
.tick-item:hover .tick-src { color: rgba(0,0,0,0.40); background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.09); }

/* ── FOOTER ───────────────────────────────── */
.footer {
  padding: 13px 24px;
  border-top: 0.5px solid rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; color: var(--t4); font-weight: 300;
}
.footer a { color: var(--t4); text-decoration: none; transition: color .13s; }
.footer a:hover { color: var(--t2); }
.footer-links { display: flex; gap: 12px; }

/* ── MODAL ────────────────────────────────── */
.modal-bg {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  align-items: center; justify-content: center;
}
.modal-bg.open { display: flex; }
.modal {
  position: relative;
  width: 355px; border-radius: var(--r-2xl); padding: 24px;
  background: var(--gl-modal);
  backdrop-filter: blur(100px) saturate(2.2);
  -webkit-backdrop-filter: blur(100px) saturate(2.2);
  border: 0.5px solid rgba(255,255,255,0.12);
  box-shadow:
    0 1.5px 0 rgba(255,255,255,0.16) inset,
    0 -1px 0 rgba(0,0,0,0.70) inset,
    0 56px 120px rgba(0,0,0,0.92),
    0 20px 48px rgba(0,0,0,0.60);
}
.modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 38%;
  background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, transparent 100%);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  pointer-events: none;
}
.modal-title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.022em; margin-bottom: 3px; }
.modal-sub   { font-size: 11.5px; color: var(--t3); margin-bottom: 16px; font-weight: 300; }
.modal-lbl   { font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--t4); display: block; margin-bottom: 7px; }
.chk { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--t2); margin-bottom: 6px; cursor: pointer; font-weight: 300; }
.chk input { accent-color: var(--g2); width: 13px; height: 13px; }
.modal-grp { margin-bottom: 13px; }
.modal-acts { display: flex; gap: 7px; margin-top: 16px; }
.btn-cancel {
  flex: 1; padding: 9px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.022); border: 0.5px solid rgba(255,255,255,0.07);
  color: var(--t2); font-size: 12px; font-weight: 400; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all .13s;
  box-shadow: 0 0.5px 0 rgba(255,255,255,0.07) inset;
}
.btn-cancel:hover { background: rgba(255,255,255,0.06); color: var(--t1); }
.btn-ok {
  flex: 2; padding: 9px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.08); border: 0.5px solid rgba(255,255,255,0.18);
  color: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all .14s;
  box-shadow: 0 1.5px 0 rgba(255,255,255,0.20) inset, 0 -1px 0 rgba(0,0,0,0.55) inset;
}
.btn-ok:hover { background: rgba(255,255,255,0.14); }

/* ── TOAST ────────────────────────────────── */
.toast {
  display: none; position: fixed; z-index: 600;
  bottom: 22px; right: 22px;
  padding: 11px 16px; border-radius: var(--r-lg);
  background: rgba(8,8,8,0.90);
  border: 0.5px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(56px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.10) inset, 0 -1px 0 rgba(0,0,0,0.65) inset, 0 24px 64px rgba(0,0,0,0.75);
  min-width: 220px; animation: toast-in .2s ease;
}
.toast.show { display: block; }
@keyframes toast-in { from{opacity:0;transform:translateY(9px)} to{opacity:1;transform:none} }
.toast-t { font-weight: 600; font-size: 12px; color: var(--g1); margin-bottom: 2px; }
.toast-b { font-size: 11px; color: var(--t3); font-weight: 300; }

/* ── BOTTOM NAV MOBILE ────────────────────── */
.bottom-nav { display: none; }

/* ════════════════════════════════════════════
   RESPONSIVE MOBILE ≤768px
════════════════════════════════════════════ */
@media (max-width: 768px) {
  .topnav, .brand-sub { display: none; }
  .topbar { padding: 0 16px; }

  .hero { flex-direction: column; padding: 16px 14px 10px; gap: 12px; }
  .hero-h1 { font-size: 23px; }
  .hero-desc { display: none; }
  .kpi-row { width: 100%; }
  .kpi { flex: 1; min-width: 0; padding: 10px 5px; }
  .kpi-n { font-size: 20px; }
  .kpi-l { font-size: 7.5px; }

  /* grid → 1 colonne, space pour bottom nav */
  .main { grid-template-columns: 1fr; padding: 0 12px 90px; gap: 10px; }

  .radar-zone { height: 255px; }

  .chips { flex-wrap: nowrap; overflow-x: auto; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; }

  .list-wrap { max-height: 210px; }

  .scan-bar { flex-direction: row; }
  .scan-bar .btn { flex: 1; }

  .ticker { margin: 0 12px 12px; }

  /* Toast au-dessus du bottom nav */
  .toast { bottom: 82px; left: 14px; right: 14px; min-width: 0; }

  .footer { flex-direction: column; gap: 5px; text-align: center; padding: 10px 14px; }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 9px; }

  /* Modal → bottom sheet */
  .modal-bg { align-items: flex-end; }
  .modal {
    width: 100%;
    border-radius: var(--r-2xl) var(--r-2xl) 0 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
  .modal::before { border-radius: var(--r-2xl) var(--r-2xl) 0 0; }

  .detail-bar { flex-direction: row; }

  /* ── BOTTOM NAV ── */
  .bottom-nav {
    display: flex;
    /* HORS du .app — directement dans body */
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 400;   /* > tout le reste */
    height: 70px;
    padding: 0 10px calc(env(safe-area-inset-bottom) + 5px);
    align-items: flex-end; gap: 3px;
    background: rgba(8,8,8,0.75);
    backdrop-filter: blur(72px) saturate(1.7);
    -webkit-backdrop-filter: blur(72px) saturate(1.7);
    border-top: 0.5px solid rgba(255,255,255,0.06);
    box-shadow: 0 -0.5px 0 rgba(255,255,255,0.06) inset;
    pointer-events: all; /* s'assurer que les clics passent */
  }
  .bnav-btn {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 4px; border-radius: var(--r-md);
    background: transparent; border: none; cursor: pointer;
    color: var(--t3); transition: all .15s;
    font-family: 'DM Sans', sans-serif;
    /* isoler les clics */
    position: relative; z-index: 1;
    -webkit-tap-highlight-color: rgba(255,255,255,0.08);
  }
  .bnav-btn.on {
    color: var(--g2);
    background: rgba(255,255,255,0.045);
    border: 0.5px solid rgba(255,255,255,0.07);
    box-shadow: 0 0.5px 0 rgba(255,255,255,0.10) inset;
  }
  .bnav-btn:active {
    background: rgba(255,255,255,0.075);
    transform: scale(0.96);
  }
  .bnav-ic { font-size: 19px; line-height: 1; }
  .bnav-lb { font-size: 9px; font-weight: 500; letter-spacing: 0.01em; }
}

@media (max-width: 375px) {
  .hero-h1 { font-size: 20px; }
  .kpi-n { font-size: 18px; }
}
