/* =========================================================
   Bat Mitsvah de Rachel DADOUN — Invitation numérique
   Bleu roi & or · Doré & prestige
   ========================================================= */

:root {
  --blue-950: #071C6E;
  --blue-900: #0A2385;
  --blue-850: #0D2A96;
  --blue-800: #1033A8;
  --blue-700: #1A42BE;
  --blue-600: #2452D4;
  --blue-500: #3A68E6;

  --gold-50: #FFF7DA;
  --gold-100: #F8E7A9;
  --gold-200: #F0D68A;
  --gold-300: #E2BF62;
  --gold-400: #D4AF37;
  --gold-500: #B8912E;
  --gold-600: #94701F;

  --ivory: #F7F1E1;
  --ivory-soft: rgba(247, 241, 225, .86);
  --line: rgba(226, 191, 98, .5);
  --line-soft: rgba(226, 191, 98, .28);

  --foil: linear-gradient(100deg,
      #B08429 0%, #EBCB72 14%, #FFF5CF 26%, #E3BF5C 38%,
      #BE952F 50%, #F3DA8E 64%, #FFF3C6 74%, #D2A944 86%, #B08429 100%);

  --f-script: "Great Vibes", "Snell Roundhand", cursive;
  --f-caps: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --f-serif: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;
  --f-he: "Frank Ruhl Libre", "David", "Times New Roman", serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);

  --gutter: clamp(14px, 4.4vw, 28px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--blue-900);
  scroll-behavior: smooth;
  scroll-padding-top: 12px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(1.2rem, 4.8vw, 1.4rem);
  line-height: 1.45;
  color: var(--ivory);
  background: var(--blue-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  font-variant-numeric: lining-nums;
}

body.is-locked { overflow: hidden; }

p, h1, h2, h3, dl, dd { margin: 0; }
strong { font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }

.foil {
  display: inline-block;
  background-image: var(--foil);
  background-size: 200% 100%;
  background-repeat: repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: foil 9s linear infinite;
}

@keyframes foil {
  from { background-position: 0% 50%; }
  to   { background-position: -200% 50%; }
}

/* ---------- Fond (visuel généré Higgsfield) ---------- */
.bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--blue-900);
}

.bg__img,
.intro__door::before {
  background-color: var(--blue-900);
  background-image: url("../img/bg-mobile.jpg");
  background-image: image-set(url("../img/bg-mobile.webp") type("image/webp"), url("../img/bg-mobile.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

@media (min-aspect-ratio: 4/5) {
  .bg__img,
  .intro__door::before {
    background-image: url("../img/bg-desktop.jpg");
    background-image: image-set(url("../img/bg-desktop.webp") type("image/webp"), url("../img/bg-desktop.jpg") type("image/jpeg"));
  }
}

.bg__img {
  position: absolute;
  inset: -3%;
  animation: bgDrift 48s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes bgDrift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.07) translate3d(0, -1.2%, 0); }
}

.bg__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(110% 55% at 50% -6%, rgba(60, 110, 240, .42), transparent 65%),
    radial-gradient(80% 45% at 50% 108%, rgba(36, 82, 220, .32), transparent 70%);
  animation: glowPulse 10s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from { opacity: .7; }
  to   { opacity: 1; }
}

.bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 85% at 50% 45%, transparent 60%, rgba(4, 14, 70, .55) 100%);
}

.dust {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: 1;
  pointer-events: none;
}

.fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 300;
  pointer-events: none;
}

/* Rayons art déco */
.rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(240, 214, 138, .16) 0deg 2.2deg, transparent 2.2deg 9deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .55) 28%, transparent 62%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .55) 28%, transparent 62%);
  animation: spin 120s linear infinite;
  will-change: transform;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Logo (généré Higgsfield) ---------- */
.logo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  opacity: 0;
  transform: scale(.86);
  filter: blur(6px);
  transition: opacity 1.4s ease, transform 2.2s var(--ease-out), filter 1.4s ease;
}

.logo picture { display: block; width: 100%; height: 100%; }

.logo__img {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 16px rgba(2, 8, 30, .45));
}

.logo__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 246, 214, .32) 50%, transparent 58%) no-repeat;
  background-size: 300% 100%;
  background-position: 120% 0;
  mix-blend-mode: screen;
}

.is-in > .logo { opacity: 1; transform: none; filter: none; }
.is-in > .logo .logo__shine { animation: logoShine 7s ease-in-out 1.8s infinite; }

@keyframes logoShine {
  0% { background-position: 120% 0; }
  32%, 100% { background-position: -20% 0; }
}

/* =========================================================
   POP-UP D'OUVERTURE
   ========================================================= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  perspective: 1600px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

.intro__door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.2%;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(60, 110, 240, .45), transparent 70%),
    linear-gradient(180deg, var(--blue-800), var(--blue-900) 60%, var(--blue-950));
  background-size: 200% 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 1.9s var(--ease-io), filter 1.9s var(--ease-io), opacity .6s ease 1.4s;
  will-change: transform;
}

.intro__door--l { left: 0; transform-origin: 0 50%; background-position: 0 0; }
.intro__door--r { right: 0; transform-origin: 100% 50%; background-position: 100% 0; }

.intro__door::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100vw;
}

.intro__door--l::before { left: 0; }
.intro__door--r::before { right: 0; }

/* Liseré central doré */
.intro__door::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold-300) 15%, var(--gold-50) 50%, var(--gold-300) 85%, transparent);
  box-shadow: 0 0 18px rgba(240, 214, 138, .55);
}

