/* =========================================================
   Bar Mitsvah de Mayron — faire-part numérique
   Palette : ivoire · chocolat · cuivre · bronze · or rosé · taupe
   ========================================================= */

:root {
  --ivory: #f8f2e9;
  --ivory-2: #f1e7d8;
  --cream: #e9dbc6;
  --taupe: #9b8676;
  --taupe-dark: #6f5d50;
  --choco: #2f1b11;
  --choco-2: #43281a;
  --walnut: #6b4430;
  --copper: #b8734a;
  --bronze: #8c6239;
  --rose: #d9a585;
  --rose-light: #f3d3bd;
  --ink: #3a2418;

  --grad-copper: linear-gradient(115deg, #7c4a2d 0%, #b97a52 18%, #f3cdb0 36%, #c98b66 50%, #8a5537 66%, #e0ad8c 84%, #9a6242 100%);
  --grad-text: linear-gradient(115deg, #5e3520 0%, #96593a 20%, #c98b66 38%, #8a5233 55%, #5f3622 72%, #b07650 88%, #6e3f26 100%);
  --grad-rose: linear-gradient(115deg, #c48b6b 0%, #f6d9c4 30%, #d9a585 55%, #fbe6d6 75%, #c08465 100%);

  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-serif: "Cormorant Garamond", "Garamond", Georgia, serif;
  --f-sans: "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --f-script: "Pinyon Script", "Snell Roundhand", cursive;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--choco);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-sans);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; height: 100%; }

img { max-width: 100%; display: block; }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: 400; }
[hidden] { display: none !important; }

/* ---------- Logo monogramme (SVG vectorisé en masque + dégradé cuivre animé) ---------- */
.logo {
  aspect-ratio: 689 / 613;
  background: var(--grad-copper);
  background-size: 250% 250%;
  -webkit-mask: url("assets/logo/logo-mb-masque.svg") center / contain no-repeat;
  mask: url("assets/logo/logo-mb-masque.svg") center / contain no-repeat;
  animation: metal 7s ease-in-out infinite alternate;
}

@keyframes metal {
  0% { background-position: 0% 30%; }
  100% { background-position: 100% 70%; }
}

.shine-text {
  background: var(--grad-text);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: metal 6s ease-in-out infinite alternate;
}

/* ---------- Boutons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 56px;
  padding: .9em 2.1em;
  border: 0;
  border-radius: 999px;
  font-family: var(--f-sans);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), opacity .3s;
}
.btn:active { transform: scale(.97); }

.btn--glow {
  color: var(--choco);
  background: var(--grad-rose);
  background-size: 220% 100%;
  box-shadow: 0 0 0 1px rgba(255, 230, 210, .5), 0 10px 40px -8px rgba(226, 163, 120, .7);
  animation: metal 4s ease-in-out infinite alternate, pulse 2.8s ease-in-out infinite;
}
.btn--glow::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1px solid rgba(243, 205, 176, .45);
  animation: ring 2.8s ease-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 230, 210, .5), 0 10px 40px -8px rgba(226, 163, 120, .65); }
  50% { box-shadow: 0 0 0 1px rgba(255, 230, 210, .7), 0 10px 60px -4px rgba(226, 163, 120, .95); }
}
@keyframes ring {
  0% { transform: scale(.94); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(1.18); opacity: 0; }
}

.btn--copper {
  color: #fff8f1;
  background: linear-gradient(115deg, #8a5537, #c58a63 45%, #9a6242);
  box-shadow: 0 14px 30px -12px rgba(110, 60, 30, .8), inset 0 1px 0 rgba(255, 230, 210, .5);
}
.btn--block { width: 100%; }

.btn--outline {
  color: var(--rose-light);
  border: 1px solid rgba(243, 211, 189, .6);
  background: rgba(255, 255, 255, .03);
  font-size: .92rem;
  letter-spacing: .16em;
  padding: .9em 1.6em;
}
.btn--outline:hover { background: rgba(243, 211, 189, .1); }

/* =========================================================
   POP-UP D'OUVERTURE
   ========================================================= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ivory);
}

.intro__door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  overflow: hidden;
  background: #1f110a;
  transition: transform 1.6s var(--ease-io);
  will-change: transform;
}
.intro__door::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100vw;
  background:
    radial-gradient(70% 45% at 50% 42%, rgba(28, 15, 8, .74), rgba(28, 15, 8, .5) 70%, rgba(18, 9, 5, .72) 100%),
    url("assets/images/fond-soiree.jpg") center / cover no-repeat;
  animation: kenburns 18s ease-in-out infinite alternate;
}
.intro__door--l { left: 0; }
.intro__door--r { right: 0; }
.intro__door--l::after { left: 0; transform-origin: 100% 50%; }
.intro__door--r::after { right: 0; transform-origin: 0 50%; }
@keyframes kenburns { from { scale: 1; } to { scale: 1.08; } }

.intro__seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, transparent, #f3cdb0 30%, #fff 50%, #f3cdb0 70%, transparent);
  box-shadow: 0 0 30px 8px rgba(243, 205, 176, .55);
  transform: scaleY(0);
  opacity: 0;
  z-index: 2;
}

.intro__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  transition: opacity .7s ease, transform 1.1s var(--ease-io), filter .9s ease;
}

.intro__ring {
  position: absolute;
  width: min(118vw, 560px);
  max-width: none;
  left: 50%;
  top: 34%;
  translate: -50% -50%;
  opacity: .22;
  animation: spin 60s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { rotate: 360deg; } }

.logo--intro {
  width: min(56vw, 250px);
  animation: metal 6s ease-in-out infinite alternate, introLogo 1.8s var(--ease-out) both;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .35));
}
@keyframes introLogo {
  from { opacity: 0; transform: scale(.85); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.intro__kicker {
  margin-top: 30px;
  font-size: .95rem;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--rose-light);
  animation: fadeUp 1.2s .5s var(--ease-out) both;
}
.intro__name {
  font-family: var(--f-script);
  font-size: clamp(3.2rem, 15vw, 4.6rem);
  line-height: 1.1;
  color: #fbe6d6;
  margin: 2px 0 34px;
  animation: fadeUp 1.2s .7s var(--ease-out) both;
}
.intro .btn { animation: fadeUp 1.2s .95s var(--ease-out) both, metal 4s ease-in-out infinite alternate, pulse 2.8s 2s ease-in-out infinite; }
.intro__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  font-size: .92rem;
  color: rgba(248, 242, 233, .72);
  animation: fadeUp 1.2s 1.2s var(--ease-out) both;
}
.intro__hint svg { width: 20px; height: 20px; }

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

/* Ouverture : le contenu s'élève et se dissout, la lumière jaillit, les portes s'ouvrent */
.intro.is-opening .intro__content { opacity: 0; transform: scale(1.35); filter: blur(12px); }
.intro.is-opening .intro__seam { animation: seam 1.5s var(--ease-io) forwards; }
.intro.is-opening .intro__door--l { transform: translateX(-102%); transition-delay: .45s; }
.intro.is-opening .intro__door--r { transform: translateX(102%); transition-delay: .45s; }
@keyframes seam {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  70% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}
.intro::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60vmax;
  height: 110vmax;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 248, 238, .95), rgba(243, 205, 176, .55) 45%, transparent 100%);
  transform: scaleX(0);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}
