/* ════════════════════════════════════════════════════════════════════════
   Bar Mitsva de Solal — feuille de style
   Blocs blancs posés sur le cannage, filet doré, The Seasons partout.
   ════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────── Police du projet ─────────────────────────── */
@font-face {
  font-family: "The Seasons";
  src: url("../assets/fonts/TheSeasons-Light.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "The Seasons";
  src: url("../assets/fonts/TheSeasons-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "The Seasons";
  src: url("../assets/fonts/TheSeasons-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "The Seasons";
  src: url("../assets/fonts/TheSeasons-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ───────────────────────────── Design system ──────────────────────────── */
:root {
  --color-paper:     #FFFFFF;
  --color-pattern:   #C9C9C9;
  --color-ink:       #5F6660;
  --color-ink-soft:  #8A8F8A;
  --color-ink-deep:  #454B47;
  --color-gold:      #BFA97A;
  --color-gold-soft: #E8DFC9;
  --color-envelope:  #F3F1EE;

  /* nuances de papier de l’enveloppe : c’est ce qui dessine les plis */
  --env-flap:   #F3F1EE;
  --env-front:  #F1EFEB;
  --env-side-l: #EDEBE6;
  --env-side-r: #E8E5E0;
  --env-back:   #E4E1DB;

  --font: "The Seasons", "Cormorant Garamond", Didot, Georgia, serif;
  /* The Seasons n'a aucun glyphe hébreu : pile système dédiée, sans requête */
  --font-he: "Frank Ruhl Libre", "Narkisim", "David", "Adobe Hebrew",
             "Times New Roman", serif;

  --cane: 92px;                 /* pas du motif cannage */
  --wrap: 560px;                /* colonne centrale */
  --gap:  clamp(18px, 5vw, 30px);   /* respiration entre les blocs */

  --radius: 2px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .06);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur:  600ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* une cible d'ancre ne doit jamais coller au bord haut de l'écran */
.block { scroll-margin-top: var(--gap); }

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: transparent;
  font-family: var(--font);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: .015em;
  color: var(--color-ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Le scroll n’est libéré qu’une fois l’enveloppe ouverte. */
body.is-sealed { overflow: hidden; height: 100svh; }

img { display: block; max-width: 100%; height: auto; }
p   { margin: 0; }

button, input, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

a { color: inherit; }

/* détails : la sélection et le curseur de saisie restent dans la palette */
::selection { background: var(--color-gold-soft); color: var(--color-ink-deep); }
input, textarea { caret-color: var(--color-gold); }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.noscript {
  padding: 4rem 1.5rem;
  text-align: center;
  background: var(--color-paper);
}

/* ── Fine ligne dorée : progression de lecture, en haut de l'écran ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 15;
  width: 100%;
  height: 2px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}
body:not(.is-sealed) .scroll-progress { opacity: .85; }

/* ─────────────────────── Fond cannage (parallaxe) ─────────────────────── */
.pattern {
  position: fixed;
  inset: -25vh 0;
  z-index: -1;
  background-color: #FFFFFF;
  background-image: image-set(
    url("../assets/canage@2x.webp") 2x,
    url("../assets/canage.webp")    1x);
  background-image: -webkit-image-set(
    url("../assets/canage@2x.webp") 2x,
    url("../assets/canage.webp")    1x);
  background-repeat: repeat;
  background-size: var(--cane) var(--cane);
  transform: translate3d(0, 0, 0);
}

/* ══════════════════════════════════════════════════════════════════════
   VUE A — L’ENVELOPPE
   ══════════════════════════════════════════════════════════════════════ */
.envelope-view {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem
           max(1.5rem, env(safe-area-inset-bottom));
  transition: opacity .5s ease;
}
/* voile clair au centre : détache l’enveloppe et le texte du cannage */
.envelope-view::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 82% 54% at 50% 50%,
              rgba(255, 255, 255, .93) 0%,
              rgba(255, 255, 255, .58) 52%,
              rgba(255, 255, 255, 0)   80%);
  pointer-events: none;
}
.envelope-view.is-gone { opacity: 0; pointer-events: none; }

.envelope-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 6vh, 2.75rem);
  width: 100%;
  max-width: 30rem;
  perspective: 1200px;
  opacity: 0;
  transition: opacity .5s ease;
}
html.fonts-ready .envelope-stage { opacity: 1; }

.envelope__kicker {
  font-size: clamp(11px, 3vw, 12px);
  letter-spacing: .18em;
  text-indent: .18em;
  text-transform: uppercase;
  color: var(--color-ink);
  text-align: center;
  transition: opacity .3s ease;
}

.envelope {
  --w: min(84vw, 21rem);
  --h: calc(var(--w) * .68);
  position: relative;
  width: var(--w);
  height: var(--h);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-style: preserve-3d;
  filter: drop-shadow(0 18px 34px rgba(72, 78, 74, .22))
          drop-shadow(0 3px 8px rgba(72, 78, 74, .12));
  transition: transform .5s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .envelope:hover { transform: translateY(-4px); } }
.envelope.is-open {
  cursor: default;
  /* l'ombre s'écarte : la carte se soulève du papier */
  filter: drop-shadow(0 30px 50px rgba(72, 78, 74, .26))
          drop-shadow(0 5px 12px rgba(72, 78, 74, .14));
  transition: transform .5s var(--ease), filter .9s var(--ease);
}
.envelope.is-expanding { filter: none; }

.envelope__back {
  position: absolute; inset: 0; z-index: 1;
  background: var(--env-back);
  border-radius: var(--radius);
}

/* les trois volets pavent le rectangle : la carte n’est jamais à nu */
.envelope__pocket {
  position: absolute; inset: 0; z-index: 3;
  border-radius: var(--radius);
  overflow: hidden;
  pointer-events: none;
}
.envelope__side  { position: absolute; top: 0; width: 52%; height: 100%; }
.envelope__side--l {
  left: 0;
  background: linear-gradient(115deg, #F1EFEA 0%, var(--env-side-l) 70%);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.envelope__side--r {
  right: 0;
  background: linear-gradient(245deg, #EFECE7 0%, var(--env-side-r) 75%);
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}
.envelope__bottom {
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 58%;
  background: var(--env-front);
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
  filter: drop-shadow(0 -1px 1px rgba(95, 102, 96, .07));
}

.envelope__flap {
  position: absolute; left: 0; top: 0; z-index: 5;
  width: 100%; height: 58%;
  transform-origin: top center;
  transform: rotateX(0deg);
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.34, .01, .2, 1);
  pointer-events: none;
}
/* Une seule face : en tournant au-delà de 90°, le navigateur affiche son
   dos — c'est-à-dire le vrai miroir du papier, pointe vers le haut. Une
   seconde face « dos » annulerait cette rotation et retournerait le triangle. */
.envelope__flap-face {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(175deg, #F7F5F2 0%, var(--env-flap) 45%, #EDEBE6 100%);
}

.envelope__seal {
  position: absolute; left: 50%; top: 15%;
  width: 24%; min-width: 52px;
  transform: translateX(-50%);
  opacity: .78;
  transition: opacity .3s ease;
}
/* il disparaît avant que le papier ne se retourne : jamais de monogramme à l'envers */
.envelope.is-open .envelope__seal { opacity: 0; transition-duration: .25s; }

/* le rabat ne repasse derrière la carte qu’à mi-rotation, quand il a
   quitté la face de l’enveloppe — sinon il disparaîtrait d’un coup */
.envelope.is-open .envelope__flap {
  transform: rotateX(-180deg);
  z-index: 0;
  transition: transform .9s cubic-bezier(.34, .01, .2, 1), z-index 0s linear .45s;
}

.envelope__card {
  position: absolute; left: 6%; bottom: 6%; z-index: 2;
  width: 88%; height: 82%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35em;
  background: var(--color-paper);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(72, 78, 74, .16);
  transform: translateY(0) rotate(0deg);
  transition: transform .9s var(--ease) .3s;
  will-change: transform;
}
.envelope__card-title,
.envelope__card-name {
  font-weight: 400;
  color: var(--color-ink);
  text-transform: uppercase;
  letter-spacing: .1em;
  text-indent: .1em;
  line-height: 1.15;
  opacity: 0;
  transition: opacity .5s ease;
}
.envelope__card-title { font-size: clamp(17px, 5vw, 22px); }
.envelope__card-name  { font-size: clamp(23px, 6.6vw, 30px); }

/* la carte glisse hors de l’enveloppe avec une légère bascule */
.envelope.is-open .envelope__card { transform: translateY(-62%) rotate(-1.2deg); }
.envelope.is-open .envelope__card-title,
.envelope.is-open .envelope__card-name { opacity: 1; transition-delay: .85s; }

/* phase finale : la carte grandit seule et couvre l’écran */
.envelope.is-expanding .envelope__back,
.envelope.is-expanding .envelope__pocket,
.envelope.is-expanding .envelope__flap {
  opacity: 0;
  transition: opacity .28s ease;
}
.envelope.is-expanding .envelope__card {
  transform: translateY(-62%) rotate(0deg) scale(7);
  border-radius: 0;
  box-shadow: none;
  transition: transform .7s cubic-bezier(.55, .06, .68, .19);
}
.envelope.is-expanding .envelope__card-title,
.envelope.is-expanding .envelope__card-name {
  opacity: 0;
  transition: opacity .22s ease;
}

.envelope__hint {
  font-size: clamp(11px, 3.2vw, 12px);
  letter-spacing: .18em;
  text-indent: .18em;
  text-transform: uppercase;
  color: var(--color-ink);
  text-align: center;
  animation: breathe 2.8s var(--ease) infinite;
  transition: opacity .3s ease;
}
@keyframes breathe { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

.envelope-view.is-opening .envelope__kicker,
.envelope-view.is-opening .envelope__hint {
  opacity: 0;
  animation: none;
}

/* ══════════════════════════════════════════════════════════════════════
   VUE B — STRUCTURE
   ══════════════════════════════════════════════════════════════════════ */
.invitation { display: block; padding: var(--gap) 0; }
.invitation[hidden] { display: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(12px, 4vw, 20px);
}

/* Bloc blanc + filet doré en cadre intérieur. Le cannage respire entre eux. */
.block {
  background: var(--color-paper);
  padding: clamp(8px, 2.4vw, 11px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .9);
  border-radius: var(--radius);
  margin-bottom: var(--gap);
}
.block:last-child { margin-bottom: 0; }

.block__inner {
  position: relative;
  padding: clamp(24px, 7vw, 40px) clamp(18px, 6vw, 34px);
  /* rythme vertical unique : --sp pilote l'espacement de chaque bloc */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp, 18px);
  text-align: center;
}
/* Le cadre doré se TRACE depuis le centre : les deux filets horizontaux
   s'étirent pendant que les deux verticaux montent, les angles se referment
   en dernier. Deux pseudo-éléments, deux axes, aucune reprise de layout. */
.block__inner::before,
.block__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: transform .85s var(--ease) .18s;
}
.block__inner::before {
  border-top: 1px solid var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
  transform: scaleX(0);
}
.block__inner::after {
  border-left: 1px solid var(--color-gold);
  border-right: 1px solid var(--color-gold);
  transform: scaleY(0);
}
.reveal.is-in .block__inner::before { transform: scaleX(1); }
.reveal.is-in .block__inner::after  { transform: scaleY(1); }

/* ─────────────────────────── Typographie ──────────────────────────────── */
.t-hero {
  margin: 0;
  font-weight: 400;
  font-size: clamp(44px, 13vw, 52px);
  line-height: 1.05;
  color: var(--color-ink-deep);
}
.t-section {
  margin: 0;
  font-weight: 400;
  font-size: clamp(30px, 8.4vw, 34px);
  line-height: 1.15;
  color: var(--color-ink-deep);
}
.t-event {
  margin: 0;
  font-weight: 400;
  font-size: clamp(24px, 6.6vw, 26px);
  line-height: 1.2;
  color: var(--color-ink-deep);
}
.t-body { font-size: 17px; line-height: 1.65; }
.t-soft { color: var(--color-ink-soft); }

.t-label {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
}
.t-label--indent { text-indent: .18em; }

.center { text-align: center; }

/* filet doré court, centré — il se dessine à l’apparition */
.rule {
  display: block;
  width: 56px; height: 1px;
  margin: 0 auto;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .7s var(--ease) .25s;
}
.is-in .rule { transform: scaleX(1); }

/* ───────────────────────── Carte de garde ─────────────────────────────── */
.cover .block__inner {
  min-height: calc(100svh - 2 * var(--gap) - 22px);
  justify-content: center;
  padding-block: clamp(36px, 9vw, 56px);
}
/* La garde recule légèrement à mesure qu'on la quitte : effet de profondeur. */
.cover > .block__inner > *:not(::before) { will-change: auto; }
.cover.is-receding .block__inner {
  opacity: var(--recede-o, 1);
  transform: scale(var(--recede-s, 1));
  transform-origin: 50% 30%;
}

.cover__mono {
  width: clamp(84px, 24vw, 104px);
  margin: 0 auto;
  opacity: 0;
  transform: scale(.92);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.is-in .cover__mono { opacity: 1; transform: scale(1); }

.cover__intro { max-width: 24ch; }
.cover__dates { font-size: clamp(18px, 5vw, 21px); color: var(--color-ink-deep); }

/* indice de scroll */
.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--color-ink-soft);
  transition: opacity .4s ease, color .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.scroll-hint.is-hidden { opacity: 0; pointer-events: none; }
.scroll-hint__arrow {
  width: 14px; height: 22px;
  stroke: var(--color-gold);
  stroke-width: 1.4;
  fill: none;
  animation: bob 2.4s var(--ease) infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50%      { transform: translateY(5px); opacity: 1; }
}
@media (hover: hover) { .scroll-hint:hover { color: var(--color-ink); } }

/* ───────────────────── Bandeau de titre de section ────────────────────── */
.head .block__inner { padding-block: clamp(28px, 7vw, 38px); }

/* ────────────────────────── Cartes-événements ─────────────────────────── */
/* la carte-événement suit le même rythme centré que les autres blocs :
   badge posé au-dessus, puis tout le contenu aligné sur l'axe */
.event .block__inner { padding-inline: clamp(14px, 4.2vw, 34px); }

.event__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 3.4vw, 16px);
  width: 100%;
  text-align: center;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 54px;
  padding: 10px 7px;
  border: 1px solid var(--color-gold);
  border-radius: var(--radius);
  color: var(--color-ink-deep);
  opacity: 0;
  transform: scale(.9);
  transition: opacity .5s var(--ease) .18s, transform .5s var(--ease) .18s;
}
.is-in .badge { opacity: 1; transform: scale(1); }
.badge__day   { font-size: 30px; line-height: 1; font-weight: 400; }
.badge__month {
  font-size: 11px; line-height: 1;
  letter-spacing: .16em; text-indent: .16em;
  text-transform: uppercase;
}
/* temps fort */
.badge--accent {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-paper);
  box-shadow: 0 5px 16px rgba(191, 169, 122, .45);
}
/* la carte du temps fort porte une ombre un peu plus présente */
.block--accent { box-shadow: 0 16px 40px rgba(120, 100, 60, .13), inset 0 1px 0 rgba(255, 255, 255, .9); }

