:root {
  --bg: #080a10;
  --bg-soft: #0f1320;
  --bg-card: #11141f;
  --border: #232a3b;
  --border-soft: #1a1f2e;
  --text: #eef1f8;
  --muted: #9aa4b8;
  --accent: #f5b62e;
  --tech-1: #818cf8;
  --tech-2: #22d3ee;
  --tech-grad: linear-gradient(135deg, #818cf8, #22d3ee);
  --green: #3ecf8e;
  --red: #f06a6a;
  --orange: #f5a623;
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(700px 460px at 8% -8%, rgba(99,102,241,.20), transparent 70%),
    radial-gradient(640px 420px at 96% -2%, rgba(34,211,238,.14), transparent 70%),
    radial-gradient(500px 360px at 50% 6%, rgba(245,182,46,.05), transparent 70%);
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 100% 55% at 50% 0%, #000 35%, transparent 100%);
}
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.18; }
.grad { background: var(--tech-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
a { color: var(--tech-2); text-decoration: none; }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--border-soft);
  background: rgba(8,10,16,.72); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; }
.brand .mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--tech-grad); color: #07121a; font-size: .72rem; font-weight: 900; box-shadow: 0 0 16px rgba(34,211,238,.35); }
.brand .vs { color: var(--accent); }
.brand .labo { color: var(--tech-2); }
.topnav a { color: var(--muted); font-size: .9rem; font-weight: 500; }
.topnav a:hover { color: var(--text); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ============ HERO ============ */
.hero2 { padding: 60px 22px 28px; }
.hero2-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(34,211,238,.12));
  border: 1px solid rgba(99,102,241,.32);
  color: #c7d2fe; font-size: .8rem; font-weight: 600;
  padding: 6px 14px; border-radius: 99px; margin-bottom: 20px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tech-2); box-shadow: 0 0 8px var(--tech-2); }
.hero2-text h1 { font-size: clamp(1.8rem, 4vw, 2.9rem); margin: 0 0 16px; font-weight: 800; }
.hero2-text p { color: var(--muted); font-size: 1.08rem; max-width: 540px; margin: 0 0 22px; }
.hero2-text strong { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip { background: var(--bg-card); border: 1px solid var(--border); border-radius: 99px;
  padding: 7px 14px; font-size: .84rem; color: var(--text); }
.hero2-visual svg { width: 100%; height: auto; display: block; }
.floaty { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .floaty { animation: float 5s ease-in-out infinite; }
  .floaty.d2 { animation-delay: 1.2s; }
  .floaty.d3 { animation-delay: 2.1s; }
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ============ Ad slots (réservés) ============ */
.ad-slot {
  /* Masqué pour l'instant. Repasser en "flex" quand des bannières (pub ou affiliation) seront prêtes. */
  display: none; align-items: center; justify-content: center;
  color: #586079; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
  border: 1px dashed var(--border); border-radius: 12px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 10px, transparent 10px 20px);
}
.ad-slot.leaderboard { height: 90px; margin: 8px 0 4px; }
.ad-slot.box { height: 250px; }

/* ============ Layout ============ */
.layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0 70px; align-items: start; }
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.results { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 80px; }

