/* =========================================================================
   2home — habillé dans la direction « Le Greffier » (arenavs-lab.com)
   Page statique : fonts self-hostées via /fonts/. Mêmes classes qu'avant
   (app.js inchangé côté structure).
   ========================================================================= */

@font-face { font-family: 'Space Grotesk Variable'; font-weight: 300 700; font-style: normal; font-display: swap; src: url(/fonts/space-grotesk.woff2) format('woff2-variations'); }
@font-face { font-family: 'Manrope Variable'; font-weight: 200 800; font-style: normal; font-display: swap; src: url(/fonts/manrope.woff2) format('woff2-variations'); }
@font-face { font-family: 'Spline Sans Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/spline-sans-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'Spline Sans Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/spline-sans-mono-500.woff2) format('woff2'); }

:root {
  --ink: #0a0913;
  --slate: #161229;
  --slate-2: #110d20;
  --line: #272138;
  --line-soft: #1d1830;
  --lead: #a8a3c4;
  --lead-dim: #948fb8;
  --paper: #f3f1fb;
  --cyan: #6d8bff;
  --gold: #ec4899;
  --violet: #8b5cf6;
  --grad: linear-gradient(135deg, #4f7cff 0%, #8b5cf6 52%, #ec4899 100%);
  --pos: #46c89b;   /* données financières : positif */
  --neg: #e0666b;   /* données financières : négatif */
  --radius: 16px;
  --display: 'Space Grotesk Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font: 'Manrope Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--lead);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Profondeur : halos indigo / magenta / violet (cohérent avec le site) */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 10% -8%, rgba(79, 124, 255, 0.16), transparent 60%),
    radial-gradient(820px 560px at 94% -2%, rgba(236, 72, 153, 0.11), transparent 58%),
    radial-gradient(760px 760px at 72% 118%, rgba(139, 92, 246, 0.12), transparent 60%);
}
h1, h2, h3 { font-family: var(--display); color: var(--paper); letter-spacing: -0.02em; line-height: 1.12; font-weight: 700; margin: 0; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.muted { color: var(--lead); }
.small { font-size: .85rem; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

/* ============ Masthead ============ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; height: 66px; border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 8, 9, 0.86); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand svg { filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4)); }
.brand:hover { text-decoration: none; }
.brand .vs, .brand b { color: var(--gold); }
.brand .labo { margin-left: 0.5em; color: var(--lead-dim); font-family: var(--mono); font-size: .68rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.brand-logo { display: none; }
.topnav a { color: var(--lead); font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.topnav a:hover { color: var(--paper); text-decoration: none; }

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

/* ============ Héros ============ */
.hero2 { padding: 56px 22px 26px; }
.hero2-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--slate); border: 1px solid var(--line);
  color: var(--cyan); font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 99px; margin-bottom: 22px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.hero2-text h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin: 0 0 18px; }
.hero2-text p { color: var(--lead); font-size: 1.06rem; max-width: 540px; margin: 0 0 22px; }
.hero2-text strong { color: var(--paper); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.chip { background: var(--slate); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: var(--lead); }
.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); } }

/* ============ Boutons ============ */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font); font-weight: 600; border: none; cursor: pointer;
  padding: 12px 20px; border-radius: 10px; font-size: .95rem; transition: filter .15s ease, transform .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn.tech { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -12px rgba(139, 92, 246, 0.7); }
.btn.tech:hover { filter: brightness(1.07); }
.btn.tech.big { padding: 14px 26px; font-size: 1rem; }
.btn.ghost { background: transparent; color: var(--lead); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--cyan); color: var(--paper); }

/* ============ Ad slots (réservés, masqués) ============ */
.ad-slot { display: none; align-items: center; justify-content: center; color: var(--lead-dim); font-family: var(--mono);
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; border: 1px dashed var(--line); border-radius: 12px; }
.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(--slate); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel h3 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--paper); margin: 0 0 6px; }
.results { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }

