/* Mobiles Radar — design system « pupitre de veille » (sur mesure) */

:root {
  --ink: #05070d;        /* fond — noir profond */
  --panel: #0a0f1d;      /* panneaux */
  --panel-2: #0e1526;    /* panneaux clairs */
  --line: #16223c;       /* filets */
  --text: #d5e3f4;
  --muted: #5f7392;
  --signal: #00ffa3;     /* phosphore — la signature */
  --signal-dim: #0a8a5e;
  --amber: #ffb020;      /* exploit public */
  --red: #ff3d3d;        /* exploitation active / alerte */
  --violet: #b28cff;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box }

#worldmap {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  opacity: .55;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 15px/1.6 "Space Grotesk", system-ui, sans-serif;
}

/* scanline discrète sur les panneaux (effet terminal) */
.panel, .counter, dialog {
  background-image: repeating-linear-gradient(
    0deg, transparent 0 2px, rgba(0, 255, 170, .012) 2px 3px);
}

/* — en-tête : pupitre — */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead-in {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none }
.brand .glyph {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
}
.brand .name em { color: var(--signal); font-style: normal }
.brand .name { font-weight: 700; font-size: 16px; color: var(--text) }
.nav { display: flex; gap: 22px }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 13.5px;
  letter-spacing: .04em;
  border-bottom: 2px solid transparent; padding-bottom: 3px;
}
.nav a:hover { color: var(--text) }
.nav a.on { color: var(--signal); border-bottom-color: var(--signal) }

/* — structure — */
main { max-width: 1200px; margin: 0 auto; padding: 36px 28px 64px }
.foot {
  border-top: 1px solid var(--line);
  padding: 26px 28px 34px; text-align: center;
  color: var(--muted); font-size: 12.5px;
}
.k {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
  margin: 34px 0 12px;
}
.k:first-child { margin-top: 0 }

/* — compteurs — */
.counters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) }
.counter {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 18px;
  position: relative; overflow: hidden;
}
.counter::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--signal); opacity: .0;
}
.counter .n {
  font-family: var(--mono); font-size: 25px; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.counter .l {
  margin-top: 5px; font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.counter.c-signal  { border-left: 3px solid var(--signal) }
.counter.c-amber  { border-left: 3px solid var(--amber) }
.counter.c-red    { border-left: 3px solid var(--red) }
.counter.c-violet { border-left: 3px solid var(--violet) }
.counter.c-plain  { border-left: 3px solid var(--line) }
.counter .n.s-signal { color: var(--signal) }
.counter .n.s-amber { color: var(--amber) }
.counter .n.s-red { color: var(--red) }
.counter .n.s-violet { color: var(--violet) }

/* — panneaux / tableaux — */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
table { width: 100%; border-collapse: collapse }
th {
  text-align: left; font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
  padding: 11px 16px; background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
td { padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px }
tr:last-child td { border-bottom: 0 }
tbody tr:hover td { background: #0a1220 }

.mono { font-family: var(--mono); font-size: 12.5px }
.cve-link {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--signal); text-decoration: none;
}
.cve-link:hover { text-decoration: underline; text-underline-offset: 3px }
.src { color: var(--muted); font-size: 12px }

/* — pastilles — */
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 4px 10px 4px 10px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: #081018;
}
.pill.critical { background: var(--red) }
.pill.high { background: var(--amber) }
.pill.medium { background: #ffe9a8 }
.pill.low { background: #9defc4 }
.pill.none { background: #232f4d; color: var(--muted) }

.tag {
  display: inline-block; padding: 1px 8px; border-radius: 3px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
}
.tag.on  { color: #081018 }
.tag.off { color: var(--muted); border: 1px solid var(--line) }
.tag.poc { background: var(--amber) }
.tag.kev { background: var(--red); color: #fff }

/* — formulaires — */
form input[type=text], form input[type=password], form select {
  width: 100%; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; font: 13.5px/1 "Space Grotesk", sans-serif;
}
form input:focus, form select:focus { outline: 2px solid var(--signal); outline-offset: -1px }
.btn {
  background: var(--signal); color: #04120c; border: 0; border-radius: 8px;
  padding: 10px 22px; font: 600 13.5px "Space Grotesk", sans-serif;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08) }
.btn:disabled { opacity: .5; cursor: wait }
.btn-ghost {
  background: none; color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 14px; font: 500 13px "Space Grotesk", sans-serif;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted) }

.filters-grid { display: grid; gap: 12px; grid-template-columns: 2fr 1fr 1fr .7fr 1fr }
label.f { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px }
.chips { display: flex; gap: 18px; align-items: center; color: var(--muted); font-size: 13px; margin-top: 12px }
.chips label { display: flex; gap: 7px; align-items: center; cursor: pointer }
.chips input { accent-color: var(--signal) }

/* — formulaire de recherche de l'accueil — */
.searchbar { display: flex; gap: 10px }
.searchbar input[type=text] { width: 230px }

/* — login — */
.login {
  max-width: 380px; margin: 12vh auto 0;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 34px 34px 30px;
}
.login .glyph { display: grid; place-items: center; margin-bottom: 18px }
.login h1 { margin: 0; font-size: 19px; text-align: center }
.login h1 em { color: var(--signal); font-style: normal }
.login p.sub { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 24px }
.login .btn { width: 100%; margin-top: 16px }
.err {
  display: none; margin-top: 12px;
  background: #2a1215; border: 1px solid #57242a; color: #ffbdbd;
  border-radius: 8px; padding: 9px 13px; font-size: 13px;
}
.err.show { display: block }

/* — timeline (modal) — */
dialog {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--text);
  padding: 0; width: min(860px, 94vw);
}
dialog::backdrop { background: rgba(2, 6, 12, .72) }
.dlg-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 22px; border-bottom: 1px solid var(--line);
}
.dlg-head h3 { margin: 0; font-family: var(--mono); font-size: 14.5px; color: var(--signal) }
.dlg-meta { padding: 14px 22px 4px; font-size: 13px; color: var(--muted) }
.dlg-meta .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px }
.dlg-body { padding: 10px 22px 26px; max-height: 68vh; overflow: auto }

.tl { list-style: none; margin: 8px 0 0; padding: 0 0 0 26px; position: relative }
.tl::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line) }
.tl li { position: relative; padding: 0 0 22px 0 }
.tl li .dot {
  position: absolute; left: -26px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--muted); border: 2px solid var(--ink);
}
.tl li.poc .dot { background: var(--amber) }
.tl li.kev .dot { background: var(--red) }
.tl li.patch .dot { background: var(--signal) }
.tl li.disclosure .dot { background: #58c7ff }
.tl .when { font-family: var(--mono); font-size: 11.5px; color: var(--muted) }
.tl .what { font-size: 13.5px; margin-top: 2px }
.tl .what b { font-weight: 600 }
.tl a { color: var(--signal); text-decoration: none }
.tl a:hover { text-decoration: underline; text-underline-offset: 3px }
.tl .meta { color: var(--muted); font-size: 12px; margin-top: 2px }

.empty { color: var(--muted); text-align: center; padding: 30px; font-size: 13.5px }

@media (max-width: 860px) {
  .filters-grid { grid-template-columns: 1fr 1fr }
  main { padding: 22px 18px 48px }
  .masthead-in { padding: 12px 18px }
}

@media print { .masthead, .foot, .no-print { display: none } }