.event__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
/* l'interlettrage laisse un blanc à droite : on le compense pour un vrai centrage */
.event__body > .t-label { text-indent: .18em; }

/* ── Hébreu : date et paracha, en lecture droite-à-gauche ── */
.event__he {
  direction: rtl;
  unicode-bidi: isolate;
  font-family: var(--font-he);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-ink-deep);
}
.event__translit {
  margin-top: -4px;
  font-size: 11px;
  letter-spacing: .07em;
  text-indent: .07em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.event__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 15px;
  color: var(--color-ink);
}
.event__sep { color: var(--color-gold); }
.event__address { font-size: 15px; color: var(--color-ink-soft); }
.event__text { max-width: 42ch; font-size: 16px; }

.event__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 6px;
  width: 100%;
  max-width: 300px;      /* les boutons restent centrés, jamais étirés */
}
@media (min-width: 480px) {
  .event__actions { flex-direction: row; flex-wrap: wrap; gap: 10px; }
  /* côte à côte s'ils tiennent, sinon chacun sur sa ligne, pleine largeur */
  .event__actions .btn { flex: 1 1 auto; }
}

/* ──────────────────────────── Boutons ─────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 44px;
  padding: .7em 1.2em;
  border: 1px solid var(--color-gold);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-ink-deep);
  font-size: 12px;
  letter-spacing: .16em;
  text-indent: .16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color .3s ease, transform .12s ease, opacity .3s ease;
  -webkit-tap-highlight-color: transparent;
}
/* remplissage doré qui monte depuis le bas */
.btn::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: var(--color-gold);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .34s var(--ease);
}
@media (hover: hover) {
  .btn:hover { color: var(--color-paper); }
  .btn:hover::before { transform: scaleY(1); }
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:disabled:active { transform: none; }

.btn--solid {
  background: var(--color-ink-deep);
  border-color: var(--color-ink-deep);
  color: var(--color-paper);
}
.btn--solid::before { background: var(--color-gold); }
@media (hover: hover) { .btn--solid:hover { color: var(--color-paper); } }

.btn--ghost {
  border-color: rgba(191, 169, 122, .5);
  color: var(--color-ink-soft);
}

.btn__icon { width: 1.05em; height: 1.05em; flex: none; }

/* ───────────────────────── Compte à rebours ───────────────────────────── */
.countdown .block__inner { padding-block: clamp(22px, 6vw, 30px); }
.countdown__row { width: 100%; }

.countdown__row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}
.countdown__cell {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 6px;
  text-align: center;
}
.countdown__cell + .countdown__cell { border-left: 1px solid var(--color-gold); }
.countdown__value {
  display: block;
  font-size: clamp(30px, 9vw, 38px);
  line-height: 1.1;
  color: var(--color-ink-deep);
  font-variant-numeric: tabular-nums;
}
/* fondu vertical court à chaque changement de valeur */
.countdown__value.is-tick { animation: tick .32s var(--ease); }
@keyframes tick {
  0%   { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}
.countdown__done {
  font-size: clamp(26px, 7.5vw, 32px);
  color: var(--color-ink-deep);
  text-align: center;
}

/* ─────────────────────────── Plans d’accès ────────────────────────────── */
.venue .block__inner { padding-block: clamp(24px, 6.5vw, 32px); }
.venue__name { font-size: clamp(21px, 5.6vw, 24px); color: var(--color-ink-deep); line-height: 1.25; }
.venue__address { font-size: 15px; color: var(--color-ink-soft); }

.venue__chip {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--color-gold-soft);
  border-radius: var(--radius);
  background: rgba(232, 223, 201, .3);
  font-size: 11px;
  letter-spacing: .14em;
  text-indent: .14em;
  text-transform: uppercase;
  color: var(--color-ink);
}

