/* Épure. Un jardin fleuri au coucher du soleil, une allée, une arche de roses et deux mariés. */
@font-face { font-family: "Epure Serif"; src: url("./fonts/cormorant-garamond-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Epure Serif"; src: url("./fonts/cormorant-garamond-latin-italic.woff2") format("woff2"); font-style: italic; font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Epure Sans"; src: url("./fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Epure Script"; src: url("./fonts/great-vibes-regular.ttf") format("truetype"); font-display: swap; }

:root {
  --ink: #2c2422;
  --text: #4f4440;
  --muted: #8a7b74;
  --line: rgba(44, 36, 34, 0.13);
  --cream: #fcf8f3;
  --card: rgba(252, 249, 245, 0.95);
  --rose: #c7838a;
  --blush: #f3cfcb;
  --serif: "Epure Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Epure Sans", Inter, "Helvetica Neue", Arial, sans-serif;
  --script: "Epure Script", "Great Vibes", "Snell Roundhand", cursive;
  --shadow: 0 2px 18px rgba(40, 20, 18, 0.38), 0 1px 3px rgba(40, 20, 18, 0.3);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: linear-gradient(#c6d0db, #f6dcc2) fixed; -webkit-text-size-adjust: 100%; }
html:not(.is-sealed) { scroll-snap-type: y proximity; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
html.is-sealed,
html.is-sealed body { overflow: hidden; height: 100%; overscroll-behavior: none; }

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 30;
  padding: 10px 14px; background: var(--ink); color: var(--cream);
  border-radius: 999px; transform: translateY(-160%); transition: transform 0.2s;
}
.skip:focus { transform: none; }

.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
html.is-ready .stage { opacity: 1; }
/* Un voile sombre en bas d’écran pour que les légendes restent lisibles. */
.veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(24, 14, 14, 0.16) 0%, rgba(24, 14, 14, 0) 18%, rgba(24, 14, 14, 0) 46%, rgba(24, 14, 14, 0.28) 70%, rgba(24, 14, 14, 0.62) 100%);
  transition: opacity 0.8s ease;
}
html.is-sealed .veil { opacity: 0.55; }
main { position: relative; z-index: 1; }

/* ───── Barre du haut ───── */
.pill-glass {
  background: rgba(255, 252, 248, 0.7);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px -18px rgba(40, 20, 18, 0.55);
  border-radius: 999px;
}
.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.masthead > * { pointer-events: auto; }
html.is-sealed .masthead { opacity: 0; transform: translateY(-8px); }
html.is-sealed .masthead > * { pointer-events: none; }
.brand {
  padding: 7px 14px 6px;
  color: var(--ink);
  font: 400 21px/1 var(--script);
  text-decoration: none;
  white-space: nowrap;
}
.brand i { font-style: normal; color: var(--rose); }
.dial {
  margin: 0;
  padding: 8px 13px;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}
.masthead nav { display: flex; align-items: center; gap: 2px; padding: 3px; white-space: nowrap; }
.languages { display: flex; }
.languages button,
.nav-rsvp {
  border: 0;
  background: none;
  border-radius: 999px;
  padding: 7px 9px;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.12em;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}
.languages button[aria-pressed="true"] { color: var(--ink); }
.nav-rsvp { background: var(--ink); color: var(--cream); padding: 8px 12px; margin-left: 2px; text-transform: uppercase; }

/* ───── Plein écran : chaque moment est une image ───── */
.scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 96px 22px calc(env(safe-area-inset-bottom) + 54px);
  color: #fff;
  scroll-snap-align: start;
}
.caption { max-width: 34rem; text-shadow: var(--shadow); }
.caption p { margin: 0; }
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font: 600 10.5px/1.4 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.kicker .num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: italic 500 14px/1 var(--serif);
  letter-spacing: 0;
}
.kicker time { font-variant-numeric: tabular-nums; }
.scene h2 {
  margin: 0 0 8px;
  font: 300 clamp(46px, 13vw, 92px)/0.95 var(--serif);
  letter-spacing: -0.01em;
}
.scene .caption > p:not(.kicker) { font: italic 400 clamp(20px, 5.4vw, 26px)/1.3 var(--serif); max-width: 22em; }
.amp { font-family: var(--script); font-style: normal; color: var(--blush); }

