/*  FACET · styles
    One locked viewport: a full-bleed video, sparse type in the corners, olive
    brackets, a display sans for the headline and the counter, a monospace for
    everything else. The docs page below reuses the same voice and scrolls. */

@font-face {
  font-family: "Sora";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("assets/fonts/sora-500-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("assets/fonts/jetbrainsmono-latin.woff2") format("woff2");
}

:root {
  --bg: #1a1a1a;
  --white: #ffffff;
  --olive: #dbdda1;
  --fill: #63624b;
  --fill-hover: #73725a;
  --display: "Sora", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --pad: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--white);
  font-family: var(--mono); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img, video { display: block; }
.hidden { display: none !important; }

/* ══════════ the locked page ══════════ */
body.locked { overflow: hidden; }
.stage { position: relative; height: 100vh; height: 100svh; width: 100%; overflow: hidden; }
.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.overlay {
  position: relative; z-index: 10; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--pad);
}

/* ── zone A · top row ── */
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); color: var(--white); font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; line-height: 1.2; }
.logo img { display: block; height: 40px; width: auto; }
.doc-bar .logo img { height: 44px; }
.blurb {
  display: none; max-width: 180px; text-align: right;
  font-family: var(--mono); font-size: 10px; line-height: 1.7; letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.top-right { display: flex; align-items: flex-start; gap: 20px; }

/* the wallet button: the CTA's bracketed rectangle, smaller */
.wallet-wrap { position: relative; flex: none; }
.wallet {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px;
  background: var(--fill); color: var(--olive);
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; white-space: nowrap;
  border-radius: 0; transition: background-color 0.3s;
}
.wallet:hover { background: var(--fill-hover); }
.wallet:disabled { opacity: 0.7; cursor: wait; }
.wallet-dot { width: 6px; height: 6px; background: rgba(219, 221, 161, 0.35); flex: none; }
.wallet.is-on .wallet-dot { background: var(--olive); box-shadow: 0 0 8px rgba(219, 221, 161, 0.7); }
.wallet.is-off .wallet-dot { background: #c9784e; }
.wallet.is-on .wallet-label, .wallet.is-off .wallet-label { text-transform: none; letter-spacing: 0.06em; }
.wallet:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

/* the X button: the same rectangle, square */
.xbtn-wrap { position: relative; flex: none; }
.xbtn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--fill); color: var(--olive); transition: background-color 0.3s;
}
.xbtn:hover { background: var(--fill-hover); }
.xbtn svg { width: 15px; height: 15px; }
.xbtn:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

/* ── zone B · middle ── */
.middle { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; padding-top: min(24px, 2vh); max-width: 48rem; }
.headline {
  font-family: var(--display); font-weight: 500; color: var(--white); margin: 0;
  font-size: min(48px, 10.5vh); line-height: 0.95; letter-spacing: -0.025em;
}
.body {
  font-family: var(--mono); color: var(--olive); font-size: 12px; line-height: 1.75;
  margin: min(24px, 3.5vh) 0 0; max-width: 28rem;
}

/* the bracketed button */
.cta-wrap { position: relative; width: fit-content; margin-top: min(24px, 3.5vh); }
.cta {
  display: inline-block; background: var(--fill); color: var(--olive);
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em;
  padding: 14px 40px; border-radius: 0; transition: background-color 0.3s;
}
.cta:hover { background: var(--fill-hover); }
.corner { position: absolute; width: 16px; height: 16px; border: 0 solid var(--olive); pointer-events: none; }
.corner.tl { top: -8px; left: -8px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: -8px; right: -8px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: -8px; left: -8px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: -8px; right: -8px; border-bottom-width: 2px; border-right-width: 2px; }
.small .corner { width: 12px; height: 12px; }

/* ── zone C · bottom row ── */
.bottom { display: flex; flex-direction: column; gap: 16px; }
.arrows { display: flex; gap: 16px; }
.arrow-wrap { position: relative; }
.arrow {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--fill); color: var(--olive); transition: background-color 0.3s;
}
.arrow:hover { background: var(--fill-hover); }
.arrow svg { width: 18px; height: 18px; }
.legal-line {
  /* les crochets des flèches débordent de 8 px sous les boutons : la mention part en dessous */
  margin: 20px 0 0; max-width: 34rem;
  font-family: var(--mono); font-size: 10px; line-height: 1.6; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.45);
}
.legal-line a { color: rgba(255, 255, 255, 0.7); }
.legal-line a:hover { color: var(--white); }

.right { display: flex; flex-direction: column; align-items: flex-start; gap: min(12px, 1.5vh); }
.counter {
  font-family: var(--display); font-weight: 500; color: var(--white); margin: 0;
  font-size: min(36px, 8vh); line-height: 1; font-variant-numeric: tabular-nums;
}
.caption {
  font-family: var(--mono); font-size: 10px; line-height: 1.6; letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7); max-width: 330px; min-height: 3.2em; margin: 0;
}
.caption b { color: var(--olive); font-weight: 500; }

