/* =========================================================
   Bar Mitsvah de Joshua – Famille Wasserman Cohen
   Thème : nuit de Jérusalem, or & ivoire, bleu d'Israël,
   touches « HUD » inspirées des jeux vidéo.
   ========================================================= */

:root {
  --navy-950: #040918;
  --navy-900: #071230;
  --navy-800: #0e2358;
  --navy-700: #16307a;
  --blue: #2f5fd0;
  --sky: #5aa0e6;
  --gold: #d4aa46;
  --gold-light: #fed860;
  --gold-pale: #fff1b8;
  --gold-deep: #a8822c;
  --ivory: #f8f3e6;
  --silver: #c9d1dc;
  --white: #ffffff;

  --text: #f4efe2;
  --text-soft: rgba(244, 239, 226, .82);

  --f-display: "Cinzel", "Times New Roman", serif;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-hud: "Rajdhani", "Arial Narrow", sans-serif;
  --f-hebrew: "Frank Ruhl Libre", "David", serif;

  --gutter: 16px;
  --maxw: 560px;
  --cut: 18px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.77, 0, .18, 1);

  --gold-grad: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold-light) 22%, var(--gold) 42%, var(--gold-pale) 55%, var(--gold) 68%, var(--gold-deep) 100%);
}

@property --a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy-950);
  color: var(--text);
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 5vw, 1.5rem);
  line-height: 1.45;
  font-variant-numeric: lining-nums; /* chiffres alignés, plus lisibles que les chiffres elzéviriens */
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

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

.gold-text {
  background: var(--gold-grad);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -150% 0; }
}

/* ---------- Fond fixe ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg__img {
  position: absolute;
  inset: -4% -4% -4% -4%;
  background: var(--navy-950) url("assets/images/bg-jerusalem.jpg") center bottom / cover no-repeat;
  transform: scale(1.06);
  animation: bgBreath 30s ease-in-out infinite alternate;
  will-change: transform;
}
.bg__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(4, 9, 24, .2), transparent 70%),
    linear-gradient(180deg, rgba(4, 9, 24, .38) 0%, rgba(4, 9, 24, .55) 45%, rgba(4, 9, 24, .78) 100%);
}
.bg__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
@keyframes bgBreath {
  from { transform: scale(1.06) translateY(0); }
  to { transform: scale(1.12) translateY(-1.5%); }
}

/* ---------- Médaillon du logo ---------- */
.medallion {
  --size: 180px;
  position: relative;
  width: var(--size);
  height: var(--size);
  margin-inline: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 28%, #ffffff 0%, var(--ivory) 55%, #e8dcb9 100%);
  box-shadow:
    0 0 0 3px var(--gold),
    0 0 0 7px rgba(212, 170, 70, .22),
    0 0 0 8px rgba(254, 216, 96, .5),
    0 22px 60px rgba(0, 0, 0, .55),
    0 0 90px rgba(254, 216, 96, .3);
  isolation: isolate;
}
.medallion::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: conic-gradient(from var(--a), transparent 0 62%, rgba(254, 216, 96, .0) 64%, var(--gold-light) 82%, #fff 86%, transparent 90%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: spin 3.6s linear infinite;
  z-index: -1;
}
.medallion::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .75) 50%, transparent 62%);
  background-size: 300% 100%;
  background-position: 120% 0;
  animation: sheen 5s var(--ease-io) infinite 1.2s;
  z-index: 2;
  pointer-events: none;
}
.medallion img {
  width: 74%;
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 6px rgba(7, 18, 48, .25));
}
.medallion--xl { --size: min(64vw, 300px); }
.medallion--md { --size: min(46vw, 210px); }
.medallion--sm { --size: 128px; }

@keyframes spin { to { --a: 360deg; } }
@keyframes sheen {
  0% { background-position: 120% 0; }
  45%, 100% { background-position: -120% 0; }
}

/* ---------- Boutons ---------- */
.btn {
  --clip: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 60px;
  padding: 0 2.1em;
  border: 0;
  cursor: pointer;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.02rem, 4.4vw, 1.2rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  clip-path: var(--clip);
  transition: transform .25s var(--ease-out), filter .25s;
  touch-action: manipulation;
}
.btn span { position: relative; z-index: 1; }
.btn:active { transform: scale(.97); }