.intro.is-opening::after { animation: flash 1.9s .35s var(--ease-out) forwards; }
@keyframes flash {
  0% { transform: scaleX(.02); opacity: 0; }
  35% { transform: scaleX(.6); opacity: 1; }
  100% { transform: scaleX(2.4); opacity: 0; }
}
.intro.is-gone { display: none; }

/* ---------- Pétales ---------- */
.petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
  transition: opacity .6s;
}
.is-typing .petals { opacity: 0; }

/* =========================================================
   APPARITIONS AU DÉFILEMENT
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transition: opacity 1.1s var(--ease-out), transform 1.3s var(--ease-out), filter 1.1s var(--ease-out), clip-path 1.6s var(--ease-io);
  transition-delay: var(--d, 0s);
}
[data-reveal="up"] { transform: translateY(28px); filter: blur(4px); }
[data-reveal="zoom"] { transform: scale(.86); filter: blur(8px); }
[data-reveal="fade"] { filter: blur(6px); }
[data-reveal="draw"] { opacity: 1; }
[data-reveal="draw"] > * { clip-path: inset(-25% 100% -25% -5%); filter: blur(6px); transform: scale(.96); transition: clip-path 2s var(--ease-io), filter 1.4s var(--ease-out), transform 1.6s var(--ease-out); transition-delay: var(--d, .1s); }
[data-reveal="card"] { transform: translateY(50px) scale(.96); filter: blur(6px); }
[data-reveal="scene"] { transform: translateY(40px); }

.is-in[data-reveal] { opacity: 1; transform: none; filter: none; }
.is-in[data-reveal="draw"] > * { clip-path: inset(-25% -5% -25% -5%); filter: none; transform: none; }

/* =========================================================
   SECTION 1 · FAIRE-PART
   ========================================================= */
