/* =========================================================
   Bat Mitsvah de Keren SAADA — style.css
   ========================================================= */

:root {
  --paper: #fbf3f0;
  --blush: #f6e0e4;
  --rose: #a8164f;
  --rose-light: #f2b3c6;
  --plum: #3d1a57;
  --plum-dark: #2c1140;
  --lilac: #e9def0;
  --ink: #2a1735;
  --ink-soft: #4a2a5e;
  --line: rgba(61, 26, 87, .22);
  --gold: #c39a3e;
  --gold-deep: #8f6819;
  --gold-light: #f1d78f;
  --gold-line: rgba(176, 134, 48, .55);
  /* or poli : reflets clairs et ombres chaudes */
  --gold-grad: linear-gradient(115deg, #a57a22 0%, #d9b45c 26%, #f7e6a6 45%, #c99c3d 63%, #9b711e 82%, #cfa850 100%);
  --gold-text: linear-gradient(180deg, #c69530 0%, #f2d585 36%, #c08f2e 54%, #8c6216 100%);

  --f-display: "Cormorant Garamond", "Garamond", Georgia, serif;
  --f-script: "Pinyon Script", "Snell Roundhand", cursive;
  --f-body: "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --f-hebrew: "Frank Ruhl Libre", "Times New Roman", serif;


  /* Textures (SVG procédural, sans image) */
  --tex-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='.9' diffuseConstant='1.12'%3E%3CfeDistantLight azimuth='45' elevation='62'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23p)'/%3E%3C/svg%3E");
  --tex-satin: url("assets/img/satin-poster.jpg");

  --ease: cubic-bezier(.22, 1, .36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--blush);
}
html.locked,
html.locked body { overflow: hidden; height: 100%; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* grain papier */
/* fond rayé (celui de la réception), fixe, sur toute l'invitation */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--tex-paper), var(--blush);
  background-blend-mode: multiply, normal;
}
.page-bg::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -56px;
  right: -56px;
  background: repeating-linear-gradient(90deg, rgba(200, 40, 95, .07) 0 28px, transparent 28px 56px);
  animation: stripes-drift 22s linear infinite;
  will-change: transform;
}
@keyframes stripes-drift {
  to { transform: translate3d(56px, 0, 0); }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: .05;
  background-image: 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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }

