/* Family Quest — landing page. Palette alignée sur l'app : violet royal + or chaud. */

:root {
  --violet: #6c3fc5;
  --violet-clair: #8b5cf6;
  --or: #d4a437;
  --or-clair: #f0c75e;
  --fond: #14101f;
  --fond-2: #1c1630;
  --fond-3: #241c3d;
  --texte: #ece9f5;
  --texte-doux: #a79fc0;
  --bordure: #33294f;
  --ok: #4ade80;
  --err: #f87171;
  --rayon: 14px;
  --max: 1140px;

  /* raretés, reprises de l'app */
  --r-common: #9e9e9e;
  --r-rare: #2196f3;
  --r-epic: #9c27b0;
  --r-leg: #ff9800;
  --r-myth: #e91e63;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.wrap.narrow { max-width: 720px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.gold { color: var(--or-clair); }
strong, b { color: #fff; font-weight: 650; }
em { color: var(--or-clair); font-style: normal; font-weight: 600; }

/* ───────────────────────── nav ───────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(20, 16, 31, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bordure);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: .85rem 0; }
.logo { font-weight: 800; letter-spacing: -.02em; }
.nav-right { display: flex; align-items: center; gap: .6rem; }
.lang-toggle {
  cursor: pointer; font: inherit; font-weight: 700; font-size: .82rem;
  color: var(--texte-doux); background: transparent;
  border: 1px solid var(--bordure); border-radius: 8px;
  padding: .4rem .6rem; min-width: 40px; letter-spacing: .04em;
  transition: color .15s ease, border-color .15s ease;
}
.lang-toggle:hover { color: var(--texte); border-color: var(--violet-clair); }

/* ───────────────────────── boutons ───────────────────────── */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--violet), var(--violet-clair));
  color: #fff; font: inherit; font-weight: 700;
  padding: .8rem 1.5rem; border-radius: var(--rayon);
  text-decoration: none; text-align: center;
  transition: transform .15s ease, filter .15s ease;
  box-shadow: 0 6px 20px -8px rgba(108, 63, 197, .9);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-lg {
  width: 100%; padding: 1rem 1.5rem; font-size: 1.05rem;
  background: linear-gradient(135deg, var(--or), var(--or-clair));
  color: #2a1e05;
  box-shadow: 0 8px 26px -10px rgba(212, 164, 55, .95);
}

/* ───────────────────────── hero ───────────────────────── */
.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  background:
    radial-gradient(1000px 520px at 12% -10%, rgba(108, 63, 197, .5), transparent 62%),
    radial-gradient(760px 420px at 92% 8%, rgba(212, 164, 55, .16), transparent 60%),
    linear-gradient(180deg, var(--fond-2), var(--fond));
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: 1rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--or-clair);
  background: rgba(212, 164, 55, .1);
  border: 1px solid rgba(212, 164, 55, .3);
  padding: .35rem .8rem; border-radius: 100px;
}
.lede { font-size: 1.08rem; color: var(--texte-doux); max-width: 56ch; }

/* ───────────────────────── téléphone + carrousel ───────────────────────── */
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: 100%; max-width: 300px;
  background: #0c0916; border: 9px solid #2b2340; border-radius: 36px;
  padding: 5px; box-shadow: 0 26px 70px -22px rgba(0, 0, 0, .95);
}
.phone.sm { max-width: 265px; }
.phone-screen {
  position: relative; width: 100%; aspect-ratio: 886 / 1920;
  border-radius: 26px; overflow: hidden;
  background: linear-gradient(160deg, var(--fond-3), #150f26);
}
.phone-screen img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transition: opacity .6s ease;
}
.phone-screen img.on { opacity: 1; }

/* points de navigation */
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.dots button {
  width: 7px; height: 7px; padding: 0; border: 0; cursor: pointer;
  border-radius: 50%; background: rgba(255, 255, 255, .22);
  transition: background .2s ease, width .2s ease;
}
.dots button.on { background: var(--or-clair); width: 20px; border-radius: 4px; }

/* carrousel large (captures horizontales du jeu) */
.wide-carousel { max-width: 980px; margin: 0 auto; }
.wide-frame {
  position: relative; width: 100%; aspect-ratio: 1920 / 886;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--bordure);
  background: var(--fond-3);
  box-shadow: 0 24px 60px -26px rgba(0, 0, 0, .9);
}
.wide-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .7s ease;
}
.wide-frame img.on { opacity: 1; }

/* rangée de captures portrait */
.phone-row {
  position: relative; width: 100%; max-width: 300px; margin: 0 auto;
  aspect-ratio: 886 / 1920;
  border-radius: 22px; overflow: hidden;
  border: 8px solid #2b2340;
  background: var(--fond-3);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .9);
}
.phone-row img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transition: opacity .6s ease;
}
.phone-row img.on { opacity: 1; }

/* ───────────────────────── formulaire ───────────────────────── */
.signup-form { margin-top: 1.75rem; max-width: 480px; }
.signup-form.wide { max-width: 100%; margin-inline: auto; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.signup-form input {
  width: 100%; margin-bottom: .7rem; padding: .85rem 1rem;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--bordure); border-radius: var(--rayon);
  color: var(--texte); font: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.signup-form input::placeholder { color: #7d739c; }
.signup-form input:focus {
  outline: none; border-color: var(--violet-clair);
  background: rgba(255, 255, 255, .07);
}
.hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }

.form-note { margin: .8rem 0 0; font-size: .85rem; color: var(--texte-doux); text-align: center; }
.form-msg { margin: .9rem 0 0; font-size: .92rem; font-weight: 600; text-align: center; min-height: 1.3em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--err); }

