:root {
  --bg: #0d1116; --panel: #151b22; --panel2: #1c242d; --panel3: #232d38; --ink: #e6edf3; --muted: #8b98a6; --faint: #5d6976; --line: #26303b;
  --accent: #f5a524; --accent-ink: #2a1a00; --accent-soft: #33260f;
  --ok: #4cc27f; --ok-soft: #15301f; --warn: #f0a63a; --warn-soft: #382811; --ko: #f0766b; --ko-soft: #3a1b19;
  --star: #f5c84b; --radius: 10px;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 18px 70px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
[hidden] { display: none !important; }

/* ---------- en-tête ---------- */
header.top { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
header.top .wrap { display: flex; align-items: center; gap: 16px; padding-top: 9px; padding-bottom: 9px; flex-wrap: wrap; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 15px; }
.brand svg { color: var(--accent); }
nav.tabs { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
nav.tabs button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
nav.tabs button:hover { background: var(--panel2); color: var(--ink); }
nav.tabs button.on { background: var(--accent-soft); color: var(--accent); }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; text-align: center; margin-left: 5px; line-height: 17px; }
.etat-veille { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.pulse.on { background: var(--accent); box-shadow: 0 0 0 0 rgba(245,165,36,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(245,165,36,0); } 100% { box-shadow: 0 0 0 0 rgba(245,165,36,0); } }

/* ---------- éléments communs ---------- */
h1 { font-size: 21px; margin: 24px 0 4px; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.sub { color: var(--muted); margin: 0 0 18px; max-width: 75ch; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.btn { border: 1px solid var(--line); background: var(--panel2); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--ko); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--panel2); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
input[type=text], input[type=search], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 64px; font-family: var(--mono); font-size: 12.5px; }
.field { margin-bottom: 12px; }
.hint { font-size: 12px; color: var(--faint); margin-top: 4px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1; min-width: 180px; }
.err { color: var(--ko); font-size: 13px; min-height: 18px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ko { background: var(--ko-soft); color: var(--ko); }
.pill.neutre { background: var(--panel3); color: var(--muted); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.vide { text-align: center; color: var(--muted); padding: 46px 20px; }
.vide b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ---------- barre d'outils du fil ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; max-width: 220px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 7px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg button.on { background: var(--panel3); color: var(--ink); }

/* ---------- fil des découvertes ---------- */
.jour { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin: 20px 0 6px; display: flex; gap: 10px; align-items: center; }
.jour::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.liste { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dec { display: grid; grid-template-columns: 26px 1fr auto; gap: 4px 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); align-items: start; }
.dec:last-child { border-bottom: 0; }
.dec:hover { background: var(--panel2); }
.dec .etoile { border: 0; background: none; cursor: pointer; color: var(--faint); font-size: 16px; line-height: 1; padding: 2px 0 0; }
.dec .etoile.on { color: var(--star); }
.dec .corps { min-width: 0; }
.dec .mc { font-weight: 600; font-size: 15px; color: var(--ink); display: inline; word-break: break-word; }
.dec .mc:hover { color: var(--accent); text-decoration: none; }
.dec.nonlu .mc::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
.dec .mc.approx { font-style: italic; color: var(--muted); }
.dec .titre { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dec .url { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-top: 3px; word-break: break-all; }
.dec .meta { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); background: var(--panel3); border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.copier { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 12px; padding: 0; }
.copier:hover { color: var(--accent); }
.plus { display: block; margin: 14px auto 0; }

/* ---------- concurrents ---------- */
.ajout .apercu { margin-top: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; }
.apercu ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.apercu li { margin: 3px 0; }
details.avance summary { cursor: pointer; color: var(--muted); font-size: 13px; margin: 2px 0 10px; }
.tableau { width: 100%; border-collapse: collapse; }
.tableau-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tableau th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tableau td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; }
.site-nom { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.site-nom i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.site-url { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.spark { display: block; }
.actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
tr.pause td { opacity: .55; }
tr.edition td { background: var(--panel2); }

/* ---------- passages ---------- */
.direct { border-color: var(--accent); }
.direct .ligne { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.direct .ligne:last-child { border-bottom: 0; }
.direct .ligne b { min-width: 170px; }
.hist td details summary { cursor: pointer; }
.hist .det { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

/* ---------- réglages ---------- */
.grille-reglages { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.radio { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; cursor: pointer; font-size: 14px; color: var(--ink); font-weight: 400; }
.radio input { margin-top: 3px; accent-color: var(--accent); }
.radio span small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- jeux ---------- */
nav.tabs .sep { width: 1px; background: var(--line); margin: 6px 6px; }
.jeu { display: grid; grid-template-columns: 26px 1fr auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: start; }
.jeu:last-child { border-bottom: 0; }
.jeu:hover { background: var(--panel2); }
.jeu .etoile { border: 0; background: none; cursor: pointer; color: var(--faint); font-size: 16px; line-height: 1; padding: 2px 0 0; }
.jeu .etoile.on { color: var(--star); }
.jeu .nom { font-weight: 650; font-size: 15.5px; color: var(--ink); }
.jeu .nom:hover { color: var(--accent); text-decoration: none; }
.jeu.nonlu .nom::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
.jeu .types { display: inline-flex; gap: 5px; margin-left: 8px; vertical-align: 1px; }
.jeu .desc { color: var(--muted); font-size: 13px; margin-top: 3px; max-width: 90ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jeu .url { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-top: 3px; word-break: break-all; }
.jeu .meta { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sortie { font-weight: 600; color: var(--ink); font-size: 12.5px; }
.sortie.futur { color: var(--accent); }
.t { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .02em; line-height: 18px; }
.t.crash { background: #3a1b2e; color: #ff7ab8; }
.t.instant { background: #2b2410; color: #f5c84b; }
.t.suite { background: #1a2740; color: #7fb0ff; }
.t.slot { background: var(--panel3); color: var(--muted); }
.t.avenir { background: var(--accent-soft); color: var(--accent); }
.spe { font-size: 11px; color: #ff7ab8; font-weight: 600; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); font-weight: 500; font-size: 13.5px; padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .2s; pointer-events: none; z-index: 50; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ko { background: var(--ko); color: #fff; }

@media (max-width: 720px) {
  .dec { grid-template-columns: 22px 1fr; }
  .dec .meta { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .etat-veille .txt { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ================================================================ Radar Trustpilot */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; cursor: pointer; text-align: left; }
.kpi:hover { border-color: var(--muted); }
.kpi.on { border-color: var(--accent); background: var(--accent-soft); }
.kpi b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); }
.score { display: inline-block; min-width: 34px; text-align: center; font-weight: 700; border-radius: 7px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.score.h { background: var(--accent-soft); color: var(--accent); }
.score.m { background: var(--warn-soft); color: var(--warn); }
.score.b { background: var(--panel3); color: var(--muted); }
.raisons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.raisons .chip { font-size: 11.5px; color: var(--muted); }
.dom { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.dom:hover { color: var(--accent); }
.sous { color: var(--muted); font-size: 12px; margin-top: 2px; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dots { display: inline-flex; gap: 2px; vertical-align: middle; }
.dots i { width: 6px; height: 12px; border-radius: 2px; background: var(--panel3); }
.dots i.on { background: var(--accent); }
.langs { font-family: var(--mono); font-size: 11px; color: var(--faint); max-width: 18ch; }
.etoile { border: 0; background: none; cursor: pointer; color: var(--faint); font-size: 16px; line-height: 1; padding: 0; }
.etoile.on { color: var(--star); }
.tableau td.c { width: 28px; padding-right: 0; }
.tableau tr.sel td { background: var(--panel2); }
.barre { position: sticky; bottom: 10px; margin-top: 12px; background: var(--panel3); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.prog { height: 4px; background: var(--panel3); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.prog i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.journal li { font-size: 12.5px; color: var(--muted); padding: 4px 0; border-bottom: 1px dashed var(--line); list-style: none; }
.journal { padding: 0; margin: 0; max-height: 340px; overflow: auto; }
.journal li b { color: var(--ink); font-weight: 500; }
.famille { cursor: help; border-bottom: 1px dotted var(--muted); }
.tp { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 600; padding: 0 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); line-height: 19px; vertical-align: 1px; white-space: nowrap; }
.tp:hover { text-decoration: none; filter: brightness(1.15); }
.tableau th[data-tri] { cursor: pointer; user-select: none; }
.tableau th[data-tri]:hover { color: var(--ink); }
.tableau th.trie { color: var(--accent); }
.tableau th.trie::after { content: " ↓"; }
.tableau th.trie.asc::after { content: " ↑"; }
.chip.clone { background: #2a2140; color: #b9a6ff; cursor: pointer; }
.chip.op { background: #1a2740; color: #7fb0ff; cursor: pointer; }
.chip.lic { background: var(--panel3); color: var(--muted); font-family: var(--mono); font-size: 11px; }
.seg { flex-wrap: wrap; }
.registres { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.registre { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; font-size: 12.5px; }
.registre:hover { border-color: var(--muted); }
.registre.on { border-color: var(--accent); background: var(--accent-soft); }
.registre b { font-size: 14px; display: block; }
.registre .lit { color: var(--muted); margin: 6px 0; line-height: 1.4; }
.registre .chiffres { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* Champs secrets masqués sans type="password" : sinon Chrome y colle le compte de connexion et met l'identifiant dans la recherche */
.secret { -webkit-text-security: disc; text-security: disc; }