/* ---------- Logo couronné (or et rose) ---------- */
/* la couronne et le monogramme sont deux images empilées : la couronne se pose sur le K S */
.logo-hero { position: relative; width: 112px; }
.logo-hero img { display: block; width: 100%; height: auto; }
.logo-hero .crown { transform-origin: 50% 100%; }
.logo-wrap.in .crown { animation: crown-drop 1.4s var(--ease) .5s both; }
@keyframes crown-drop {
  0% { opacity: 0; transform: translateY(-46px) scale(.72) rotate(-9deg); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
/* reflet de lumière qui glisse sur l'or */
.logo-hero .shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 252, 238, .9) 50%, transparent 62%) 160% 0 / 260% 100% no-repeat;
  -webkit-mask: url("assets/img/logo-or.webp") 0 0 / 100% 100% no-repeat;
  mask: url("assets/img/logo-or.webp") 0 0 / 100% 100% no-repeat;
  mix-blend-mode: soft-light;
}
.logo-wrap.in .shine { animation: shine 6s ease-in-out 1.9s infinite; }
@keyframes shine {
  0% { background-position: 160% 0; }
  30%, 100% { background-position: -60% 0; }
}
/* étincelles sur la couronne et sur le diamant du K */
.glint {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  pointer-events: none;
  background:
    radial-gradient(circle, #fff 0 1.5px, rgba(255, 255, 255, .7) 2.5px, transparent 5px),
    linear-gradient(transparent calc(50% - .6px), rgba(255, 255, 255, .95) 50%, transparent calc(50% + .6px)),
    linear-gradient(90deg, transparent calc(50% - .6px), rgba(255, 255, 255, .95) 50%, transparent calc(50% + .6px));
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%);
  mask: radial-gradient(circle, #000 20%, transparent 70%);
  transform: scale(0);
}
.glint.g1 { left: 50%; top: 2%; }
.glint.g2 { left: 44.5%; top: 58.5%; }
.logo-wrap.in .glint { animation: twinkle 3.6s ease-in-out 1.7s infinite; }
.logo-wrap.in .glint.g2 { animation-delay: 2.6s; }
@keyframes twinkle {
  0%, 100% { transform: scale(0) rotate(0); }
  12% { transform: scale(1.15) rotate(45deg); }
  26% { transform: scale(0) rotate(90deg); }
}

/* ---------- Pop-up d'ouverture ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  height: 100vh;
  height: 100dvh;
  --r: 0px;
  --cx: 50%;
  --cy: 50%;
  overflow: hidden;
  background: var(--blush) url("assets/img/intro-debut.jpg") center / cover no-repeat;
}
.intro-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.intro-loop { opacity: 0; }
.intro.looping .intro-loop { opacity: 1; }
/* l'iris : un cercle transparent qui s'ouvre depuis le K */
.intro.opening {
  -webkit-mask-image: radial-gradient(circle at var(--cx) var(--cy), transparent var(--r), #000 calc(var(--r) + 1px));
  mask-image: radial-gradient(circle at var(--cx) var(--cy), transparent var(--r), #000 calc(var(--r) + 1px));
}
.intro-ring {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  z-index: 3;
  width: calc(var(--r) * 2 + 3px);
  height: calc(var(--r) * 2 + 3px);
  border: 2px solid var(--gold-light);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(241, 215, 143, .75), inset 0 0 18px rgba(241, 215, 143, .45);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}
.intro.opening .intro-ring { opacity: var(--ring, 0); }

/* le bouton arrive quand le monogramme est formé */
.intro-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(9vh + var(--safe-b));
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity .9s ease, transform 1.1s var(--ease);
}
.intro.ready .intro-content { opacity: 1; transform: none; pointer-events: auto; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.intro.opening .intro-content { opacity: 0; transform: scale(1.18); transition: opacity .7s ease, transform 1.1s var(--ease); }
.intro.gone { display: none; }

/* l'invitation se pose doucement derrière l'iris */
main {
  transform-origin: 50% 40vh;
  transition: transform 1.7s var(--ease);
}
.pre-reveal main { transform: scale(1.08); }

/* ---------- Fond satin animé ---------- */
.bg-video {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.intro .bg-video { z-index: 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 14px 34px;
  border: 0;
  border-radius: 3px;
  font-family: var(--f-body);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--plum-dark);
  background: var(--gold-grad);
  background-size: 140% 100%;
  box-shadow: 0 8px 20px -10px rgba(110, 76, 14, .7), inset 0 1px 0 rgba(255, 248, 220, .7);
  cursor: pointer;
  transition: background-position .5s, transform .2s;
  touch-action: manipulation;
}
.btn:hover { background-position: 100% 0; }
.btn:active { transform: scale(.97); }

/* ---------- Bouton musique ---------- */
.music-btn {
  position: fixed;
  right: calc(16px + var(--safe-r));
  bottom: calc(16px + var(--safe-b));
  z-index: 40;
  width: 54px;
  height: 54px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-light);
  background: var(--plum);
  box-shadow: 0 6px 18px rgba(44, 17, 64, .3);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .4s, transform .5s var(--ease);
}
.music-btn.show { opacity: 1; transform: none; pointer-events: auto; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 3px; height: 100%; background: currentColor; transform-origin: bottom; animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.4s; }
.eq i:nth-child(3) { animation-delay: -.75s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.mute-ico { display: none; width: 24px; height: 24px; }
.music-btn.muted .eq { display: none; }
.music-btn.muted .mute-ico { display: block; }

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: 84px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(44px, 12.5vw, 66px);
  line-height: 1.1;
  color: var(--plum);
}
.title em { font-style: italic; }
/* filet doré sous les titres des sections roses */
.reception .title::after,
.rsvp .title::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 18px auto 0;
  background: var(--gold-grad);
}

/* ---------- SECTION 1 : Faire-part ---------- */
/* tient sur un seul écran : la hauteur est celle du téléphone (barres affichées),
   et script.js réduit légèrement le bloc si l'écran est trop court */
.faire-part {
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  padding: 22px 16px 54px;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.fp-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 100%;
  transform: scale(var(--fit, 1));
  transform-origin: 50% 50%;
}
/* phrase en hébreu en arc au-dessus du logo (image utilisée comme masque, colorée en CSS) */
.hebrew-arc {
  display: block;
  aspect-ratio: 840 / 239;
  background: currentColor;
  -webkit-mask: url("assets/img/hebreu-arc.png") center / contain no-repeat;
  mask: url("assets/img/hebreu-arc.png") center / contain no-repeat;
}
.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
  color: var(--plum);
}
.logo-wrap .hebrew-arc { width: 186px; }
.logo-wrap .logo-hero { margin-top: -20px; }