.hero {
  position: relative;
  text-align: center;
  background:
    url("assets/images/fond-ivoire.jpg") center top / cover no-repeat,
    var(--ivory);
  overflow: hidden;
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(180deg, rgba(248, 242, 233, 0), var(--ivory));
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: max(54px, env(safe-area-inset-top)) 22px 40px;
}

.logo--hero {
  width: min(44vw, 190px);
  margin: 0 auto 34px;
}

.grands-parents {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(.98rem, 4.15vw, 1.25rem);
  line-height: 1.38;
  color: var(--taupe-dark);
}
.gp--left { text-align: left; }
.gp--right { text-align: right; }

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 26px auto 22px;
  max-width: 320px;
}
.ornament span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--copper));
}
.ornament span:last-child { background: linear-gradient(90deg, var(--copper), transparent); }
.ornament img { width: 38px; height: 38px; animation: spin 40s linear infinite; }

.parents {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 6.3vw, 2.05rem);
  line-height: 1.2;
  color: var(--ink);
}
.fratrie {
  margin-top: 8px;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 6vw, 1.7rem);
  color: var(--taupe-dark);
}
.annonce {
  margin-top: 26px;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 5.4vw, 1.55rem);
  line-height: 1.3;
  color: var(--ink);
}
.bm-title {
  margin: 10px 0 4px;
  font-family: var(--f-display);
  font-size: clamp(2.3rem, 11vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.bm-title + .annonce { margin-top: 12px; }

.prenom {
  margin: 26px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.prenom__main {
  display: block;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(3rem, 16.5vw, 5.6rem);
  line-height: .95;
  letter-spacing: .05em;
  margin-right: -.05em;
  white-space: nowrap;
  color: var(--ink);
}
.prenom__main .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(.45em) rotateX(70deg);
  filter: blur(10px);
  transition: opacity 1s var(--ease-out), transform 1.3s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: calc(var(--i) * 90ms);
  background: var(--grad-text);
  background-size: 600% 100%;
  background-position: calc(var(--i) * 20%) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.prenom__main.is-in .ch { opacity: 1; transform: none; filter: none; }
.prenom__second {
  font-family: var(--f-script);
  font-size: clamp(2.5rem, 12vw, 3.6rem);
  line-height: 1;
  margin-top: -.08em;
  color: var(--copper);
}

/* ---------- Portrait (image générée) dans une arche ---------- */
.portrait-section {
  position: relative;
  padding: 30px 0 70px;
  text-align: center;
  background:
    linear-gradient(180deg, var(--ivory) 0%, rgba(248, 242, 233, 0) 22%),
    url("assets/images/fond-ivoire.jpg") center bottom / cover no-repeat,
    var(--ivory);
}
.portrait {
  position: relative;
  width: min(86vw, 460px);
  margin: 0 auto;
}
.portrait__frame {
  position: relative;
  aspect-ratio: 1200 / 1536;
  border-radius: 999px 999px 22px 22px / 520px 520px 22px 22px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 0 0 1px rgba(184, 115, 74, .75),
    0 0 0 8px #fbf6ef,
    0 0 0 9px rgba(184, 115, 74, .45),
    0 40px 70px -30px rgba(70, 38, 20, .65),
    0 0 90px rgba(243, 205, 176, .55);
}
.portrait__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  transform: scale(1.14);
  transform-origin: 50% 30%;
  filter: blur(6px) saturate(.9);
  transition: transform 3.2s var(--ease-out), filter 1.6s var(--ease-out);
}
.portrait.is-in .portrait__img { transform: scale(1.02); filter: none; animation: breatheZoom 16s 3.2s ease-in-out infinite alternate; }
@keyframes breatheZoom { from { transform: scale(1.02); } to { transform: scale(1.07); } }
.portrait__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 240, 225, .5), inset 0 -60px 80px -40px rgba(60, 30, 15, .35);
  pointer-events: none;
}
.portrait__sheen {
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 245, 232, .55) 50%, transparent 60%);
  transform: translateX(-70%);
  pointer-events: none;
}
.portrait.is-in .portrait__sheen { animation: sheen 2.6s 1.4s var(--ease-io) both; }
@keyframes sheen { to { transform: translateX(70%); } }
.portrait__seal {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 74px;
  height: 74px;
  translate: -50% 50%;
  filter: drop-shadow(0 8px 14px rgba(60, 30, 15, .4));
  animation: spin 40s linear infinite;
}
[data-reveal="portrait"] { transform: translateY(40px) scale(.97); }


