/* Couleurs et typographies du site */
:root {
  --bg: #06040A;
  --bg-alt: #0B0812;
  --black: #000000;
  --panel: #120D1F;
  --line: #2A2140;
  --line-strong: #6B5C96;
  --text: #F2EEFB;
  --text-2: #B3A9CC;
  --muted: #8F86A8;
  --violet: #7C3AED;
  --violet-soft: #A78BFA;
  --violet-deep: #160C2E;
  --violet-pressed: #24164A;
  --yellow: #F0C040;
  --yellow-hover: #F6D26B;
  --on-yellow: #06040A;
  /* Or plaqué : réservé aux petites pièces (bout de la clé en volume, pastille du logo). */
  --gold-plate: linear-gradient(135deg, #7A5A12 0%, #F5E08A 18%, #C9A227 38%, #FFF4BF 52%, #B8901F 68%, #F1D772 84%, #8A6717 100%);
  --gold-edge: linear-gradient(180deg, #7A5A12 0%, #F5E08A 16%, #C9A227 38%, #FFF4BF 54%, #9B7419 76%, #E7C65A 100%);
  --gold-flat: #E9C46A;

  /* Trois rayons seulement : boutons, encadrés, petites pièces. */
  --r-pill: 999px;
  --r-box: 14px;
  --r-small: 6px;

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: var(--text); }
a:hover { color: var(--violet-soft); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--yellow); color: var(--on-yellow);
  padding: 10px 16px; border-radius: var(--r-small); font-weight: 600; z-index: 10;
}
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap-narrow { max-width: 760px; }

/* Échelle des tailles : 15, 16, 17, 19, 24, 32, 52, 84 (plus les chiffres des étapes et le montant). */
h1, h2, h3 { font-family: var(--display); margin: 0; }
h1 { font-weight: 800; font-size: clamp(44px, 7vw, 84px); line-height: 0.96; letter-spacing: -0.03em; }
h2 { font-weight: 800; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.02; letter-spacing: -0.02em; }
h3 { font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
p { margin: 0; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 14px 26px;
  border: 2px solid transparent; border-radius: var(--r-pill);
  font: inherit; font-weight: 600; font-size: 17px; text-decoration: none;
  cursor: pointer;
}
.btn-small { min-height: 44px; padding: 9px 20px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--yellow); color: var(--on-yellow); }
.btn-primary:hover { background: var(--yellow-hover); color: var(--on-yellow); }
.btn-violet { background: var(--violet); color: #FFFFFF; }
.btn-violet:hover { background: #8B4FF5; color: #FFFFFF; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn-ghost:hover { border-color: var(--violet-soft); color: var(--violet-soft); }
.btn-mock { background: transparent; color: var(--text); border: 2px dashed var(--muted); font-size: 16px; min-height: 48px; padding: 10px 22px; }
.btn-link { background: transparent; color: var(--text); border: 0; padding: 10px 8px; min-height: 48px; font-size: 16px; text-decoration: underline; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
/* Le prix, dans le bouton d'achat de l'accueil. */
.btn-price { font-family: var(--display); font-weight: 800; padding-left: 12px; border-left: 2px solid rgba(6, 4, 10, 0.3); white-space: nowrap; }

/* En-tête */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; text-decoration: none; color: var(--text); }
.brand-mark { width: 14px; height: 14px; border-radius: 3px; background: var(--gold-plate); transform: rotate(45deg); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; padding: 10px 0; }

/* Accueil */
.hero-band {
  background:
    radial-gradient(70% 90% at 12% 30%, rgba(124, 58, 237, 0.38), rgba(124, 58, 237, 0) 70%),
    radial-gradient(50% 70% at 85% 60%, rgba(124, 58, 237, 0.18), rgba(124, 58, 237, 0) 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 64px; padding-top: 24px; padding-bottom: 64px; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.h1-violet { color: var(--violet-soft); }
/* Badge « Prix de lancement » : n'affiche aucun ancien prix, seulement que le tarif est celui du lancement. */
.launch {
  margin: -12px 0 0; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--violet-tint, #1C1036); border: 1px solid var(--violet);
  color: var(--text); font-weight: 600; font-size: 15px;
}
.launch-dot { width: 12px; height: 12px; border-radius: 3px; transform: rotate(45deg); background: var(--gold-plate); }
.total-price-wrap { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.launch-small { font-size: 14px; font-weight: 600; color: var(--violet-soft); white-space: nowrap; }
.hero-free { margin: 0; font-size: 17px; color: var(--text-2); max-width: 420px; }
.price-unit { font-family: var(--body); font-weight: 500; font-size: 15px; color: var(--text-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-zip { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* La clé d'activation en volume : quatre blocs de quatre caractères, chacun tourne sur son axe. */
.keystage {
  --s: 80px;
  position: relative;
  width: 100%; max-width: 420px; height: calc(var(--s) + 200px);
  display: flex; align-items: center; justify-content: center;
  perspective: 1200px;
}
.key3d {
  display: flex; align-items: center; gap: 6px;
  transform-style: preserve-3d;
  transform: rotateX(-16deg) rotateY(-24deg);
  animation: key-sway 10s ease-in-out infinite alternate;
}
@keyframes key-sway {
  from { transform: rotateX(-16deg) rotateY(-28deg); }
  to { transform: rotateX(-16deg) rotateY(-10deg); }
}
.key-seg {
  position: relative; flex: none;
  width: var(--s); height: var(--s);
  transform-style: preserve-3d;
  animation: key-roll 10s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.key-seg:nth-of-type(2) { animation-delay: 0.2s; }
.key-seg:nth-of-type(3) { animation-delay: 0.4s; }
.key-seg:nth-of-type(4) { animation-delay: 0.6s; }
/* Un quart de tour, une pause pour lire, et ainsi de suite. */
@keyframes key-roll {
  0%, 17% { transform: rotateX(0deg); }
  25%, 42% { transform: rotateX(-90deg); }
  50%, 67% { transform: rotateX(-180deg); }
  75%, 92% { transform: rotateX(-270deg); }
  100% { transform: rotateX(-360deg); }
}
.key-face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--violet-deep);
  border: 2px solid var(--violet); border-radius: var(--r-small);
  box-shadow: inset 0 0 18px rgba(124, 58, 237, 0.35);
  font-family: var(--mono); font-weight: 700; font-size: calc(var(--s) * 0.32); letter-spacing: 0.04em;
  color: var(--gold-flat);
  backface-visibility: hidden;
}
.key-face:nth-child(1) { transform: translateZ(calc(var(--s) / 2)); }
.key-face:nth-child(2) { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.key-face:nth-child(3) { transform: rotateX(180deg) translateZ(calc(var(--s) / 2)); }
.key-face:nth-child(4) { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
/* Flancs des blocs : sombres entre deux blocs, en or plaqué aux deux bouts de la clé seulement. */
.key-seg::before, .key-seg::after { content: ''; position: absolute; inset: 0; background: #0D071C; border: 2px solid var(--violet); border-radius: var(--r-small); }
.key-seg::before { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.key-seg::after { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.key-seg:first-of-type::before, .key-seg:last-of-type::after { background: var(--gold-edge); border: 0; }
/* Les tirets sont posés sur le plan des faces avant, sinon les blocs les cachent. */
.key-dash { flex: none; width: 10px; height: 3px; border-radius: 2px; background: var(--gold-flat); transform: translateZ(calc(var(--s) / 2)); }
.key-glow {
  position: absolute; left: 50%; bottom: 34px; width: 340px; height: 46px; margin-left: -170px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.7), rgba(124, 58, 237, 0));
  filter: blur(6px);
}

.zipmeta { width: 100%; max-width: 420px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.zipmeta-label { font-size: 15px; color: var(--muted); }
.zipmeta-date { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
.zipmeta-right { display: flex; align-items: center; gap: 14px; }
.price { font-family: var(--display); font-weight: 800; font-size: 24px; white-space: nowrap; }
/* Étiquette du temps restant : en contour, pour ne pas ressembler à un bouton. */
.stamp { color: var(--yellow); border: 1.5px solid var(--yellow); font-weight: 600; font-size: 15px; padding: 4px 11px; border-radius: var(--r-small); transform: rotate(2deg); white-space: nowrap; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-black { background: var(--black); }
.section h2 { margin-bottom: 44px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px 48px; }
.steps li { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.steps p { color: var(--text-2); }
.step-num { font-family: var(--display); font-weight: 800; font-size: 48px; line-height: 0.9; color: var(--violet-soft); }

/* Achat */
.buy { display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: flex-start; }
.buy-intro { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.buy-intro h2 { margin-bottom: 0; }
.buy-intro p { color: var(--text-2); max-width: 400px; }
.progress { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.progress li { display: flex; align-items: center; gap: 14px; font-weight: 600; color: var(--muted); }
.progress-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0; }
.progress li[aria-current="step"] { color: var(--text); }
.progress li[aria-current="step"] .progress-dot { background: var(--yellow); border-color: var(--yellow); }
.progress li[data-done="true"] { color: var(--text-2); }
.progress li[data-done="true"] .progress-dot { background: var(--violet-soft); border-color: var(--violet-soft); }

.panel { flex: 1 1 460px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-box); padding: 36px; scroll-margin-top: 16px; }
.panel:focus-visible { outline: none; }
.panel-step { display: flex; flex-direction: column; gap: 24px; }
.panel-title { font-weight: 800; font-size: 32px; letter-spacing: -0.02em; }
.panel-sub { color: var(--text-2); margin-top: 6px; }
.coins-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.coins-field legend { padding: 0; margin-bottom: 16px; font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
.coins { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.coin {
  min-width: 0; min-height: 64px; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  background: var(--bg-alt); color: var(--text);
  border: 2px solid var(--line-strong); border-radius: var(--r-box);
  font: inherit; cursor: pointer;
}
.coin-name { font-weight: 600; }
.coin-ticker { font-size: 15px; color: var(--muted); }
.coin[aria-pressed="true"] { border-color: var(--violet-soft); background: var(--violet-pressed); box-shadow: inset 0 0 0 1px var(--violet-soft); }
.coin[aria-pressed="true"] .coin-ticker { color: var(--text-2); }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 20px; border-top: 2px solid var(--line); font-weight: 600; }
.total-price { font-family: var(--display); font-weight: 800; font-size: 24px; white-space: nowrap; }
.form-error { background: #3A0D18; border: 1px solid #F87171; color: #FECACA; border-radius: var(--r-box); padding: 12px 16px; }

/* Bloc d'un écran du panneau : libellé, valeur, bouton, note. */
.stack { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.stack > .address, .stack > .pay-address { align-self: stretch; }
.field-label { font-weight: 600; }
.amount { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.network { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; }
.address { font-family: var(--mono); font-weight: 500; font-size: 15px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r-box); padding: 16px; overflow-wrap: anywhere; }
.hint { font-size: 15px; color: var(--muted); }
.note { font-size: 16px; color: var(--text-2); }
.warn { font-size: 16px; color: var(--text); border-left: 3px solid var(--violet-soft); padding-left: 12px; }
.ref { font-family: var(--mono); font-weight: 500; color: var(--text); }
.pay-address { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.pay-address-text { flex: 1 1 220px; }
.qr-box { flex: none; width: 168px; }
.qr { display: block; width: 168px; height: 168px; background: #FFFFFF; border-radius: var(--r-box); }
/* Emplacement du QR code quand il n'y a pas d'image à montrer (maquette sans serveur, image indisponible). */
.qr-empty { width: 168px; min-height: 168px; display: flex; align-items: center; padding: 14px; border: 2px dashed var(--line-strong); border-radius: var(--r-box); font-size: 15px; color: var(--text-2); }
.status { display: flex; align-items: center; gap: 12px; background: #1C1036; border-radius: var(--r-box); padding: 14px 16px; font-weight: 600; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); flex-shrink: 0; }
@keyframes status-pulse { 50% { opacity: 0.35; } }
.panel-foot { padding-top: 20px; border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.keybox {
  font-family: var(--mono); font-weight: 700; font-size: clamp(17px, 2.4vw, 24px); letter-spacing: 0.03em;
  text-align: center; overflow-wrap: anywhere;
  color: var(--gold-flat); background: var(--bg-alt);
  border: 2px solid var(--violet); border-radius: var(--r-box); padding: 22px 20px;
}

/* Questions */
.faq { border-bottom: 2px solid var(--line); }
.faq details { border-top: 2px solid var(--line); padding: 6px 0; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; padding: 16px 0; font-weight: 600; font-size: 19px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq .plus { font-size: 24px; line-height: 1; color: var(--violet-soft); }
.faq details[open] .plus { transform: rotate(45deg); }
.faq p { margin: 0 0 18px; color: var(--text-2); }

/* Pied de page */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; padding-top: 40px; padding-bottom: 48px; }
.footer .brand { font-size: 19px; }
.footer-top { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; color: var(--text-2); }

/* Page d'informations */
.info { padding-top: 40px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 48px; }
.info section { display: flex; flex-direction: column; gap: 14px; }
.info h1 { font-size: clamp(36px, 5vw, 52px); }
.info h2 { font-size: 32px; }
.info p, .info li { color: var(--text-2); max-width: 68ch; }

/* Mouvement : le point d'attente ne bat que si le visiteur n'a pas demandé moins d'animations. */
@media (prefers-reduced-motion: no-preference) {
  .status-dot { animation: status-pulse 1.6s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .key3d, .key-seg { animation: none; }
}

/* Quand l'accueil s'empile, tout s'aligne à gauche comme le reste de la page. */
@media (max-width: 931px) {
  .hero-zip { align-items: flex-start; }
}

@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .hero { gap: 24px 64px; }
  .section { padding: 56px 0; }
  .section h2 { margin-bottom: 28px; }
  .step-num { font-size: 40px; }
  .panel { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .keystage { --s: 60px; height: calc(var(--s) + 140px); }
  .key3d { gap: 4px; }
  .key-glow { width: 280px; margin-left: -140px; bottom: 16px; }
}