.intro__door--l::after { right: 0; }
.intro__door--r::after { left: 0; }

/* Panneau mouluré en arche sur chaque porte */
.intro__panel {
  position: absolute;
  top: max(22px, calc(var(--safe-t) + 14px));
  bottom: max(22px, calc(var(--safe-b) + 14px));
  border: 1px solid rgba(240, 214, 138, .5);
  border-radius: 1000px 1000px 6px 6px;
}

.intro__panel::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(240, 214, 138, .2);
  border-radius: inherit;
}

.intro__door--l .intro__panel { left: 18px; right: 14px; }
.intro__door--r .intro__panel { right: 18px; left: 14px; }

.intro__light {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 60vw;
  margin-left: -30vw;
  background: radial-gradient(50% 60% at 50% 50%, rgba(255, 244, 201, .9), rgba(240, 214, 138, .35) 40%, transparent 70%);
  opacity: 0;
  transform: scaleX(.02);
  pointer-events: none;
  mix-blend-mode: screen;
}

.intro__stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 5vh, 44px);
  padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 24px);
  transition: opacity .9s ease, transform 1.2s var(--ease-io), filter .9s ease;
}

.intro__emblem {
  position: relative;
  width: min(78vw, 48vh, 360px);
  aspect-ratio: 1;
}

.intro__emblem .rays { width: 200%; height: 200%; left: -50%; top: -50%; margin: 0; opacity: 0; transition: opacity 2s ease .6s; }
.intro.is-ready .intro__emblem .rays { opacity: 1; }

.intro__logo {
  position: relative;
  width: 100%;
  filter: drop-shadow(0 0 22px rgba(226, 191, 98, .25));
}

.intro__logo::before {
  content: "";
  position: absolute;
  inset: -7%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(12, 36, 140, .97) 60%, rgba(12, 36, 140, .7) 66%, rgba(12, 36, 140, 0) 71%);
}

.intro__btn {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease 1.9s, transform 1.2s var(--ease-out) 1.9s;
}

.intro__hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(9, 28, 118, .95) 70%, rgba(9, 28, 118, 0));
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ivory-soft);
  opacity: 0;
  transition: opacity 1s ease 2.4s;
}

.intro__hint svg { width: 20px; height: 20px; color: var(--gold-300); animation: bob 2.4s ease-in-out infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-4px) rotate(6deg); }
}

.intro.is-ready .intro__btn { opacity: 1; transform: none; }
.intro.is-ready .intro__hint { opacity: 1; }

/* Ouverture */
.intro.is-opening .intro__stage {
  opacity: 0;
  transform: scale(1.18);
  filter: blur(3px);
  transition-delay: 0s;
}

.intro.is-opening .intro__light { animation: light 1.7s var(--ease-io) .15s forwards; }

@keyframes light {
  0% { opacity: 0; transform: scaleX(.02); }
  35% { opacity: 1; transform: scaleX(.35); }
  100% { opacity: 0; transform: scaleX(1.6); }
}

.intro.is-opening .intro__door { transition-delay: .35s, .35s, 1.6s; filter: brightness(.55); }
.intro.is-opening .intro__door--l { transform: rotateY(88deg); opacity: 0; }
.intro.is-opening .intro__door--r { transform: rotateY(-88deg); opacity: 0; }
.intro.is-done { visibility: hidden; pointer-events: none; }

/* =========================================================
   Page
   ========================================================= */
.page {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 var(--gutter) calc(104px + var(--safe-b));
  transition: transform 2.2s var(--ease-out) .35s, opacity 1.6s ease .35s;
}

body.is-locked .page { transform: scale(1.07); opacity: .55; }

.sec {
  position: relative;
  padding-top: clamp(64px, 16vw, 104px);
  text-align: center;
}

.sec__head { margin-bottom: clamp(26px, 6vw, 38px); }

.kicker {
  font-family: var(--f-caps);
  font-weight: 600;
  font-size: clamp(.82rem, 3.4vw, .98rem);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-200);
  margin-bottom: .55em;
  padding-left: .28em;
}

.script-title {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(3.3rem, 15.5vw, 5rem);
  line-height: 1.12;
  padding: .1em 0 .14em;
  margin: -.1em 0 -.14em;
}

.script-title .foil,
.name .foil {
  padding: .12em .32em .18em;
  margin: -.12em -.32em -.18em;
}

.sec__intro {
  margin-top: 14px;
  font-size: clamp(1.3rem, 5.4vw, 1.6rem);
  font-weight: 600;
  color: var(--ivory);
  line-height: 1.35;
  text-wrap: balance;
}

.sec__intro strong { color: var(--gold-200); }