.grandparents {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 560px;
  font-size: clamp(10.5px, 2.85vw, 15px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft);
}
.gp p { white-space: nowrap; }
.gp b { font-weight: 500; }
.gp-left { text-align: left; }
.gp-right { text-align: right; }

.rule {
  width: 72px;
  height: 2px;
  margin: 13px auto;
  border: 0;
  background: var(--gold-grad);
}

.parents {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(24px, 6.4vw, 31px);
  line-height: 1.2;
  color: var(--plum);
  text-wrap: balance;
}
.siblings {
  margin-top: 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(24px, 6.4vw, 31px);
  line-height: 1.2;
  color: var(--plum);
  text-wrap: balance;
}
.lead {
  margin-top: 10px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(20px, 5.3vw, 24px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-soft);
}
.batmitsvah {
  margin: 0;
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(58px, 16.5vw, 100px);
  line-height: 1.2;
  color: var(--rose);
  white-space: nowrap;
}
.batmitsvah + .lead { margin-top: 2px; }

.name-block { margin-top: 4px; }
.keren {
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0 4px 2px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(76px, 21vw, 136px);
  line-height: 1;
  letter-spacing: .05em;
  color: var(--gold-deep);
}
/* KEREN en or poli */
.keren .l {
  display: inline-block;
  transform: translateY(105%);
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .7)) drop-shadow(0 3px 4px rgba(110, 72, 10, .28));
}
.keren.in .l {
  transform: none;
  transition: transform 1.1s var(--ease) calc(var(--i) * .08s);
}


.hebrew {
  margin-top: 2px;
  font-family: var(--f-hebrew);
  font-weight: 500;
  font-size: clamp(38px, 10.5vw, 56px);
  line-height: 1.1;
  color: var(--rose);
}

.memoriam {
  margin-top: 12px;
  max-width: 290px;
  text-wrap: balance;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink-soft);
}
.memoriam span { font-weight: 500; font-size: 16px; letter-spacing: .03em; opacity: .7; }

/* flèche « la suite est en dessous » */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: calc(10px + var(--safe-b));
  width: 44px;
  height: 44px;
  margin-left: -22px;
  display: grid;
  place-items: center;
  color: var(--rose);
  animation: hint 2.4s ease-in-out infinite;
}
.scroll-hint svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes hint {
  0%, 100% { transform: translateY(0); opacity: .75; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ---------- Fleurs ---------- */
.fleurs {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  height: auto;
  max-width: none;
}

.reception,
.rsvp { isolation: isolate; overflow: hidden; }
/* branche fleurie qui dépasse du bord, à côté du titre */
.fleurs-side {
  top: 8px;
  width: clamp(96px, 27vw, 150px);
  transform-origin: 50% 0;
}
.fleurs-side-r {
  right: -36px;
  transform: rotate(-10deg);
}
.fleurs-side-l {
  left: -36px;
  transform: scaleX(-1) rotate(-10deg);
}

/* ---------- Photos : slider ---------- */
.photos { padding: 22px 0 56px; }
.slider {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}
.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  outline: none;
}
.slides::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(92vw, 58svh, 520px);
  margin: 0;
  padding: 0 16px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border: 8px solid #fff;
  outline: 1px solid var(--gold-line);
  outline-offset: -5px;
  box-shadow: 0 12px 26px -14px rgba(44, 17, 64, .55), 0 0 0 1px rgba(195, 154, 62, .5);
}
.slide-nav {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(61, 26, 87, .9);
  border: 1.5px solid var(--gold);
  box-shadow: 0 6px 16px -6px rgba(44, 17, 64, .5);
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity .25s, transform .2s;
}
.slide-nav:active { transform: scale(.92); }
.slide-nav[disabled] { opacity: 0; pointer-events: none; }
.slide-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.slide-nav.prev { left: 6px; }
.slide-nav.next { right: 6px; }
@media (min-width: 600px) {
  .slide { padding: 0 64px; }
}

