/* ═══════════════════════════════════════════
   PAWN — page d'accueil et pages légales
   Mêmes couleurs que l'appli (style.css)
═══════════════════════════════════════════ */

:root {
  --ink: #172031;
  --ink-deep: #121a29;
  --panel: #1f2a3e;
  --line: #2c3a53;
  --chalk: #eef1f6;
  --muted: #93a0b5;
  --faint: #66748b;
  --sq-light: #dde3ec;
  --sq-dark: #7c8da6;
  --check: #f0c35a;
  --castle: #5bbfb2;
  --capture: #e9705f;

  /* graphiques : deux teintes validées (daltonisme + contraste) sur fond --panel */
  --serie-a: #4a86d8;
  --serie-b: #cf7f2a;

  --out: cubic-bezier(.23, 1, .32, 1);
  --font: "Bricolage Grotesque", system-ui, sans-serif;
  --page: min(1120px, 100% - 32px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font); color: var(--chalk); background: var(--ink);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; line-height: 1.55;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--check); outline-offset: 3px; border-radius: 6px; }
.wrap { width: var(--page); margin-inline: auto; }

/* ── Barre du haut ── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; text-decoration: none; letter-spacing: -.01em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--chalk);
  display: grid; place-items: center;
}
.brand-mark img { width: 24px; height: 24px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  text-decoration: none; color: var(--muted); font-size: .92rem; padding: 8px 12px; border-radius: 8px;
  transition: color .15s, background-color .15s;
}
.nav-links a:hover { color: var(--chalk); background: var(--panel); }
.lang {
  display: flex; border: 1px solid var(--line); border-radius: 9px; padding: 2px; font-size: .8rem; font-weight: 500;
}
.lang button { padding: 5px 9px; border-radius: 7px; color: var(--muted); transition: color .15s, background-color .15s; }
.lang button[aria-pressed="true"] { background: var(--panel); color: var(--chalk); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500;
  padding: 11px 20px; border-radius: 11px; font-size: .95rem; white-space: nowrap;
  transition: transform .16s var(--out), background-color .15s, border-color .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--chalk); color: var(--ink); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border: 1px solid var(--line); color: var(--chalk); }
.btn-ghost:hover { border-color: var(--sq-dark); }
.nav .btn { padding: 8px 16px; font-size: .9rem; }

/* ── Hero ── */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(48px, 7vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.eyebrow { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.8rem); line-height: .98; letter-spacing: -.035em; font-weight: 700;
  margin: 16px 0 22px; font-variation-settings: "opsz" 96; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--muted); }
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 34em; text-wrap: pretty; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: .85rem; color: var(--faint); }

.mini-board {
  width: 100%; max-width: 440px; justify-self: end; aspect-ratio: 1; display: grid;
  grid-template-columns: repeat(8, 1fr); border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 10px var(--panel), 0 30px 60px -20px rgba(0, 0, 0, .55);
}
.mini-board div { position: relative; }
.mini-board .l { background: var(--sq-light); }
.mini-board .d { background: var(--sq-dark); }
.mini-board .last { box-shadow: inset 0 0 0 100px rgba(240, 195, 90, .42); }
.mini-board img { position: absolute; inset: 6%; width: 88%; height: 88%; }
.board-caption { margin-top: 26px; font-size: .82rem; color: var(--faint); text-align: center; justify-self: end; width: 100%; max-width: 440px; }

/* ── Chiffres clés ── */
.stats { border-block: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }

/* ── Sections ── */
section.block { padding: clamp(64px, 10vw, 120px) 0 0; }
.head { max-width: 640px; margin-bottom: 40px; }
.head h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); letter-spacing: -.025em; line-height: 1.08; font-weight: 700; margin-top: 10px; text-wrap: balance; }
.head p { color: var(--muted); margin-top: 14px; text-wrap: pretty; }

