/* ============================================================
   Mystra — design system
   Univers : nuit indigo + or. Display Fraunces, corps Manrope,
   libellés Space Mono. Signature : la constellation du hero.
   ============================================================ */

:root {
  --night: #0b0a1f;
  --night-2: #14122e;
  --veil: #1e1b3a;
  --line: rgba(232, 195, 107, 0.18);
  --gold: #e8c36b;
  --gold-soft: #c9a24a;
  --aura: #7c6ff0;
  --starlight: #f4f1fa;
  --muted: #a09cc0;

  --maxw: 1120px;
  --narrow: 760px;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --f-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--starlight);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Atmosphère : voiles de lumière fixes derrière tout le contenu. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 78% 8%, rgba(124, 111, 240, 0.16), transparent 60%),
    radial-gradient(50% 45% at 12% 22%, rgba(232, 195, 107, 0.10), transparent 60%),
    radial-gradient(80% 60% at 50% 110%, rgba(124, 111, 240, 0.12), transparent 60%);
  pointer-events: none;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: var(--narrow); }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: var(--night);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 700; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Typographie ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}
.eyebrow.center { display: block; }

.hero-title, .section-title, .legal-title, .cta-title {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-title { font-size: clamp(28px, 4vw, 42px); }
.section-intro { color: var(--muted); max-width: 56ch; margin: 14px auto 0; }
.section-intro.center { text-align: center; }

/* ---------- Boutons ---------- */
.btn-primary, .btn-ghost {
  display: inline-block;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-soft));
  color: #1a1530;
  box-shadow: 0 10px 30px rgba(232, 195, 107, 0.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(232, 195, 107, 0.32); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--starlight);
  margin-top: 18px;
}
.btn-ghost:hover { border-color: var(--gold); }

/* ---------- Badges stores ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 0; }
.badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  border: 1px solid rgba(244, 241, 250, 0.18);
  border-radius: 14px;
  background: rgba(20, 18, 46, 0.6);
  color: var(--starlight);
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.badge:hover { border-color: var(--gold); transform: translateY(-2px); }
.badge--soon { opacity: 0.55; cursor: default; }
.badge--soon:hover { transform: none; border-color: rgba(244, 241, 250, 0.18); }
.badge-logo { flex: none; }
.badge-text { display: flex; flex-direction: column; line-height: 1.1; }
.badge-sm { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.badge-lg { font-size: 17px; font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 10, 31, 0.72);
  border-bottom: 1px solid rgba(244, 241, 250, 0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: 0.02em; }
.brand-mark { color: var(--gold); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color 0.15s ease; }
.site-nav a:hover { color: var(--starlight); }
.nav-cta { color: var(--gold) !important; }
.lang-switch {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em;
  border: 1px solid var(--line); padding: 6px 11px; border-radius: 999px;
}
.lang-switch:hover { border-color: var(--gold); color: var(--gold) !important; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 9vw, 110px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.starfield {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.9;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 26% 64%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.6px 1.6px at 47% 30%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 68% 72%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 82% 24%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 91% 56%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.1px 1.1px at 38% 84%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.3px 1.3px at 58% 12%, #fff, transparent);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-title { font-size: clamp(38px, 6.2vw, 68px); }
.hero-title .accent { color: var(--gold); font-style: italic; }
.lede { color: var(--muted); font-size: clamp(17px, 2.1vw, 20px); max-width: 44ch; margin: 22px 0 0; }
.hero-note { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); margin: 18px 0 0; }

/* Signature : la constellation */
.hero-sky { display: flex; justify-content: center; }
.constellation { width: min(440px, 100%); height: auto; overflow: visible; }
.c-line { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); animation: draw 1.4s ease forwards; animation-delay: 0.2s; }
.c-line:nth-child(2) { animation-delay: 0.7s; }
.c-line:nth-child(3) { animation-delay: 1.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.c-star circle { fill: var(--gold); }
.c-star .c-halo { fill: var(--gold); opacity: 0.16; animation: twinkle 3.4s ease-in-out infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }
@keyframes twinkle { 0%, 100% { opacity: 0.12; transform: scale(0.9); } 50% { opacity: 0.3; transform: scale(1.15); } }
.c-star text { fill: var(--starlight); font-family: var(--f-display); font-style: italic; font-size: 17px; text-anchor: middle; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(20,18,46,0.5), transparent); }
.section-title.center + .section-intro { margin-top: 16px; }