/* Presets */
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.presets-label { font-size: .82rem; color: var(--muted); margin-right: 4px; }
.chip-btn {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 99px; font-size: .82rem; cursor: pointer; font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.chip-btn:hover { border-color: var(--tech-2); background: rgba(34,211,238,.08); }

/* Form */
.form fieldset { border: 1px solid var(--border-soft); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.form legend { padding: 0 8px; font-weight: 700; color: var(--tech-2); font-size: .92rem; }
.form label { display: block; font-size: .86rem; color: var(--muted); margin-bottom: 12px; }
.form label.row { display: flex; align-items: center; gap: 10px; color: var(--text); cursor: pointer; }
.form label.row input { width: auto; margin: 0; }
.form input, .form select {
  width: 100%; margin-top: 5px; padding: 9px 11px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-size: .95rem; font-family: inherit;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--tech-2); }
.form small { display: block; color: #6b7488; font-size: .76rem; margin-top: 3px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hidden { display: none !important; }

/* ============ Score panel + gauge ============ */
.score-panel { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.gauge { text-align: center; }
.gauge svg { width: 100%; height: auto; }
.verdict-inline .badge { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; padding: 4px 11px; border-radius: 99px; margin-bottom: 8px; }
.verdict-inline.keep .badge { background: var(--green); color: #06281a; }
.verdict-inline.sell .badge { background: var(--red); color: #2c0a0a; }
.verdict-inline.hold .badge { background: var(--accent); color: #1a1408; }
.verdict-inline h2 { margin: 0 0 6px; font-size: 1.12rem; }
.verdict-inline p { margin: 6px 0 0; font-size: .9rem; color: var(--text); }
.verdict-inline .why { color: var(--muted); font-size: .82rem; }

/* Cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.kpi .label { font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.kpi .value { font-size: 1.5rem; font-weight: 800; }
.kpi .sub { font-size: .76rem; color: var(--muted); margin-top: 3px; }
.value.pos { color: var(--green); }
.value.neg { color: var(--red); }

/* Actions */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; border: none; cursor: pointer;
  padding: 11px 18px; border-radius: 11px; font-size: .92rem; font-family: inherit;
  transition: filter .15s ease, transform .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn.tech { background: var(--tech-grad); color: #07121a; box-shadow: 0 0 24px rgba(34,211,238,.3); }
.btn.tech.big { padding: 14px 26px; font-size: 1rem; }
.btn.ghost { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--tech-2); }

/* Capture email */
.capture {
  border: 1px solid rgba(34, 211, 238, 0.32);
  background:
    radial-gradient(360px 200px at 90% 10%, rgba(34, 211, 238, 0.12), transparent 70%),
    radial-gradient(360px 200px at 5% 95%, rgba(99, 102, 241, 0.14), transparent 70%),
    var(--bg-card);
}
.capture-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.capture-head .cap-ico { font-size: 1.6rem; line-height: 1; }
.capture-head h3 { margin: 0 0 4px; font-size: 1.08rem; }
.capture-form { display: flex; gap: 10px; }
.capture-form input {
  flex: 1; padding: 11px 13px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 11px; color: var(--text);
  font-size: .95rem; font-family: inherit;
}
.capture-form input:focus { outline: none; border-color: var(--tech-2); }
.capture-msg { font-size: .85rem; margin: 12px 0 0; min-height: 1.1em; }
.capture-msg.ok { color: var(--green); }
.capture-msg.err { color: var(--red); }
@media (max-width: 420px) { .capture-form { flex-direction: column; } }

/* Chart */
#chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 20px; margin-top: 12px; font-size: .82rem; color: var(--muted); }
.legend .sw { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend .sw.gold { background: var(--accent); }
.legend .sw.cyan { background: var(--tech-2); }

/* Table */
.table-scroll { overflow-x: auto; margin-top: 12px; }
#table { width: 100%; border-collapse: collapse; font-size: .82rem; white-space: nowrap; }
#table th, #table td { padding: 7px 10px; border-bottom: 1px solid var(--border-soft); text-align: right; }
#table th:first-child, #table td:first-child { text-align: left; }
#table th { color: var(--muted); font-weight: 600; }
#table tr.opt td { background: rgba(245,182,46,.08); }
details summary { cursor: pointer; font-weight: 700; }
.disclaimer { font-size: .78rem; color: #6b7488; line-height: 1.5; border-top: 1px solid var(--border-soft); padding-top: 14px; }

@media (max-width: 900px) {
  .hero2-inner { grid-template-columns: 1fr; }
  .hero2-visual { max-width: 340px; margin: 4px auto 0; order: -1; }
  .layout { grid-template-columns: 1fr; }
  .results { position: static; }
}
@media (max-width: 480px) {
  .grid2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .score-panel { grid-template-columns: 1fr; text-align: center; }
  .gauge { max-width: 180px; margin: 0 auto; }
}

/* ============ Impression / PDF ============ */
@media print {
  body { background: #fff; color: #111; }
  body::before, body::after { display: none; }
  .topbar, .form, .ad-slot, .actions, .presets, details { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  .results { position: static; }
  .panel, .kpi { border: 1px solid #ccc; background: #fff; color: #111; }
  .muted, .kpi .label, .kpi .sub, .verdict-inline .why { color: #555; }
  .verdict-inline h2, .kpi .value, h3 { color: #111; }
}