/* ---------- Cartes ---------- */
.card {
  position: relative;
  padding: clamp(30px, 8vw, 50px) clamp(18px, 5.4vw, 42px);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(22, 56, 170, .7) 0%, rgba(12, 36, 140, .78) 45%, rgba(9, 28, 116, .86) 100%);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 40px 90px -40px rgba(0, 0, 0, .85),
    0 0 0 1px rgba(7, 22, 100, .4);
}

.card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line-soft);
  border-radius: inherit;
  pointer-events: none;
}

.card__corner {
  position: absolute;
  width: clamp(48px, 13vw, 66px);
  height: clamp(48px, 13vw, 66px);
  pointer-events: none;
  opacity: .95;
}

.card__corner svg { width: 100%; height: 100%; overflow: visible; }
.card__corner--tl { top: 4px; left: 4px; }
.card__corner--tr { top: 4px; right: 4px; transform: scaleX(-1); }
.card__corner--bl { bottom: 4px; left: 4px; transform: scaleY(-1); }
.card__corner--br { bottom: 4px; right: 4px; transform: scale(-1, -1); }

/* Carte en arche (faire-part) */
.card--arch {
  border-radius: 1000px 1000px 8px 8px;
  overflow: hidden;
  padding-left: clamp(24px, 6.6vw, 48px);
  padding-right: clamp(24px, 6.6vw, 48px);
  --logo: clamp(156px, 46vw, 210px);
  --pad-top: clamp(26px, 7vw, 40px);
  --gap-lg: clamp(26px, 7vw, 38px);
  --gap-md: clamp(18px, 5vw, 26px);
  padding-top: var(--pad-top);
  padding-bottom: clamp(44px, 12vw, 64px);
  isolation: isolate;
}

.card--arch::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: inherit;
  border: 1px solid rgba(226, 191, 98, .12);
  pointer-events: none;
}

.card__apex {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  color: var(--gold-100);
  fill: var(--gold-100);
  filter: drop-shadow(0 0 8px rgba(255, 240, 190, .9));
  z-index: 2;
}

.card__apex svg { width: 100%; height: 100%; animation: twinkle 3.2s ease-in-out infinite; }

.rays--hero {
  top: calc(var(--pad-top) + var(--logo) / 2);
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  z-index: -1;
  opacity: .9;
}

/* ---------- Section 1 : faire-part ---------- */
.sec--hero {
  padding-top: calc(var(--safe-t) + clamp(18px, 5vw, 40px));
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__logo {
  width: var(--logo);
  margin: 0 auto var(--gap-lg);
}

.gp {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .8em;
  font-size: clamp(.95rem, 4.7vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--gold-100);
}

.gp__name { flex: 0 0 auto; white-space: nowrap; }
.gp__name--l { text-align: left; }
.gp__name--r { text-align: right; }

.divider {
  width: min(78%, 280px);
  margin: clamp(16px, 4.4vw, 24px) auto;
  aspect-ratio: 10 / 1;
}

.divider svg { width: 100%; height: 100%; overflow: visible; }
.divider--sm { width: min(52%, 190px); margin-top: clamp(14px, 4vw, 22px); margin-bottom: clamp(10px, 3vw, 16px); }

.parents {
  font-weight: 700;
  font-size: clamp(1.75rem, 8vw, 2.4rem);
  line-height: 1.15;
  color: var(--ivory);
  letter-spacing: .01em;
}

.amp {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: 1.12em;
  color: var(--gold-200);
  padding: 0 .08em;
}

.siblings {
  margin-top: .22em;
  font-weight: 600;
  font-size: clamp(1.4rem, 6.1vw, 1.8rem);
  color: var(--ivory-soft);
}

.lead {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 5.5vw, 1.6rem);
  line-height: 1.3;
  color: var(--ivory-soft);
  text-wrap: balance;
}

/* Rythme vertical du faire-part : espaces larges entre les blocs, serrés à l'intérieur */
.card--arch .gp + .divider { margin: var(--gap-md) auto; }
.siblings + .lead { margin-top: var(--gap-lg); }
.card--arch .event { margin: .34em 0 .38em; }
.card--arch .event + .lead { margin-bottom: .55em; }
.card--arch .name { margin-bottom: -.3em; }
.card--arch .name-he { margin-top: 0; }
.card--arch .divider--sm { margin: var(--gap-md) auto; }

.event {
  margin: .28em 0 .32em;
  font-family: var(--f-caps);
  font-weight: 600;
  font-size: clamp(1.7rem, 8.2vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: .12em;
  padding-left: .12em;
  white-space: nowrap;
}

.name {
  position: relative;
  display: inline-block;
  margin: .02em auto 0;
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(4.6rem, 23.5vw, 8rem);
  line-height: 1.12;
  padding: .1em .3em .12em;
  margin-top: -.08em;
  margin-bottom: -.1em;
  isolation: isolate;
}

.name::before {
  content: "";
  position: absolute;
  left: 8%; right: 8%;
  top: 22%; bottom: 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(226, 191, 98, .22), transparent);
  pointer-events: none;
  z-index: -1;
}

.name:focus { outline: none; }

.spark {
  position: absolute;
  width: 18px;
  height: 18px;
  fill: var(--gold-50);
  filter: drop-shadow(0 0 6px rgba(255, 244, 201, .95));
  opacity: 0;
  pointer-events: none;
}