.maps {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Tuiles d'application : logos de marque, coins arrondis façon icône iOS.
   Pas de remplissage doré au survol — il salirait des logos en couleur. */
.map-btn {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 23%;
  overflow: hidden;
  background: var(--color-paper);
  box-shadow: 0 0 0 1px rgba(191, 169, 122, .55), 0 2px 6px rgba(0, 0, 0, .07);
  transition: box-shadow .3s ease, transform .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.map-btn img { width: 100%; height: 100%; object-fit: cover; }

@media (hover: hover) {
  .map-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px var(--color-gold), 0 8px 16px rgba(0, 0, 0, .12);
  }
}
.map-btn:active { transform: scale(.95); }

/* ══════════════════════════════════════════════════════════════════════
   FORMULAIRE RSVP
   ══════════════════════════════════════════════════════════════════════ */
.rsvp__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.rsvp .block__inner { --sp: 26px; }
.rsvp__form { width: 100%; }

.progress {
  position: relative;
  height: 2px;
  margin-bottom: 26px;
  background: rgba(191, 169, 122, .22);
}
.progress__bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 33.33%;
  background: var(--color-gold);
  transition: width .45s var(--ease);
}

.steps { position: relative; text-align: left; }

.step {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: 0; margin: 0; padding: 0;
  min-width: 0;
  text-align: left;
}
.step[hidden] { display: none; }
.step.is-out { animation: step-out .22s var(--ease) both; }
.step.is-in-anim { animation: step-in .38s var(--ease) both; }
@keyframes step-in  { from { opacity: 0; transform: translateX(24px); }  to { opacity: 1; transform: none; } }
@keyframes step-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-24px); } }

