@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Frank+Ruhl+Libre:wght@400;500;700&family=Playfair+Display:ital,wght@0,400;0,500;1,400&family=Montserrat:wght@400;500&display=swap");

:root {
  --page-width: 430px;
  --ink: #4a3420;
  --ink-soft: #7a5f42;
  --ivory: #fffaf0;
  --gold: #b8862b;
  --gold-deep: #8f6a1f;
  --gold-light: #e2b65a;
  --gold-line: rgba(184, 134, 43, 0.75);
  --gold-line-soft: rgba(184, 134, 43, 0.35);
  --logo-gold: linear-gradient(135deg, #a8771f 0%, #d9a945 30%, #c08a2c 55%, #e8c06a 80%, #a8771f 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Cormorant Garamond", serif;
  color: var(--ink);
  background: #f4ecdf;
}

.gold-text {
  background: var(--logo-gold);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* ===== FOND : image du Temple ===== */
body::before {
  content: "";
  position: fixed; inset: 0;
  width: min(100vw, var(--page-width));
  margin: auto;
  background: url("images/fond-temple.jpg") center top / cover no-repeat;
  filter: brightness(0.98) saturate(0.9);
  z-index: -3;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  width: min(100vw, var(--page-width));
  margin: auto;
  background: radial-gradient(ellipse at 50% 38%, rgba(255, 250, 242, 0.55), rgba(255, 248, 240, 0.12) 70%);
  pointer-events: none;
  z-index: -2;
}
body.invitation-open::after { background: rgba(255, 248, 240, 0.06); }

/* ===== MUSIQUE ===== */
.music-toggle {
  position: fixed; top: 18px;
  left: calc(50% - min(50vw, var(--page-width) / 2) + 18px);
  z-index: 30;
  width: 46px; height: 46px;
  border: 1px solid var(--gold-line); border-radius: 50%;
  background: rgba(255, 250, 240, 0.92);
  color: var(--gold-deep);
  font-size: 22px;
  box-shadow: 0 10px 26px rgba(61, 42, 34, 0.18);
  cursor: pointer;
}
.music-toggle.is-hidden { display: none; }

/* ===== BOUTON LANGUE ===== */
.lang-toggle {
  position: fixed; top: 22px;
  right: calc(50% - min(50vw, var(--page-width) / 2) + 18px);
  z-index: 30;
  min-width: 84px; height: 38px; padding: 0 14px;
  border: 1px solid var(--gold-line); border-radius: 999px;
  background: rgba(255, 250, 240, 0.92);
  color: var(--gold-deep);
  font-family: "Cinzel", serif; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  box-shadow: 0 10px 26px rgba(61, 42, 34, 0.16);
  cursor: pointer;
}
.lang-toggle[lang="he"] { font-family: "Frank Ruhl Libre", serif; font-size: 15px; letter-spacing: 0; }
body.is-loading .lang-toggle { visibility: hidden; opacity: 0; }
body.loader-finished .lang-toggle { visibility: visible; opacity: 1; transition: opacity 0.8s ease; }

/* ===== VERSION HÉBREU ===== */
html[lang="he"] body,
html[lang="he"] .intro-text, html[lang="he"] .couple-names, html[lang="he"] .open-instruction,
html[lang="he"] .families, html[lang="he"] .invite-text, html[lang="he"] .couple-script,
html[lang="he"] .presence, html[lang="he"] .date-line, html[lang="he"] .date-day, html[lang="he"] .hebrew-date,
html[lang="he"] .times *, html[lang="he"] .venue, html[lang="he"] .city,
html[lang="he"] .card-eyebrow, html[lang="he"] .section-title, html[lang="he"] .normal-text,
html[lang="he"] .luxury-button, html[lang="he"] .rsvp-form *, html[lang="he"] #guestSide,
html[lang="he"] .form-message, html[lang="he"] .creator-credit p,
html[lang="he"] .loader-countdown-box small {
  font-family: "Frank Ruhl Libre", serif;
  font-style: normal;
  letter-spacing: normal;
}
html[lang="he"] .fr-only { display: none; }
html[lang="he"] .intro-text { font-size: 16px; }
html[lang="he"] .couple-names { font-size: clamp(32px, 9.5vw, 40px); font-weight: 500; }
html[lang="he"] .open-instruction { font-size: 18px; }
html[lang="he"] .families { font-size: 15.5px; }
html[lang="he"] .invite-text { font-size: 20px; line-height: 1.6; }
html[lang="he"] .couple-script { font-size: clamp(34px, 10vw, 42px); font-weight: 500; line-height: 1.25; }
html[lang="he"] .presence { font-size: 19px; }
html[lang="he"] .date-day { font-size: 15px; }
html[lang="he"] .date-line { font-size: 26px; font-weight: 500; }
html[lang="he"] .hebrew-date { font-size: 18px; font-weight: 400; }
html[lang="he"] .times .t-label { font-size: 14px; }
html[lang="he"] .times .t-hour { font-weight: 500; }
html[lang="he"] .venue { font-size: 24px; font-weight: 700; }
html[lang="he"] .city { font-size: 15px; }
html[lang="he"] .card-eyebrow { font-size: 15px; }
html[lang="he"] .section-title { font-weight: 500; }
html[lang="he"] .luxury-button { font-size: 16px; }
html[lang="he"] #guestSide { font-size: 16px; padding: 13px 20px 13px 44px; background-position: 22px 22px, 16px 22px; }
html[lang="he"] .loader-countdown-box small { font-size: 10px; }


/* ===== PAGE ENVELOPPE ===== */
.opening { min-height: 100svh; width: min(100vw, var(--page-width)); margin: 0 auto; display: grid; place-items: center; }
.opening-content {
  width: 100%; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 100px 20px 38px;
  text-align: center;
}
.glow { text-shadow: 0 0 12px rgba(255, 250, 240, 0.95), 0 1px 3px rgba(255, 250, 240, 0.9); }
.intro-text {
  margin: 0 auto 12px;
  font-family: "Cinzel", serif;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(255, 250, 240, 1), 0 1px 3px rgba(255, 250, 240, 0.95);
}
.couple-names {
  margin: 0 0 80px;
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 9vw, 38px);
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;
  filter: drop-shadow(0 0 10px rgba(255, 250, 240, 0.95)) drop-shadow(0 1px 2px rgba(255, 250, 240, 0.9));
}

.envelope-button {
  width: min(64vw, 280px);
  padding: 0; border: 0; background: transparent; cursor: pointer;
  filter: drop-shadow(0 22px 24px rgba(58, 42, 31, 0.24));
  animation: floatEnvelope 4s ease-in-out infinite;
}
.envelope {
  position: relative; display: block;
  width: 100%; aspect-ratio: 1.55;
  border-radius: 6px;
  background: linear-gradient(160deg, #fffdf8 0%, #f6efe3 55%, #ede2cf 100%);
  border: 1px solid var(--gold-line);
  overflow: hidden;
}
.envelope::after {
  content: ""; position: absolute; inset: 6px;
  border: 1px solid var(--gold-line-soft); border-radius: 3px;
}
.envelope::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top right, transparent calc(50% - 0.5px), var(--gold-line-soft) 50%, transparent calc(50% + 0.5px)) left bottom / 50% 62% no-repeat,
    linear-gradient(to top left, transparent calc(50% - 0.5px), var(--gold-line-soft) 50%, transparent calc(50% + 0.5px)) right bottom / 50% 62% no-repeat;
}
.envelope-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 60%; z-index: 1;
  background: linear-gradient(180deg, #fbf6ec, #efe4d0);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.envelope-seal {
  position: absolute; left: 50%; top: 60%; z-index: 2;
  transform: translate(-50%, -50%);
  width: 24%; aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #f0d595 0%, #d0a24b 40%, #b8862b 70%, #8f6a1f 100%);
  box-shadow: 0 3px 6px rgba(80, 55, 25, 0.35), inset 0 0 0 3px rgba(255, 240, 205, 0.3), inset 0 -3px 6px rgba(90, 60, 25, 0.25);
}
.envelope-seal span {
  font-family: "Playfair Display", serif;
  font-size: clamp(17px, 5vw, 22px);
  letter-spacing: -0.04em;
  color: #fff6de;
  text-shadow: 0 1px 1px rgba(90, 60, 25, 0.55);
}
.open-instruction { animation: none; opacity: 0; transition: opacity .3s; }
.open-instruction {
  margin: 46px 0 0;
  font-size: 17px; font-style: italic; font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(255, 250, 240, 1), 0 1px 3px rgba(255, 250, 240, 0.95);
  animation: pulseText 1.8s ease-in-out infinite;
}

