/* ============================================================
   CÉLESTINE — Page d'ouverture
   Identité de marque : fond terracotta #9E3A26 · écritures blanches
   Typo : Manrope (marque) + Caveat (accent manuscrit)
   ============================================================ */

:root {
  --ink:       #9E3A26;   /* terracotta de marque — fond */
  --ink-deep:  #7c2c1b;   /* terracotta foncée — profondeur / vignette */
  --ink-soft:  #b14d36;
  --sage:      #F7E7DC;   /* crème chaude — accents (presque blanc) */
  --sage-dim:  #ffffff;
  --cream:     #ffffff;   /* texte principal : blanc */
  --cream-dim: rgba(255, 255, 255, 0.72);
  --white:     #ffffff;

  --font-sans: "Manrope", system-ui, sans-serif;
  --font-hand: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --maxw: 1280px;
  --pad:  clamp(1.25rem, 4vw, 3.25rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--ink);
  color: var(--cream);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Cadre décoratif (poster) ---------- */
.frame {
  position: fixed;
  inset: clamp(0.75rem, 1.6vw, 1.5rem);
  z-index: 40;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.tick {
  position: absolute;
  width: 9px; height: 9px;
  border: 1px solid var(--sage);
  opacity: 0.6;
}
.tick--tl { top: -1px;  left: -1px;  border-right: 0; border-bottom: 0; }
.tick--tr { top: -1px;  right: -1px; border-left: 0;  border-bottom: 0; }
.tick--bl { bottom: -1px; left: -1px;  border-right: 0; border-top: 0; }
.tick--br { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; }

/* ---------- Structure ---------- */
.page {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1.4rem, 3vw, 2.6rem) var(--pad) clamp(1.2rem, 2.4vw, 2rem);
}

/* ===================== TOPBAR ===================== */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.topbar__side { display: flex; align-items: center; gap: 0.6rem; }
.topbar__side--right { justify-content: flex-end; }

.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cream);
}
.kicker--muted { color: var(--sage); font-weight: 500; }
.dot { color: var(--sage); opacity: 0.6; }

.topbar__mark { display: block; line-height: 0; }
.emblem-mark {
  width: 26px; height: auto;
  fill: var(--sage);
  transition: fill 0.4s var(--ease), transform 0.5s var(--ease);
}
.topbar__mark:hover .emblem-mark { fill: var(--cream); transform: rotate(-4deg); }

.ghost-link {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  padding: 0.6rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}
.ghost-link:hover { background: var(--sage); color: var(--ink); border-color: var(--sage); }

/* ===================== SCÈNE ===================== */
.stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vh, 3rem) 0;
}

.emblem-watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  width: min(58vh, 540px);
  height: auto;
  fill: var(--sage);
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}

.stage__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Eyebrow */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sage);
  margin-bottom: clamp(1.2rem, 3vh, 2rem);
}
.eyebrow .rule {
  display: block;
  width: clamp(28px, 7vw, 64px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sage));
}
.eyebrow .rule:last-child { background: linear-gradient(90deg, var(--sage), transparent); }

/* Wordmark */
.wordmark {
  width: clamp(280px, 62vw, 560px);
  color: var(--white);
  line-height: 0;
}
.wordmark svg { width: 100%; height: auto; display: block; }

/* Baseline — serif italique raffiné */
.hand-note {
  font-family: var(--font-hand);
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--cream);
  margin-top: clamp(0.9rem, 2vh, 1.5rem);
}
.hand-note em { color: var(--sage); font-style: italic; }

/* ---------- Compte à rebours ---------- */
.countdown { margin-top: clamp(1.8rem, 4.5vh, 3rem); }
.countdown__lead {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cream-dim);
  font-weight: 500;
}
.countdown__date {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 0.35rem;
  color: var(--cream);
}

.clock {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.4rem);
  margin-top: clamp(1rem, 2.4vh, 1.6rem);
}
.clock__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(52px, 12vw, 78px);
}
.clock__num {
  font-size: clamp(2rem, 6.5vw, 3.6rem);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  letter-spacing: -0.02em;
}
.clock__label {
  margin-top: 0.55rem;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
}
.clock__sep {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 200;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.1;
  align-self: flex-start;
  margin-top: 0.1em;
}

/* ---------- Inscription ---------- */
.notify { margin-top: clamp(1.8rem, 4.5vh, 2.8rem); width: 100%; max-width: 440px; }
.notify__label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
  margin-bottom: 0.75rem;
}
.notify__row {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 0.5rem;
  transition: border-color 0.35s var(--ease);
}
.notify__row:focus-within { border-color: var(--sage); }
.notify__input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.4rem 0.2rem;
  outline: none;
  min-width: 0;
}
.notify__input::placeholder { color: rgba(243, 240, 230, 0.35); }
.notify__btn {
  background: var(--sage);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s var(--ease), transform 0.2s var(--ease);
}
.notify__btn:hover { background: var(--white); }
.notify__btn:active { transform: scale(0.97); }
.notify__note {
  margin-top: 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--cream-dim);
  transition: color 0.3s var(--ease);
}
.notify__note.is-success { color: var(--sage); font-weight: 600; }
.notify__note.is-error { color: #e3a09a; }

/* ===================== FOOTER ===================== */
.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 1rem;
  padding-top: clamp(1.2rem, 2.4vh, 1.8rem);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.footer__cell { display: flex; flex-direction: column; gap: 0.35rem; font-style: normal; }
.footer__cell--center { text-align: center; align-items: center; }
.footer__cell--right { text-align: right; align-items: flex-end; }
.footer__k {
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
}
.footer__v {
  font-size: 0.82rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.01em;
}
a.footer__v { transition: color 0.3s var(--ease); }
a.footer__v:hover { color: var(--sage); }

/* ===================== ANIMATIONS ===================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 1s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}
.emblem-watermark.reveal {
  transform: translate(-50%, -52%) scale(0.94);
  animation: emblem-in 1.6s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes emblem-in {
  to { opacity: 0.07; transform: translate(-50%, -52%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .emblem-watermark.reveal { animation: none; opacity: 1; transform: none; }
  .emblem-watermark.reveal { opacity: 0.07; transform: translate(-50%, -52%); }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto 1fr; }
  .topbar__side--left .kicker--muted, .topbar__side--left .dot { display: none; }
  .ghost-link { padding: 0.5rem 0.85rem; font-size: 0.62rem; letter-spacing: 0.16em; }

  .footer {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    text-align: center;
  }
  .footer__cell,
  .footer__cell--right { align-items: center; text-align: center; }

  .clock__unit { min-width: 0; flex: 1; }
  .hand-note { font-size: clamp(1.4rem, 6vw, 1.9rem); }
}

@media (max-width: 380px) {
  .clock { gap: 0.3rem; }
  .clock__sep { display: none; }
}

/* Hauteurs réduites : on resserre les marges verticales */
@media (max-height: 720px) {
  .countdown { margin-top: clamp(1rem, 3vh, 1.6rem); }
  .notify { margin-top: clamp(1rem, 3vh, 1.6rem); }
  .emblem-watermark { width: min(46vh, 420px); }
}