.field { display: flex; flex-direction: column; gap: 2px; }

.field__label {
  font-size: 15px;
  line-height: 1.45;
  color: var(--color-ink);
}
.field__opt { color: var(--color-ink-soft); }

.field__input {
  width: 100%;
  min-height: 44px;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid rgba(191, 169, 122, .55);
  border-radius: 0;
  background: transparent;
  font-size: 16px;              /* ≥16px : pas de zoom automatique sur iOS */
  font-weight: 300;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .3s ease;
}
.field__input:focus { outline: none; border-bottom-color: var(--color-gold); }
.field__input--area { min-height: 92px; resize: vertical; line-height: 1.6; }
.field__input[aria-invalid="true"] { border-bottom-color: #B4736B; }

.question {
  font-size: 17px;
  line-height: 1.5;
  text-align: center;
  color: var(--color-ink);
}
.question__note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-ink-soft);
  text-align: center;
}

.error {
  font-size: 13px;
  line-height: 1.45;
  color: #A6675E;
  text-align: center;
}
.error[hidden] { display: none; }

/* ──────────────────── Cartes de choix (radio masqué) ──────────────────── */
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.choice:active .choice__box { transform: scale(.985); }
.choice input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice__box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid rgba(191, 169, 122, .5);
  border-radius: var(--radius);
  background: transparent;
  transition: border-color .28s ease, background-color .28s ease,
              box-shadow .28s ease, transform .14s var(--ease);
}
@media (hover: hover) { .choice:hover .choice__box { border-color: var(--color-gold); } }