/* ── Modèles ── */
.models { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.model {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.model.star { border-color: var(--sq-dark); }
.model-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 8px; flex-wrap: wrap; }
.model h3 { font-size: 1.45rem; letter-spacing: -.02em; white-space: nowrap; }
.tag { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.model.star .tag { color: var(--check); border-color: color-mix(in srgb, var(--check) 40%, transparent); }
.acro { font-size: .85rem; color: var(--faint); font-style: italic; margin-top: -8px; }
.model p.desc { color: var(--muted); font-size: .93rem; flex: 1; }
.specs { list-style: none; display: grid; gap: 8px; font-size: .88rem; border-top: 1px solid var(--line); padding-top: 14px; }
.specs li { display: flex; justify-content: space-between; gap: 12px; }
.specs li span { color: var(--muted); }
.specs li b { font-weight: 500; text-align: right; }
.extra {
  margin-top: 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  border: 1px dashed var(--line); border-radius: 14px; padding: 16px 20px; color: var(--muted); font-size: .92rem;
}
.extra b { color: var(--chalk); font-weight: 500; }

/* ── Benchmarks ── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs button {
  padding: 9px 16px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: .9rem;
  transition: color .15s, background-color .15s, border-color .15s;
}
.tabs button:hover { color: var(--chalk); border-color: var(--sq-dark); }
.tabs button[aria-selected="true"] { background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3.5vw, 36px); }
.panel[hidden] { display: none; }
.panel-head { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.panel-head h3 { font-size: 1.3rem; letter-spacing: -.015em; }
.panel-head p { color: var(--muted); font-size: .92rem; max-width: 52em; margin-top: 6px; }
.big-number { text-align: right; }
.big-number b { display: block; font-size: 2.2rem; line-height: 1; letter-spacing: -.02em; }
.big-number span { font-size: .82rem; color: var(--muted); }

/* graphiques en barres horizontales */
.chart { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 64px; gap: 14px; align-items: center; font-size: .9rem; }
.row .lbl { color: var(--chalk); }
.row .lbl small { display: block; color: var(--faint); font-size: .76rem; }
.row .val { text-align: right; font-weight: 500; }
.track { position: relative; height: 26px; }
.track::before { content: ""; position: absolute; inset: 0; border-radius: 6px; background: color-mix(in srgb, var(--ink) 55%, transparent); }
.bar {
  position: absolute; left: 0; top: 3px; bottom: 3px; border-radius: 0 4px 4px 0; background: var(--serie-a);
  transform-origin: left;
}
.chart.anim .bar { animation: grow .7s var(--out) both; }
@keyframes grow { from { transform: scaleX(0); } }
.ref {
  position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 1px dashed var(--faint); pointer-events: none;
}
.axis { display: grid; grid-template-columns: 150px minmax(0, 1fr) 64px; gap: 14px; font-size: .74rem; color: var(--faint); margin-top: 4px; }
.axis .ticks { position: relative; height: 16px; }
.axis .ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.axis .ticks span:first-child { transform: none; }
.axis .ticks span:last-child { transform: translateX(-100%); }
.ref-labels { position: relative; height: 18px; font-size: .72rem; color: var(--faint); }
.ref-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* points + intervalle (Elo) */
.ci { position: absolute; top: 50%; height: 2px; background: color-mix(in srgb, var(--serie-a) 60%, transparent); transform: translateY(-50%); }
.ci::before, .ci::after { content: ""; position: absolute; top: -5px; width: 2px; height: 12px; background: inherit; }
.ci::before { left: 0; } .ci::after { right: 0; }
.dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--serie-a); box-shadow: 0 0 0 2px var(--panel); transform: translate(-50%, -50%); }
.dot.alt { background: var(--serie-b); }

/* barres groupées (thèmes) */
.grouped .track { height: 34px; }
.grouped .bar { height: 13px; top: 3px; bottom: auto; }
.grouped .bar.b { top: 18px; background: var(--serie-b); }
.legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }

.hit { position: absolute; inset: -4px 0; cursor: default; }
.tip {
  position: fixed; z-index: 50; pointer-events: none; background: var(--ink-deep); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; font-size: .82rem; line-height: 1.45; max-width: 260px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4); opacity: 0; transition: opacity .12s;
}
.tip.on { opacity: 1; }
.tip b { font-weight: 500; }
.tip span { color: var(--muted); }

.notes { margin-top: 26px; display: grid; gap: 6px; font-size: .84rem; color: var(--faint); }
details.table-view { margin-top: 22px; font-size: .88rem; }
details.table-view summary { cursor: pointer; color: var(--muted); width: fit-content; }
details.table-view summary:hover { color: var(--chalk); }
.tbl { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .88rem; }
.tbl th, .tbl td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { color: var(--muted); font-weight: 500; font-size: .8rem; }
.tbl td.best { color: var(--chalk); font-weight: 700; }
.tbl tbody td { color: var(--muted); }
.tbl tbody td:first-child { color: var(--chalk); }
.scroll-x { overflow-x: auto; }