/* ---------- Guides ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 52px; }
.guide-card {
  background: linear-gradient(180deg, rgba(30,27,58,0.6), rgba(20,18,46,0.4));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 26px;
}
.guide-glyph { display: inline-flex; color: var(--gold); margin-bottom: 16px; }
.guide-name { font-family: var(--f-display); font-weight: 600; font-size: 26px; margin: 0; }
.guide-role { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin: 6px 0 14px; }
.guide-desc { color: var(--muted); margin: 0; }

/* ---------- Rituel (arc du jour) ---------- */
.ritual-arc { list-style: none; counter-reset: step; margin: 52px auto 0; padding: 0; max-width: 720px; position: relative; }
.ritual-arc::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--gold), rgba(232,195,107,0.05)); }
.ritual-step { position: relative; padding: 0 0 30px 52px; }
.ritual-step:last-child { padding-bottom: 0; }
.ritual-dot { position: absolute; left: 5px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--night); border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(232,195,107,0.1); }
.ritual-name { font-family: var(--f-display); font-weight: 600; font-size: 22px; margin: 0 0 4px; }
.ritual-desc { color: var(--muted); margin: 0; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 48px; }
.feature-card { border: 1px solid var(--line); border-radius: 16px; padding: 26px; background: rgba(20,18,46,0.35); }
.feature-name { font-family: var(--f-display); font-weight: 600; font-size: 21px; margin: 0 0 6px; color: var(--gold); }
.feature-desc { color: var(--muted); margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { padding: clamp(56px, 8vw, 96px) 0; background: radial-gradient(70% 120% at 50% 0%, rgba(124,111,240,0.18), transparent 70%); }
.cta-inner { text-align: center; }
.cta-title { font-size: clamp(30px, 4.6vw, 48px); }
.cta-sub { color: var(--muted); margin: 14px 0 0; }
.cta-inner .badges { justify-content: center; }

/* ---------- FAQ ---------- */
.faq { margin-top: 44px; }
.faq-item { border-bottom: 1px solid rgba(244,241,250,0.1); padding: 6px 0; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-family: var(--f-display); font-weight: 600; font-size: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 26px; font-family: var(--f-body); line-height: 1; transition: transform 0.2s ease; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { color: var(--muted); margin: 0 0 18px; max-width: 64ch; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid rgba(244,241,250,0.08); padding: 56px 0 36px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 32px; }
.footer-tag { color: var(--muted); margin: 14px 0 0; max-width: 26ch; }
.footer-col h2 { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin: 0 0 16px; }
.footer-col a { display: block; color: var(--muted); padding: 5px 0; font-size: 15px; }
.footer-col a:hover { color: var(--starlight); }
.footer-get .badges { flex-direction: column; align-items: flex-start; margin-top: 0; gap: 10px; }
.footer-base { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(244,241,250,0.06); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
.footer-disclaimer { color: var(--muted); font-size: 13px; max-width: 70ch; margin: 0; }
.footer-rights { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- Pages légales ---------- */
.legal { padding: clamp(40px, 7vw, 80px) 0 64px; }
.legal-title { font-size: clamp(30px, 5vw, 46px); margin-bottom: 8px; }
.legal-updated { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 28px; }
.legal-intro { color: var(--starlight); font-size: 18px; margin: 0 0 32px; }
.legal-section { margin: 0 0 26px; }
.legal-section h2 { font-family: var(--f-display); font-weight: 600; font-size: 23px; margin: 0 0 8px; }
.legal-section p { color: var(--muted); margin: 0; }
.legal-contact { color: var(--muted); margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.bullets { color: var(--muted); margin: 0; padding-left: 20px; }
.bullets li { margin: 4px 0; }
.muted-note { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* ---------- Formulaire ---------- */
.form { margin-top: 8px; }
.field { margin-bottom: 20px; display: flex; flex-direction: column; }
.field label { font-weight: 600; margin-bottom: 7px; font-size: 15px; }
.field small { color: var(--muted); font-size: 13px; margin-top: 6px; }
.field input, .field textarea {
  background: rgba(20,18,46,0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--starlight);
  font-family: var(--f-body);
  font-size: 16px;
  padding: 13px 15px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-error { color: #ffb4a8; background: rgba(220,38,38,0.12); border: 1px solid rgba(220,38,38,0.3); border-radius: 10px; padding: 12px 14px; margin: 0 0 18px; }
.notice { border: 1px solid var(--line); border-radius: 16px; padding: 28px; background: rgba(20,18,46,0.4); }
.notice--ok { border-color: rgba(52,211,153,0.4); }
.notice h2 { font-family: var(--f-display); font-weight: 600; margin: 0 0 8px; }
.notice p { color: var(--muted); margin: 0 0 18px; }
.notfound { padding: clamp(60px, 12vw, 140px) 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-sky { order: -1; }
  .constellation { width: min(320px, 80%); }
  .guide-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .site-nav { gap: 14px; }
  .site-nav a:not(.nav-cta):not(.lang-switch) { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Accessibilité mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .c-line { stroke-dashoffset: 0; }
}