/* =========================================================
   SECTION 2 · COMPTE À REBOURS
   ========================================================= */
.countdown,
.rsvp {
  position: relative;
  isolation: isolate;
  color: var(--ivory);
  text-align: center;
  overflow: hidden;
}
.velvet {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 60% at 50% 40%, rgba(43, 24, 16, .15), rgba(24, 12, 7, .55) 100%),
    url("assets/images/fond-velours.jpg") center / cover no-repeat,
    #2a170f;
}
.velvet::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 40% at 50% 50%, rgba(217, 165, 133, .14), transparent 70%);
  animation: breathe 6s ease-in-out infinite;
}

.countdown { padding: 76px 18px 84px; }

.script-title {
  font-family: var(--f-script);
  font-size: clamp(3.4rem, 16vw, 5rem);
  line-height: 1.15;
  padding: 0 .2em;
  background: var(--grad-rose);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: metal 5s ease-in-out infinite alternate;
}
.countdown__sub {
  max-width: 340px;
  margin: 12px auto 36px;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 5.2vw, 1.45rem);
  line-height: 1.35;
  color: rgba(248, 242, 233, .88);
}

.cd {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 150px));
  justify-content: center;
  gap: 18px 26px;
  max-width: 470px;
  margin: 0 auto;
}
@media (min-width: 560px) {
  .cd { grid-template-columns: repeat(4, minmax(0, 120px)); gap: 16px; }
}
.cd__unit {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cd__unit img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  animation: spin 50s linear infinite;
}
.cd__unit:nth-child(even) img { animation-direction: reverse; }
.cd__num {
  position: relative;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 11vw, 2.9rem);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: #fff4ea;
}
.cd__num.tick { animation: tick .6s var(--ease-out); }
@keyframes tick {
  0% { transform: translateY(-40%); opacity: 0; filter: blur(4px); }
  100% { transform: none; opacity: 1; filter: none; }
}
.cd__lbl {
  position: relative;
  margin-top: 4px;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rose-light);
}
.cd__done {
  font-family: var(--f-script);
  font-size: 3.2rem;
  color: var(--rose-light);
}

/* =========================================================
   ÉVÉNEMENTS
   ========================================================= */
.events {
  position: relative;
  isolation: isolate;
  padding: 70px 18px 40px;
  background:
    url("assets/images/fond-ivoire.jpg") center / cover no-repeat,
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%);
}
.events__head { text-align: center; margin-bottom: 26px; }
.events__script {
  font-family: var(--f-script);
  font-size: clamp(3rem, 14vw, 4.2rem);
  line-height: 1.1;
  color: var(--copper);
}
.events__place {
  margin-top: 6px;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--taupe-dark);
}
.event { padding-bottom: 72px; }

