@font-face { font-family: Cinzel; font-weight: 700; src: url(/fonts/cinzel-latin-700-normal.woff2); }
@font-face { font-family: Cinzel; font-weight: 900; src: url(/fonts/cinzel-latin-900-normal.woff2); }

/* Surfaces neutres ; le violet est réservé aux actions et aux données. */
:root {
  --bg: #0b0a0f; --surface: #131218; --raised: #1a1822; --line: #26232f; --line-2: #36323f;
  --text: #ecebf1; --muted: #9a95a8; --accent: #7c5cfc; --accent-2: #a28bff; --warn: #e5a445; --ok: #4cc38a;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
h1, h2 { line-height: 1.2; text-wrap: balance; letter-spacing: -0.01em; }
[hidden] { display: none !important; }

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font: 700 15px Cinzel, serif; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 600 14px inherit; font-family: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #8b6dff; }
.btn.off { opacity: .55; cursor: default; }

/* ── page publique ── */
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.topbar { display: flex; align-items: center; gap: 28px; height: 68px; }
.topbar nav { display: flex; gap: 22px; margin-right: auto; }
.topbar nav a { color: var(--muted); font-size: 14px; }
.topbar > .brand + .btn, .topbar > .btn:last-child { margin-left: auto; }
.topbar nav + .btn { margin-left: 0; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-block: 64px 96px; }
.hero h1 { font: 900 52px/1.08 Cinzel, serif; margin-bottom: 18px; }
.hero p { color: var(--muted); font-size: 17px; max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.live { display: flex; gap: 36px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.live div { display: flex; flex-direction: column-reverse; }
.live dd { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.live dt { color: var(--muted); font-size: 13px; }
.preview { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 30px 80px -30px #7c5cfc55; min-width: 0; }
.preview-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.preview-id { display: flex; gap: 14px; align-items: center; }
.preview-id span:not(.rank) { display: block; color: var(--muted); font-size: 13px; }
.preview .tiles { grid-template-columns: repeat(3, 1fr); }
.preview .panel { margin: 0; }
.hero-art { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px #7c5cfc66; }
.preview details { display: none; }
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; padding-block: 40px; }
.feature:nth-of-type(even) img { order: 2; }
.feature img { width: 100%; border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 16 / 8.4; object-fit: cover; }
.feature h2, .ladder h2, .faq h2, .cta h2 { font-size: 28px; margin-bottom: 10px; }
.feature p { color: var(--muted); }
.feature ul { list-style: none; margin-top: 16px; }
.feature li { padding: 9px 0 9px 26px; border-top: 1px solid var(--line); position: relative; }
.feature li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
.ladder { padding-block: 72px 24px; }
.ladder ol { display: grid; grid-template-columns: repeat(7, 1fr); list-style: none; margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ladder li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 4px; background: var(--surface); }
.ladder li + li { border-left: 1px solid var(--line); }
.ladder li > span:last-child { color: var(--muted); font-size: 13px; }
.faq { padding-block: 56px; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; }
.faq p { color: var(--muted); padding-bottom: 16px; }
.cta { text-align: center; padding-block: 72px 88px; }
.cta h2 { margin-bottom: 22px; }
.doc { max-width: 760px; padding-block: 32px 64px; }
.doc h1 { font-size: 28px; margin-bottom: 20px; }
.doc h2 { font-size: 17px; margin: 28px 0 8px; }
.doc p { margin-bottom: 10px; }
.doc ul { padding-left: 20px; margin-bottom: 10px; }
.doc li { margin-bottom: 6px; }
.legal-links { font-size: 11px; color: var(--muted); padding-inline: 6px; }
.legal-links a { color: var(--muted); }
@media (max-width: 900px) { .legal-links { display: none; } }
footer { color: var(--muted); font-size: 13px; padding-block: 24px; border-top: 1px solid var(--line); }

/* ── application ── */
body.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.side .brand { padding-inline: 8px; }
.side nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side nav p { color: var(--muted); font-size: 12px; font-weight: 600; padding: 14px 8px 6px; }
.side nav a { color: var(--muted); padding: 7px 10px; border-radius: 7px; font-size: 14px; white-space: nowrap; }
.side nav a:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.side nav a.on { background: var(--raised); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 14px 4px 0; }
.me div { min-width: 0; flex: 1; line-height: 1.3; }
.me b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me span { color: var(--muted); font-size: 12px; }
.me button { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; }
.me button:hover { color: var(--text); }
.content { padding: 28px 32px 64px; max-width: 1200px; width: 100%; min-width: 0; }
.content > h1 { font-size: 22px; margin-bottom: 20px; }
.notice { border: 1px solid var(--warn); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-top: 16px; min-width: 0; }
.panel h2 { font-size: 15px; margin-bottom: 12px; }
#vue > .panel:first-child, #vue > .tiles:first-child { margin-top: 0; }
.identity { display: flex; gap: 18px; align-items: center; }
.identity .grow { flex: 1; min-width: 0; }
.identity h2 { font-size: 20px; margin: 0; }
.identity p, .identity small { color: var(--muted); }
progress { display: block; width: 100%; height: 6px; margin: 12px 0 6px; border: 0; border-radius: 4px; background: var(--raised); appearance: none; overflow: hidden; }
progress::-webkit-progress-bar { background: var(--raised); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 4px; }
progress::-moz-progress-bar { background: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 16px; }
.tile { background: var(--surface); padding: 14px 16px; }
.tile span, .tile small { display: block; color: var(--muted); font-size: 12px; }
.tile b { display: block; font-size: 22px; font-weight: 600; margin-block: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; margin-top: 16px; }
.two > .panel { margin-top: 0; }
.rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; border: 1px solid currentColor; font: 900 14px Cinzel, serif; flex: none; }
.identity .rank { width: 64px; height: 64px; font-size: 30px; border-radius: 12px; }
.r-e { color: #9ca3af; } .r-d { color: #4ade80; } .r-c { color: #60a5fa; } .r-b { color: #c084fc; } .r-a { color: #f87171; } .r-s { color: #fbbf24; } .r-n { color: #fff; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.data th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data tr:last-child td { border-bottom: 0; }
.data td.long { white-space: normal; min-width: 220px; }
.data tr.mine td { background: #7c5cfc1a; }
.num { font-variant-numeric: tabular-nums; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--raised); }
.me .avatar { width: 32px; height: 32px; }
.initial { display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; }
.state.wait { color: var(--warn); } .state.ok { color: var(--ok); }
.empty, .count { color: var(--muted); }
.count { margin-top: 12px; font-size: 13px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tabs a { padding: 7px 12px; border-radius: 7px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.tabs a.on { background: var(--raised); color: var(--text); }
.search { display: flex; gap: 8px; max-width: 460px; }
.search input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; }

/* ── graphiques ── */
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.chart figcaption span { color: var(--muted); font-size: 13px; }
.chart figcaption b { font-size: 18px; font-weight: 600; }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: var(--accent); }
.chart .hit { fill: transparent; }
.chart .col:hover .bar { fill: var(--accent-2); }
.chart details { margin-top: 8px; font-size: 13px; color: var(--muted); }
.chart summary { cursor: pointer; }
.chart td { padding: 3px 0; border-bottom: 1px solid var(--line); }
.chart td:last-child { text-align: right; }
.hbars { list-style: none; }
.hbars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 7px 0; }
.hbars svg { grid-column: 1 / -1; width: 100%; height: 6px; border-radius: 3px; }
.hbars .track { fill: var(--raised); } .hbars .bar { fill: var(--accent); }
.tip { position: fixed; z-index: 10; pointer-events: none; background: var(--raised); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 9px; font-size: 13px; white-space: nowrap; }

body.centre { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px; max-width: 420px; text-align: center; }
.card h1 { font-size: 20px; margin: 20px 0 8px; }
.card p { color: var(--muted); margin-bottom: 22px; }

@media (max-width: 900px) {
  .hero, .feature { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-block: 32px 48px; }
  .hero h1 { font-size: 36px; }
  .feature:nth-of-type(even) img { order: 0; }
  .topbar nav { display: none; }
  .topbar > .btn { margin-left: auto !important; }
  .ladder ol { grid-template-columns: repeat(4, 1fr); }
  body.app { display: block; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { order: 3; flex-direction: row; width: 100%; overflow-x: auto; }
  .side nav p { display: none; }
  .side nav a.on { box-shadow: inset 0 -2px 0 var(--accent); }
  .me { margin: 0 0 0 auto; border: 0; padding: 0; }
  .me div { display: none; }
  .content { padding: 20px 16px 48px; }
  .two { grid-template-columns: 1fr; }
  .preview .tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