/* Presets */
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.presets-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lead-dim); margin-right: 4px; }
.chip-btn { background: var(--slate-2); border: 1px solid var(--line); color: var(--lead); padding: 6px 12px; border-radius: 99px;
  font-family: var(--mono); font-size: .78rem; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.chip-btn:hover { border-color: var(--cyan); color: var(--paper); }

/* Form */
.form fieldset { border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.form legend { padding: 0 8px; font-family: var(--mono); font-weight: 500; color: var(--cyan); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.form label { display: block; font-size: .86rem; color: var(--lead); margin-bottom: 12px; }
.form label.row { display: flex; align-items: center; gap: 10px; color: var(--paper); cursor: pointer; }
.form label.row input { width: auto; margin: 0; accent-color: var(--cyan); }
.form input, .form select {
  width: 100%; margin-top: 5px; padding: 10px 12px;
  background: var(--slate-2); border: 1px solid var(--line); border-radius: 9px;
  color: var(--paper); font-size: .95rem; font-family: var(--mono);
}
.form input:focus, .form select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 224, 230, 0.12); }
.form small { display: block; color: var(--lead-dim); font-size: .76rem; margin-top: 3px; font-family: var(--font); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hidden { display: none !important; }

/* ============ Score + jauge ============ */
.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-family: var(--mono); font-size: .66rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .1em; padding: 5px 12px; border-radius: 99px; margin-bottom: 8px; }
.verdict-inline.keep .badge { background: var(--gold); color: #1a1408; }
.verdict-inline.sell .badge { background: var(--neg); color: #2c0a0a; }
.verdict-inline.hold .badge { background: var(--cyan); color: var(--ink); }
.verdict-inline h2 { font-family: var(--display); font-weight: 600; margin: 0 0 6px; font-size: 1.15rem; }
.verdict-inline p { margin: 6px 0 0; font-size: .9rem; color: var(--paper); }
.verdict-inline .why { color: var(--lead); font-size: .82rem; }

/* Cards KPI */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kpi { background: var(--slate); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.kpi .label { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lead-dim); margin-bottom: 7px; }
.kpi .value { font-family: var(--display); font-size: 1.6rem; font-weight: 900; color: var(--paper); }
.kpi .sub { font-size: .76rem; color: var(--lead-dim); margin-top: 3px; }
.value.pos { color: var(--pos); }
.value.neg { color: var(--neg); }

/* Actions */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Capture email */
.capture {
  border: 1px solid var(--line); border-left: 3px solid var(--cyan);
  border-radius: 0 var(--radius) var(--radius) 0; background: var(--slate-2);
}
.capture-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.capture-head .cap-ico { color: var(--gold); font-size: 1.4rem; 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(--ink); border: 1px solid var(--line); border-radius: 10px;
  color: var(--paper); font-size: .95rem; font-family: var(--mono); }
.capture-form input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 224, 230, 0.12); }
.capture-msg { font-size: .85rem; margin: 12px 0 0; min-height: 1.1em; font-family: var(--mono); }
.capture-msg.ok { color: var(--pos); }
.capture-msg.err { color: var(--neg); }
@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-family: var(--mono); font-size: .74rem; color: var(--lead-dim); }
.legend .sw { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend .sw.gold { background: var(--gold); }
.legend .sw.cyan { background: var(--cyan); }

/* Table */
.table-scroll { overflow-x: auto; margin-top: 12px; }
#table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .8rem; white-space: nowrap; }
#table th, #table td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); text-align: right; }
#table th:first-child, #table td:first-child { text-align: left; }
#table th { color: var(--lead-dim); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; font-size: .68rem; }
#table tr.opt td { background: rgba(232, 178, 58, .1); }
details summary { cursor: pointer; font-family: var(--display); font-weight: 600; color: var(--paper); }
.disclaimer { font-size: .78rem; color: var(--lead-dim); line-height: 1.55; border-top: 1px solid var(--line-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; }
  .topbar { backdrop-filter: none; background: rgba(7, 8, 9, 0.97); }
}
@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 { display: none; }
  .topbar, .form, .ad-slot, .actions, .presets, details, .capture { 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; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  html { scroll-behavior: auto; }
}