/* ===== OUVERTURE ===== */
.invitation { display: none; width: min(100vw, var(--page-width)); margin: 0 auto; }
body.invitation-open .opening { display: none; }
body.invitation-open .invitation { display: block; }

/* ===== CARTE EN ARCHE ===== */
.invitation-page { width: 100%; padding: 74px 16px 24px; display: flex; justify-content: center; }
.invitation-page > *, .info-section > * { filter: drop-shadow(0 18px 34px rgba(61, 42, 34, 0.2)); }
.royal {
  --notch: 18px;
  position: relative;
  width: min(94vw, 394px);
  padding: 1.5px;
  background: var(--logo-gold);
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, 0 calc(100% - var(--notch)), 0 var(--notch));
}
.royal-in, .royal-line, .royal-content {
  clip-path: polygon(var(--n) 0, calc(100% - var(--n)) 0, 100% var(--n), 100% calc(100% - var(--n)), calc(100% - var(--n)) 100%, var(--n) 100%, 0 calc(100% - var(--n)), 0 var(--n));
}
.royal-in { --n: 17.4px; padding: 6px; background: #fbf6ec; }
.royal-line { --n: 13px; padding: 1px; background: var(--gold-line); }
.royal-content {
  --n: 12.6px;
  padding: 30px 22px 28px;
  text-align: center;
  background: radial-gradient(circle at 50% 18%, #fffdf8, #fbf5ea 70%, #f6eedf 100%);
}
.royal-content.panel { padding: 28px 22px 28px; }
.main-card .royal-content { padding: 26px 20px 26px; }
.crown { display: block; width: 86px; margin: 0 auto 6px; }
.bsd { margin: 0 0 6px; font-family: "Frank Ruhl Libre", serif; font-size: 14px; color: var(--ink-soft); }
.pasuk {
  margin: 0;
  font-family: "Frank Ruhl Libre", serif;
  font-size: 20px; font-weight: 500;
  line-height: 1.5;
  color: var(--gold-deep);
  white-space: nowrap;
}
.ornament { display: block; width: 92px; margin: 14px auto 22px; opacity: 0.95; }
.ornament.small { width: 70px; margin: 16px auto 14px; }

/* ===== FAMILLES ===== */
.families {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 10px;
  margin: 0 0 24px;
  font-size: 15px; font-style: italic; line-height: 1.45;
}
.families div:first-child { text-align: start; }
.families div:last-child { text-align: end; }
.families p { margin: 0 0 5px; }
.families .to-fill { color: #b8a58a; }

.invite-text { max-width: 310px; margin: 0 auto 20px; font-size: 20px; font-style: italic; line-height: 1.5; }

/* ===== NOMS ===== */
.names-block { margin: 0 auto 6px; }
.couple-script {
  margin: 0;
  display: flex; flex-direction: column; align-items: center;
  font-family: "Playfair Display", serif;
  font-size: clamp(34px, 10.4vw, 42px);
  font-weight: 400; line-height: 1.12;
  white-space: nowrap;
}
.couple-script .amp {
  font-style: italic; font-size: 0.7em; line-height: 1.1;
  background: var(--logo-gold); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.name-wrap {
  display: inline-block; padding: 0 6px;
  background-image:
    linear-gradient(105deg, transparent 0%, transparent 40%, #f0d38c 46%, #fff5cf 50%, #f0d38c 54%, transparent 60%, transparent 100%),
    var(--logo-gold);
  background-size: 260% 100%, 100% 100%;
  background-position: 100% center, center;
  background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* ===== TEXTES ===== */
.presence, .time-line, .normal-text { margin: 0 0 8px; font-size: 19px; font-style: italic; line-height: 1.4; }
.date-line {
  margin: 14px 0 2px;
  font-family: "Playfair Display", serif;
  font-size: 24px; font-weight: 400;
  color: var(--gold-deep);
}
.date-day { display: block; font-family: "Cinzel", serif; font-size: 11px; letter-spacing: 0.3em; color: var(--ink-soft); margin-bottom: 2px; }
.hebrew-date { margin: 0 0 14px; font-family: "Frank Ruhl Libre", serif; font-size: 20px; font-weight: 500; color: var(--gold-deep); }
.times { display: flex; justify-content: center; margin: 4px auto 6px; }
.times div { flex: 1; padding: 2px 8px; }
.times div + div { border-inline-start: 1px solid var(--gold-line-soft); }
.times .t-label { display: block; font-family: "Cinzel", serif; font-size: 10.5px; letter-spacing: 0.2em; color: var(--ink-soft); }
.times .t-hour { display: block; font-family: "Playfair Display", serif; font-size: 26px; color: var(--gold-deep); line-height: 1.25; }
.times .t-note { display: block; font-style: italic; font-size: 15px; color: var(--ink-soft); }
.venue { margin: 16px 0 2px; font-family: "Cinzel", serif; font-size: 19px; font-weight: 600; letter-spacing: 0.22em; }
.city { margin: 0 0 4px; font-family: "Cinzel", serif; font-size: 10.5px; letter-spacing: 0.22em; color: var(--ink-soft); }
.hebrew-address { font-family: "Frank Ruhl Libre", serif; font-style: normal; font-size: 18px; }

/* ===== COMPTE À REBOURS ===== */
.countdown-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 16px auto 0;
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
  padding: 9px 0 8px;
  position: relative;
}
.countdown-bar::before, .countdown-bar::after {
  content: "◆"; position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 9px; color: var(--gold);
}
.countdown-bar::before { left: -4px; }
.countdown-bar::after { right: -4px; }
.countdown-bar > div { text-align: center; }
.countdown-bar > div + div { border-left: 1px solid var(--gold-line-soft); }
.countdown-bar span { display: block; font-family: "Playfair Display", serif; font-size: 26px; color: var(--gold-deep); line-height: 1.1; }
.countdown-bar small { display: block; margin-top: 3px; font-family: "Cinzel", serif; font-size: 8.5px; letter-spacing: 0.18em; color: var(--ink-soft); }

/* ===== LOGO SÉPARATEUR ===== */
.logo-separator { padding: 6px 0; display: flex; align-items: center; justify-content: center; }
.logo-separator img {
  width: min(24vw, 100px); height: auto;
  filter: drop-shadow(0 6px 14px rgba(61, 42, 34, 0.18)) drop-shadow(0 0 12px rgba(255, 250, 240, 0.8));
}

/* ===== CARTES ===== */
.info-section { width: 100%; padding: 18px 16px; display: flex; justify-content: center; }
.panel-ornament { display: block; width: 60px; margin: -4px auto 6px; }
.card-eyebrow { margin: 0 0 6px; font-family: "Cinzel", serif; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-soft); }
.section-title { margin: 0 0 14px; font-family: "Playfair Display", serif; font-size: 38px; font-weight: 400; }

/* ===== BOUTONS ===== */
.button-row { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.luxury-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 13px 22px;
  border-radius: 2px;
  border: 1px solid var(--gold-line);
  font-family: "Cinzel", serif;
  font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
}
.luxury-button.primary {
  background: var(--logo-gold); background-size: 160% 100%;
  color: #fffaf0; border-color: transparent;
  text-shadow: 0 1px 1px rgba(90, 60, 20, 0.35);
  box-shadow: 0 8px 20px -8px rgba(143, 106, 31, 0.7);
}
.luxury-button.secondary { background: rgba(255, 250, 240, 0.85); color: var(--gold-deep); }
.luxury-button.full { width: 100%; }
.luxury-button:disabled { opacity: 0.7; }

/* ===== FORMULAIRE ===== */
.rsvp-form { display: grid; gap: 12px; margin-top: 18px; }
.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
  width: 100%;
  border: 1px solid var(--gold-line-soft);
  border-radius: 2px;
  background: #fffdf8;
  padding: 13px 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: 18px; color: var(--ink);
  outline: none;
}
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus { border-color: var(--gold); }
.rsvp-form textarea { min-height: 96px; resize: vertical; }
.attendance-choice { display: grid; gap: 10px; }
.attendance-choice label {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 14px;
  border-radius: 2px;
  background: #fffdf8;
  border: 1px solid var(--gold-line-soft);
  font-size: 18px; cursor: pointer;
}
.attendance-choice input { width: 18px; height: 18px; accent-color: var(--gold); }
#guestSide {
  appearance: none; -webkit-appearance: none;
  min-height: 50px;
  padding: 13px 44px 13px 20px;
  border: 1px solid var(--gold); border-radius: 2px;
  background-color: #fffdf8;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
  color: var(--gold-deep);
  font-family: "Cinzel", serif; font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em;
  text-align: center; text-transform: uppercase;
  cursor: pointer;
}
.form-message { margin: 2px 0 0; min-height: 1.4em; font-style: italic; font-size: 17px; color: var(--gold-deep); }

/* ===== CRÉDIT ===== */
.creator-credit {
  width: min(100vw, var(--page-width));
  margin: 20px auto 0; padding: 20px 18px 28px;
  text-align: center;
  background: rgba(255, 250, 240, 0.78);
  border-top: 1px solid var(--gold-line-soft);
  color: var(--ink-soft);
}
.creator-credit p { margin: 0 0 6px; font-size: 14px; font-weight: 500; }
.creator-credit a { color: var(--gold-deep); font-family: "Cinzel", serif; font-size: 12px; letter-spacing: 0.12em; text-decoration: none; }

/* ===== APPARITION ===== */
.reveal-on-scroll { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.first-page .royal-content > * { opacity: 0; transform: translateY(12px); }
.first-page.is-visible .royal-content > * { animation: elegantTextReveal 0.8s ease forwards; }
.first-page.is-visible .royal-content > :nth-child(1) { animation-delay: 0.1s; }
.first-page.is-visible .royal-content > :nth-child(2) { animation-delay: 0.3s; }
.first-page.is-visible .royal-content > :nth-child(3) { animation-delay: 0.5s; }
.first-page.is-visible .royal-content > :nth-child(4) { animation-delay: 0.7s; }
.first-page.is-visible .royal-content > :nth-child(5) { animation-delay: 0.95s; }
.first-page.is-visible .royal-content > :nth-child(6) { animation-delay: 1.25s; }
.first-page.is-visible .royal-content > :nth-child(7) { animation-delay: 1.6s; }
.first-page.is-visible .royal-content > :nth-child(8) { animation-delay: 1.9s; }
.first-page.is-visible .royal-content > :nth-child(9) { animation-delay: 2.1s; }
.first-page.is-visible .royal-content > :nth-child(10) { animation-delay: 2.3s; }
.first-page.is-visible .royal-content > :nth-child(11) { animation-delay: 2.5s; }
.first-page.is-visible .royal-content > :nth-child(12) { animation-delay: 2.7s; }
.first-page.is-visible .royal-content > :nth-child(13) { animation-delay: 2.9s; }
.first-page.is-visible .royal-content > :nth-child(14) { animation-delay: 3.1s; }
.first-page.is-visible .royal-content > :nth-child(15) { animation-delay: 3.3s; }
.first-page.is-visible .name-wrap { animation: lettersLight 1.6s ease-in-out 2.4s 1 forwards; }

@keyframes floatEnvelope { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulseText { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
@keyframes elegantTextReveal {
  from { opacity: 0; transform: translateY(12px); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes lettersLight { from { background-position: 120% center, center; } to { background-position: -20% center, center; } }

/* ===== LOADER ===== */
body.is-loading { overflow: hidden; }
body.is-loading .opening, body.is-loading .invitation, body.is-loading .music-toggle { visibility: hidden; opacity: 0; }

.page-loader {
  position: fixed; inset: 0; z-index: 99999;
  width: min(100vw, var(--page-width));
  height: 100vh; height: 100svh; height: 100dvh;
  margin: auto;
  overflow: hidden;
  background: linear-gradient(rgba(255, 250, 244, 0.1), rgba(255, 250, 244, 0.1)), url("images/fond-temple.jpg") center top / cover no-repeat;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader-content { position: absolute; inset: 0; transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease; }
/* logo au centre */
.loader-logo-shell {
  position: absolute; left: 50%; top: 48%;
  transform: translate(-50%, -50%);
  width: min(40vw, 170px); aspect-ratio: 351 / 520;
}
.loader-logo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.loader-logo-base { opacity: 0.35; filter: brightness(1.15); }
.loader-logo-fill { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 100% 0 0); animation: fillLogo 2s ease-in-out forwards; }
.loader-logo-fill .loader-logo { filter: drop-shadow(0 4px 10px rgba(255, 250, 240, 0.7)); }
@keyframes fillLogo { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* compte à rebours au niveau des personnages de l'image */
.loader-countdown {
  position: absolute; left: 50%; top: 81%;
  transform: translateX(-50%);
  width: min(90%, 360px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px;
}
.loader-countdown-box {
  min-height: 60px;
  padding: 10px 4px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid rgba(168, 137, 84, 0.75);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.78);
  color: #8a6b45;
  box-shadow: 0 8px 20px rgba(61, 42, 34, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.loader-countdown-box span { font-family: "Cormorant Garamond", serif; font-size: clamp(20px, 5.8vw, 26px); font-weight: 600; line-height: 1; color: #8a6b45; }
.loader-countdown-box small { margin-top: 5px; font-family: "Montserrat", sans-serif; font-size: 7px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: #8a6b45; }

body.loader-finished .page-loader { opacity: 0; visibility: hidden; pointer-events: none; }
body.loader-finished .loader-content { opacity: 0; transform: translateY(-2vh) scale(0.98); filter: blur(2px); }
body.loader-finished .opening, body.loader-finished .music-toggle { visibility: visible; opacity: 1; transition: opacity 0.8s ease; }

/* ===== MOBILE ===== */
@media (max-width: 430px) {
  .families { font-size: 13.5px; gap: 8px; }
  .invite-text { font-size: 19px; }
  .page-loader { width: 100vw; }
}
@media (max-width: 360px) {
  .pasuk { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .envelope-button, .open-instruction, .reveal-on-scroll { animation: none; transition: none; }
  .first-page .royal-content > * { opacity: 1; transform: none; animation: none; filter: none; }
  .name-wrap { animation: none !important; }
}

/* Familles en français : chaque nom sur une seule ligne */
html[lang="fr"] .families { grid-template-columns: auto auto; justify-content: space-between; font-size: clamp(11.5px, 3.33vw, 15px); }
html[lang="fr"] .families p { white-space: nowrap; }