/* La couverture : on arrive devant le portail. */
.cover { justify-content: space-between; text-align: center; padding-top: max(13vh, 86px); }
.cover-copy { transition: opacity 0.7s ease, transform 0.9s ease; }
.overline {
  margin: 0 0 6px;
  font: 600 10.5px/1.4 var(--sans);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink);
}
h1 {
  margin: 0;
  font: 400 clamp(64px, 19vw, 140px)/1 var(--script);
  color: var(--ink);
  text-shadow: 0 2px 30px rgba(255, 246, 236, 0.9);
}
h1 .amp { color: var(--rose); font-size: 0.8em; }
.cover-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  margin: 8px 0 0;
  font: italic 500 clamp(18px, 5vw, 24px)/1.3 var(--serif);
  color: var(--ink);
  text-shadow: 0 1px 14px rgba(255, 246, 236, 0.95);
}
.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rose); }
html:not(.is-sealed) .cover-copy .overline,
html:not(.is-sealed) .cover h1,
html:not(.is-sealed) .cover-meta { color: #fff; text-shadow: var(--shadow); }
html:not(.is-sealed) h1 .amp { color: var(--blush); }
.cover-foot { display: grid; justify-items: center; gap: 14px; transition: opacity 0.5s ease; }
html.is-opening .cover-copy { opacity: 0; transform: translateY(-14px); }
html.is-opening .cover-foot { opacity: 0; }

.open {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 18px 30px 18px 24px;
  background: var(--cream);
  color: var(--ink);
  font: 600 11.5px/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  box-shadow: 0 18px 40px -16px rgba(40, 20, 18, 0.6);
  cursor: pointer;
}
.open::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: inherit;
  animation: halo 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes halo { 0% { transform: scale(0.94); opacity: 0.9; } 100% { transform: scale(1.16); opacity: 0; } }
.heart {
  width: 14px;
  height: 13px;
  background: var(--rose);
  clip-path: path("M7 13 C7 13 0 8.2 0 3.9 C0 1.6 1.7 0 3.7 0 C5.1 0 6.3 .8 7 2 C7.7 .8 8.9 0 10.3 0 C12.3 0 14 1.6 14 3.9 C14 8.2 7 13 7 13 Z");
}
html:not(.is-sealed) .open { display: none; }
.scroll-hint {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #fff;
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: var(--shadow);
}
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(#fff, transparent); animation: hint 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0%, 100% { transform: scaleY(0.35); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }
html.is-sealed .scroll-hint { display: none; }
.fallback-note { max-width: 320px; margin: 0; font-size: 13px; color: #fff; text-shadow: var(--shadow); }

/* Les vœux : une seule phrase, au-dessus des mariés. */
.vows { justify-content: flex-start; text-align: center; padding-top: max(16vh, 110px); }
.vows .caption { margin: 0 auto; }
.scene .quote {
  font: 400 clamp(50px, 14vw, 108px)/1.02 var(--script);
  letter-spacing: 0;
  margin: 0 0 10px;
}
.signed {
  font: 600 10.5px/1.4 var(--sans) !important;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.signed .amp { font-size: 20px; letter-spacing: 0; vertical-align: -2px; }

/* ───── Infos et réponse : on lit tranquillement, le jardin reste derrière ───── */
.panel { padding: 30vh 12px 10vh; }
.card {
  width: min(470px, 100%);
  margin: 0 auto;
  padding: 26px 22px 28px;
  border-radius: 26px;
  background: var(--card);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 30px 70px -34px rgba(20, 10, 10, 0.7);
}
.card p { margin: 0; color: var(--text); }
.card .kicker { color: var(--muted); }
.card h2 {
  margin: 22px 0 6px;
  font: 300 clamp(36px, 9vw, 46px)/1.02 var(--serif);
  letter-spacing: -0.01em;
}
.rsvp .card h2 { margin-top: 0; }
.countdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}
.countdown div + div { border-left: 1px solid var(--line); }
.countdown b { display: block; font: 300 44px/1.05 var(--serif); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.countdown small { font: 600 9.5px/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.day-of { margin-top: 14px !important; font: italic 400 22px/1.3 var(--serif); text-align: center; }
.facts { display: grid; gap: 16px; margin: 16px 0 0; }
.facts div { padding-top: 14px; border-top: 1px solid var(--line); }
.facts dt { font: 600 10.5px/1.4 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--rose); }
.facts dd { margin: 6px 0 0; color: var(--text); }
.stays { list-style: none; margin: 10px 0 0; padding: 0; }
.stays li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dotted var(--line); font: 400 19px/1.3 var(--serif); color: var(--ink); }
.stays small { font: 500 12px/1.6 var(--sans); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border: 1px solid rgba(44, 36, 34, 0.25);
  border-radius: 999px;
  color: var(--ink);
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  background: rgba(255, 255, 255, 0.5);
}
.pill::-webkit-details-marker { display: none; }
.pill.light { margin-top: 18px; background: rgba(255, 252, 248, 0.88); border-color: transparent; text-shadow: none; }
.calendar-links { display: grid; gap: 4px; margin-top: 8px; }
.calendar-links a { color: var(--ink); font-size: 14px; }

/* ───── Réponse ───── */
form { display: grid; gap: 16px; margin-top: 18px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.presence { display: flex; flex-wrap: wrap; gap: 8px; }
.presence legend { width: 100%; margin-bottom: 8px; font: 600 10.5px/1.4 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.presence label { position: relative; }
.presence input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.presence span {
  display: inline-block;
  padding: 12px 20px;
  border: 1px solid rgba(44, 36, 34, 0.25);
  border-radius: 999px;
  font: italic 400 19px/1 var(--serif);
}
.presence input:checked + span { background: var(--rose); color: #fff; border-color: var(--rose); }
.presence input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.guest-details { display: grid; gap: 16px; }
.guest-details[hidden] { display: none; }
.field { display: grid; gap: 4px; }
.field span, .form-label { font: 600 10.5px/1.4 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 0; }
.field input, .field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(44, 36, 34, 0.28);
  background: transparent;
  padding: 8px 0;
  font: 400 19px/1.3 var(--serif);
  color: var(--ink);
  border-radius: 0;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--rose); }
.companions { display: grid; gap: 10px; }
#companions { display: grid; gap: 12px; }
.guest-row { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; }
.guest-heading { display: flex; justify-content: space-between; align-items: center; font: italic 400 18px/1 var(--serif); }
.companion-actions { display: flex; gap: 8px; }
.ghost, .remove {
  border: 1px solid rgba(44, 36, 34, 0.25);
  background: none;
  border-radius: 999px;
  padding: 10px 14px;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}
.remove { padding: 6px 10px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--rose); }
.submit {
  justify-self: stretch;
  border: 0;
  border-radius: 999px;
  padding: 18px 26px;
  background: var(--ink);
  color: var(--cream);
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
}
.confirmation { display: grid; gap: 12px; margin-top: 16px; outline: none; }
.confirmation[hidden], form[hidden] { display: none; }
.thanks { font: 400 60px/1 var(--script) !important; color: var(--rose) !important; }

/* ───── Fin ───── */
.endnote { justify-content: center; text-align: center; }
.endnote .caption { margin: 0 auto; display: grid; justify-items: center; }
.names { font: 400 clamp(60px, 17vw, 120px)/1 var(--script) !important; }
.endnote time { font: italic 400 22px/1.2 var(--serif); }

@media (min-width: 900px) {
  .scene { padding: 110px 7vw 9vh; }
  .moment .caption { max-width: 40rem; }
  .panel { padding: 22vh 0 12vh 7vw; }
  .card { margin: 0; padding: 34px 34px 36px; }
}

/* ───── Sans 3D : le faire-part reste complet ───── */
html.flat body { background: linear-gradient(170deg, #3c2d2c, #8d6a64 60%, #d9a99f) fixed; }
html.flat .stage, html.flat .dial { display: none; }
html.flat .cover h1, html.flat .cover-meta, html.flat .overline { color: #fff; text-shadow: var(--shadow); }

html.no-fade .stage, html.no-fade .masthead, html.no-fade .veil, html.no-fade .cover-copy { transition: none; }

@media (max-width: 380px) {
  .masthead { padding-inline: 10px; gap: 6px; }
  .dial { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint i, .open::after { animation: none; }
  .stage, .masthead, .veil, .cover-copy, .cover-foot { transition: none; }
}