/* touches de fleurs posées sur le fond, au bord des sections roses */
.touche {
  position: absolute;
  z-index: -1;
  height: auto;
  max-width: none;
  pointer-events: none;
}
.t-rec-1 { top: 40%; left: -34px; width: 104px; transform: rotate(18deg); }
.t-rec-2 { top: 63%; right: -6px; width: 40px; transform: rotate(-16deg); }
.t-rec-3 { bottom: 70px; left: 2px; width: 46px; transform: rotate(12deg); }
.t-rsvp-1 { top: 150px; right: -10px; width: 58px; transform: rotate(-10deg); }
.t-rsvp-2 { bottom: 8px; left: -18px; width: 70px; transform: rotate(14deg); }
.t-rsvp-3 { bottom: 4px; right: 8px; width: 36px; transform: rotate(-24deg); }

/* ---------- SECTION 2 : Save the date ---------- */
.save {
  isolation: isolate;
  overflow: hidden;
  background: var(--plum) var(--tex-satin) center / cover no-repeat;
  color: var(--paper);
}
.save .title {
  background: linear-gradient(180deg, #fbebb4 0%, #e8c670 42%, #c39433 72%, #e3c06a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0 .08em;
}
.countdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 420px;
  margin-top: 40px;
  border-top: 1px solid rgba(241, 215, 143, .4);
}
.cd {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 0 22px;
  border-bottom: 1px solid rgba(241, 215, 143, .4);
}
.cd:nth-child(odd) { border-right: 1px solid rgba(241, 215, 143, .4); }
.num {
  font-family: var(--f-body);
  font-weight: 300;
  font-size: clamp(60px, 17vw, 76px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
}
.num.flip { animation: flip .5s var(--ease); }
@keyframes flip {
  from { opacity: 0; transform: translateY(-30%); }
  to { opacity: 1; transform: none; }
}
.unit {
  margin-top: 8px;
  font-size: 16px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rose-light);
}
.countdown-done {
  margin-top: 30px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 34px;
  color: var(--rose-light);
}

/* ---------- SECTION 3 : Réception ---------- */
.details {
  width: 100%;
  max-width: 440px;
  margin: 36px 0 0;
}
.details > div {
  padding: 20px 0;
  border-top: 1px solid var(--gold-line);
}
.details > div:last-child { border-bottom: 1px solid var(--gold-line); }
.details dt {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rose);
}
.details dd {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
}
.details .venue {
  display: block;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.2;
  margin-bottom: 4px;
  color: var(--plum);
}
.details .note {
  display: block;
  margin-top: 6px;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 600;
  font-size: 23px;
  color: var(--rose);
}

.btn-waze {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  min-height: 50px;
  padding: 10px 22px 10px 16px;
  border: 1px solid var(--plum);
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  color: var(--plum);
  transition: background-color .2s, color .2s;
}
.btn-waze svg { width: 26px; height: 26px; }
.btn-waze:hover,
.btn-waze:active { background: var(--plum); color: var(--paper); }

/* ---------- SECTION 4 : RSVP ---------- */
.title-rsvp {
  max-width: min(290px, 100%);
  font-size: clamp(32px, 8.8vw, 44px);
  line-height: 1.15;
  text-wrap: balance;
}
.title-rsvp em { display: block; color: var(--rose); }

form {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: 480px;
  margin-top: 38px;
  text-align: left;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 8px; }
.field > span,
.presence legend {
  font-size: 16px;
  font-weight: 500;
  color: var(--plum);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 56px;
  padding: 13px 14px;
  border: 1px solid rgba(61, 26, 87, .35);
  border-radius: 4px;
  background: #fff;
  font-size: 19px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 104px; line-height: 1.45; }