.spark svg { width: 100%; height: 100%; }
.spark--1 { top: 12%; left: 4%; width: 16px; height: 16px; }
.spark--2 { top: 4%; right: 10%; width: 22px; height: 22px; }
.spark--3 { bottom: 16%; right: 0; width: 13px; height: 13px; }
.spark--4 { bottom: 4%; left: 24%; width: 11px; height: 11px; }

.name.is-in .spark { animation: twinkle 3.4s ease-in-out infinite; }
.name.is-in .spark--1 { animation-delay: 2.2s; }
.name.is-in .spark--2 { animation-delay: 2.9s; }
.name.is-in .spark--3 { animation-delay: 3.6s; }
.name.is-in .spark--4 { animation-delay: 4.3s; }

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); }
  45% { opacity: 1; transform: scale(1) rotate(45deg); }
  70% { opacity: .2; transform: scale(.6) rotate(80deg); }
}

.card__apex svg { animation-name: apex; }
@keyframes apex {
  0%, 100% { opacity: .75; transform: scale(.85) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.1) rotate(45deg); }
}

.name-he {
  margin-top: -.08em;
  font-family: var(--f-he);
  font-weight: 500;
  font-size: clamp(2.5rem, 11.5vw, 3.6rem);
  line-height: 1.1;
  color: var(--gold-200);
  letter-spacing: .04em;
  text-shadow: 0 0 24px rgba(226, 191, 98, .3);
}

.memorial {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 22em;
  margin: 0 auto;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.02rem, 4.2vw, 1.2rem);
  line-height: 1.3;
  color: var(--ivory-soft);
  text-align: center;
  text-wrap: balance;
  gap: 8px;
}

.memorial strong { font-weight: 700; color: var(--ivory); font-style: italic; }

.candle { flex: 0 0 auto; width: 16px; height: 31px; overflow: visible; }

.candle__flame {
  transform-origin: 12px 17px;
  transform-box: view-box;
  animation: flicker 2.6s ease-in-out infinite;
}

.candle__glow {
  transform-origin: 12px 13px;
  transform-box: view-box;
  animation: glow 2.6s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  20% { transform: scale(.94, 1.06) skewX(-2deg); }
  40% { transform: scale(1.04, .95) skewX(2deg); }
  60% { transform: scale(.97, 1.04) skewX(-1deg); }
  80% { transform: scale(1.02, .98) skewX(1.5deg); }
}

@keyframes glow {
  0%, 100% { opacity: .85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ---------- Section 2 : compte à rebours ---------- */
.cd {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2.6vw, 16px);
}

.cd__unit { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }

.cd__tile {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.6;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 48%, rgba(0, 0, 0, .14) 52%, rgba(0, 0, 0, .05)),
    linear-gradient(160deg, rgba(44, 94, 226, .55), rgba(10, 30, 120, .85));
  box-shadow:
    inset 0 0 0 1px var(--line),
    inset 0 1px 0 rgba(255, 240, 190, .25),
    0 18px 34px -18px rgba(0, 0, 0, .8);
  overflow: hidden;
}

.cd__tile::before {
  content: "";
  position: absolute;
  left: 8px; right: 8px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 191, 98, .35), transparent);
}

.cd__tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 244, 201, .16) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: tileShine 6s ease-in-out infinite;
}

.cd__unit:nth-child(2) .cd__tile::after { animation-delay: .25s; }
.cd__unit:nth-child(3) .cd__tile::after { animation-delay: .5s; }
.cd__unit:nth-child(4) .cd__tile::after { animation-delay: .75s; }

@keyframes tileShine {
  0%, 70% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.cd__num {
  display: flex;
  justify-content: center;
  font-family: var(--f-caps);
  font-weight: 600;
  font-size: clamp(1.75rem, 8.6vw, 3rem);
  line-height: 1;
  color: var(--gold-100);
  filter: drop-shadow(0 0 10px rgba(226, 191, 98, .35));
}

.d {
  position: relative;
  display: inline-block;
  width: .72em;
  height: 1.15em;
  line-height: 1.15em;
  overflow: hidden;
  text-align: center;
}

.d__v { display: block; }
.d__v--in { animation: dIn .62s var(--ease-out) both; }
.d__v--out { position: absolute; inset: 0; animation: dOut .62s var(--ease-out) both; }

@keyframes dIn {
  from { transform: translateY(85%) scale(.9); opacity: 0; filter: blur(2px); }
  to   { transform: none; opacity: 1; filter: none; }
}

@keyframes dOut {
  from { transform: none; opacity: 1; }
  to   { transform: translateY(-85%) scale(.9); opacity: 0; filter: blur(2px); }
}

.cd__lbl {
  font-weight: 700;
  font-size: clamp(1rem, 4.3vw, 1.2rem);
  color: var(--ivory-soft);
  letter-spacing: .02em;
}

.cd__caption {
  margin-top: clamp(22px, 6vw, 30px);
  text-wrap: balance;
  font-style: italic;
  font-size: clamp(1.25rem, 5.2vw, 1.5rem);
  color: var(--ivory-soft);
}

.cd__done {
  margin-top: 22px;
  font-family: var(--f-script);
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  color: var(--gold-200);
}

/* ---------- Section 3 : réception ---------- */
.card--frame { padding-top: clamp(48px, 13vw, 72px); padding-bottom: clamp(48px, 13vw, 72px); }

.info { display: grid; gap: 0; }

.info__item {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: clamp(26px, 7vw, 36px) 0;
}

.info__item:first-child { padding-top: clamp(8px, 2vw, 12px); }

.info__item + .info__item {
  background: linear-gradient(90deg, transparent, rgba(226, 191, 98, .4), transparent) top / 70% 1px no-repeat;
}

.info__ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  margin-bottom: 10px;
  color: var(--gold-200);
  background: radial-gradient(circle at 50% 30%, rgba(226, 191, 98, .2), rgba(226, 191, 98, .04));
  box-shadow: inset 0 0 0 1px var(--line);
}