.thumbs { display: flex; gap: 8px; overflow: visible; }
.thumb { position: relative; flex: none; width: 56px; height: 56px; transition: all 0.3s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .frame, .thumb .dot { display: none; }
.thumb.active .frame { display: block; position: absolute; inset: 0; border: 2px solid var(--white); z-index: 10; pointer-events: none; }
.thumb.active .dot { display: block; position: absolute; width: 8px; height: 8px; background: var(--white); z-index: 20; pointer-events: none; }
.dot.tl { top: -4px; left: -4px; }
.dot.tr { top: -4px; right: -4px; }
.dot.bl { bottom: -4px; left: -4px; }
.dot.br { bottom: -4px; right: -4px; }
.dot.t { top: -4px; left: 50%; transform: translateX(-50%); }
.dot.b { bottom: -4px; left: 50%; transform: translateX(-50%); }
.dot.l { left: -4px; top: 50%; transform: translateY(-50%); }
.dot.r { right: -4px; top: 50%; transform: translateY(-50%); }
.thumb:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

/* ══════════ docs ══════════ */
.doc-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; background: linear-gradient(180deg, rgba(26, 26, 26, 0.96), rgba(26, 26, 26, 0)); }
.doc-bar .wrap { display: flex; align-items: center; justify-content: space-between; padding: 24px var(--pad); }
.doc-bar .top-right { align-items: center; gap: 28px; }
.doc-bar .links { display: flex; gap: 22px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.7); }
.doc-bar .links a:hover, .doc-bar .links a.active { color: var(--olive); }
.doc { max-width: 1180px; margin: 0 auto; padding: 120px var(--pad) 72px; display: grid; grid-template-columns: 1fr; gap: 40px; }
.doc > * { min-width: 0; }
.toc { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.toc-h { color: var(--olive); margin-bottom: 12px; letter-spacing: 0.2em; }
.toc a { display: block; padding: 5px 0; color: rgba(255, 255, 255, 0.5); }
.toc a:hover, .toc a.active { color: var(--white); }
article { max-width: 740px; }
article h1 { font-family: var(--display); font-weight: 500; font-size: clamp(40px, 6vw, 88px); line-height: 0.95; letter-spacing: -0.025em; margin: 0 0 18px; }
article h2 { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 3vw, 34px); letter-spacing: -0.01em; margin: 56px 0 14px; }
article h2::after { content: ""; display: block; width: 40px; height: 2px; background: var(--olive); margin-top: 12px; }
article h3 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--olive); margin: 26px 0 8px; }
article p, article li { font-family: var(--mono); font-size: 13px; line-height: 1.8; color: rgba(255, 255, 255, 0.82); }
article ul { padding-left: 18px; }
article li { margin-bottom: 6px; }
article code { font-family: var(--mono); color: var(--olive); }
.lead { font-size: 14px; color: var(--white); }
.note { border-left: 2px solid var(--olive); padding: 6px 0 6px 16px; margin: 18px 0; }
.note p { margin: 0; color: var(--white); }
.law { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 16px 0; }
.law-item { position: relative; padding: 16px 18px; border: 1px solid rgba(219, 221, 161, 0.35); }
.law-item .corner { width: 10px; height: 10px; }
.law-id { font-family: var(--mono); color: var(--olive); font-size: 11px; letter-spacing: 0.2em; margin-bottom: 6px; }
.law-item p { margin: 0; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; margin: 14px 0 6px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); vertical-align: top; }
.tbl th { font-weight: 500; text-transform: uppercase; letter-spacing: 0.15em; color: var(--olive); font-size: 10px; }
.tbl td:last-child { color: var(--olive); white-space: nowrap; }
.faq details { border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding: 12px 0; }
.faq summary { cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--white); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--olive); margin-right: 10px; }
.faq details[open] summary::before { content: "−"; }
.faq p { margin: 10px 0 0; }
section[id] { scroll-margin-top: 100px; }
/* le pied de la page docs : une classe, jamais l'élément, le <footer> de la page
   verrouillée ne doit pas hériter de ce padding */
.doc-foot { padding: 32px var(--pad) 48px; font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, 0.45); line-height: 1.7; }
.doc-foot .wrap { max-width: 1180px; margin: 0 auto; }
.doc-foot .foot-links { display: flex; flex-wrap: wrap; gap: 18px; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 16px; }
.doc-foot .foot-links a:hover { color: var(--olive); }
.doc-foot .foot-ca { color: rgba(255, 255, 255, 0.7); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 12px; }
.doc-foot .legal { margin: 0; max-width: 90ch; }

/* ══════════ breakpoints ══════════ */
@media (min-width: 640px) {
  .blurb { display: block; }
  .top-right { gap: 24px; }
  .bottom { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .right { align-items: flex-end; }
  .caption { text-align: right; }
}
@media (min-width: 768px) {
  .top .logo img { height: 52px; }
  :root { --pad: min(48px, 6vh); }
  .blurb { max-width: 240px; font-size: 12px; }
  .middle { padding-top: min(48px, 2vh); }
  .headline { font-size: min(72px, 10.5vh); }
  .body { font-size: 14px; margin-top: min(48px, 3.5vh); }
  .cta-wrap { margin-top: min(48px, 3.5vh); }
  .arrows { gap: 24px; }
  .arrow { width: 44px; height: 44px; }
  .right { gap: min(16px, 1.5vh); }
  .counter { font-size: min(72px, 8vh); }
  .thumbs { gap: 10px; }
  .thumb { width: min(80px, 9vh); height: min(80px, 9vh); }
  .doc { grid-template-columns: 220px 1fr; gap: 56px; }
  .toc { position: sticky; top: 120px; align-self: start; }
  .law { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .top .logo img { height: 60px; }
  .logo { gap: 14px; }
  :root { --pad: min(64px, 6vh); }
  .blurb { max-width: 280px; }
  .headline { font-size: min(96px, 10.5vh); }
  .counter { font-size: min(96px, 8vh); }
  .thumb { width: min(96px, 9vh); height: min(96px, 9vh); }
}
@media (min-width: 1280px) {
  .headline { font-size: min(110px, 10.5vh); }
  .counter { font-size: min(110px, 8vh); }
}
@media (prefers-reduced-motion: reduce) {
  .cta, .arrow, .thumb { transition: none; }
}