.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.mini { border: 1px solid var(--line); border-radius: 14px; padding: 18px; font-size: .9rem; color: var(--muted); }
.mini b { display: block; color: var(--chalk); font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 4px; }
.data-link { margin-top: 20px; font-size: .88rem; color: var(--muted); }
.data-link a { color: var(--chalk); }

/* ── Comment ça marche ── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { border-top: 1px solid var(--line); padding-top: 22px; }
.step::before { counter-increment: s; content: "0" counter(s); font-size: .8rem; color: var(--faint); letter-spacing: .1em; }
.step h3 { font-size: 1.15rem; margin: 10px 0 8px; letter-spacing: -.01em; }
.step p { color: var(--muted); font-size: .93rem; }

/* ── Confidentialité ── */
.privacy {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px clamp(20px, 3.5vw, 36px);
}
.privacy-icon { width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--castle) 16%, transparent); display: grid; place-items: center; color: var(--castle); }
.privacy h3 { font-size: 1.2rem; letter-spacing: -.01em; }
.privacy p { color: var(--muted); font-size: .93rem; margin-top: 4px; }

/* ── Appel final ── */
.final { text-align: center; padding: clamp(80px, 12vw, 140px) 0 clamp(64px, 9vw, 100px); }
.final h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -.03em; line-height: 1.05; text-wrap: balance; }
.final p { color: var(--muted); margin: 16px auto 30px; max-width: 32em; }

/* ── Pied de page ── */
.footer { padding-top: 56px; overflow: hidden; }
.foot-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.foot-brand .brand { font-size: 1.3rem; }
.foot-brand p { color: var(--muted); max-width: 26em; }
.foot-cols { display: flex; justify-content: center; gap: clamp(40px, 10vw, 140px); margin-top: 48px; text-align: center; }
.foot-cols h4 { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin-bottom: 18px; }
.foot-cols ul { list-style: none; display: grid; gap: 12px; }
.foot-cols a { text-decoration: none; color: var(--chalk); font-size: .98rem; transition: color .15s; }
.foot-cols a:hover { color: var(--muted); }
.legal-line { margin: 56px auto 0; max-width: 54em; text-align: center; font-size: .82rem; color: var(--faint); line-height: 1.7; }
.wordmark {
  margin-top: 32px; text-align: center; font-weight: 700; letter-spacing: -.05em; line-height: .78;
  font-size: clamp(7rem, 26vw, 23rem); font-variation-settings: "opsz" 96; user-select: none;
  background: linear-gradient(180deg, #24304a 0%, rgba(23, 32, 49, 0) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.foot-bottom { border-top: 1px solid var(--line); padding: 22px 0 26px; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); }

/* ── Pages légales ── */
.legal { padding: clamp(48px, 8vw, 88px) 0 0; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -.03em; line-height: 1.05; }
.legal .updated { color: var(--faint); font-size: .88rem; margin-top: 10px; }
.legal-toc { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 8px; }
.legal-toc a { text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font-size: .88rem; color: var(--muted); }
.legal-toc a:hover { color: var(--chalk); border-color: var(--sq-dark); }
.legal section { padding-top: 48px; }
.legal h2 { font-size: 1.6rem; letter-spacing: -.02em; margin-bottom: 14px; }
.legal h3 { font-size: 1.05rem; margin: 22px 0 6px; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; margin-top: 8px; }
.legal strong { color: var(--chalk); font-weight: 500; }
.callout { margin-top: 16px; border: 1px solid color-mix(in srgb, var(--castle) 45%, transparent); background: color-mix(in srgb, var(--castle) 8%, transparent); border-radius: 12px; padding: 14px 18px; color: var(--chalk) !important; }

/* ── Écrans plus petits ── */
@media (max-width: 960px) {
  .models { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav .lang { margin-left: auto; }
}
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .mini-board, .board-caption { justify-self: center; max-width: 360px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 22px 16px; border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:first-child { padding-left: 16px; }
  .steps, .cards3 { grid-template-columns: 1fr; }
  .privacy { grid-template-columns: 1fr; }
  .row, .axis { grid-template-columns: 96px minmax(0, 1fr) 52px; gap: 10px; }
  .big-number { text-align: left; }
  .foot-cols { gap: 36px; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .models { grid-template-columns: 1fr; }
  .nav .btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chart.anim .bar { animation: none; }
}
