/* ============================================================
   Rituel Renaissance — Happy Ménopause
   ============================================================ */
:root {
  --night: #5A3E2C;
  --cream: #FFF8EF;
  --peach: #F9B38A;
  --orange: #D5550B;
  --gold: #F4EEA9;
  --muted: rgba(255, 248, 239, .72);
  --line: rgba(249, 179, 138, .35);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--night);
  color: var(--cream);
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Fonds (fondu enchaîné entre deux calques) ---------- */
.bg-layer {
  position: fixed; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.4s var(--ease), transform 12s linear;
}
.bg-layer.on { opacity: 1; transform: scale(1); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  /* Voile marron clair et léger : les photos restent bien visibles */
  background:
    radial-gradient(ellipse at center, rgba(90,62,44,.38) 0%, rgba(90,62,44,.18) 75%),
    linear-gradient(180deg, rgba(120,84,60,.12), rgba(70,48,34,.3));
}
/* Lisibilité du texte sur photo claire */
.inner { text-shadow: 0 1px 3px rgba(40,26,18,.55), 0 0 22px rgba(40,26,18,.45); }
input, textarea, .btn { text-shadow: none; }

/* ---------- Barre haute ---------- */
.home-link {
  position: fixed; top: 20px; left: 24px; z-index: 10;
  font-family: 'Cormorant Garamond', serif; font-size: 20px;
  color: var(--cream); text-decoration: none; opacity: .85;
}
.home-link strong { color: var(--peach); font-style: italic; font-weight: 600; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10; background: rgba(255,255,255,.06); }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--peach)); transition: width .8s var(--ease); }

