/* ==========================================================================
   Bar Mitzvah de Leeroy Levy — invitation numérique
   Fonts : Cormorant Garamond (latin) / Frank Ruhl Libre (hébreu)
   ========================================================================== */

:root {
  --ink: #10294a;          /* bleu nuit : texte principal */
  --ink-soft: #3d5878;     /* bleu ardoise : texte secondaire */
  --ink-faint: rgba(16, 41, 74, 0.45);
  --line: rgba(16, 41, 74, 0.22);
  --gold: #b99a5f;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.75);
  --shadow: 0 18px 50px -18px rgba(16, 41, 74, 0.35);
  --radius: 26px;
  --font: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-he: "Frank Ruhl Libre", "David", "Arial Hebrew", serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: #cfe6f8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}
body.is-locked { overflow: hidden; height: 100vh; height: 100dvh; }
img, svg { display: block; max-width: 100%; }
address { font-style: normal; }
button { font: inherit; color: inherit; }
::selection { background: rgba(16, 41, 74, 0.18); }

/* ---------- Fond fixe ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #cfe6f8;
  background-image: url("assets/background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(0);
  will-change: transform;
}
.no-webp .bg { background-image: url("assets/background.jpg"); }
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 40%, rgba(255,255,255,0.10) 100%);
}

/* ---------- בס"ד ---------- */
.bsd {
  position: fixed;
  top: calc(14px + var(--safe-top));
  right: 18px;
  z-index: 60;
  font-family: var(--font-he);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- Logo ---------- */
.logo { fill: currentColor; color: var(--ink); height: auto; margin-inline: auto; }
.logo--xl { width: clamp(175px, 54vw, 256px); }
.logo--lg { width: clamp(112px, 33vw, 152px); }
.logo--sm { width: 84px; }

/* ---------- Boutons ---------- */
.btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background-color 0.3s, color 0.3s, opacity 0.3s;
  position: relative;
  overflow: hidden;
}
.btn > span { position: relative; z-index: 1; }
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 14px 30px -12px rgba(16, 41, 74, 0.55);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
}
.btn--primary:hover::before, .btn--primary:focus-visible::before { transform: translateX(120%); }
.btn--outline {
  background: rgba(255,255,255,0.35);
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--block { width: 100%; }
.btn--waze {
  padding: 0.5rem 1rem 0.5rem 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  background: rgba(255,255,255,0.55);
  color: var(--ink);
  border-color: var(--line);
  margin-top: 0.8rem;
}
.btn--waze svg { width: 20px; height: 20px; }
.btn--waze:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Pop-up d'ouverture ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), visibility 0s linear 1s;
}
.intro__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.intro__logo {
  margin-bottom: 1.2rem;
  animation: introLogo 1.6s var(--ease-out) both;
}
.intro__logo .logo { filter: drop-shadow(0 20px 30px rgba(16,41,74,0.18)); }
.intro__kicker {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
  animation: introText 1.2s 0.5s var(--ease-out) both;
}
.intro__name {
  margin: 0 0 1.6rem;
  font-size: clamp(2.6rem, 13vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  padding-left: 0.22em; /* compense le letter-spacing */
  animation: introText 1.2s 0.7s var(--ease-out) both;
}
.intro__btn { animation: introText 1.2s 1s var(--ease-out) both; }

.intro.is-closing {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
  visibility: hidden;
}
.intro.is-closing .intro__logo { animation: introLogoOut 0.9s var(--ease) both; }
.intro.is-closing .intro__kicker,
.intro.is-closing .intro__name,
.intro.is-closing .intro__btn { animation: introTextOut 0.5s var(--ease) both; }

@keyframes introLogo {
  0%   { opacity: 0; transform: translateY(18px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes introLogoOut {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-40px) scale(1.12); }
}
@keyframes introText {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes introTextOut {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ---------- Bouton musique ---------- */
.music {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  z-index: 40;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px -10px rgba(16,41,74,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.music.is-shown { opacity: 1; transform: translateY(0); }
.music__bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.music__bars i {
  display: block;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--ink);
  transform-origin: bottom;
  animation: bar 1.1s ease-in-out infinite;
}
.music__bars i:nth-child(2) { animation-delay: 0.2s; }
.music__bars i:nth-child(3) { animation-delay: 0.45s; }
.music__bars i:nth-child(4) { animation-delay: 0.1s; }
.music[aria-pressed="false"] .music__bars i { animation: none; transform: scaleY(0.25); opacity: 0.6; }
@keyframes bar {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* ---------- Structure de page ---------- */
.page { visibility: hidden; }
.page.is-open { visibility: visible; }

.section {
  position: relative;
  padding: clamp(3rem, 9vw, 5rem) 0;
}
.section--flush { padding: clamp(2rem, 6vw, 3.5rem) 0; }
.container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 7vw, 2.8rem) clamp(1.3rem, 5vw, 2.2rem);
  text-align: center;
}

/* Cartes événements avec photo en fond */
.card--photo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.card__photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.card__photo picture, .card__photo img {
  display: block;
  width: 100%;
  height: 100%;
}
.card__photo img {
  object-fit: cover;
  object-position: center;
  opacity: 0.2;
  filter: saturate(0.85);
}
#soiree .card__photo img { object-position: 60% center; }
.card--photo .event__place,
.card--photo .event__intro { color: var(--ink); }

.eyebrow {
  margin: 0;
  font-size: clamp(1.5rem, 6.4vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.15;
  padding-left: 0.22em;
}
.rule {
  position: relative;
  width: 100%;
  max-width: 220px;
  height: 1px;
  margin: 1.1rem auto 1.5rem;
  background: linear-gradient(90deg, transparent, var(--line) 25%, var(--line) 75%, transparent);
}
.rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--ink);
  outline: 4px solid rgba(255,255,255,0.7);
}
.rule--soft { margin: 1.8rem auto; max-width: 120px; }
.rule--soft::after { display: none; }

/* ---------- Animations d'apparition ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Section 1 : Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: calc(clamp(2.5rem, 8vw, 4rem) + var(--safe-top));
  padding-bottom: clamp(2.5rem, 8vw, 4rem);
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero .logo--lg { margin-bottom: 2.4rem; }

.grandparents {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
  white-space: nowrap;
  line-height: 1.45;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.grandparents__left,
.grandparents__right { display: flex; flex-direction: column; gap: 0.2em; }
.grandparents__left { text-align: left; align-items: flex-start; }
.grandparents__right { text-align: right; align-items: flex-end; }

.parents {
  margin: 0;
  font-size: clamp(1.55rem, 7vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.siblings {
  margin: 0.5rem 0 0;
  font-size: clamp(1.1rem, 4.8vw, 1.35rem);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.hero__lead {
  margin: 0;
  font-size: clamp(1.05rem, 4.4vw, 1.25rem);
  font-weight: 500;
  color: var(--ink);
}
.siblings + .hero__lead { margin-top: 3rem; }
.hero__lead { line-height: 1.5; }
.hero__title {
  margin: 0.8rem 0 0.8rem;
  font-size: clamp(2rem, 9.2vw, 3.2rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.05;
  padding-left: 0.14em;
  white-space: nowrap;
}
.hero__name {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2.6rem;
  gap: 0.6rem;
}
.hero__leeroy {
  font-size: clamp(3.4rem, 19vw, 6rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 0.95;
  padding-left: 0.14em;
  color: var(--ink);
}
.hero__hebrew {
  font-family: var(--font-he);
  font-size: clamp(1.7rem, 8vw, 2.4rem);
  font-weight: 400;
  color: var(--ink);
  margin-top: 0.4rem;
  letter-spacing: 0.08em;
}

.scroll-hint {
  margin-top: clamp(3rem, 10vw, 4.2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.scroll-hint__label {
  font-size: 0.75rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  padding-left: 0.36em;
}
.scroll-hint__arrow {
  position: relative;
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, transparent, var(--ink-soft));
  overflow: visible;
}
.scroll-hint__arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 9px;
  height: 9px;
  border-right: 1px solid var(--ink-soft);
  border-bottom: 1px solid var(--ink-soft);
  transform: translateX(-50%) rotate(45deg);
}
.scroll-hint__arrow::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 14px;
  background: var(--ink);
  animation: scrollDrop 1.8s var(--ease) infinite;
}
@keyframes scrollDrop {
  0%   { transform: translateY(-14px); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(46px); opacity: 0; }
}

/* ---------- Section 2 : Compte à rebours ---------- */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.25rem, 1.6vw, 0.7rem);
  margin-top: 0.4rem;
}
.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4ch;
}
.countdown__value {
  display: block;
  font-size: clamp(2.1rem, 9.6vw, 3rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.countdown__value.is-ticking { animation: tick 0.55s var(--ease-out); }
@keyframes tick {
  0%   { opacity: 0.2; transform: translateY(-8px); filter: blur(2px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.countdown__label {
  margin-top: 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.26em;
}
.countdown__sep {
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  line-height: 1;
  color: var(--ink-faint);
  padding-top: 0.15rem;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
.countdown__note[hidden] { display: none; }
.countdown__note {
  margin: 1.6rem 0 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

/* ---------- Section 3 : Marquee ---------- */
.marquee {
  --gap: 18px;
  --duration: 40s;
  position: relative;
  overflow: hidden;
  padding: 14px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee + .marquee { margin-top: -6px; }
.marquee__track {
  display: flex;
  gap: var(--gap);
  width: max-content;
  animation: marquee var(--duration) linear infinite;
  will-change: transform;
}
.marquee[data-direction="right"] .marquee__track { animation-direction: reverse; }
.marquee.is-paused .marquee__track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(-50% - var(--gap) / 2), 0, 0); }
}
.polaroid {
  --pw: clamp(150px, 42vw, 200px);
  flex: 0 0 auto;
  margin: 0;
  width: var(--pw);
  aspect-ratio: 4 / 5;
  padding: 8px 8px 22px;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 14px 30px -14px rgba(16,41,74,0.45), 0 0 0 1px rgba(16,41,74,0.05);
  transform: rotate(-2.2deg);
}
.polaroid:nth-child(even) { transform: rotate(2deg) translateY(6px); }
.polaroid:nth-child(3n) { transform: rotate(-1deg) translateY(-4px); }
.polaroid picture, .polaroid img { width: 100%; height: 100%; }
.polaroid img { object-fit: cover; border-radius: 2px; background: #e7f1fa; }
/* Photo verticale : polaroïd plus étroit, même hauteur, image affichée en entier */
.polaroid--tall {
  aspect-ratio: auto;
  height: calc(var(--pw) * 1.25);
  width: calc((var(--pw) * 1.25 - 30px) * 0.63 + 16px);
}

/* ---------- Sections 4 & 5 : Événements ---------- */
.event__intro {
  margin: 0;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink-soft);
}
.event__intro--lead {
  font-size: clamp(1.7rem, 7vw, 2.1rem);
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.06em;
  line-height: 1.2;
}
.event__paracha {
  margin: 0.2rem 0 1.6rem;
  font-size: clamp(1.7rem, 7vw, 2.1rem);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.hebrew { font-family: var(--font-he); font-weight: 400; margin-left: 0.35em; letter-spacing: 0; }
.event__date {
  margin: 0 0 1.4rem;
  font-size: clamp(1.45rem, 6.2vw, 1.8rem);
  font-weight: 500;
  line-height: 1.25;
}
.event__time {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 1em;
  font-weight: 500;
  color: var(--ink);
}
.event__place {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.event__place strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

/* ---------- Section 6 : RSVP ---------- */
.rsvp__title {
  margin: 0 0 1.8rem;
  font-size: clamp(1.2rem, 5.2vw, 1.45rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.35;
}
.form { text-align: left; display: flex; flex-direction: column; gap: 1.3rem; }
.form[hidden], .rsvp__title[hidden] { display: none; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 360px) { .form__row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field__label {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.field__input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  font-family: var(--font);
  font-size: 1.15rem; /* ≥16px : évite le zoom iOS */
  font-weight: 500;
  color: var(--ink);
  background: rgba(255,255,255,0.45);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}
.field__input:focus { border-color: var(--ink); background: rgba(255,255,255,0.75); box-shadow: 0 0 0 3px rgba(16,41,74,0.08); }
.field__input.is-invalid { border-color: #b23b3b; }
textarea.field__input { resize: vertical; min-height: 84px; line-height: 1.4; }
select.field__input {
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2310294a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}

.fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.fieldset legend { margin-bottom: 0.65rem; }

.choice {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.choice input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.choice__box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  position: relative;
  transition: background-color 0.25s, transform 0.25s;
}
.choice__box::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg) scale(0);
  transition: transform 0.25s var(--ease-out);
}
.choice input:checked ~ .choice__box { background: var(--ink); }
.choice input:checked ~ .choice__box::after { transform: rotate(45deg) scale(1); }
.choice input:checked ~ .choice__text { color: var(--ink); }
.choice:has(input:checked) { background: rgba(255,255,255,0.7); border-color: var(--ink); }
.choice input:focus-visible ~ .choice__box { outline: 2px solid var(--ink); outline-offset: 2px; }
.choice__text { font-size: 1.15rem; font-weight: 500; line-height: 1.2; }
.choice__text small { display: block; font-size: 0.85rem; font-style: italic; font-weight: 400; color: var(--ink-soft); margin-top: 0.1rem; }
.choice--absent { margin-top: 0.4rem; }
.choice.is-disabled { opacity: 0.45; pointer-events: none; }

.counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  padding: 0.2rem 0.2rem 0.6rem;
  animation: countsIn 0.5s var(--ease-out) both;
}
.counts[hidden] { display: none; }
@keyframes countsIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form__error {
  margin: -0.4rem 0 0;
  color: #b23b3b;
  font-style: italic;
  font-size: 1rem;
}
.form__error[hidden] { display: none; }

.btn.is-loading { pointer-events: none; opacity: 0.75; }
.btn.is-loading > span::after { content: "…"; }

/* Confirmation */
.confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0 0.4rem;
  animation: confirmIn 0.9s var(--ease-out) both;
}
.confirm[hidden] { display: none; }
@keyframes confirmIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.confirm__icon { width: 64px; height: 64px; color: var(--ink); }
.confirm__check {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.7s 0.4s var(--ease-out) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.confirm__title { margin: 0.4rem 0 0; font-size: clamp(1.6rem, 7vw, 2rem); font-weight: 500; letter-spacing: 0.04em; }
.confirm__text { margin: 0; font-style: italic; font-size: 1.1rem; color: var(--ink-soft); line-height: 1.4; }

/* ---------- Footer ---------- */
.footer {
  padding: clamp(3rem, 9vw, 5rem) 0 calc(6rem + var(--safe-bottom));
  text-align: center;
}
.footer .container { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.footer__text {
  margin: 0;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.45;
}
.footer .btn--outline { font-size: 0.82rem; padding: 0.85rem 1.6rem; }

/* ---------- Accessibilité / préférences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation-duration: 120s; }
  .scroll-hint__arrow::after, .countdown__sep, .music__bars i { animation: none; }
  .intro, .intro__logo, .intro__kicker, .intro__name, .intro__btn { animation: none; transition-duration: 0.3s; }
}

/* Écrans larges : on garde l'esprit "mobile first", centré et aéré */
@media (min-width: 760px) {
  body { font-size: 18px; }
  .container { max-width: 560px; }
  .polaroid { --pw: 210px; }
}

/* Champ anti-robots (pot de miel) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Portrait de Leeroy (mis en avant) ---------- */
.section--portrait { padding-top: clamp(1rem, 4vw, 2rem); }
.portrait {
  position: relative;
  width: min(76vw, 340px);
  margin: 0 auto;
}
/* Liseré décoratif décalé autour du cadre */
.portrait::before {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(16, 41, 74, 0.35);
  border-radius: 999px 999px 30px 30px;
  pointer-events: none;
}
.portrait__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 8px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 999px 999px 24px 24px;
  box-shadow: 0 30px 60px -28px rgba(16, 41, 74, 0.55);
  overflow: hidden;
}
.portrait__frame picture,
.portrait__frame img {
  display: block;
  width: 100%;
  height: 100%;
}
.portrait__frame img {
  object-fit: cover;
  object-position: center 35%;
  border-radius: 999px 999px 18px 18px;
  background: #e7f1fa;
  transform: scale(1.12);
  transition: transform 2.6s var(--ease-out);
}
.portrait.is-visible .portrait__frame img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .portrait__frame img { transform: none; transition: none; }
}