.choice__check {
  flex: none;
  width: 20px; height: 20px;
  stroke: var(--color-gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.choice__check path {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  transition: stroke-dashoffset .4s var(--ease);
}
.choice__ring { stroke: rgba(191, 169, 122, .5); transition: stroke .28s ease; }

.choice__text { display: flex; flex-direction: column; gap: 2px; }
.choice__title { font-size: 16px; line-height: 1.35; color: var(--color-ink-deep); }
.choice__sub   { font-size: 13px; line-height: 1.35; color: var(--color-ink-soft); }

.choice input:checked + .choice__box {
  border-color: var(--color-gold);
  background: var(--color-gold-soft);
  box-shadow: inset 0 0 0 1px var(--color-gold);
}
.choice input:checked + .choice__box .choice__check path { stroke-dashoffset: 0; }
.choice input:checked + .choice__box .choice__ring { stroke: var(--color-gold); }
.choice input:focus-visible + .choice__box {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* ── Marqueur de champ obligatoire ── */
.field__label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0; }
.field__req { color: var(--color-gold); margin-left: .1em; }
.field__opt { margin-left: .45em; }
.field__input::placeholder { color: var(--color-ink-soft); opacity: .6; }

/* ══════════════════════════════════════════════════════════════════════
   PRÉSENCE PAR ÉVÉNEMENT
   ══════════════════════════════════════════════════════════════════════ */
.moments { display: flex; flex-direction: column; gap: 14px; }
.step > .question { margin-bottom: -6px; }

.moment {
  border: 1px solid rgba(191, 169, 122, .45);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.moment.is-on {
  border-color: var(--color-gold);
  box-shadow: 0 4px 16px rgba(191, 169, 122, .18);
}
.moment.is-off { border-color: rgba(191, 169, 122, .28); }
.moment.is-off .moment__head { opacity: .55; }

/* bandeau : nom du moment puis date et heure */
.moment__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 14px;
  background: rgba(232, 223, 201, .38);
  border-bottom: 1px solid rgba(191, 169, 122, .35);
  text-align: center;
  transition: background-color .3s ease;
}
.moment.is-on .moment__head { background: var(--color-gold-soft); }

.moment__titre {
  font-size: 12px;
  letter-spacing: .16em;
  text-indent: .16em;
  text-transform: uppercase;
  color: var(--color-ink-deep);
}
.moment__quand {
  font-size: 13px;
  font-style: italic;
  line-height: 1.35;
  color: var(--color-ink-mid, var(--color-ink-soft));
}

.moment__body { padding: 12px 14px 14px; }

.moment__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.moment__label { font-size: 16px; }

/* ── Bascule Oui / Non ── */
.segmented {
  display: flex;
  flex: none;
  border: 1px solid rgba(191, 169, 122, .55);
  border-radius: var(--radius);
  overflow: hidden;
}
.segmented__opt { display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.segmented__opt + .segmented__opt { border-left: 1px solid rgba(191, 169, 122, .55); }
.segmented__opt input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.segmented--sm span { min-width: 0 !important; font-size: 14px; padding: 0 14px !important; }
.segmented--sm { flex: 1 1 auto; }
.segmented--sm .segmented__opt { flex: 1 1 0; }

.segmented__opt span {
  display: grid;
  place-items: center;
  min-width: 58px;
  min-height: 44px;
  padding: 0 10px;
  font-size: 15px;
  color: var(--color-ink);
  transition: background-color .28s ease, color .28s ease;
}
.segmented__opt input:checked + span {
  background: var(--color-ink-deep);
  color: var(--color-paper);
}
.segmented__opt input:focus-visible + span {
  outline: 2px solid var(--color-gold);
  outline-offset: -3px;
}
@media (hover: hover) {
  .segmented__opt:hover input:not(:checked) + span { background: rgba(191, 169, 122, .12); }
}

/* ── Le détail se replie tant que la présence n'est pas confirmée ── */
.moment__collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease), opacity .3s ease;
  opacity: 0;
}
.moment__collapse > * { overflow: hidden; min-height: 0; }
.moment.is-on .moment__collapse { grid-template-rows: 1fr; opacity: 1; }

/* ══════════════════════════════════════════════════════════════════════
   LISTE DES PERSONNES (étape 2)
   ══════════════════════════════════════════════════════════════════════ */
.guests { display: flex; flex-direction: column; gap: 12px; }

.guest {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(191, 169, 122, .4);
  border-radius: var(--radius);
}
.guest__nom { min-height: 40px; padding: 6px 2px; }
.guest__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.guest__del {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-ink-soft);
  cursor: pointer;
  transition: color .25s ease, background-color .25s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.guest__del svg { width: 17px; height: 17px; }
@media (hover: hover) {
  .guest__del:hover { color: #A6675E; background: rgba(166, 103, 94, .08); }
}
.guest__del:active { transform: scale(.9); }

/* bouton d'ajout, en pointillé pour se distinguer des actions d'étape */
.btn--add {
  border-style: dashed;
  border-color: rgba(191, 169, 122, .6);
  color: var(--color-ink);
  gap: .5em;
  align-self: stretch;
}
.btn--add[hidden] { display: none; }

/* ══════════════════════════════════════════════════════════════════════
   QUI VIENT À QUEL MOMENT (étape 3)
   ══════════════════════════════════════════════════════════════════════ */
.attendees {
  display: flex;
  flex-direction: column;
  padding-top: 6px;
}

.attendee {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 4px 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.attendee + .attendee { border-top: 1px solid rgba(191, 169, 122, .22); }
.attendee input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attendee__box {
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 1px solid rgba(191, 169, 122, .65);
  border-radius: var(--radius);
  color: var(--color-paper);
  transition: background-color .25s ease, border-color .25s ease;
}
.attendee__box svg { width: 15px; height: 15px; }
.attendee__box svg path {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  transition: stroke-dashoffset .3s var(--ease);
}
.attendee input:checked + .attendee__box {
  background: var(--color-ink-deep);
  border-color: var(--color-ink-deep);
}
.attendee input:checked + .attendee__box svg path { stroke-dashoffset: 0; }
.attendee input:focus-visible + .attendee__box {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}
.attendee input:disabled ~ * { opacity: .5; }

.attendee__nom {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  line-height: 1.3;
  color: var(--color-ink-deep);
  overflow-wrap: anywhere;
}
.attendee__type {
  flex: none;
  font-size: 11px;
  letter-spacing: .12em;
  text-indent: .12em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
}

/* ─────────────────────────── Actions du formulaire ────────────────────── */
.step__actions {
  display: flex;
  flex-direction: column-reverse;   /* action principale en premier */
  align-items: stretch;
  gap: 10px;
  margin-top: 2px;
}
@media (min-width: 420px) {
  .step__actions { flex-direction: row; justify-content: center; }
  .step__actions .btn { flex: 0 1 auto; }
}

.thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  animation: step-in .45s var(--ease) both;
}
.thanks[hidden] { display: none; }
.thanks__mono { width: clamp(72px, 20vw, 92px); }
.thanks p { max-width: 26ch; }

/* ─────────────────────────── Pied de page ─────────────────────────────── */
.closing__mono { width: clamp(76px, 21vw, 96px); margin: 0 auto; }
.closing__contacts { display: flex; flex-direction: column; gap: 4px; }
.closing__contact { font-size: 15px; color: var(--color-ink); }
.closing__contact a { text-decoration: none; border-bottom: 1px solid var(--color-gold-soft); }

.credit {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--color-ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}
@media (hover: hover) {
  .credit:hover { color: var(--color-ink); border-bottom-color: var(--color-gold-soft); }
}

/* ══════════════════════════════════════════════════════════════════════
   APPARITION AU SCROLL
   ══════════════════════════════════════════════════════════════════════ */
/* Les grands titres montent derrière un cache plutôt que de simplement fondre. */
.reveal .t-hero,
.reveal .t-section {
  clip-path: inset(0 0 106% 0);
  transition: clip-path .9s var(--ease) var(--d, 0ms);
}
.reveal.is-in .t-hero,
.reveal.is-in .t-section { clip-path: inset(-35% -35% -35% -35%); }

.reveal > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease) var(--d, 0ms),
              transform var(--dur) var(--ease) var(--d, 0ms);
}
.reveal.is-in > * { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════════════════════════════
   GRANDS ÉCRANS
   ══════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  :root { --cane: 116px; }
  .envelope { --w: min(42vw, 27rem); }
  .envelope-stage { max-width: 34rem; }
}