.btn--gold {
  color: var(--navy-900);
  background: linear-gradient(135deg, var(--gold-pale), var(--gold-light) 30%, var(--gold) 65%, var(--gold-deep));
  box-shadow: 0 10px 30px rgba(212, 170, 70, .35);
}
.btn--gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .85) 50%, transparent 70%);
  background-size: 250% 100%;
  background-position: 150% 0;
  animation: sheen 3.2s ease-in-out infinite;
}

.btn--outline {
  color: var(--gold-pale);
  background:
    linear-gradient(var(--navy-900), var(--navy-900)) padding-box,
    linear-gradient(135deg, var(--gold-light), var(--gold-deep)) border-box;
  border: 2px solid transparent;
  background-clip: padding-box, border-box;
}
.btn--outline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(254, 216, 96, .25), transparent 60%);
}

/* ---------- Pop-up d'ouverture ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: calc(env(safe-area-inset-top) + 24px) var(--gutter) calc(env(safe-area-inset-bottom) + 24px);
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
}
.intro__door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background:
    radial-gradient(120% 70% at var(--x) 50%, rgba(47, 95, 208, .35), transparent 60%),
    repeating-linear-gradient(60deg, rgba(254, 216, 96, .045) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-60deg, rgba(254, 216, 96, .045) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
  transition: transform 1.25s var(--ease-io) .25s;
  will-change: transform;
}
.intro__door--left { left: 0; --x: 100%; box-shadow: inset -1px 0 0 rgba(254, 216, 96, .55); }
.intro__door--right { right: 0; --x: 0%; box-shadow: inset 1px 0 0 rgba(254, 216, 96, .55); }

.intro__flash {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140vmax;
  height: 140vmax;
  margin: -70vmax 0 0 -70vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 220, .95) 0%, rgba(254, 216, 96, .55) 18%, rgba(254, 216, 96, 0) 50%);
  opacity: 0;
  transform: scale(.05);
  pointer-events: none;
  z-index: 3;
}

.intro__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
  transition: transform .8s var(--ease-out), opacity .6s ease, filter .6s ease;
}
.intro__content .medallion { animation: introPop 1.4s var(--ease-out) both; }
.intro__kicker {
  font-family: var(--f-hud);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--gold-pale);
  opacity: .9;
  animation: fadeUp 1s var(--ease-out) .5s both;
  margin-right: -.38em;
}

.loader {
  width: min(70vw, 280px);
  display: grid;
  gap: 10px;
  transition: opacity .4s ease, transform .4s ease;
  animation: fadeUp .8s var(--ease-out) .7s both;
}
.loader__track {
  height: 8px;
  padding: 2px;
  border: 1px solid rgba(254, 216, 96, .55);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  background: rgba(4, 9, 24, .6);
}
.loader__bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--blue), var(--sky), var(--gold-light));
  box-shadow: 0 0 12px var(--gold-light);
  animation: load 1.7s cubic-bezier(.6, .05, .3, 1) .9s forwards;
}
.loader__label {
  font-family: var(--f-hud);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silver);
}
.intro__cta {
  opacity: 0;
  transform: translateY(14px) scale(.96);
  pointer-events: none;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  margin-top: -76px;
  animation: pulseGlow 2.4s ease-in-out infinite;
}
.intro.is-ready .loader { opacity: 0; transform: translateY(-8px); }
.intro.is-ready .intro__cta { opacity: 1; transform: none; pointer-events: auto; }

/* Ouverture : portes qui s'écartent + éclat de lumière */
.intro.is-opening .intro__door--left { transform: translateX(-102%); }
.intro.is-opening .intro__door--right { transform: translateX(102%); }
.intro.is-opening .intro__content { transform: scale(1.18); opacity: 0; filter: blur(8px); }
.intro.is-opening .intro__flash { animation: flash 1.3s ease-out forwards; }
.intro.is-gone { display: none; }