.info__ico svg { width: 24px; height: 24px; }

.info__lbl {
  font-family: var(--f-caps);
  font-weight: 600;
  font-size: clamp(.85rem, 3.5vw, 1rem);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-300);
  padding-left: .26em;
}

.info__val {
  font-weight: 700;
  font-size: clamp(1.45rem, 6.2vw, 1.85rem);
  line-height: 1.25;
  color: var(--ivory);
}

.info__val--place {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(2.4rem, 11vw, 3.2rem);
  line-height: 1.15;
  color: var(--gold-100);
}

/* ---------- Boutons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7em;
  min-height: 58px;
  padding: 16px 32px;
  border: 0;
  border-radius: 999px;
  font-family: var(--f-caps);
  font-weight: 700;
  font-size: clamp(.92rem, 3.8vw, 1.05rem);
  letter-spacing: .16em;
  line-height: 1.15;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition: transform .35s var(--ease-out), box-shadow .35s ease, background-position .8s ease;
}

.btn:active { transform: scale(.97); }
.btn svg { width: 22px; height: 22px; flex: 0 0 auto; }

.btn--gold {
  color: var(--blue-900);
  background: linear-gradient(120deg, #B48A2C 0%, #EED27F 22%, #FFF6D2 40%, #E6C467 58%, #C49A33 78%, #F3DB92 100%);
  background-size: 180% 100%;
  box-shadow:
    0 14px 34px -12px rgba(226, 191, 98, .65),
    inset 0 1px 0 rgba(255, 255, 255, .7),
    inset 0 -2px 0 rgba(120, 85, 20, .35);
}

.btn--gold::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .85) 50%, transparent 58%) no-repeat;
  background-size: 300% 100%;
  background-position: 100% 0;
  animation: sweep 4.2s ease-in-out infinite 2.4s;
}

@keyframes sweep {
  0%, 62% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}

@media (hover: hover) {
  .btn--gold:hover { background-position: 100% 0; box-shadow: 0 18px 40px -12px rgba(226, 191, 98, .8), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(120, 85, 20, .35); }
  .btn--outline:hover, .btn--waze:hover { background: rgba(226, 191, 98, .14); }
}

.btn:focus-visible { outline: 2px solid var(--gold-100); outline-offset: 4px; }

.intro__btn {
  min-height: 64px;
  padding: 18px 40px;
  font-size: clamp(1rem, 4.4vw, 1.15rem);
}

.intro__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid var(--gold-200);
  opacity: 0;
  animation: ripple 2.8s cubic-bezier(.2, .6, .3, 1) infinite 2.8s;
  z-index: -2;
  pointer-events: none;
}

@keyframes ripple {
  0% { opacity: .9; transform: scale(1, 1); }
  100% { opacity: 0; transform: scale(1.14, 1.5); }
}

/* le halo doit déborder du bouton */
.intro__btn { overflow: visible; }

.btn--block { width: 100%; }

.btn--waze,
.btn--outline {
  color: var(--gold-100);
  background: rgba(226, 191, 98, .06);
  box-shadow: inset 0 0 0 1.5px var(--gold-300), 0 12px 30px -16px rgba(0, 0, 0, .7);
}

.btn--waze { margin-top: clamp(22px, 6vw, 32px); min-height: 54px; padding: 14px 26px; font-size: clamp(.86rem, 3.6vw, .98rem); }
.btn--waze svg { width: 20px; height: 20px; color: var(--gold-200); }

.btn__ico { transition: transform .4s var(--ease-out); }
.btn__spin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  border: 2.5px solid rgba(10, 32, 130, .25);
  border-top-color: var(--blue-900);
  opacity: 0;
}

.btn.is-loading .btn__label,
.btn.is-loading .btn__ico { opacity: 0; }
.btn.is-loading .btn__spin { opacity: 1; animation: spin .8s linear infinite; }
.btn.is-loading { pointer-events: none; }

/* ---------- Section 4 : RSVP ---------- */
.card--form { text-align: left; transition: height .7s var(--ease-out); }

.form { transition: opacity .45s ease, transform .6s var(--ease-out); }
.form.is-leaving { opacity: 0; transform: translateY(-14px) scale(.98); }

.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }

.field__lbl {
  display: block;
  margin-bottom: 10px;
  padding: 0;
  font-weight: 700;
  font-size: clamp(1.2rem, 5vw, 1.4rem);
  line-height: 1.25;
  color: var(--gold-100);
}