/* ══════════════════════════════════════════════════════════════════════
   MOUVEMENT RÉDUIT — tout devient un simple fondu, rien ne casse
   ══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .pattern { transform: none !important; }

  .envelope__flap,
  .envelope__card,
  .envelope.is-open .envelope__card { transition-duration: .2s; transition-delay: 0s; }
  .envelope.is-open .envelope__card { transform: translateY(-62%) rotate(0deg); }
  .envelope.is-open .envelope__card-title,
  .envelope.is-open .envelope__card-name { transition-delay: .2s; }
  .envelope.is-expanding .envelope__card { transition-duration: .2s; }
  .envelope__hint { animation: none; opacity: .8; }
  .scroll-hint__arrow { animation: none; }

  .reveal > *,
  .cover__mono,
  .badge {
    transform: none !important;
    transition: opacity .2s ease var(--d, 0ms) !important;
  }
  .rule { transform: scaleX(1) !important; transition: opacity .2s ease !important; }

  .step.is-in-anim,
  .step.is-out,
  .thanks { animation-duration: .2s; }
  .step.is-in-anim { animation-name: fade-only; }
  .step.is-out { animation-name: fade-out-only; }
  @keyframes fade-only { from { opacity: 0; } to { opacity: 1; } }
  @keyframes fade-out-only { from { opacity: 1; } to { opacity: 0; } }

  .countdown__value.is-tick { animation: none; }
  .moment__collapse { transition: opacity .2s ease; }
  .attendee__box svg path { transition: none; }

  /* Les nouveaux effets tombent aussi à de simples fondus. */
  .block__inner::before,
  .block__inner::after { transform: none !important; transition: none; }
  .reveal .t-hero,
  .reveal .t-section { clip-path: none !important; transition: opacity .2s ease !important; }
  .cover .block__inner { opacity: 1 !important; transform: none !important; }
  .choice:active .choice__box { transform: none; }
  .scroll-progress { transition: none; }
  .btn::before { transition: none; }
  .map-btn { transition: box-shadow .2s ease; }
  .map-btn:hover, .map-btn:active { transform: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   IMPRESSION — version papier lisible, sans décor ni animation
   ══════════════════════════════════════════════════════════════════════ */
@media print {
  .pattern, .scroll-progress, .envelope-view,
  .scroll-hint, .rsvp__form, .thanks, .countdown { display: none !important; }

  body { background: #FFFFFF; color: #000000; font-size: 12pt; }
  .invitation[hidden] { display: block !important; }

  .block {
    box-shadow: none;
    margin-bottom: 14pt;
    padding: 0;
    break-inside: avoid;
  }
  .block__inner { border: 1pt solid #999999; padding: 16pt; }
  .block__inner::before,
  .block__inner::after { display: none; }
  .cover .block__inner { min-height: 0; }

  .reveal > *,
  .reveal .t-hero,
  .reveal .t-section {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .rule { transform: scaleX(1) !important; }
  .badge { opacity: 1 !important; transform: none !important; }

  /* l'adresse d'un lien vaut mieux qu'un bouton mort sur papier */
  .maps, .event__actions { display: none !important; }
}