.field select {
  padding-right: 42px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%233d1a57' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 20px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(61, 26, 87, .12);
}
.field.invalid input { border-color: #b3123f; }

.presence { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.presence legend { padding: 0; margin-bottom: 8px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-box {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid rgba(61, 26, 87, .35);
  border-radius: 4px;
  background: #fff;
  font-size: 19px;
  line-height: 1.3;
  transition: border-color .2s, background-color .2s;
}
.choice-box small { display: block; margin-top: 2px; font-size: 16px; color: var(--ink-soft); }
.check {
  flex: 0 0 auto;
  position: relative;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(61, 26, 87, .5);
  border-radius: 50%;
  transition: border-color .2s;
}
.check::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--rose);
  transform: scale(0);
  transition: transform .3s var(--ease);
}
.choice input:checked + .choice-box { border-color: var(--plum); background: var(--lilac); }
.choice input:checked + .choice-box .check { border-color: var(--rose); }
.choice input:checked + .choice-box .check::after { transform: scale(1); }
.choice input:focus-visible + .choice-box { box-shadow: 0 0 0 3px rgba(61, 26, 87, .2); }
.presence.invalid .choice-box { border-color: #b3123f; }

.guests {
  display: grid;
  align-self: start;
  grid-template-rows: 1fr;
  transition: grid-template-rows .45s var(--ease), opacity .3s;
}
.guests-inner { overflow: hidden; min-height: 0; }
.guests.hide { grid-template-rows: 0fr; opacity: 0; }
.guests[hidden] { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { font-size: 17px; color: #b3123f; text-align: center; }
.form-error:empty { display: none; }

.btn-send { width: 100%; }
.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(251, 243, 240, .35);
  border-color: rgba(44, 17, 64, .25);
  border-top-color: var(--plum-dark);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-send.loading { pointer-events: none; opacity: .85; }
.btn-send.loading .spinner { display: block; }

form.leaving { opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; }

.thanks { margin-top: 36px; max-width: 420px; outline: none; animation: rise .8s var(--ease) both; }
.thanks[hidden] { display: none; }
.thanks-ico { width: 72px; height: 72px; margin: 0 auto 18px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.thanks-ico circle { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 183; stroke-dashoffset: 183; animation: draw .9s var(--ease) .1s forwards; }
.thanks-ico path { stroke: var(--plum); stroke-width: 2.5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s var(--ease) .8s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.thanks h3 {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 600;
  font-size: 44px;
  line-height: 1.15;
  color: var(--plum);
}
.thanks p { margin-top: 10px; font-size: 20px; }

/* ---------- SECTION 5 : Footer ---------- */
.footer {
  padding: 72px 22px calc(100px + var(--safe-b));
  text-align: center;
  color: var(--paper);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--plum-dark) var(--tex-satin) center / cover no-repeat;
}
.footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(44, 17, 64, .45);
}
.logo-footer { width: 112px; height: auto; margin: 0 auto 26px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .3)); }
.footer-q {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.35;
}
.footer-t {
  margin: 10px auto 30px;
  max-width: 320px;
  font-size: 19px;
  color: rgba(251, 243, 240, .75);
}
.btn-cta { padding-left: 24px; padding-right: 24px; }

/* ---------- Couronnes, confettis, poussière d'or ---------- */
.fly-layer {
  position: fixed;
  inset: 0;
  z-index: 39;
  overflow: hidden;
  pointer-events: none;
}
.crown-fly {
  position: absolute;
  left: 0;
  top: 0;
  margin: -20px 0 0 -28px;
  perspective: 220px;
  filter: drop-shadow(0 8px 6px rgba(90, 20, 60, .22));
  will-change: transform;
}
.crown-fly img {
  display: block;
  width: 100%;
  height: auto;
  animation: crown-sway var(--sway, 2.6s) ease-in-out infinite alternate;
}
/* la couronne pivote doucement pour accrocher la lumière */
@keyframes crown-sway {
  from { transform: rotateY(-32deg) translateY(-3px); }
  to { transform: rotateY(32deg) translateY(3px); }
}
.crown-fly .glint { left: 50%; top: 6%; animation: twinkle 2.6s ease-in-out .4s infinite; }

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

.dust {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.footer .bg-video { z-index: -3; }
.footer::after { z-index: -2; }

/* ---------- Apparitions au scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Écrans plus larges ---------- */
@media (min-width: 700px) {
  .section { padding: 120px 32px; }
  .countdown { grid-template-columns: repeat(4, 1fr); max-width: 680px; border-bottom: 1px solid rgba(241, 215, 143, .4); }
  .cd { border-bottom: 0; border-right: 1px solid rgba(241, 215, 143, .4); }
  .cd:last-child { border-right: 0; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .2s !important;
    transition-delay: 0s !important;
  }
  .keren .l { transform: none; }
  .glint, .shine { display: none; }
  .slides { scroll-behavior: auto; }
  .bg-video { display: none; }
  .pre-reveal main { transform: none; }
}