.field__date { color: var(--ivory); font-weight: 700; }

.input {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: max(16px, clamp(1.2rem, 5vw, 1.35rem));
  line-height: 1.3;
  color: var(--ivory);
  background: rgba(6, 20, 92, .55);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 10px rgba(0, 0, 0, .25);
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow .3s ease, background-color .3s ease;
}

.input::placeholder { color: rgba(247, 241, 225, .45); }

.input:focus {
  outline: none;
  background: rgba(10, 30, 120, .75);
  box-shadow: inset 0 0 0 1.5px var(--gold-200), 0 0 0 4px rgba(226, 191, 98, .18);
}

.input--area { min-height: 110px; resize: vertical; }

.field.is-invalid .input,
.field.is-invalid .opt__box { box-shadow: inset 0 0 0 1.5px #FF9E8C; }

.field__err {
  margin-top: 8px;
  font-style: italic;
  font-weight: 600;
  font-size: 1.1rem;
  color: #FFB8A8;
  min-height: 0;
}

.field__err:empty { display: none; }

.opts { display: grid; gap: 12px; }

.opt { position: relative; display: block; cursor: pointer; }

.opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.opt__box {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: clamp(1.2rem, 5vw, 1.35rem);
  line-height: 1.22;
  color: var(--ivory);
  background: rgba(6, 20, 92, .45);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background .35s ease, box-shadow .35s ease, transform .35s var(--ease-out);
}

.opt:active .opt__box { transform: scale(.985); }

.opt__dot {
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--gold-300);
}

.opt__dot::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF6D2, var(--gold-400));
  transform: scale(0);
  transition: transform .4s var(--ease-back);
}

.opt input:checked + .opt__box {
  background: linear-gradient(135deg, rgba(226, 191, 98, .26), rgba(226, 191, 98, .07));
  box-shadow: inset 0 0 0 1.5px var(--gold-200), 0 12px 30px -14px rgba(226, 191, 98, .55);
}

.opt input:checked + .opt__box .opt__dot::after { transform: scale(1); }
.opt input:focus-visible + .opt__box { outline: 2px solid var(--gold-100); outline-offset: 3px; }

/* Bloc conditionnel adultes / enfants */
.collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .7s var(--ease-out), opacity .5s ease, margin .7s var(--ease-out);
}

.collapse__inner { min-height: 0; overflow: hidden; }

.collapse.is-open { grid-template-rows: 1fr; opacity: 1; margin-bottom: 22px; }

.guests {
  padding: 18px 16px 6px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(226, 191, 98, .12), rgba(226, 191, 98, .03));
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.guests__title {
  margin-bottom: 14px;
  font-family: var(--f-caps);
  font-weight: 600;
  font-size: clamp(.85rem, 3.5vw, .98rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-200);
  text-align: center;
}

.guests__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field--sm { margin-bottom: 14px; }
.field--sm .field__lbl { font-size: clamp(1.05rem, 4.4vw, 1.25rem); text-align: center; }
.guests .field__err { margin: -4px 0 14px; text-align: center; }

.select { position: relative; }
.select .input {
  padding-right: 44px;
  text-align: center;
  text-align-last: center;
  font-family: var(--f-caps);
  font-size: max(16px, clamp(1.35rem, 5.6vw, 1.6rem));
  cursor: pointer;
}