/* ---------- Bouton musique ---------- */
.sound-toggle {
  position: fixed; top: 14px; right: 18px; z-index: 11;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(63,51,44,.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .3s, background .3s, opacity .6s;
}
.sound-toggle:hover { border-color: var(--peach); background: rgba(213,85,11,.3); }
.sound-toggle svg { width: 20px; height: 20px; fill: none; stroke: var(--cream); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle .ico-off { display: none; }
.sound-toggle[aria-pressed="true"] .ico-on { display: none; }
.sound-toggle[aria-pressed="true"] .ico-off { display: block; }

/* ---------- Écrans ---------- */
.screen {
  position: fixed; inset: 0;
  height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 20px 110px;
  overflow-y: auto;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .9s var(--ease), visibility 0s linear .9s;
}
.screen.is-active {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity .9s var(--ease) .25s, visibility 0s;
}
.inner { width: 100%; max-width: 680px; margin: auto; text-align: center; }
.inner.narrow { max-width: 560px; }

/* Apparition en cascade du contenu */
.screen .inner > * { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.screen.is-active .inner > * { opacity: 1; transform: none; }
.screen.is-active .inner > *:nth-child(2) { transition-delay: .45s; }
.screen.is-active .inner > *:nth-child(3) { transition-delay: .7s; }
.screen.is-active .inner > *:nth-child(4) { transition-delay: .95s; }
.screen.is-active .inner > *:nth-child(5) { transition-delay: 1.2s; }
.screen.is-active .inner > *:nth-child(n+6) { transition-delay: 1.45s; }
.screen.is-active .inner > *:first-child { transition-delay: .25s; }

.screen .text p { opacity: 0; transition: opacity 1.1s var(--ease); }
.screen.is-active .text p { opacity: 1; }
.screen.is-active .text p:nth-child(1) { transition-delay: .8s; }
.screen.is-active .text p:nth-child(2) { transition-delay: 2s; }
.screen.is-active .text p:nth-child(3) { transition-delay: 3.2s; }

/* ---------- Typo ---------- */
.kicker { text-transform: uppercase; letter-spacing: 4px; font-size: 12px; font-weight: 600; color: #FFD9C2; margin-bottom: 18px; }
h1.giant { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: clamp(56px, 13vw, 132px); line-height: .95; letter-spacing: -1px; }
h2 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: clamp(40px, 8vw, 68px); line-height: 1.05; margin-bottom: 22px; }
.script { font-family: 'Parisienne', cursive; color: var(--peach); font-size: clamp(24px, 4.5vw, 34px); margin: 6px 0 22px; }
.script.big { font-size: clamp(56px, 12vw, 96px); color: var(--cream); margin-bottom: 18px; }
.lead { color: var(--muted); font-size: 16px; margin: 0 auto 28px; max-width: 520px; }
.text p { font-size: clamp(16px, 2.3vw, 19px); margin-bottom: 14px; }
.text .quote { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(22px, 3.6vw, 30px); color: var(--peach); margin-top: 22px; }
.fine { font-size: 12.5px; color: rgba(255,248,239,.55); margin: 18px auto 24px; max-width: 480px; }

/* ---------- Formulaires ---------- */
.capture { display: flex; flex-direction: column; gap: 12px; max-width: 380px; margin: 0 auto; }
input, textarea {
  width: 100%;
  background: rgba(255,248,239,.06);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--cream);
  font: inherit; font-size: 16px; /* 16px = pas de zoom auto iOS */
  padding: 14px 18px;
  transition: border-color .3s, background .3s;
}
input::placeholder, textarea::placeholder { color: rgba(255,248,239,.4); }
input:focus, textarea:focus { outline: none; border-color: var(--peach); background: rgba(255,248,239,.1); }
textarea { resize: vertical; min-height: 120px; text-align: left; }
.question { display: block; font-family: 'Cormorant Garamond', serif; font-size: clamp(21px, 3.2vw, 26px); color: var(--cream); margin: 34px auto 14px; max-width: 560px; line-height: 1.3; }
.question.small { font-size: 19px; margin: 20px 0 8px; text-align: left; }
.form-error { color: var(--peach); font-size: 13px; min-height: 18px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 18px;
  padding: 15px 34px;
  border-radius: 999px; border: 1px solid var(--orange);
  background: var(--orange); color: var(--cream);
  font: 500 15px 'Poppins', sans-serif; letter-spacing: .3px;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 12px 34px rgba(213,85,11,.35);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(213,85,11,.5); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--peach); }
.missive {
  margin: 8px auto 30px; padding: 26px 24px 22px; max-width: 520px;
  border: 1px solid var(--line); border-radius: 22px;
  background: rgba(63,51,44,.45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.missive-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(22px, 3.4vw, 27px); line-height: 1.3; margin-bottom: 10px; }
.missive-text { font-size: 14.5px; color: var(--muted); }
.missive-text em { color: var(--peach); font-style: italic; }
.missive .btn { margin-top: 16px; }
.missive-done { margin-top: 14px; color: var(--peach); font-family: 'Cormorant Garamond', serif; font-size: 21px; }
.end-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Préparation ---------- */
.prep-list { list-style: none; text-align: left; margin: 10px auto 8px; }
.prep-list li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(249,179,138,.12); }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-top: 10px; box-shadow: 0 0 12px var(--orange); }
.center { text-align: center; }

/* ---------- Navigation ---------- */
.nav-arrows {
  position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px; z-index: 10;
  opacity: 0; pointer-events: none; transition: opacity .6s;
}
.nav-arrows.show { opacity: 1; pointer-events: auto; }
.nav-arrows button {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(15,10,8,.5);
  display: grid; place-items: center; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color .3s, background .3s;
}
.nav-arrows button:hover { border-color: var(--peach); background: rgba(213,85,11,.25); }
.nav-arrows button:disabled { opacity: .3; cursor: default; }
.nav-arrows svg { width: 20px; height: 20px; fill: none; stroke: var(--cream); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.counter { font-size: 12px; letter-spacing: 3px; color: var(--muted); min-width: 44px; text-align: center; }

@media (max-width: 600px) {
  .screen { padding: 70px 16px 100px; align-items: flex-start; }
  .home-link { top: 16px; left: 16px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
}