@keyframes introPop {
  0% { opacity: 0; transform: scale(.6) rotate(-8deg); filter: blur(10px); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes load { to { transform: scaleX(1); } }
@keyframes flash {
  0% { opacity: 0; transform: scale(.05); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(254, 216, 96, 0)); }
  50% { filter: drop-shadow(0 0 16px rgba(254, 216, 96, .65)); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Bouton musique ---------- */
.music {
  position: fixed;
  right: calc(env(safe-area-inset-right) + 14px);
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid rgba(254, 216, 96, .7);
  background: rgba(7, 18, 48, .78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45), 0 0 18px rgba(254, 216, 96, .25);
  opacity: 0;
  transform: scale(.6);
  pointer-events: none;
  transition: opacity .5s ease, transform .5s var(--ease-out);
}
.music.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.music__bars { display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.music__bars i {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(var(--gold-pale), var(--gold));
  transform-origin: bottom;
  animation: eq 1s ease-in-out infinite;
}
.music__bars i:nth-child(2) { animation-delay: -.3s; }
.music__bars i:nth-child(3) { animation-delay: -.6s; }
.music__bars i:nth-child(4) { animation-delay: -.15s; }
.music.is-paused .music__bars i { animation: none; transform: scaleY(.25); }
.music.is-paused::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 2px;
  background: var(--gold-light);
  transform: rotate(-45deg);
  border-radius: 2px;
}
@keyframes eq {
  0%, 100% { transform: scaleY(.3); }
  50% { transform: scaleY(1); }
}

/* ---------- Mise en page générale ---------- */
.page {
  position: relative;
  z-index: 1;
  overflow-x: clip;
}
.section {
  position: relative;
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 72px var(--gutter);
  text-align: center;
}

.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--f-hud);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 10px;
}
.kicker::before, .kicker::after {
  content: "";
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.kicker::after { transform: scaleX(-1); }

.section-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 10.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: .02em;
}
.section-title--sm {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: clamp(1.55rem, 6.6vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: 0;
  margin-bottom: 28px;
}

/* ---------- Animations d'apparition ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out) var(--d, 0s), transform 1.1s var(--ease-out) var(--d, 0s), filter 1.1s var(--ease-out) var(--d, 0s);
}
[data-reveal="blur"] { filter: blur(12px); transform: translateY(10px) scale(1.06); }
[data-reveal="zoom"] { transform: scale(.7); }
[data-reveal="card"] { transform: translateY(50px) scale(.94); }
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* ---------- Section 1 : faire-part ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(env(safe-area-inset-top) + 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.hero .medallion { margin-bottom: 18px; }

.grandparents {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  font-size: clamp(1.08rem, 5.4vw, 1.45rem);
  color: var(--silver);
  white-space: nowrap;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(254, 216, 96, .25);
}
.grandparents span:first-child { text-align: left; }
.grandparents span:last-child { text-align: right; }

.parents {
  font-weight: 700;
  font-size: clamp(1.5rem, 6.6vw, 2rem);
  line-height: 1.25;
  color: var(--white);
  margin-top: 6px;
}
.amp {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--gold-light);
  padding-inline: .1em;
}
.parents .amp { display: block; font-size: .8em; line-height: 1.2; }
.siblings {
  font-weight: 700;
  font-size: clamp(1.4rem, 6vw, 1.8rem);
  color: var(--white);
}

.announce {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 5.4vw, 1.6rem);
  color: var(--text-soft);
  margin-top: 8px;
}
.bar-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 10vw, 3.4rem);
  letter-spacing: .06em;
  line-height: 1.1;
  text-transform: uppercase;
  filter: drop-shadow(0 4px 18px rgba(212, 170, 70, .35));
}

.joshua {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 17vw, 6.2rem);
  line-height: 1;
  letter-spacing: .06em;
  margin: 14px 0 0 .06em;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  perspective: 600px;
}
.joshua .ch {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 0%, var(--gold-pale) 35%, var(--gold) 70%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(254, 216, 96, .45)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5));
  opacity: 0;
  transform: translateY(60%) rotateX(-80deg);
  transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i) * 90ms);
}
.joshua.is-in .ch { opacity: 1; transform: none; }

.hebrew {
  font-family: var(--f-hebrew);
  font-weight: 500;
  font-size: clamp(1.9rem, 8.6vw, 2.7rem);
  color: var(--sky);
  text-shadow: 0 0 22px rgba(90, 160, 230, .55);
  line-height: 1.2;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  color: var(--gold);
  margin-top: 10px;
}
.ornament span { flex: 1; max-width: 110px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament span:last-child { transform: scaleX(-1); }
.ornament svg { width: 28px; height: 28px; }

.memory {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 6px 0 10px;
}
.memory__flame {
  width: 16px;
  height: 26px;
  position: relative;
  margin-bottom: 4px;
}
.memory__flame i {
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 72%, #fff 0 18%, var(--gold-light) 38%, rgba(212, 170, 70, .0) 72%);
  filter: blur(.4px) drop-shadow(0 0 10px rgba(254, 216, 96, .9));
  animation: flicker 2.6s ease-in-out infinite;
  transform-origin: 50% 90%;
}
.memory__intro {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 5vw, 1.4rem);
  color: var(--text-soft);
}
.memory__names {
  display: grid;
  gap: 2px;
  font-weight: 600;
  font-size: clamp(1.3rem, 5.6vw, 1.55rem);
  color: var(--silver);
}
.memory__names small {
  font-family: var(--f-display);
  font-size: .62em;
  letter-spacing: .08em;
  color: var(--gold);
  margin-left: .2em;
  vertical-align: .15em;
}
@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-2deg); opacity: .95; }
  30% { transform: scale(1.06, .94) rotate(2deg); opacity: 1; }
  55% { transform: scale(.95, 1.05) rotate(-1deg); opacity: .85; }
  80% { transform: scale(1.03) rotate(1.5deg); opacity: 1; }
}

.scroll-hint {
  margin-top: 26px;
  width: 30px;
  height: 50px;
  border: 2px solid rgba(254, 216, 96, .7);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-hint span {
  width: 4px;
  height: 10px;
  border-radius: 2px;
  background: var(--gold-light);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(18px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Section 2 : compte à rebours ---------- */
.countdown { padding-block: 90px; }
.countdown__sub {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 5.4vw, 1.6rem);
  color: var(--text-soft);
  margin: 8px 0 32px;
}
.timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(6px, 2.4vw, 14px);
}
.timer__cell {
  --c: 12px;
  position: relative;
  padding: 18px 2px 14px;
  display: grid;
  gap: 4px;
  justify-items: center;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  background:
    linear-gradient(180deg, rgba(22, 48, 122, .75), rgba(7, 18, 48, .92));
  isolation: isolate;
}
.timer__cell::before {
  /* bordure lumineuse animée */
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  clip-path: inherit;
  background: conic-gradient(from var(--a), var(--gold-deep), var(--gold-light), var(--sky), var(--gold-deep) 50%, var(--gold-light), var(--gold-deep));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 6s linear infinite;
  z-index: -1;
}
.timer__cell::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254, 216, 96, .25), transparent);
}
.timer__num {
  font-family: var(--f-hud);
  font-weight: 700;
  font-size: clamp(2.3rem, 10.5vw, 3.4rem);
  line-height: 1;
  color: var(--white);
  text-shadow: 0 0 14px rgba(254, 216, 96, .55), 0 0 2px #fff;
  font-variant-numeric: tabular-nums;
}
.timer__num.tick { animation: tick .55s var(--ease-out); }
.timer__label {
  font-family: var(--f-hud);
  font-weight: 700;
  font-size: clamp(.82rem, 3.6vw, 1rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.timer__done {
  margin-top: 26px;
  font-family: var(--f-display);
  font-size: 1.5rem;
  color: var(--gold-light);
}
@keyframes tick {
  0% { transform: translateY(-40%) scale(.9); opacity: 0; filter: blur(4px); }
  100% { transform: none; opacity: 1; filter: none; }
}

/* ---------- Cartes (événements & formulaire) ---------- */
.event { padding-block: 48px; }

.card {
  position: relative;
  padding: 1.5px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  background: linear-gradient(160deg, var(--gold-light), rgba(212, 170, 70, .25) 30%, rgba(90, 160, 230, .35) 70%, var(--gold));
}
.card__inner {
  position: relative;
  clip-path: inherit;
  padding: 46px 20px 34px;
  background:
    radial-gradient(120% 50% at 50% 0%, rgba(47, 95, 208, .32), transparent 70%),
    linear-gradient(180deg, rgba(10, 24, 62, .94), rgba(5, 12, 32, .96));
  overflow: hidden;
}
.card__inner::before {
  /* reflet qui balaie la carte à l'apparition */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(254, 216, 96, .18) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
.card.is-in .card__inner::before { animation: cardSweep 1.6s var(--ease-io) .5s forwards; }
@keyframes cardSweep { to { transform: translateX(120%); } }

.card__hud {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 18px 7px;
  font-family: var(--f-hud);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--navy-900);
  background: linear-gradient(135deg, var(--gold-pale), var(--gold));
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 12px 100%);
  white-space: nowrap;
}
.card__hud i { font-style: normal; opacity: .6; }

.card__icon {
  width: 76px;
  height: 76px;
  margin: 6px auto 14px;
  filter: drop-shadow(0 0 14px rgba(254, 216, 96, .45));
}
.card.is-in .card__icon { animation: iconFloat 4s ease-in-out infinite 1.2s; }
@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.flame { transform-origin: 22px 22px; animation: flicker 2.2s ease-in-out infinite; }
.flame--2 { transform-origin: 42px 22px; animation-delay: -1.1s; }
.sparkle { animation: twinkle 1.8s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .2; } }