.select .input option { color: var(--blue-900); background: #fff; }

.select svg {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  color: var(--gold-200);
  pointer-events: none;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__alert:empty { display: none; }
.form__alert {
  margin: -4px 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.15rem;
  color: #FFD3C9;
  background: rgba(255, 120, 100, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 158, 140, .45);
  text-align: center;
}

.form__note {
  margin-top: 14px;
  text-align: center;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(247, 241, 225, .62);
}

/* Remerciements */
.thanks { text-align: center; padding: 6px 0 4px; outline: none; }

.thanks__seal { width: 112px; height: 112px; margin: 0 auto 16px; overflow: visible; }

.thanks__ring {
  fill: none;
  stroke: url(#gGold);
  stroke-width: 1.6;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
}

.thanks__ring--in { stroke-width: .8; stroke-dasharray: 296; stroke-dashoffset: 296; }

.thanks__check {
  fill: none;
  stroke: var(--gold-100);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  filter: drop-shadow(0 0 6px rgba(255, 240, 190, .7));
}

.thanks.is-in .thanks__ring { animation: draw 1.4s var(--ease-out) forwards; }
.thanks.is-in .thanks__ring--in { animation-delay: .15s; }
.thanks.is-in .thanks__check { animation: draw .9s var(--ease-out) .7s forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }

.thanks > *:not(.thanks__seal) { opacity: 0; transform: translateY(14px); }
.thanks.is-in > *:not(.thanks__seal) { animation: up 1s var(--ease-out) forwards; }
.thanks.is-in > :nth-child(2) { animation-delay: .5s; }
.thanks.is-in > :nth-child(3) { animation-delay: .7s; }
.thanks.is-in > :nth-child(4) { animation-delay: .9s; }
.thanks.is-in > :nth-child(5) { animation-delay: 1.05s; }
.thanks.is-in > :nth-child(6) { animation-delay: 1.2s; }

@keyframes up { to { opacity: 1; transform: none; } }

.thanks__title {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(3rem, 14vw, 4.2rem);
  line-height: 1.15;
  margin: 2px 0 10px;
}

.thanks__title .foil { padding: .1em .3em .16em; margin: -.1em -.3em -.16em; }

.thanks__msg {
  font-weight: 600;
  font-size: clamp(1.25rem, 5.2vw, 1.5rem);
  line-height: 1.4;
  color: var(--ivory);
  text-wrap: balance;
}

.thanks__sum {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.thanks__sum:empty { display: none; }

.chip {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--f-caps);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .08em;
  color: var(--gold-100);
  box-shadow: inset 0 0 0 1px var(--line);
  background: rgba(226, 191, 98, .08);
}

.thanks__note {
  margin-top: 18px;
  text-wrap: balance;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.4;
  color: rgba(247, 241, 225, .7);
}

/* ---------- Section 5 : footer ---------- */
.foot {
  padding-top: clamp(70px, 18vw, 110px);
  text-align: center;
}

.foot .divider { margin-bottom: clamp(30px, 8vw, 44px); }

.foot__logo { width: 156px; margin: 0 auto 22px; }

.foot__q {
  font-style: italic;
  font-size: clamp(1.25rem, 5.2vw, 1.5rem);
  line-height: 1.3;
  color: var(--ivory-soft);
  text-wrap: balance;
}

.foot__t {
  margin: 6px 0 24px;
  font-weight: 700;
  font-size: clamp(1.3rem, 5.4vw, 1.55rem);
  line-height: 1.3;
  color: var(--gold-100);
  text-wrap: balance;
}

.btn--outline { padding: 16px 26px; font-size: clamp(.82rem, 3.5vw, .95rem); letter-spacing: .12em; }
.btn--outline svg { width: 20px; height: 20px; }

/* ---------- UI flottante ---------- */
.scroll-hint {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 18px);
  z-index: 50;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--gold-100);
  background: rgba(9, 28, 118, .82);
  box-shadow: inset 0 0 0 1px var(--line), 0 8px 24px -6px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .8s ease, transform .8s var(--ease-out);
}

.scroll-hint svg { width: 24px; height: 24px; margin-top: 2px; animation: nudge 1.8s ease-in-out infinite; }
.scroll-hint.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

@keyframes nudge {
  0%, 100% { transform: translateY(-2px); opacity: .75; }
  50% { transform: translateY(4px); opacity: 1; }
}

.music {
  position: fixed;
  right: calc(var(--safe-r) + 14px);
  bottom: calc(var(--safe-b) + 14px);
  z-index: 60;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--gold-200);
  background: radial-gradient(circle at 50% 30%, rgba(36, 82, 220, .95), rgba(8, 26, 110, .95));
  box-shadow: inset 0 0 0 1.5px var(--gold-300), 0 10px 26px -8px rgba(0, 0, 0, .8), 0 0 22px rgba(226, 191, 98, .2);
  animation: popIn .8s var(--ease-back) both;
  touch-action: manipulation;
}

.music:focus-visible { outline: 2px solid var(--gold-100); outline-offset: 3px; }

@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: none; opacity: 1; } }

.music__bars { display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.music__bars i {
  display: block;
  width: 3.5px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-50), var(--gold-400));
  transform-origin: bottom;
  animation: eq 1s ease-in-out infinite;
}

.music__bars i:nth-child(2) { animation-duration: .8s; animation-delay: -.3s; }
.music__bars i:nth-child(3) { animation-duration: 1.15s; animation-delay: -.5s; }
.music__bars i:nth-child(4) { animation-duration: .9s; animation-delay: -.15s; }

@keyframes eq {
  0%, 100% { transform: scaleY(.25); }
  50% { transform: scaleY(1); }
}

.music__off { display: none; position: relative; width: 24px; height: 24px; }
.music__off svg { width: 100%; height: 100%; }
.music__off::after {
  content: "";
  position: absolute;
  left: -3px; right: -3px;
  top: 50%;
  height: 2px;
  background: var(--gold-200);
  transform: rotate(-45deg);
  border-radius: 2px;
}

.music.is-off .music__bars { display: none; }
.music.is-off .music__off { display: block; }

/* =========================================================
   Visuels de la salle
   ========================================================= */

/* Bandeau photo (jardin tropical) derrière le compte à rebours */
.sec--photo {
  isolation: isolate;
  padding-bottom: clamp(76px, 20vw, 120px);
}

.photo-band {
  position: absolute;
  z-index: -1;
  top: clamp(8px, 3vw, 24px);
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 76%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 76%, transparent 100%);
}

.photo-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 60% at 50% 45%, rgba(8, 26, 110, .18), rgba(8, 26, 110, .62)),
    linear-gradient(180deg, rgba(10, 32, 130, .38), rgba(10, 32, 130, .5));
}

.photo-band__img {
  position: absolute;
  left: 0;
  top: -12%;
  width: 100%;
  height: 124%;
  object-fit: cover;
  object-position: 50% 62%;
  filter: saturate(.85) brightness(1.08);
  opacity: 0;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.06);
  transition: opacity 1.8s ease;
  will-change: transform;
}