.card {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  padding: 74px 26px 40px;
  text-align: center;
  border-radius: 240px 240px 26px 26px / 220px 220px 26px 26px;
  background:
    radial-gradient(80% 40% at 50% 0%, #fffdf9 0%, transparent 80%),
    linear-gradient(180deg, #fbf6ef, #f4eadc);
  box-shadow:
    0 0 0 1px rgba(184, 115, 74, .45),
    0 0 0 8px #fbf6ef,
    0 0 0 9px rgba(184, 115, 74, .3),
    0 30px 60px -30px rgba(70, 40, 20, .45);
  margin-top: 40px;
}
.card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 230px 230px 18px 18px / 210px 210px 18px 18px;
  border: 1px solid rgba(184, 115, 74, .35);
  pointer-events: none;
}

.card__seal {
  position: absolute;
  left: 50%;
  top: 0;
  width: 84px;
  height: 84px;
  translate: -50% -50%;
  filter: drop-shadow(0 8px 12px rgba(60, 30, 15, .35));
  animation: spin 40s linear infinite;
}

.card__title {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 10.5vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: .03em;
  color: var(--ink);
}
.card__small {
  display: block;
  margin-bottom: 6px;
  font-family: var(--f-sans);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--copper);
}
.card__rule {
  width: 120px;
  height: 14px;
  margin: 18px auto 20px;
  background:
    radial-gradient(circle, var(--copper) 0 3px, transparent 3.5px) center / 14px 14px no-repeat,
    linear-gradient(90deg, transparent, var(--copper) 30%, transparent 44%, transparent 56%, var(--copper) 70%, transparent) center / 100% 1px no-repeat;
}
.card__date {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.45rem, 6.4vw, 1.75rem);
  line-height: 1.25;
  color: var(--ink);
}
.card__time {
  margin-top: 8px;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--copper);
}
.card__time.is-tbc {
  font-family: var(--f-serif);
  font-style: italic;
  letter-spacing: 0;
  font-size: 1.25rem;
  color: var(--taupe);
}
.card__line {
  margin-top: 16px;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--taupe-dark);
}
.card__line--paracha em {
  font-family: var(--f-display);
  font-style: italic;
  color: var(--copper);
}
.card__place {
  margin-top: 22px;
  font-family: var(--f-sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink);
}
.card__addr {
  margin-top: 6px;
  font-size: 1.12rem;
  line-height: 1.45;
  color: var(--taupe-dark);
}