.card__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 8vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: .03em;
  margin-bottom: 14px;
  background: var(--gold-grad);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shimmer 7s linear infinite;
}
.card__date {
  font-weight: 700;
  font-size: clamp(1.45rem, 6.4vw, 1.8rem);
  color: var(--white);
}
.card__time {
  font-family: var(--f-hud);
  font-weight: 700;
  font-size: clamp(2.6rem, 12vw, 3.4rem);
  line-height: 1.1;
  color: var(--gold-light);
  text-shadow: 0 0 18px rgba(254, 216, 96, .5);
  letter-spacing: .04em;
}
.card__paracha {
  margin-top: 6px;
  font-size: clamp(1.3rem, 5.6vw, 1.55rem);
  color: var(--text-soft);
}
.card__paracha strong { color: var(--white); font-weight: 700; }
.card__paracha span { font-family: var(--f-hebrew); color: var(--sky); margin-left: .3em; }

.card__sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px auto 16px;
  max-width: 240px;
  color: var(--gold);
}
.card__sep::before, .card__sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254, 216, 96, .7));
}
.card__sep::after { transform: scaleX(-1); }
.card__sep svg { width: 20px; height: 20px; }

.card__place {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 5.6vw, 1.55rem);
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 6px;
}
.card__address {
  font-size: clamp(1.25rem, 5.4vw, 1.45rem);
  color: var(--text-soft);
  line-height: 1.4;
}