.photo-band.is-loaded .photo-band__img { opacity: 1; }

/* Fenêtre en arche (dîner de gala) */
.venue {
  position: relative;
  width: min(86%, 430px);
  margin: 0 auto clamp(30px, 8vw, 44px);
}

.venue__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 1000px 1000px 10px 10px;
  overflow: hidden;
  isolation: isolate;
  background: var(--blue-800);
  box-shadow:
    0 0 0 1px var(--gold-300),
    0 0 0 7px rgba(10, 32, 130, .9),
    0 0 0 8px rgba(226, 191, 98, .45),
    0 0 60px -6px rgba(226, 191, 98, .28),
    0 44px 80px -30px rgba(0, 0, 0, .9);
}

.venue__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(0deg, rgba(8, 26, 110, .6), transparent 34%),
    radial-gradient(120% 70% at 50% 30%, transparent 55%, rgba(8, 26, 110, .45));
  pointer-events: none;
}

.venue__frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(255, 244, 201, .5);
  border-radius: inherit;
  pointer-events: none;
}

.venue__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
  transform: scale(1.18);
  transition: transform 2.8s var(--ease-out);
}

.venue.is-in .venue__img {
  transform: scale(1.04);
  animation: kenburns 28s ease-in-out 2.8s infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.14) translate3d(-3%, 1.5%, 0); }
}

.venue__shine {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 244, 201, .26) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%;
  background-position: 130% 0;
  pointer-events: none;
}

.venue.is-in .venue__shine { animation: shine 10s ease-in-out 1.6s infinite; }

@keyframes shine {
  0% { background-position: 130% 0; }
  28%, 100% { background-position: -30% 0; }
}

[data-reveal="venue"] { transform: translate3d(0, 34px, 0) scale(.96); }

/* Reflet doré qui parcourt lentement le cadre */
@property --glint {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.glint {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 1.5px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(from var(--glint),
      transparent 0deg 290deg,
      rgba(255, 244, 201, .25) 312deg,
      rgba(255, 248, 220, 1) 336deg,
      rgba(255, 244, 201, .25) 352deg,
      transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: glint 11s linear infinite;
}

.has-houdini .glint { opacity: .9; }
.venue__frame .glint { inset: 9px; animation-duration: 13s; animation-delay: -4s; }

@keyframes glint { to { --glint: 360deg; } }

/* =========================================================
   Révélations au défilement
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 1.1s ease var(--d, 0ms),
    transform 1.4s var(--ease-out) var(--d, 0ms),
    filter 1.4s var(--ease-out) var(--d, 0ms);
}

[data-reveal="zoom"] { transform: scale(.9); }
[data-reveal="rise"] { transform: translate3d(0, 18px, 0) scale(.94); letter-spacing: .3em; transition-property: opacity, transform, letter-spacing; transition-duration: 1.1s, 1.4s, 1.8s; transition-timing-function: ease, var(--ease-out), var(--ease-out); transition-delay: var(--d, 0ms); }
[data-reveal="blur"] { transform: scale(1.08); filter: blur(10px); }
[data-reveal="draw"] { transform: none; opacity: 1; }
[data-reveal="draw"] svg { clip-path: inset(0 50% 0 50%); transition: clip-path 1.8s var(--ease-out) var(--d, 0ms); }
[data-reveal="draw"].is-in svg { clip-path: inset(0 0 0 0); }

[data-reveal="write"] {
  opacity: 1;
  transform: none;
  -webkit-mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
  mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
  -webkit-mask-size: 260% 100%;
  mask-size: 260% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  transition: -webkit-mask-position 2.6s cubic-bezier(.45, .05, .25, 1) var(--d, 0ms), mask-position 2.6s cubic-bezier(.45, .05, .25, 1) var(--d, 0ms);
}

[data-reveal].is-in { opacity: 1; transform: none; filter: none; }
[data-reveal="rise"].is-in { letter-spacing: .12em; }
[data-reveal="write"].is-in { -webkit-mask-position: 0 0; mask-position: 0 0; }

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 600px) {
  .page { padding-left: 24px; padding-right: 24px; }
  .card { padding-left: 46px; padding-right: 46px; }
}

@media (max-width: 350px) {
  .guests__grid { gap: 8px; }
  .guests { padding-left: 10px; padding-right: 10px; }
  .btn { letter-spacing: .1em; padding-left: 22px; padding-right: 22px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .intro__emblem { width: min(40vh, 220px); }
  .intro__stage { gap: 14px; }
}

/* =========================================================
   Mouvement réduit
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .4s !important;
    transition-delay: 0s !important;
  }
  .rays, .foil, .bg__img, .bg__glow, .venue__img { animation: none !important; }
  .glint, .venue__shine, .logo__shine { display: none; }
  .photo-band__img { transform: scale(1.06); }
  [data-reveal] { transform: none !important; filter: none !important; -webkit-mask: none !important; mask: none !important; }
  [data-reveal="draw"] svg { clip-path: none !important; }
  .intro.is-opening .intro__door--l,
  .intro.is-opening .intro__door--r { transform: none; }
  body.is-locked .page { transform: none; }
}