.waze {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 22px;
  padding: 10px 22px 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(184, 115, 74, .55);
  background: rgba(255, 255, 255, .6);
  color: var(--ink);
  font-size: .98rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-decoration: none;
  transition: background .3s, transform .3s var(--ease-out);
}
.waze svg { width: 26px; height: 26px; color: #33ccff; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.waze:active { transform: scale(.96); }

/* Soirée : version de nuit, chocolat et or rosé */
.card--night {
  color: var(--ivory);
  background:
    linear-gradient(180deg, rgba(28, 15, 9, .55) 0%, rgba(28, 15, 9, .72) 45%, rgba(20, 10, 6, .86) 100%),
    url("assets/images/fond-soiree.jpg") center / cover no-repeat,
    #2a170f;
  box-shadow:
    0 0 0 1px rgba(217, 165, 133, .6),
    0 0 0 8px var(--ivory),
    0 0 0 9px rgba(184, 115, 74, .35),
    0 30px 60px -25px rgba(40, 20, 10, .7);
}
.card--night::before { border-color: rgba(243, 205, 176, .35); }
.card--night .card__title { color: transparent; background: var(--grad-rose); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: metal 5s ease-in-out infinite alternate; }
.card--night .card__small,
.card--night .card__time { color: var(--rose); }
.card--night .card__time.is-tbc { color: rgba(248, 242, 233, .7); }
.card--night .card__date,
.card--night .card__place { color: #fff6ee; }
.card--night .card__addr,
.card--night .card__line { color: rgba(248, 242, 233, .82); }
.card--night .card__rule {
  background:
    radial-gradient(circle, var(--rose) 0 3px, transparent 3.5px) center / 14px 14px no-repeat,
    linear-gradient(90deg, transparent, var(--rose) 30%, transparent 44%, transparent 56%, var(--rose) 70%, transparent) center / 100% 1px no-repeat;
}
.card--night .waze { color: var(--ivory); background: rgba(255, 255, 255, .06); border-color: rgba(243, 205, 176, .5); }
.card--night::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 75% 22%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 62% 58%, #ffe7d4, transparent),
    radial-gradient(1px 1px at 30% 72%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 85% 80%, #ffe7d4, transparent),
    radial-gradient(1px 1px at 12% 88%, #fff, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes twinkle { from { opacity: .25; } to { opacity: .85; } }

/* =========================================================
   SECTION 6 · RSVP
   ========================================================= */
.rsvp { padding: 90px 16px 80px; }

.rsvp__card {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: 64px 22px 32px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fbf6ef, #f3e8da);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(217, 165, 133, .7), 0 0 0 7px rgba(251, 246, 239, .08), 0 40px 80px -30px rgba(0, 0, 0, .6);
  text-align: left;
}
.rsvp__seal {
  position: absolute;
  left: 50%;
  top: 0;
  width: 78px;
  height: 78px;
  translate: -50% -50%;
  animation: spin 40s linear infinite;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .4));
}
.rsvp__title {
  text-align: center;
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 7.2vw, 2.05rem);
  line-height: 1.2;
  margin-bottom: 30px;
}
.rsvp__title em {
  display: block;
  margin-top: 4px;
  font-family: var(--f-script);
  font-style: normal;
  font-size: 1.5em;
  line-height: 1.1;
  color: var(--copper);
}

.form { display: grid; gap: 26px; }

.field label,
.choices legend {
  display: block;
  margin-bottom: 10px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bronze);
}
.field input,
.field textarea,
.qty select {
  width: 100%;
  font: inherit;
  font-size: 1.15rem; /* ≥ 16px : pas de zoom auto sur iOS */
  color: var(--ink);
  background: #fffdfa;
  border: 1px solid rgba(140, 98, 57, .4);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .3s, box-shadow .3s;
}
.field textarea { resize: vertical; min-height: 96px; font-family: var(--f-serif); font-size: 1.3rem; font-weight: 500; }
.field input:focus,
.field textarea:focus,
.qty select:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 4px rgba(184, 115, 74, .18);
}
.field input::placeholder { color: #b3a395; }
.is-invalid { border-color: #b4452f !important; box-shadow: 0 0 0 4px rgba(180, 69, 47, .14) !important; }

.choices { border: 0; padding: 0; margin: 0; min-width: 0; }
#choices { display: grid; gap: 12px; }

.choice {
  display: block;
  border-radius: 16px;
  background: #fffdfa;
  border: 1px solid rgba(140, 98, 57, .3);
  transition: border-color .35s, background .35s, box-shadow .35s;
}
.choice.is-on {
  border-color: var(--copper);
  background: linear-gradient(180deg, #fffaf4, #fbefe4);
  box-shadow: 0 10px 24px -16px rgba(140, 80, 40, .6);
}
.choice__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  min-height: 64px;
}
.choice__head input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.choice__box {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1.5px solid rgba(140, 98, 57, .55);
  background: #fff;
  position: relative;
  transition: background .3s, border-color .3s;
}
.choice__box::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  width: 8px;
  height: 15px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .35s var(--ease-out);
}
.choice__head input:checked + .choice__box {
  background: linear-gradient(135deg, #8a5537, #c58a63);
  border-color: transparent;
}
.choice__head input:checked + .choice__box::after { transform: rotate(45deg) scale(1); }
.choice__head input:focus-visible + .choice__box { box-shadow: 0 0 0 4px rgba(184, 115, 74, .3); }
.choice__text { display: grid; gap: 2px; }
.choice__text strong { font-weight: 500; font-size: 1.1rem; line-height: 1.3; }
.choice__text small { font-size: .98rem; color: var(--taupe-dark); }

/* Connecteur logique : nombre d'adultes / d'enfants révélé à la sélection */
.choice__more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease-out);
}
.choice.is-on .choice__more { grid-template-rows: 1fr; }
.choice__inner { overflow: hidden; }
.qty {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 16px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .4s, transform .5s var(--ease-out);
}
.choice.is-on .qty { opacity: 1; transform: none; transition-delay: .1s; }
.qty label {
  display: grid;
  gap: 6px;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bronze);
}
.qty select {
  padding: 12px 40px 12px 16px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b8734a' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") right 14px center / 13px no-repeat,
    #fff;
  font-weight: 500;
  font-size: 1.2rem;
}

.choices__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--taupe);
}
.choices__or::before,
.choices__or::after { content: ""; flex: 1; height: 1px; background: rgba(140, 98, 57, .25); }

.form__error {
  min-height: 0;
  font-size: 1.02rem;
  color: #a03c28;
  text-align: center;
}
.form__error:empty { display: none; }