/* ───────────────────────── sections ───────────────────────── */
.band { padding: clamp(3rem, 7vw, 4.75rem) 0; }
.band.alt { background: var(--fond-2); border-block: 1px solid var(--bordure); }
.band h2 { text-align: center; }
.band h2.left { text-align: left; }
.section-lede {
  text-align: center; color: var(--texte-doux);
  max-width: 62ch; margin: 0 auto 2.5rem; font-size: 1.05rem;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: var(--fond-3); border: 1px solid var(--bordure);
  border-radius: var(--rayon); padding: 1.6rem;
}
.card p { margin: 0; color: var(--texte-doux); font-size: .95rem; }
.ico { font-size: 1.9rem; display: block; margin-bottom: .7rem; }
.feature-list { margin-top: 2.5rem; }

/* ───────────────────────── la boucle ───────────────────────── */
.loop {
  display: flex; align-items: stretch; justify-content: center;
  gap: .75rem; flex-wrap: wrap;
}
.loop-step {
  position: relative; flex: 1 1 200px; max-width: 250px;
  padding: 2rem 1.25rem 1.4rem;
  background: var(--fond-3); border: 1px solid var(--bordure);
  border-radius: var(--rayon);
}
.loop-step p { margin: 0; color: var(--texte-doux); font-size: .92rem; }
.loop-step h3 { font-size: 1rem; }
.loop-num {
  position: absolute; top: -16px; left: 1.25rem;
  width: 34px; height: 34px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--or), var(--or-clair));
  color: #2a1e05; font-weight: 800; border-radius: 50%; font-size: .95rem;
  box-shadow: 0 5px 16px -6px rgba(212, 164, 55, .9);
}
.loop-arrow {
  align-self: center; color: var(--or-clair);
  font-size: 1.4rem; font-weight: 700; opacity: .5;
}
.kicker {
  margin: 2.5rem auto 0; max-width: 58ch; text-align: center;
  font-size: 1.12rem; color: var(--texte);
}

/* ───────────────────────── split (texte + visuel) ───────────────────────── */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.split.reverse .split-copy { order: 2; }
.split-copy p { color: var(--texte-doux); }
.split-visual { display: flex; justify-content: center; }

.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.ticks li {
  position: relative; padding-left: 1.7rem; margin-bottom: .6rem;
  color: var(--texte-doux); font-size: .96rem;
}
.ticks li::before {
  content: '✦'; position: absolute; left: 0; color: var(--or-clair);
}

/* ───────────────────────── raretés ───────────────────────── */
.loot-band {
  background:
    radial-gradient(700px 420px at 85% 30%, rgba(233, 30, 99, .1), transparent 60%),
    var(--fond);
}
.rarity-list { margin-top: 1.75rem; display: grid; gap: .55rem; }
.rarity { display: grid; grid-template-columns: 96px 1fr 42px; align-items: center; gap: .75rem; }
.pill {
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: .22rem .5rem; border-radius: 6px; text-align: center;
}
.r-common { background: rgba(158,158,158,.18); color: var(--r-common); border: 1px solid rgba(158,158,158,.4); }
.r-rare   { background: rgba(33,150,243,.18);  color: var(--r-rare);   border: 1px solid rgba(33,150,243,.45); }
.r-epic   { background: rgba(156,39,176,.2);   color: #ce93d8;         border: 1px solid rgba(156,39,176,.5); }
.r-leg    { background: rgba(255,152,0,.18);   color: var(--r-leg);    border: 1px solid rgba(255,152,0,.45); }
.r-myth   { background: rgba(233,30,99,.18);   color: #f06292;         border: 1px solid rgba(233,30,99,.5); }
b.r-bronze { color: #c8873a; } b.r-diamond { color: #7fd8f0; }

.bar { height: 7px; background: rgba(255,255,255,.06); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--violet), var(--violet-clair)); }
.rarity b { font-size: .85rem; color: var(--texte-doux); text-align: right; }
.fine { margin-top: 1.1rem; font-size: .87rem; color: var(--texte-doux); opacity: .8; }

/* ───────────────────────── histoire ───────────────────────── */
.narrow p { color: var(--texte-doux); font-size: 1.04rem; }
.signature { color: var(--texte) !important; font-weight: 600; }

/* ───────────────────────── appel final ───────────────────────── */
.cta {
  background:
    radial-gradient(760px 380px at 50% 0%, rgba(108, 63, 197, .38), transparent 65%),
    var(--fond-2);
  border-block: 1px solid var(--bordure);
}
.trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem 1.6rem;
  margin-top: 2rem; font-size: .9rem; color: var(--texte-doux);
}

.foot { padding: 2.5rem 0; text-align: center; color: var(--texte-doux); font-size: .9rem; }
.foot p { margin: 0 0 .4rem; }
.foot .small { font-size: .82rem; opacity: .75; }

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { order: -1; }
  .phone { max-width: 240px; }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 2.25rem; }
  .split.reverse .split-copy { order: 0; }
  .band h2.left { text-align: center; }
  .split-copy { text-align: center; }
  .ticks { display: inline-block; text-align: left; }
  .rarity { grid-template-columns: 88px 1fr 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .loop-arrow { display: none; }
  .loop-step { max-width: 100%; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .trust { flex-direction: column; align-items: center; gap: .5rem; }
  .phone { max-width: 220px; }
}

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