/* Invitation Sidy & Seynabou — 19.12.2026 */

:root {
  --white: #fdfcfa;
  --pearl: #f4f2ee;
  --mist: #e9e6e0;
  --ink: #1c1c1d;
  --grey: #7b7975;
  --line: rgba(28, 28, 29, .12);
  --accent: #c2a878;
  --accent-light: #e9dcc0;
  --gold: #e0b25a;

  /* repli élégant (et non « cursive », qui donne Comic Sans) si la calligraphie tarde à charger */
  --script: "Pinyon Script", "Cormorant Garamond", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;

  --col: 460px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.16, 1, .3, 1);
}

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

html, body { height: 100%; }
html { background: var(--mist); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Typo commune ---------- */

.kicker {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: .66rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--grey);
}
.kicker--accent { color: var(--accent); }

.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 22px; }
.ornament span { width: 54px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.ornament span:last-child { transform: scaleX(-1); }
.ornament i { width: 7px; height: 7px; border: 1px solid var(--accent); transform: rotate(45deg); }

/* ---------- Éléments fixes (langue, pages, musique) ---------- */

.chrome { transition: color .6s ease, background-color .6s ease, border-color .6s ease, opacity .6s ease; }

.lang {
  position: fixed; z-index: 60;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, calc(50% - var(--col) / 2 + 14px));
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  /* pas de flou d'arrière-plan : il serait recalculé à chaque image pendant les transitions */
  background: rgba(255, 255, 255, .88);
  color: rgba(28, 28, 29, .4);
  font-family: var(--sans); font-size: .66rem; letter-spacing: .2em;
}
.lang button { letter-spacing: inherit; padding: 2px; }
.lang button[aria-pressed="true"] { color: var(--ink); }
.lang.is-dark { background: rgba(20, 20, 20, .5); color: rgba(255, 255, 255, .5); }
.lang.is-dark button[aria-pressed="true"] { color: #fff; }

.dots {
  position: fixed; z-index: 40;
  top: 50%; transform: translateY(-50%);
  right: max(4px, calc(50% - var(--col) / 2 + 4px));
  display: flex; flex-direction: column; gap: 4px;
  opacity: 0; pointer-events: none;
}
.dots.is-ready { opacity: 1; pointer-events: auto; }
.dots button { width: 18px; height: 18px; display: grid; place-items: center; }
.dots button::before {
  content: ""; width: 5px; height: 5px; border-radius: 3px;
  background: rgba(28, 28, 29, .22);
  transition: background-color .6s ease, transform .7s var(--ease-soft);
}
.dots button[aria-current="true"]::before { background: var(--ink); transform: scaleY(2.8); }
.dots.is-dark button::before { background: rgba(255, 255, 255, .4); }
.dots.is-dark button[aria-current="true"]::before { background: #fff; }

.music {
  position: fixed; z-index: 40;
  right: max(16px, calc(50% - var(--col) / 2 + 16px));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  color: var(--ink);
}
.music[hidden] { display: none; }
.music.is-dark { background: rgba(20, 20, 20, .55); border-color: rgba(255, 255, 255, .3); color: #fff; }
.music__bars { display: flex; align-items: flex-end; gap: 3px; height: 15px; }
.music__bars i { width: 2px; height: 100%; background: currentColor; border-radius: 1px; transform: scaleY(.3); transform-origin: bottom; will-change: transform; }
.music[aria-pressed="true"] .music__bars i { animation: bars 1s ease-in-out infinite; }
.music__bars i:nth-child(2) { animation-delay: -.3s !important; }
.music__bars i:nth-child(3) { animation-delay: -.6s !important; }
.music__bars i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes bars { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* ---------- Couverture (papier gaufré, fleurs dorées) ---------- */

/* glisse vers le haut comme une page, avec la même douceur que les autres pages */
.intro {
  position: fixed; z-index: 50;
  top: 0; bottom: 0;
  left: 50%; width: min(100%, var(--col));
  transform: translateX(-50%) translateY(0);
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
  background-color: #fbf8f2;
  background-image:
    radial-gradient(ellipse 85% 70% at 50% 48%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 70%),
    var(--grain),
    linear-gradient(180deg, #fbf8f2, #f3ede3);
  background-size: cover, 160px, cover;
  /* calque à part, déplacé par la carte graphique : rien n'est redessiné pendant le glissement */
  will-change: transform, opacity;
  backface-visibility: hidden;
  transition: transform 1.3s cubic-bezier(.65, 0, .2, 1), opacity .7s ease;
}
/* ombre douce sous le bord de la couverture : fixe, elle se déplace avec elle sans coût */
.intro::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 48px;
  height: 150px;
  background: linear-gradient(rgba(255, 236, 190, .95), rgba(245, 205, 125, .55) 40%, rgba(240, 195, 110, 0));
  pointer-events: none;
}
.intro { overflow: visible; }
.cover__flowers, .glints { overflow: hidden; }
.intro:focus-visible { outline: none; }
/* sous l'éclat de lumière, la couverture grandit à peine et s'efface */
.intro.is-open { transform: translateX(-50%) translateY(calc(-100% - 160px)); pointer-events: none; transition: transform 2.5s cubic-bezier(.6, 0, .25, 1); }
.intro.is-dragging { transition: none; }
.intro.is-hidden { visibility: hidden; }
/* pendant le mouvement, les reflets et paillettes se figent : la couverture reste une simple image */
.intro.is-open *, .intro.is-dragging * { animation-play-state: paused !important; }
.intro.is-open .dust, .intro.is-open .glints { visibility: hidden; }

/* la première page attend juste en dessous et remonte avec elle, plus lentement */
.pages { will-change: transform; transition: transform 3.2s cubic-bezier(.2, .7, .2, 1); }
/* la page photo attend légèrement agrandie, puis se pose quand la lumière se dissipe */
.pages.is-under { transform: translateX(-50%) scale(1.06); }
.pages.is-dragging { transition: none; }

.cover__flowers { position: absolute; inset: 0; pointer-events: none; }

/* le contenu remonte un peu plus vite que la page : léger effet de profondeur */
.cover__center, .cover__cue { will-change: transform, opacity; transition: transform 1.3s cubic-bezier(.65, 0, .2, 1), opacity .8s ease; }
.intro.is-open .cover__center { transform: translateY(-16%); opacity: 0; }
.intro.is-open .cover__cue { opacity: 0; }

.cover__center {
  position: absolute; left: 0; right: 0; top: 50%;
  translate: 0 -50%;
  text-align: center;
  padding: 0 24px;
}
.cover__names {
  margin: 16px 0 0;
  font-family: var(--script); font-size: clamp(2.7rem, 13vw, 3.4rem); line-height: 1.05;
  color: var(--ink);
}
.cover__names span, .closing__names span {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  color: var(--accent); font-size: .62em; margin: 0 .08em;
}
.cover__rule { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px auto 14px; }
.cover__rule span { width: 46px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.cover__rule span:last-child { transform: scaleX(-1); }
.cover__rule i { width: 6px; height: 6px; border: 1px solid var(--gold); transform: rotate(45deg); }
.cover__date { margin: 0; font-family: var(--sans); font-size: .7rem; letter-spacing: .42em; text-indent: .42em; color: var(--grey); }

.cover__cue {
  position: absolute; left: 0; right: 0; bottom: calc(7% + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
}
.cover__cue i {
  width: 1px; height: 30px;
  background: linear-gradient(transparent, var(--gold));
  transform-origin: bottom;
  animation: cue-up 2.2s ease-in-out infinite;
}
.cover__cue .kicker { animation: hint 2.4s ease-in-out infinite; }
@keyframes cue-up { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* motifs floraux : relief ton sur ton, dorure permanente, reflet qui passe */
.sprig { position: absolute; aspect-ratio: 1; }
.sprig svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.emb {
  color: #fdfbf7;
  filter: drop-shadow(-.8px -.8px 0 #fff) drop-shadow(.9px 1.3px .9px rgba(120, 96, 55, .28));
}
.gild {
  color: #dcaa4c;
  opacity: .85;
  filter: drop-shadow(0 0 1.5px rgba(255, 222, 150, .95)) drop-shadow(0 0 7px rgba(240, 186, 90, .5));
}
/* reflet d'or qui coule en continu sur les fleurs, de haut en bas de la couverture */
.shine {
  color: #fff3cf;
  opacity: 0;
  filter: drop-shadow(0 0 2px rgba(255, 240, 200, 1)) drop-shadow(0 0 10px rgba(245, 195, 100, .8));
  /* calque à part, rendu une seule fois : seule son opacité varie (aucun redessin pendant l'animation) */
  will-change: opacity;
  animation: gild 3.6s ease-in-out var(--g, 0s) infinite;
}
@keyframes gild {
  0%, 100% { opacity: 0; }
  45% { opacity: .95; }
  60% { opacity: .95; }
}
/* poussière d'or qui monte lentement dans la lumière */
.dust { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.dust span {
  position: absolute; bottom: -8px;
  width: var(--s, 3px); height: var(--s, 3px); border-radius: 50%;
  background: radial-gradient(circle, #fff8e4 0%, #f0c46a 55%, rgba(240, 196, 106, 0) 100%);
  box-shadow: 0 0 6px rgba(240, 190, 90, .7);
  opacity: 0;
  animation: dust var(--d, 9s) linear var(--t, 0s) infinite;
}
@keyframes dust {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  12% { opacity: .9; }
  70% { opacity: .7; }
  100% { opacity: 0; transform: translate3d(var(--x, 20px), calc(-1 * var(--h, 70vh)), 0); }
}

/* poussière d'or qui scintille */
.glints { position: absolute; inset: 0; pointer-events: none; }
.glints span {
  position: absolute; width: 15px; height: 15px;
  translate: -50% -50%;
  background: radial-gradient(circle, #fff6dc 0%, #f3cf7c 40%, rgba(230, 175, 80, 0) 70%);
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  opacity: 0;
  animation: twinkle 3.2s ease-in-out var(--t, 0s) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); }
  45% { opacity: 1; transform: scale(1) rotate(45deg); }
  60% { opacity: .8; transform: scale(.9) rotate(60deg); }
}

/* sceau de cire ivoire (dernière page) */
.seal {
  position: absolute; z-index: 5;
  width: 100px; height: 100px;
  border-radius: 49% 51% 47% 53% / 52% 47% 53% 48%;
  background: radial-gradient(circle at 36% 30%, #fffefb 0%, #f7f0e2 42%, #e8dbc1 100%);
  box-shadow:
    0 7px 16px rgba(110, 85, 45, .24),
    0 1px 2px rgba(110, 85, 45, .22),
    inset 0 2px 2px #fff,
    inset 0 -5px 9px rgba(170, 140, 90, .28);
  display: grid; place-items: center;
}
.seal::before {
  content: ""; position: absolute; inset: 12px;
  border-radius: 50%;
  box-shadow: inset 1px 1px 2px rgba(160, 128, 80, .3), 1px 1px 0 #fff;
}
.seal::after {
  content: ""; position: absolute; inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(214, 172, 96, .6);
  animation: pulse 2.6s ease-out infinite;
}
.seal__mono {
  position: relative;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 2rem; line-height: 1; letter-spacing: .02em;
  background: linear-gradient(135deg, #f0d79a 5%, #c99a45 40%, #f3dfad 58%, #b88a3e 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .9));
  transform: translateY(2px);
}
.seal__mono em { font-size: .55em; margin: 0 2px; vertical-align: .2em; }

@keyframes pulse { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes hint { 50% { opacity: .45; } }

/* ---------- Pages plein écran (empilées, pilotées en JS) ---------- */

.pages {
  position: fixed; top: 0; bottom: 0;
  left: 50%; width: min(100%, var(--col));
  transform: translateX(-50%);
  overflow: hidden;
  touch-action: none;
  background: var(--white);
  box-shadow: 0 0 60px rgba(0, 0, 0, .08);
}

.page {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform-origin: 50% 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  background-color: var(--white); /* toujours opaque : rien ne transparaît d'une autre page */
  contain: paint;
}
.page--white { background: var(--white); }
.page--pearl { background: var(--pearl); }
.page--white, .page--pearl { background-image: var(--grain); background-size: 160px; background-blend-mode: soft-light; }

.page__inner {
  position: relative;
  flex: 1 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(72px + env(safe-area-inset-top)) 30px calc(64px + env(safe-area-inset-bottom));
  text-align: center;
}

/* apparitions : rejouées à chaque arrivée sur une page */
[data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 1s var(--ease-soft) var(--d, 0s), transform 1.2s var(--ease-soft) var(--d, 0s);
}
.page.is-active [data-reveal] { opacity: 1; transform: none; }

/* ---------- 1. Couverture ---------- */

.page--hero { background: #0e0e0f; color: #fff; }
.page--hero .page__inner { justify-content: flex-end; padding: 0; }
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 60% 35%;
  will-change: transform;
  transform: scale(1.12);
  transition: transform 7s cubic-bezier(.15, .6, .3, 1);
}
.pages.is-revealed .hero__img { transform: scale(1); }
.page--hero .page__inner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 20%),
    linear-gradient(0deg, rgba(8, 8, 9, .9) 4%, rgba(8, 8, 9, .45) 34%, rgba(8, 8, 9, 0) 60%);
}
.hero__content { position: relative; z-index: 1; width: 100%; padding: 0 24px calc(96px + env(safe-area-inset-bottom)); }
.hero__content .kicker { color: rgba(255, 255, 255, .78); }

.names {
  margin: 14px 0 10px;
  font-family: var(--script); font-weight: 400;
  font-size: clamp(3.2rem, min(17vw, 9.5svh), 4.6rem); line-height: .92;
  display: flex; flex-direction: column; align-items: center;
}
.names__amp {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: .5em; color: var(--accent-light); margin: .05em 0 -.02em;
}
.hero__date { margin: 0; font-style: italic; font-weight: 300; font-size: 1.2rem; letter-spacing: .04em; color: rgba(255, 255, 255, .85); }

.scroll-cue, .close-cue {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: .6rem; letter-spacing: .3em; text-transform: uppercase;
}
.scroll-cue {
  position: absolute; z-index: 1; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom));
  translate: -50% 0;
  color: rgba(255, 255, 255, .65);
}
.scroll-cue i, .close-cue i { width: 1px; height: 26px; animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
.scroll-cue i { background: linear-gradient(#fff, transparent); }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- 2. Message ---------- */

.page--message .page__inner { padding-left: 26px; padding-right: 26px; }
.page--message .kicker { font-size: .74rem; }
.message { margin-top: 28px; }
.message p {
  margin: 0 auto 20px; max-width: 30ch;
  font-size: clamp(1.3rem, min(6vw, 3.3svh), 1.55rem); line-height: 1.55;
  color: #262627;
}
.message p:last-child { margin-bottom: 0; }
.message em { font-style: italic; color: var(--accent); white-space: nowrap; }

/* ---------- 3. Date ---------- */

.script-title {
  margin: 0 0 10px;
  font-family: var(--script); font-weight: 400;
  font-size: clamp(2.6rem, 12vw, 3.2rem); line-height: 1.1;
  color: var(--ink);
}
.scratch-hint { transition: opacity .6s ease; }
.is-scratched .scratch-hint { opacity: 0 !important; }

.scratch__card {
  position: relative; width: 100%; max-width: 340px;
  height: clamp(124px, min(38vw, 18svh), 156px);
  margin: 32px auto 0;
  border-radius: 10px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--white);
  border: 1px solid rgba(194, 168, 120, .45);
  box-shadow: 0 6px 18px rgba(28, 28, 29, .06);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.date-reveal { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--ink); }
.date-reveal__day, .date-reveal__year { font-weight: 300; font-size: clamp(2.4rem, 11vw, 3rem); line-height: 1; }
.date-reveal__month { font-style: italic; font-size: clamp(1.4rem, 6.4vw, 1.7rem); }
.date-reveal__sep { width: 1px; height: 46px; background: rgba(194, 168, 120, .6); }
.scratch__foil {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; cursor: pointer;
  transition: opacity .8s ease;
}
.scratch__foil.is-cleared { opacity: 0; pointer-events: none; }

.after-reveal {
  width: 100%;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .9s var(--ease-soft) .15s, transform 1s var(--ease-soft) .15s, visibility 0s linear 1s;
}
.after-reveal.is-shown { opacity: 1; visibility: visible; transform: none; transition-delay: .15s, .15s, 0s; }
.weekday { margin: 26px 0 18px; font-style: italic; font-size: 1.45rem; color: var(--accent); }
.countdown {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 340px; margin: 0 auto;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.countdown div { display: flex; flex-direction: column; gap: 4px; }
.countdown div + div { border-left: 1px solid var(--line); }
.countdown b { font-weight: 300; font-size: 2rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.countdown span { font-family: var(--sans); font-size: .54rem; letter-spacing: .22em; text-transform: uppercase; color: var(--grey); }
.countdown__caption { margin-top: 12px; }

.spark {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); pointer-events: none; z-index: 2;
  animation: spark 1.2s var(--ease) forwards;
}
@keyframes spark {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(.2); opacity: 0; }
}

/* ---------- 4. Portrait ---------- */

.oval { position: relative; margin: 0 auto; width: min(70vw, 300px, 44svh); aspect-ratio: 3 / 4; }
.oval::before { content: ""; position: absolute; inset: -11px; border-radius: 50%; border: 1px solid var(--accent); opacity: .7; }
.oval img {
  width: 100%; height: 100%; object-fit: cover; object-position: 45% 0;
  border-radius: 50%;
  box-shadow: 0 24px 50px rgba(28, 28, 29, .14);
}
.values { margin: 40px 0 0; font-family: var(--sans); font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; color: var(--grey); }
.values i { font-style: normal; color: var(--accent); margin: 0 .3em; }

/* ---------- 5. Lieu ---------- */

.venue .page__inner { padding-top: calc(64px + env(safe-area-inset-top)); padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
.venue__name {
  margin: 12px 0 6px;
  font-style: italic; font-weight: 500;
  font-size: clamp(2.5rem, min(12.5vw, 6.4svh), 3.2rem); letter-spacing: .01em; line-height: 1.05;
}
.venue__city { color: var(--ink); letter-spacing: .36em; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px auto; }
.divider span { width: 64px; height: 1px; background: rgba(28, 28, 29, .2); }
.divider i { width: 5px; height: 5px; border-radius: 50%; background: rgba(28, 28, 29, .3); }
.venue__date { margin: 0; font-style: italic; font-size: 1.6rem; line-height: 1.2; }
.venue__time { margin: 6px 0 0; font-family: var(--sans); font-size: .78rem; letter-spacing: .2em; color: var(--grey); }

.map-card {
  position: relative; display: block;
  width: 100%; max-width: 330px;
  height: clamp(150px, 29svh, 240px);
  margin: clamp(18px, 3.5svh, 30px) auto 0;
  background: var(--mist);
}
.map-card::before, .map-card::after {
  content: ""; position: absolute; pointer-events: none;
  border: 1px solid rgba(28, 28, 29, .55);
}
.map-card::before { inset: -7px -5px; transform: rotate(-1.1deg); }
.map-card::after { inset: -4px -9px; transform: rotate(.8deg); border-color: rgba(28, 28, 29, .3); }
.map-card iframe {
  display: block; width: 100%; height: 100%; border: 0;
  pointer-events: none; /* glisser change de page ; toucher ouvre Maps */
  filter: grayscale(.35) contrast(.96) brightness(1.02);
}

.links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 26px;
  width: 100%; margin: clamp(22px, 4svh, 34px) auto 0;
}
.link-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 0 2px 9px;
  border-bottom: 1px solid rgba(28, 28, 29, .2);
  font-family: var(--sans); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  transition: opacity .2s ease;
}
.link-btn:active { opacity: .6; }
.link-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; flex: none; }

/* ---------- 6. Clôture ---------- */

.closing__text { margin: 0 auto 30px; max-width: 24ch; font-size: 1.5rem; line-height: 1.45; font-style: italic; font-weight: 300; }
.closing__names { margin: 14px 0 0; font-family: var(--script); font-size: clamp(2.6rem, 12vw, 3rem); line-height: 1.1; }
.closing__family { margin: 6px 0 32px; font-family: var(--sans); font-size: .78rem; letter-spacing: .6em; text-indent: .6em; color: var(--grey); }
.seal--small { position: relative; left: auto; top: auto; width: 64px; height: 64px; margin: 0 auto; transform: none; }
.page.is-active .seal--small { transform: none; }
.seal--small::after { display: none; }
.seal--small::before { inset: 7px; }
.seal--small .seal__mono { font-size: 1.45rem; }
.footer-date { margin: 28px 0 0; font-family: var(--sans); font-size: .62rem; letter-spacing: .4em; color: var(--grey); }
.save-btn { margin-top: clamp(20px, 4svh, 32px); }

.close-cue {
  position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom));
  translate: -50% 0;
  color: var(--grey);
}
.close-cue i { background: linear-gradient(transparent, var(--accent)); order: -1; transform-origin: bottom; animation-name: cue-up; }
@keyframes cue-up { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
  .hero__img { transform: none; }
}

/* ---------- Le grand jour + lieu, sur une seule page (version condensée) ---------- */

.page--day .page__inner {
  padding-top: calc(52px + env(safe-area-inset-top));
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
  justify-content: center;
}
.page--day .script-title { font-size: clamp(2.1rem, min(10vw, 5.4svh), 2.7rem); margin-bottom: 4px; }
.page--day .scratch__card { height: clamp(84px, 12.5svh, 118px); margin-top: clamp(12px, 2.4svh, 22px); }
.page--day .date-reveal__day, .page--day .date-reveal__year { font-size: clamp(2rem, min(9.5vw, 5.2svh), 2.6rem); }
.page--day .date-reveal__month { font-size: clamp(1.2rem, min(5.6vw, 3svh), 1.5rem); }
.page--day .date-reveal__sep { height: 34px; }
.page--day .weekday { margin: clamp(8px, 1.6svh, 14px) 0 clamp(6px, 1.2svh, 10px); font-size: 1.2rem; }
.page--day .countdown { padding: clamp(6px, 1.2svh, 10px) 0; max-width: 300px; }
.page--day .countdown b { font-size: clamp(1.4rem, 3.4svh, 1.75rem); }
.page--day .countdown span { font-size: .5rem; }
.page--day .countdown__caption { margin-top: 6px; font-size: .56rem; }

.page--day .venue { width: 100%; display: flex; flex-direction: column; align-items: center; }
.page--day .divider { margin: clamp(10px, 2svh, 18px) auto clamp(8px, 1.4svh, 12px); }
.page--day .divider span { width: 44px; }
.page--day .venue__name {
  margin: 4px 0 2px;
  font-style: italic; font-weight: 500;
  font-size: clamp(1.7rem, min(8vw, 4.3svh), 2.2rem); line-height: 1.05;
}
.page--day .venue__city { font-size: .6rem; }
.page--day .map-card { height: clamp(104px, 19svh, 190px); margin-top: clamp(10px, 1.8svh, 16px); max-width: 320px; }
.page--day .links { margin-top: clamp(12px, 2.2svh, 20px); gap: 10px 22px; }

/* ---------- Lumière dorée de l'ouverture ---------- */

/* entre la couverture (au-dessus) et les pages (en dessous) : elle monte avec la couverture,
   baigne la page photo d'or, puis se dissipe lentement pour la révéler */
.burst {
  position: fixed; z-index: 49;
  top: 0; bottom: 0; left: 50%; width: min(100%, var(--col));
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}
.burst.is-on { visibility: visible; }
.burst__wash {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 130% 85% at 50% 100%, #fffaf0 0%, #fde9b8 25%, #f3cd7f 58%, #e6b25c 100%);
  opacity: 0;
  will-change: opacity;
}
/* brume blanche très légère qui dérive */
.burst__wash::after {
  content: ""; position: absolute; inset: -10%;
  background:
    radial-gradient(circle at 36% 58%, rgba(255, 255, 255, .24), transparent 32%),
    radial-gradient(circle at 66% 40%, rgba(255, 255, 255, .16), transparent 34%);
  filter: blur(28px);
}
.burst.is-on .burst__wash { animation: gold-light 3.6s cubic-bezier(.4, 0, .3, 1) forwards; }
@keyframes gold-light {
  0% { opacity: .55; }
  10% { opacity: 1; }
  50% { opacity: .95; }
  100% { opacity: 0; }
}
/* ---------- Dernière page : photo + mots de clôture (condensé) ---------- */

.page--closing .page__inner {
  padding-top: calc(54px + env(safe-area-inset-top));
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}
.oval--small { width: min(46vw, 190px, 27svh); }
.oval--small::before { inset: -8px; }
.page--closing .values { margin-top: clamp(16px, 2.8svh, 26px); font-size: .6rem; }
.page--closing .closing__text { margin: clamp(14px, 2.6svh, 24px) auto clamp(10px, 1.8svh, 16px); font-size: clamp(1.15rem, min(5.4vw, 2.9svh), 1.4rem); }
.page--closing .closing__names { margin-top: 6px; font-size: clamp(2.1rem, min(10vw, 5.4svh), 2.7rem); }
.page--closing .closing__family { margin: 2px 0 0; }
.page--closing .save-btn { margin-top: clamp(14px, 2.6svh, 24px); }

/* la couverture apparaît en fondu une fois la calligraphie prête */
.cover__center { opacity: 0; }
html.fonts-ready .cover__center { opacity: 1; transition: opacity .9s ease; }