.btn__spinner {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.btn.is-loading .btn__spinner { display: block; }
.btn.is-loading { pointer-events: none; opacity: .85; }

.done {
  text-align: center;
  padding: 10px 0 20px;
  outline: none;
  animation: fadeUp 1s var(--ease-out) both;
}
.done__seal {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  color: var(--copper);
}
.done__seal img { position: absolute; inset: 0; animation: spin 30s linear infinite; }
.done__seal svg { position: absolute; inset: 30px; }
.done__seal path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw 1s .3s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done__title { font-family: var(--f-script); font-size: 3.4rem; line-height: 1.1; color: var(--copper); }
.done__text { margin-top: 8px; font-family: var(--f-serif); font-size: 1.4rem; font-weight: 500; line-height: 1.35; }

/* =========================================================
   SECTION 7 · FOOTER
   ========================================================= */
.footer {
  padding: 64px 22px calc(110px + var(--safe-b));
  text-align: center;
  color: var(--ivory);
  background: linear-gradient(180deg, #1f110a, #160b06);
  border-top: 1px solid rgba(217, 165, 133, .25);
}
.footer__logo {
  width: min(56vw, 220px);
  height: auto;
  margin: 0 auto 26px;
  opacity: .95;
}
.footer__text {
  max-width: 340px;
  margin: 0 auto 26px;
  font-size: 1.08rem;
  line-height: 1.5;
  color: rgba(248, 242, 233, .82);
}

/* =========================================================
   BOUTON MUSIQUE
   ========================================================= */
.sound {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--safe-b));
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(243, 205, 176, .7);
  background: rgba(43, 24, 16, .78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5);
  display: grid;
  place-items: center;
  cursor: pointer;
  animation: fadeUp .8s 1.2s var(--ease-out) both;
}
.sound__bars { display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.sound__bars i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--grad-rose);
  transform-origin: bottom;
  animation: eq 1s ease-in-out infinite alternate;
}
.sound__bars i:nth-child(2) { animation-delay: -.3s; }
.sound__bars i:nth-child(3) { animation-delay: -.6s; }
.sound__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.sound.is-muted .sound__bars i { animation: none; transform: scaleY(.2); }
.sound.is-muted::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 1.5px;
  background: var(--rose-light);
  transform: rotate(-40deg);
}

/* =========================================================
   GRANDS ÉCRANS
   ========================================================= */
@media (min-width: 720px) {
  body { background: var(--choco); }
  main, .footer {
    max-width: 560px;
    margin: 0 auto;
  }
  main { box-shadow: 0 0 80px rgba(0, 0, 0, .5); }
  .hero { padding-top: 64px; }
}

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   DEUX TYPOGRAPHIES · Bodoni Moda (titres, noms) + Cormorant Garamond (textes)
   droites uniquement (aucun italique), une graisse par police
   ========================================================= */
:root {
  --f-serif: "Cormorant Garamond", "Garamond", Georgia, serif;
  --f-sans: var(--f-serif);
  --f-script: "Pinyon Script", "Snell Roundhand", cursive;
}
*, *::before, *::after { font-style: normal !important; font-synthesis: none; }
body, body *, input, select, textarea, button { font-weight: 500 !important; }
.card__line--paracha em { font-family: var(--f-serif); }
/* éléments en Bodoni : graisse 400 */
.parents, .bm-title, .bm-title *, .prenom__main, .prenom__main *,
.cd__num, .card__title, .card__title *, .rsvp__title {
  font-family: var(--f-display) !important;
  font-weight: 400 !important;
}
/* titres en écriture manuscrite (Pinyon Script) */
.intro__name, .prenom__second, .script-title, .cd__done, .events__script,
.rsvp__title em, .done__title {
  font-family: var(--f-script) !important;
  font-weight: 400 !important;
  letter-spacing: 0;
  text-transform: none;
}
.intro__name { font-size: clamp(3.2rem, 15vw, 4.6rem); line-height: 1.15; }
.prenom__second { font-size: clamp(2.6rem, 12.5vw, 3.6rem); line-height: 1.2; padding: 0 .15em; }
.script-title { font-size: clamp(3.4rem, 16vw, 5rem); line-height: 1.2; }
.cd__done { font-size: 3.2rem; }
.events__script { font-size: clamp(3.2rem, 15vw, 4.4rem); line-height: 1.2; }
.rsvp__title em { font-size: 1.55em; line-height: 1.2; margin-top: 10px; }
.done__title { font-size: 3.4rem; line-height: 1.2; }
.grands-parents {
  grid-template-columns: auto auto;
  justify-content: space-between;
  gap: 14px;
  font-size: clamp(1.02rem, 4.3vw, 1.3rem);
  line-height: 1.6;
}
.gp--right { white-space: nowrap; }
.cd__lbl { font-size: .86rem; letter-spacing: .1em; }
.events__place { font-size: 1.05rem; letter-spacing: .16em; }

/* =========================================================
   RESPIRATION · espacements plus généreux
   ========================================================= */