.waze {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  min-height: 52px;
  padding: 8px 22px 8px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #46d3ff, #22b5f0);
  color: #062038;
  font-family: var(--f-hud);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .06em;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(51, 204, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.waze svg {
  width: 36px;
  height: 36px;
  padding: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
}
.waze:active { transform: scale(.96); }

/* ---------- Section 6 : RSVP ---------- */
.rsvp { padding-top: 80px; }
.card--form .card__inner { padding: 34px 18px 30px; text-align: left; }

.form { display: grid; gap: 22px; }
.form__row { display: grid; gap: 18px; }

.field { display: grid; gap: 8px; }
.field__label {
  font-family: var(--f-hud);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-light);
  padding: 0;
}
.field__input {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: 1.3rem; /* > 16px : évite le zoom auto sur iOS */
  color: var(--white);
  background-color: rgba(255, 255, 255, .07);
  border: 1.5px solid rgba(201, 209, 220, .35);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field__input:focus {
  border-color: var(--gold-light);
  background-color: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 4px rgba(254, 216, 96, .18);
}
.field__input.is-invalid { border-color: #ff7d7d; box-shadow: 0 0 0 4px rgba(255, 125, 125, .15); }
.field__input--area { resize: vertical; min-height: 120px; line-height: 1.4; }

select.field__input {
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold-light) 50%),
    linear-gradient(135deg, var(--gold-light) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 15px) 50%;
  background-size: 7px 7px;
  background-repeat: no-repeat;
  font-family: var(--f-hud);
  font-size: 1.45rem;
  text-align: center;
}
select.field__input option { color: #0b1530; background: #fff; }

.choices {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.choices legend { margin-bottom: 10px; }

.choice {
  border: 1.5px solid rgba(201, 209, 220, .22);
  border-radius: 6px;
  background: rgba(255, 255, 255, .035);
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.choice.is-on {
  border-color: rgba(254, 216, 96, .75);
  background: rgba(254, 216, 96, .07);
  box-shadow: 0 0 22px rgba(254, 216, 96, .12);
}
.choice--absent.is-on { border-color: rgba(201, 209, 220, .7); background: rgba(201, 209, 220, .08); box-shadow: none; }

.check {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  cursor: pointer;
  min-height: 64px;
}
.check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.check__box {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(254, 216, 96, .7);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  background: rgba(4, 9, 24, .5);
  transition: background .25s;
}
.check__box svg {
  width: 22px;
  height: 22px;
  color: var(--navy-900);
  transform: scale(0);
  transition: transform .35s var(--ease-out);
}
.check input:checked + .check__box { background: linear-gradient(135deg, var(--gold-pale), var(--gold)); }
.check input:checked + .check__box svg { transform: scale(1); }
.check input:focus-visible + .check__box { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.check__text {
  font-weight: 700;
  font-size: clamp(1.22rem, 5.2vw, 1.4rem);
  line-height: 1.25;
  color: var(--white);
}
.check__text small {
  display: block;
  font-family: var(--f-hud);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .06em;
  color: var(--sky);
  margin-top: 2px;
}

/* Connecteur logique : nombre d'adultes / enfants */
.guests {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease-out);
}
.guests > .guests__inner { overflow: hidden; }
.choice.is-on .guests { grid-template-rows: 1fr; }
.guests__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 14px;
  min-height: 0;
  transition: padding .45s var(--ease-out);
}
.choice.is-on .guests__inner { padding: 2px 14px 16px; }
.guests__field { display: grid; gap: 6px; }
.guests__field span {
  font-family: var(--f-hud);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--silver);
}

.form__error {
  min-height: 0;
  font-family: var(--f-hud);
  font-weight: 600;
  font-size: 1.15rem;
  color: #ffadad;
  text-align: center;
}
.form__error:empty { display: none; }
.form__submit { width: 100%; min-height: 64px; font-size: 1.25rem; }
.form__submit[disabled] { opacity: .65; pointer-events: none; }

.form.is-leaving { animation: formOut .6s var(--ease-io) forwards; }
@keyframes formOut { to { opacity: 0; transform: translateY(-20px) scale(.97); filter: blur(6px); } }

.thanks {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 20px 0 10px;
  outline: none;
}
.thanks:not([hidden]) { animation: introPop 1s var(--ease-out) both; }
.thanks__badge {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-pale), var(--gold) 60%, var(--gold-deep));
  box-shadow: 0 0 0 6px rgba(254, 216, 96, .18), 0 0 40px rgba(254, 216, 96, .55);
  color: var(--navy-900);
}
.thanks__badge svg { width: 54px; height: 54px; }
.thanks__title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 9vw, 2.6rem);
  color: var(--gold-light);
}
.thanks__text { font-size: clamp(1.3rem, 5.6vw, 1.5rem); color: var(--text); }

/* ---------- Section 7 : footer ---------- */
.footer {
  padding: 70px var(--gutter) calc(env(safe-area-inset-bottom) + 100px);
  display: grid;
  justify-items: center;
  gap: 14px;
}
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.footer .medallion { margin-bottom: 16px; }
.footer .btn {
  padding: 0 1.2em;
  letter-spacing: .06em;
  font-size: clamp(.98rem, 4.3vw, 1.15rem);
}
.footer__q {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 5.6vw, 1.55rem);
  line-height: 1.3;
  color: var(--white);
}
.footer__t {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 5.4vw, 1.45rem);
  color: var(--text-soft);
  margin-bottom: 12px;
}

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

/* ---------- Écrans plus larges ---------- */
@media (min-width: 640px) {
  .section { padding-inline: 24px; }
  .card__inner { padding: 54px 40px 40px; }
  .card--form .card__inner { padding: 40px 34px 34px; }
  .form__row { grid-template-columns: 1fr 1fr; }
}

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