.hero__inner { padding: max(70px, env(safe-area-inset-top)) 24px 80px; }
.logo--hero { margin-bottom: 48px; }
.ornament { margin: 44px auto 40px; }
.parents { line-height: 1.3; }
.fratrie { margin-top: 16px; }
.annonce { margin-top: 48px; line-height: 1.5; }
.bm-title { margin: 20px 0 12px; }
.bm-title + .annonce { margin-top: 20px; }
.prenom { margin-top: 48px; }
.prenom__second { margin-top: .12em; }
.portrait-section { padding: 50px 0 90px; }
.events__head { margin-bottom: 44px; }
.event { padding-bottom: 96px; }
.card { padding: 88px 28px 52px; }
.card__small { margin-bottom: 12px; }
.card__rule { margin: 26px auto 28px; }
.card__date { line-height: 1.35; }
.card__time { margin-top: 14px; }
.card__line { margin-top: 24px; line-height: 1.45; }
.card__place { margin-top: 34px; }
.card__addr { margin-top: 10px; line-height: 1.6; }
.waze { margin-top: 30px !important; }
.countdown { padding: 96px 18px 104px; }
.countdown__sub { margin-top: 18px; line-height: 1.5; }
.rsvp { padding: 110px 16px 100px; }
.rsvp__title { line-height: 1.35; margin-bottom: 40px; }
.choice { margin-bottom: 4px; }
.choice__text small { margin-top: 4px; line-height: 1.45; }
.footer__text { line-height: 1.6; }

/* =========================================================
   COULEUR UNIQUE · chocolat sur fond clair, ivoire sur fond sombre
   ========================================================= */
.grands-parents, .parents, .fratrie, .annonce, .events__script, .events__place,
.card__title, .card__small, .card__date, .card__time, .card__time.is-tbc, .card__line,
.card__line--paracha em, .card__place, .card__addr, .waze,
.rsvp__card, .rsvp__title, .rsvp__title em, .choices legend, .choice__text, .choice__text strong,
.choice__text small, .qty label, .qty select, .choices__or, .field input, .field textarea,
.done__seal, .done__title, .done__text {
  color: var(--ink) !important;
  opacity: 1;
}
.intro__kicker, .intro__name, .intro__hint, .countdown__sub, .cd__num, .cd__lbl, .cd__done,
.card--night .card__small, .card--night .card__date, .card--night .card__time,
.card--night .card__time.is-tbc, .card--night .card__line, .card--night .card__place,
.card--night .card__addr, .card--night .waze, .footer__text, .btn--outline {
  color: var(--ivory) !important;
  opacity: 1;
}
.script-title, .card--night .card__title {
  background: none !important;
  color: var(--ivory) !important;
  -webkit-text-fill-color: var(--ivory) !important;
  animation: none !important;
}
/* Moshé reprend exactement le cuivre de MAYRON */
.prenom__second {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}
.rsvp__card label, .field label, .field > span { color: var(--ink) !important; }
body, body * { font-variant-numeric: lining-nums; }
.events__place { font-size: 1rem; letter-spacing: .08em; white-space: nowrap; }
.choice__text strong { line-height: 1.35; }
.choice__text small { margin-top: 6px; }
@media (max-width: 359px) { .events__place { white-space: normal; } .gp--right { white-space: normal; } }
.countdown .draw-wrap { margin-bottom: 40px; }
.events__head { margin-bottom: 64px; }

/* =========================================================
   COMPTE À REBOURS · lisibilité
   ========================================================= */
.cd { gap: 26px 30px; }
@media (min-width: 560px) { .cd { grid-template-columns: repeat(4, minmax(0, 118px)); gap: 26px; } }
.cd__unit {
  aspect-ratio: auto;
  justify-content: flex-start;
  container-type: inline-size;
}
.cd__unit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(20, 10, 6, .86) 0 63%, rgba(20, 10, 6, 0) 64%);
}
.cd__unit img {
  inset: auto;
  top: 0;
  left: 0;
  height: auto;
  aspect-ratio: 1;
}
.cd__num {
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-serif) !important;
  font-weight: 500 !important;
  font-size: clamp(2.1rem, 11vw, 2.7rem);
  font-size: 31cqw;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: .02em;
  padding-bottom: .06em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}
.cd__lbl {
  margin-top: 10px;
  font-size: 1rem;
  letter-spacing: .16em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}
.events__head { margin-bottom: 100px; }
.waze svg { color: var(--choco) !important; filter: none !important; }
.card--night .waze svg { color: var(--ivory) !important; }
@media (min-width: 560px) { .cd { grid-template-columns: repeat(2, minmax(0, 160px)); gap: 30px 44px; } }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
