/* ==========================================================================
   Sintia & Franck — Invitation de mariage
   Feuille de styles du diaporama (aucune dépendance externe)
   ========================================================================== */

/* ---------- 0. Polices (hébergées sur le site, sous-ensembles latin + latin étendu) ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-ext-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Dancing Script';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/dancing-script-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Dancing Script';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/dancing-script-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 200 300;
  font-display: block;
  src: url('../fonts/material-symbols-outlined-subset.woff2') format('woff2');
}

/* ---------- 1. Jetons ---------- */
:root {
  --wine: #3A0010;
  --wine-deep: #1C0007;
  --plum: #52102A;
  --ivory: #FAF8F3;
  --gold: #F5A623;
  --gold-light: #FBD38A;
  --gold-ink: #A8700E;      /* or foncé, lisible sur ivoire */
  --champagne: #F5D9A8;
  --orchid: #B85BA0;
  --orchid-light: #E4B4D6;
  --orchid-pale: #E6CFEA;
  --coffee: #56000A;
  --blush: #F2E6EC;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --script: 'Dancing Script', 'Cormorant Garamond', Georgia, serif;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --ease-write: cubic-bezier(.6, 0, .3, 1);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);

  /* Cadre « story » 9:16 : plein écran sur téléphone, centré sur ordinateur.
     --u vaut 1 % de la largeur du cadre : toutes les tailles en découlent,
     la mise en page est donc la même sur tous les appareils. */
  --vh100: 100vh;
  --frame-gap: 0px;
  --frame-radius: 0px;
  --frame-border: 0px;
  --frame-h: calc(var(--vh100) - 2 * var(--frame-gap));
  --frame-w: min(100vw, calc(var(--frame-h) * 9 / 16));
  --u: calc(var(--frame-w) / 100);

  /* Volet photo : la photo prend la place que le texte laisse, entre --photo-min et --photo-max
     (au-delà, elle mangerait l'écran et l'information passerait au second plan — même part que l'accueil) */
  --photo-min: calc(var(--frame-h) * .25);
  --photo-max: calc(var(--frame-h) * .56);
  --fade: calc(var(--u) * 16);   /* fondu de la photo sous le titre */
  --px: calc(var(--u) * 7);      /* marges latérales */
  --bar-h: 84px;                 /* réserve du bas : « Confirmer ma présence », pause, musique */
}
@supports (height: 100dvh) {
  :root { --vh100: 100dvh; }
}
/* Téléphone : la story occupe toute la largeur, quelle que soit la hauteur visible
   (barres du navigateur, clavier ouvert) — jamais de bandes sur les côtés */
@media (hover: none) and (max-width: 600px) {
  :root { --frame-w: 100vw; }
}
/* Ordinateur : la story devient une carte centrée, avec un peu d'air autour */
@media (hover: hover) and (pointer: fine) and (min-aspect-ratio: 5/8) {
  :root { --frame-gap: 16px; --frame-radius: 18px; --frame-border: 1px; }
}

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  /* Fond autour de la story (ordinateur) : bordeaux velouté, lueurs orchidée et or */
  background:
    radial-gradient(45% 40% at 18% 22%, rgba(184, 91, 160, .20), rgba(184, 91, 160, 0) 70%),
    radial-gradient(40% 38% at 84% 78%, rgba(245, 166, 35, .12), rgba(245, 166, 35, 0) 70%),
    radial-gradient(ellipse at 50% 50%, #4a0a1f 0%, #2a000b 58%, #120004 100%);
  background-color: var(--wine-deep);
  font-family: var(--serif);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Ombre portée de la story sur ordinateur (dessinée derrière : la découpe des coins l'effacerait) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  margin: auto;
  width: var(--frame-w);
  height: var(--frame-h);
  border-radius: var(--frame-radius);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85), 0 0 60px -10px rgba(184, 91, 160, .18);
  pointer-events: none;
}

h1, h2, h3, p, figure, blockquote, ul { margin: 0; padding: 0; }
h1, h2, h3 { font: inherit; }
ul { list-style: none; }
img { display: block; }

html { -webkit-tap-highlight-color: transparent; } /* retour visuel géré par les styles :active */
button {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: inherit; }
input,
textarea { font: inherit; color: inherit; }
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. Animations ---------- */
@keyframes fall    { from { transform: translate3d(0, calc(var(--frame-h) * -.1), 0); } to { transform: translate3d(0, calc(var(--frame-h) * 1.1), 0); } }
@keyframes sway    { 0% { transform: translateX(0) rotate(0deg); } 50% { transform: translateX(34px) rotate(170deg); } 100% { transform: translateX(0) rotate(340deg); } }
@keyframes kb      { from { transform: scale(1.02); } to { transform: scale(1.1); } }
@keyframes write   { from { clip-path: inset(-30% 100% -30% 0); } to { clip-path: inset(-30% -8% -30% -2%); } }
@keyframes up      { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes ring    { from { opacity: 0; transform: scale(.78) rotate(-30deg); } to { opacity: 1; transform: none; } }
@keyframes grow    { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bfill   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes shimmer { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- 4. La story (cadre) et ses volets ---------- */
.stage {
  --dur: 6s; /* durée du volet courant (pilotée par main.js) */
  position: fixed;
  inset: 0;
  margin: auto;
  width: var(--frame-w);
  height: var(--frame-h);
  overflow: hidden;
  border-radius: var(--frame-radius);
  clip-path: inset(0 round var(--frame-radius)); /* découpe nette des coins, Safari compris */
  border: var(--frame-border) solid rgba(245, 166, 35, .22);
  background: var(--wine);
  font-family: var(--serif);
  color: var(--ivory);
  /* Story tactile : pas de sélection de texte ni de menu sur appui long, pas de zoom au double toucher */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.stage input,
.stage textarea { -webkit-user-select: text; user-select: text; }

.slide {
  --glow: rgba(245, 166, 35, .12);
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.04);
  filter: blur(6px);
  z-index: 1;
  visibility: hidden;
  pointer-events: none;
  /* Même fond pour tous les volets : bordeaux, avec une lueur douce qui varie */
  background:
    radial-gradient(circle at 50% 24%, var(--glow) 0%, rgba(58, 0, 16, 0) 48%),
    radial-gradient(ellipse 130% 80% at 50% 20%, #5a0f27 0%, var(--wine) 48%, var(--wine-deep) 100%);
  transition:
    opacity 1.2s var(--ease-soft),
    transform 1.6s var(--ease-out),
    filter 1.2s ease,
    visibility 0s linear 1.2s;
}
.slide--orchid { --glow: rgba(184, 91, 160, .34); }
.slide--gold { --glow: rgba(245, 166, 35, .2); }
.slide.is-prev,
.slide.is-active {
  visibility: visible;
  transition:
    opacity 1.2s var(--ease-soft),
    transform 1.6s var(--ease-out),
    filter 1.2s ease,
    visibility 0s;
}
.slide.is-prev { z-index: 2; }
.slide.is-active {
  opacity: 1;
  transform: none;
  filter: none;
  z-index: 3;
  pointer-events: auto;
}

/* Le contenu n'est monté que pour le volet actif et le précédent :
   ses animations d'entrée se rejouent donc à chaque affichage.
   Deux gabarits :
   · par défaut (emblème, bulles, couleurs) : le visuel et le texte forment un bloc centré en hauteur ;
   · volet photo (.slide--photo) : la photo prend la place que le texte laisse, sans dépasser --photo-max ;
     le texte occupe le reste, centré entre la photo et « Confirmer ma présence ». Le titre n'est donc pas à la même
     hauteur partout (voulu). */
.slide__inner {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--u) * 6 + var(--safe-t)); /* sous la barre de progression */
}
.slide.is-active > .slide__inner,
.slide.is-prev > .slide__inner { display: flex; }
.slide--photo .slide__inner { justify-content: flex-start; padding-top: 0; }
.layer { position: absolute; inset: 0; }

/* Zone visuelle : emblème doré, bulles ou couleurs (taille de son contenu), ou photo en fondu */
.visual {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: calc(var(--u) * 6);
}
/* La photo prend d'abord toute la place libre (facteur 1000), jusqu'à --photo-max ; au-delà,
   le reste revient à la zone de texte, où le texte se centre. */
.slide--photo .visual {
  flex: 1000 1 0;
  min-height: var(--photo-min);
  max-height: var(--photo-max);
  margin-bottom: 0;
}
.slide--photo .slide__body { flex: 1 1 auto; }
.slide--photo .fit { margin: auto 0; }
/* La photo déborde un peu sous le titre et s'y fond ; son cadre la découpe (zoom lent compris) */
.visual__media {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(100% + var(--fade));
  overflow: hidden;
  /* bas de la photo rendu transparent : elle se fond dans le fond du volet, sans ligne de coupure */
  -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 var(--fade));
  mask-image: linear-gradient(0deg, transparent 0, #000 var(--fade));
}
.visual__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.visual__media::after { /* voile : barre de progression lisible en haut ; en bas, le même fondu bordeaux
                           que sur l'accueil, calé sur le titre */
  content: "";
  position: absolute;
  inset: 0 0 -1px;
  background:
    linear-gradient(180deg, rgba(20, 0, 6, .55) 0%, rgba(20, 0, 6, 0) calc(var(--u) * 22)),
    linear-gradient(0deg, var(--wine-deep) 0, rgba(58, 0, 16, .82) var(--fade), rgba(58, 0, 16, 0) calc(var(--fade) + var(--u) * 20));
  pointer-events: none;
}
/* Cadrage sur les visages, photo par photo. La zone photo est en général plus haute que la photo
   (qui remplit alors la hauteur) : c'est la valeur horizontale qui choisit ce qu'on garde sur les côtés.
   Sur les volets chargés et les écrans courts, la zone s'aplatit : la valeur verticale garde les visages. */
.focus--ouverture { object-position: 50% 10%; }
.focus--dakar { object-position: 50% 40%; }
.focus--reponse { object-position: 50% 30%; }
.focus--demande { object-position: 25% 62%; }
.focus--dot { object-position: 50% 42%; }
.focus--mariage { object-position: 50% 20%; }
.focus--merci { object-position: 50% 15%; }
.kb { animation: kb 9s ease-out both; }
.visual__photo { -webkit-user-drag: none; }
/* Ordinateur : toute la story est cliquable (gauche : volet précédent, droite : suivant) */
@media (hover: hover) {
  .slide:not(.slide--rsvp) { cursor: pointer; }
}

/* Emblème : pictogramme doré au trait dans un double cercle */
.emblem {
  position: relative;
  display: grid;
  place-items: center;
  --em: clamp(96px, calc(var(--u) * 30), 140px);
  width: var(--em);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(245, 166, 35, .75);
  color: var(--gold);
  animation: ring 1.6s var(--ease-out) both;
}
.emblem::before {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  border: 1px solid rgba(245, 166, 35, .28);
}
.emblem svg {
  width: 40%;
  height: 40%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Zone de texte : la hauteur de son contenu (réduite par main.js › fit() si l'écran est trop court),
   au-dessus de la réserve du bas (« Confirmer ma présence », pause, musique) */
.slide__body {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding:
    0
    calc(var(--px) + var(--safe-r))
    calc(var(--bar-h) + var(--safe-b))
    calc(var(--px) + var(--safe-l));
}
.fit {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 4);
  text-align: center;
}

/* Gabarit de titre commun : surtitre or, titre en capitales ivoire, filet or à losange */
.head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 2.2);
  width: 100%;
}
.head__over {
  font-size: clamp(11px, calc(var(--u) * 3), 13.5px);
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--gold);
  animation: fade .9s ease .1s both;
}
.head__title {
  font-weight: 400;
  font-size: clamp(26px, calc(var(--u) * 7.6), 38px);
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.08;
  color: var(--ivory);
  white-space: nowrap;
  animation: up .9s var(--ease-out) .2s both;
}
/* Ouverture : « Les familles Takam et Lemegne ont la joie de vous inviter au mariage de leurs enfants » */
.head__over--families { font-size: clamp(13px, calc(var(--u) * 3.8), 17px); letter-spacing: .2em; }
.head__lead {
  max-width: 22em;
  font-style: italic;
  font-size: clamp(17px, calc(var(--u) * 4.7), 21px);
  line-height: 1.35;
  color: rgba(250, 248, 243, .94);
  text-wrap: balance;
  animation: fade .9s ease .15s both;
}
/* Script : réservé à « Sintia & Franck », « Elle a dit oui. » et « Merci ! » */
.head__title--script {
  font-family: var(--script);
  font-weight: 500;
  font-size: clamp(38px, calc(var(--u) * 11.5), 56px);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.1;
  color: var(--orchid-light);
  padding: 0 .2em;
  animation: write 1.2s var(--ease-write) .15s both;
}
.head__rule {
  position: relative;
  display: block;
  width: clamp(90px, calc(var(--u) * 28), 140px);
  height: 10px;
  animation: grow .9s var(--ease-out) .4s both;
}
.head__rule::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(245, 166, 35, 0), var(--gold) 22%, var(--gold) 78%, rgba(245, 166, 35, 0));
}
.head__rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  background: var(--wine);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* Textes : 17 px minimum sur téléphone (Cormorant paraît petit) */
.text {
  max-width: 26em;
  font-size: clamp(17px, calc(var(--u) * 4.7), 21px);
  line-height: 1.5;
  color: rgba(250, 248, 243, .94);
  text-wrap: pretty;
  animation: up .9s var(--ease-out) .5s both;
}
.text--script {
  font-family: var(--script);
  font-size: clamp(30px, calc(var(--u) * 9), 44px);
  line-height: 1.15;
  color: var(--orchid-light);
  padding: 0 .2em;
  animation: write 1.2s var(--ease-write) 1s both;
}

/* Lieu (lien vers la carte) */
.place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(16px, calc(var(--u) * 4.4), 20px);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--champagne);
  animation: fade .9s ease .45s both;
}
.place .icon { font-size: 1.15em; color: var(--gold); font-variation-settings: 'wght' 300; }
.place--ceremony { max-width: 100%; justify-content: center; align-items: flex-start; font-size: clamp(16px, calc(var(--u) * 4), 18px); letter-spacing: .04em; line-height: 1.2; text-transform: none; }
a.place__name {
  text-decoration: underline;
  text-decoration-color: rgba(245, 166, 35, .55);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
a.place__name:hover { text-decoration-color: var(--gold); }

/* Cartes ivoire : horaires, conseils */
.card {
  width: 100%;
  padding: calc(var(--u) * 1.2) calc(var(--u) * 4.6);
  border-radius: 16px;
  background: var(--ivory);
  color: var(--wine);
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .85);
  text-align: left;
  animation: up .9s var(--ease-out) .65s both;
}
.row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  column-gap: calc(var(--u) * 3);
  padding: calc(var(--u) * 2.3) 0;
  border-bottom: 1px solid rgba(58, 0, 16, .1);
}
.row:last-child { border-bottom: 0; }
.row--reco { grid-template-columns: auto 1fr; }
/* Lieu d'une partie du programme (ex. la salle du dîner et de la soirée) : les lignes suivantes s'y passent */
.row--where { grid-template-columns: auto 1fr; padding: calc(var(--u) * 1.6) 0 calc(var(--u) * 1.2); }
.row__where {
  font-size: clamp(16px, calc(var(--u) * 4.2), 19px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--gold-ink);
  text-decoration: underline;
  text-decoration-color: rgba(168, 112, 14, .45);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.row .icon { font-size: clamp(20px, calc(var(--u) * 5.6), 26px); color: var(--gold-ink); font-variation-settings: 'wght' 300; }
.row__time { font-weight: 600; font-size: clamp(16px, calc(var(--u) * 4.4), 20px); font-variant-numeric: tabular-nums; }
.row__label { font-size: clamp(17px, calc(var(--u) * 4.6), 21px); line-height: 1.3; }

/* Couleurs du mariage (dress code) : le visuel du volet « Bon à savoir » */
.palette {
  display: flex;
  justify-content: center;
  gap: calc(var(--u) * 2);
  width: calc(var(--frame-w) - 2 * var(--px));
  max-width: 100%;
}
.palette__color {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 2.4);
  text-align: center;
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-size: clamp(14px, calc(var(--u) * 4.3), 19px);
  color: var(--champagne);
  animation: ring 1.2s var(--ease-out) both;
}
.palette__color:nth-child(2) { animation-delay: .12s; }
.palette__color:nth-child(3) { animation-delay: .24s; }
.palette__color:nth-child(4) { animation-delay: .36s; }
.palette__color i {
  width: clamp(54px, calc(var(--u) * 16), 74px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(250, 248, 243, .45);
  box-shadow: 0 0 0 5px rgba(245, 166, 35, .1), 0 16px 26px -14px rgba(0, 0, 0, .8);
}
.palette__color--orchid i { background: linear-gradient(135deg, var(--orchid) 0%, #F6E8F2 100%); }
.palette__color--gold i { background: var(--gold); }
.palette__color--coffee i { background: var(--coffee); }
.palette__color--ivory i { background: var(--ivory); }

/* Échange de messages (volet "Une Réponse") : deux bulles, Franck à gauche (or), Sintia à droite (orchidée) */
.chat {
  width: calc(var(--frame-w) - 2 * var(--px));
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 3.2);
}
.bubble {
  max-width: 86%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: up .9s var(--ease-out) .2s both;
}
.bubble--sintia { align-self: flex-end; align-items: flex-end; animation-delay: 1.3s; }
.bubble blockquote {
  margin: 0;
  padding: calc(var(--u) * 3.4) calc(var(--u) * 4.6);
  border: 1px solid var(--gold);
  border-radius: 20px 20px 20px 6px;
  background: var(--ivory);
  color: var(--wine);
  font-size: clamp(17px, calc(var(--u) * 4.6), 20px);
  font-style: italic;
  line-height: 1.4;
  text-align: left;
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .85);
}
.bubble--sintia blockquote { border-color: var(--orchid); border-radius: 20px 20px 6px 20px; background: #F7ECF4; }
.bubble figcaption {
  margin-top: 6px;
  padding: 0 10px;
  font-size: clamp(12px, calc(var(--u) * 3.2), 14px);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--champagne);
}

/* Icônes Material Symbols (ligatures). La boîte de 1em masque le texte de
   secours si la police d'icônes ne se charge pas. */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  overflow: hidden;
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'wght' 200;
  user-select: none;
}

/* ---------- 5. Interface ---------- */

/* Pétales : un petit groupe par volet, derrière le texte (générés par main.js) */
.petals { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.petal {
  position: absolute;
  top: 0;
  left: var(--x);
  animation: fall var(--fall) linear var(--fall-delay) infinite;
}
.petal i {
  display: block;
  width: var(--w);
  height: var(--h);
  border-radius: 150% 0 150% 0;
  background: var(--petal-bg);
  opacity: var(--o);
  animation: sway var(--sway) ease-in-out var(--sway-delay) infinite;
}
.petal--orchid { --petal-bg: linear-gradient(135deg, var(--orchid), var(--orchid-pale)); }
.petal--gold { --petal-bg: linear-gradient(135deg, var(--gold-light), var(--gold)); }

/* Moteur du défilement : sa fin d'animation déclenche le volet suivant */
.engine { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.engine.run { animation: bfill var(--dur) linear forwards; }

/* Barre de progression : un segment par volet */
.segments {
  position: absolute;
  top: calc(8px + var(--safe-t));
  left: calc(10px + var(--safe-l));
  right: calc(10px + var(--safe-r));
  z-index: 60;
  display: flex;
  gap: 3px;
  pointer-events: none;
}
.segment {
  position: relative;
  flex: 1 1 0;
  height: 3px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(250, 248, 243, .3);
}
.segment i {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--orchid-light), var(--gold));
}
.segment.is-done i { transform: scaleX(1); }
.segment.is-current i { animation: bfill var(--dur) linear forwards; }
.stage.is-browse .segment.is-current i,
.stage.is-final .segment i { animation: none; transform: scaleX(1); }

/* Pause et musique : en bas à droite, identiques sur tous les volets */
.controls {
  position: absolute;
  right: calc(12px + var(--safe-r));
  bottom: calc(14px + var(--safe-b));
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(58, 0, 16, .62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 166, 35, .32);
}
.ctrl {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
  transition: background .3s, color .3s;
}
.ctrl .icon { font-variation-settings: 'wght' 300; }
.ctrl--pause .icon { font-size: 23px; }
.ctrl--music .icon { font-size: 21px; }
.ctrl--pause:hover { background: rgba(250, 248, 243, .12); }
.ctrl--music.is-on { background: var(--gold); color: var(--wine); }

/* ---------- 6. Fenêtre d'options, boutons, pastilles ---------- */
/* Fenêtre d'options (agenda, lieux) */
.sheet {
  position: absolute;
  inset: 0;
  z-index: 90; /* au-dessus de la feuille de réponse (85) et de l'écran « C'est noté » (82) */
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet__backdrop { position: absolute; inset: 0; background: rgba(20, 0, 6, .6); animation: fade .25s ease both; }
.sheet__panel {
  position: relative;
  width: calc(100% - 24px);
  max-width: 460px;
  margin-bottom: calc(12px + var(--safe-b));
  padding: 20px 16px 16px;
  border-radius: 22px;
  background: var(--ivory);
  color: var(--wine);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  animation: sheetIn .35s var(--ease-out) both;
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.sheet__title {
  padding: 0 44px 0 4px;
  margin-bottom: 12px;
  font-size: clamp(17px, calc(var(--u) * 4.6), 20px);
  font-weight: 600;
}
.sheet__list { display: flex; flex-direction: column; gap: 8px; }
.sheet__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(58, 0, 16, .12);
  background: #FFFFFF;
  color: var(--wine);
  font-size: clamp(15px, calc(var(--u) * 4), 17px);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.sheet__item:hover { border-color: rgba(184, 91, 160, .5); }
.sheet__item .icon { font-size: clamp(22px, calc(var(--u) * 6), 26px); color: var(--orchid); }
.sheet__item small { display: block; font-size: clamp(12px, calc(var(--u) * 3.3), 14px); font-style: italic; color: var(--orchid); }
.sheet__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--wine);
  cursor: pointer;
}
.sheet__close .icon { font-size: clamp(22px, calc(var(--u) * 6), 24px); }

/* Boutons et pastilles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: clamp(14px, calc(var(--u) * 3.9), 16px);
  letter-spacing: .06em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s, opacity .25s, transform .12s;
}
.btn .icon { font-size: clamp(19px, calc(var(--u) * 5), 21px); font-variation-settings: 'wght' 300; }
.btn--primary { background: var(--wine); color: var(--ivory); }
.btn--primary:hover { background: #52102A; }
.btn--primary:disabled { opacity: .38; cursor: not-allowed; }
.btn:not(:disabled):active,
.chip:active { transform: scale(.97); }
.btn--link { min-height: 40px; padding: 6px 12px; background: none; color: var(--orchid); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid rgba(245, 166, 35, .55);
  border-radius: 999px;
  background: rgba(250, 248, 243, .06);
  color: var(--ivory);
  font-size: clamp(13px, calc(var(--u) * 3.6), 15px);
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .25s, transform .12s;
}
.chip:hover { background: rgba(250, 248, 243, .14); }
.chip .icon { font-size: clamp(18px, calc(var(--u) * 4.8), 20px); color: var(--gold); font-variation-settings: 'wght' 300; }

/* ---------- 7. Écran d'accueil « couverture » ----------
   Photo plein cadre, nom de l'invité en haut, prénoms, dates et compte à rebours en bas.
   Tout l'écran ouvre l'invitation ; l'icône en haut à droite coupe la musique avant l'ouverture. */
.gate {
  position: absolute;
  inset: 0;
  z-index: 70;
  overflow: hidden;
  background: var(--wine);
  color: var(--ivory);
  text-align: center;
}
.gate__media { position: absolute; inset: 0; overflow: hidden; }
.gate__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  animation: kb 14s ease-out both;
  -webkit-user-drag: none;
}
.gate__veil { /* haut assombri : le nom de l'invité et l'icône son restent lisibles */
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 0, 7, .72) 0%, rgba(28, 0, 7, 0) 22%);
  pointer-events: none;
}

.gate__sound {
  position: absolute;
  top: calc(var(--u) * 3.6 + var(--safe-t));
  right: calc(var(--u) * 3.6 + var(--safe-r));
  z-index: 5;
  width: clamp(40px, calc(var(--u) * 11), 46px);
  height: clamp(40px, calc(var(--u) * 11), 46px);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(245, 166, 35, .55);
  border-radius: 50%;
  background: rgba(28, 0, 7, .35);
  color: var(--gold);
  cursor: pointer;
  transition: color .25s, border-color .25s;
}
.gate__sound .icon { font-size: clamp(19px, calc(var(--u) * 5.2), 22px); font-variation-settings: 'wght' 300; }
.gate__sound[aria-pressed="false"] { color: var(--champagne); border-color: rgba(245, 217, 168, .45); }

.gate__for {
  position: absolute;
  top: calc(var(--u) * 4.6 + var(--safe-t));
  left: 16%;
  right: 16%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: opacity .5s ease;
}
.gate.is-loading .gate__for { opacity: 0; } /* le nom arrive : pas de texte générique qui clignote */
.gate__for-label {
  font-size: clamp(11px, calc(var(--u) * 3), 13px);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--champagne);
}
.gate__for-name {
  max-width: 100%;
  font-family: var(--script);
  font-weight: 500;
  font-size: clamp(24px, calc(var(--u) * 7.4), 32px);
  line-height: 1.15;
  color: var(--ivory);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
  overflow-wrap: anywhere;
}

/* Bas de la couverture : le fondu bordeaux suit le texte (il commence au-dessus des prénoms),
   quelle que soit la hauteur de l'écran */
.gate__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 2.6);
  padding:
    calc(var(--u) * 16)
    calc(var(--u) * 6 + var(--safe-r))
    calc(var(--u) * 9 + var(--safe-b))
    calc(var(--u) * 6 + var(--safe-l));
  background: linear-gradient(180deg, rgba(58, 0, 16, 0) 0%, rgba(58, 0, 16, .82) calc(var(--u) * 16), var(--wine) calc(var(--u) * 34), var(--wine-deep) 100%);
}
.gate__names {
  font-family: var(--script);
  font-weight: 500;
  font-size: clamp(42px, calc(var(--u) * 13.2), 60px);
  line-height: 1.05;
  color: var(--orchid-light);
  animation: up 1s var(--ease-out) .3s both;
}
.gate__date {
  font-size: clamp(19px, calc(var(--u) * 5.8), 26px);
  font-weight: 500;
  letter-spacing: .1em;
  white-space: nowrap;
  text-transform: uppercase;
  font-variant-numeric: lining-nums; /* chiffres alignés : « 20 » bien lisible */
  color: var(--ivory);
  animation: up 1s var(--ease-out) .45s both;
}
.gate__date i { font-style: normal; color: var(--gold); padding: 0 .12em; }
.gate__place {
  margin-top: calc(var(--u) * -1);
  font-size: clamp(11px, calc(var(--u) * 3.1), 13.5px);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--champagne);
  animation: up 1s var(--ease-out) .55s both;
}
.gate__countdown {
  display: inline-flex;
  align-items: baseline;
  gap: .45em;
  margin-top: calc(var(--u) * 1);
  padding: .3em 1.1em .38em;
  border: 1px solid rgba(245, 166, 35, .6);
  border-radius: 999px;
  background: rgba(245, 166, 35, .1);
  font-size: clamp(16px, calc(var(--u) * 4.4), 19px);
  font-variant-numeric: lining-nums;
  color: var(--champagne);
  animation: up 1s var(--ease-out) .65s both;
}
.gate__countdown b { font-size: 1.55em; font-weight: 600; line-height: 1; color: var(--gold); }


/* Ouverture (~2,3 s) : les textes s'effacent, la photo avance et s'efface sur la story */
@keyframes fadeOut { to { opacity: 0; } }
@keyframes gateOut { to { opacity: 0; visibility: hidden; } }
@keyframes photoOut { to { transform: scale(1.12); opacity: 0; } }
.gate.is-opening .gate__for,
.gate.is-opening .gate__sound,
.gate.is-opening .gate__names,
.gate.is-opening .gate__date,
.gate.is-opening .gate__place,
.gate.is-opening .gate__countdown,
.gate.is-opening .gate__actions,
.gate.is-opening .gate__pair { animation: fadeOut .4s ease forwards; }
.gate.is-opening .gate__media { animation: photoOut 1.4s cubic-bezier(.5, 0, .2, 1) .3s forwards; }
.gate.is-opening { animation: gateOut .8s ease 1.55s forwards; pointer-events: none; }

/* ---------- 8. Votre réponse (écran final) ---------- */
.slide--rsvp { background: var(--wine); }
.rsvp__bg { background: radial-gradient(ellipse at 50% 28%, #62102b 0%, var(--wine) 52%, #1c0007 100%); }
.rsvp {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--ivory);
}
.rsvp__script {
  font-family: var(--script);
  font-size: clamp(28px, min(calc(var(--u) * 7.5), calc(var(--frame-h) * 5.4 / 100)), 52px);
  line-height: 1.15;
  color: var(--orchid-light);
  padding: 0 .3em;
  animation: write 1.2s var(--ease-write) .2s both;
}
.rsvp__title {
  font-weight: 300;
  font-size: clamp(30px, min(calc(var(--u) * 9), calc(var(--frame-h) * 6.4 / 100)), 64px);
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
  animation: up 1s var(--ease-out) .5s both;
}
.rsvp__for {
  margin-top: clamp(8px, calc(var(--frame-h) * 1.6 / 100), 14px);
  font-style: italic;
  font-size: clamp(14px, calc(var(--u) * 3.9), 17px);
  color: var(--champagne);
  animation: fade 1s ease .8s both;
}
.rsvp__for b { font-style: normal; font-weight: 500; color: var(--ivory); }
.rsvp__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(12px, calc(var(--frame-h) * 2.4 / 100), 20px);
  animation: fade 1s ease 1.1s both;
}

/* ---------- 8 bis. Réponse : bouton d'action, feuille (bottom sheet), écran « C'est noté », cadeaux ----------
   Un seul bouton selon l'état de l'invité (main.js › answerHtml), dessiné sur l'accueil et sur le dernier volet.
   Pas de style en ligne (politique de sécurité du site) : tout passe par des classes. */
.act-cta {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #F8B43C, var(--gold));
  color: var(--wine);
  font-size: clamp(18px, calc(var(--u) * 5.1), 21px);
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 12px 28px -12px rgba(245, 166, 35, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
  cursor: pointer;
  transition: transform .15s;
}
.act-cta:active { transform: scale(.98); }
.act-cta--pulse { animation: ctaPulse 2.8s ease-in-out 1.6s infinite; }
@keyframes ctaPulse { 0%, 100% { box-shadow: 0 12px 28px -12px rgba(245, 166, 35, .7), 0 0 0 0 rgba(245, 166, 35, .45); } 50% { box-shadow: 0 12px 28px -12px rgba(245, 166, 35, .7), 0 0 0 10px rgba(245, 166, 35, 0); } }
.act-sub { font-size: clamp(14px, calc(var(--u) * 3.9), 16px); font-style: italic; text-align: center; color: var(--champagne); margin-top: -2px; }
.act-sub b { font-style: normal; color: var(--gold); font-weight: 600; }
.act-status {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border-radius: 16px;
  background: rgba(250, 248, 243, .09);
  border: 1px solid rgba(245, 217, 168, .22);
  text-align: left;
}
.act-status__icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(184, 91, 160, .3); color: var(--orchid-light); flex: none; }
.act-status--yes .act-status__icon { background: rgba(245, 166, 35, .22); color: var(--gold); }
.act-status__txt { flex: 1; font-size: clamp(16px, calc(var(--u) * 4.4), 18px); line-height: 1.2; }
.act-status__txt small { display: block; font-size: clamp(13px, calc(var(--u) * 3.6), 15px); font-style: italic; color: var(--champagne); }
.act-link { padding: 8px 6px; border: 0; background: none; color: var(--orchid-light); font-size: clamp(15px, calc(var(--u) * 4.1), 17px); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.rsvp-act { width: 100%; display: grid; gap: 12px; justify-items: center; margin-top: clamp(14px, calc(var(--frame-h) * 2.6 / 100), 24px); animation: up .8s var(--ease-out) .9s both; }
.rsvp-act:empty { display: none; }
.gate__actions { width: 100%; display: grid; gap: 12px; justify-items: center; margin-top: calc(var(--u) * 1.4); animation: up 1s var(--ease-out) .8s both; }
.gate__actions:empty { display: none; }
.gate__pair { width: 100%; display: flex; justify-content: center; gap: 10px; animation: up 1s var(--ease-out) .95s both; }
.gate__open, .gift-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  white-space: nowrap;
  border: 1px solid rgba(245, 217, 168, .35);
  border-radius: 999px;
  background: rgba(250, 248, 243, .06);
  color: var(--champagne);
  font-size: clamp(15px, calc(var(--u) * 4.3), 18px);
  letter-spacing: .02em;
  cursor: pointer;
}
.gate__open .btn__svg, .gift-btn .btn__svg { color: var(--gold); }
.gate__pair .gate__open { flex: 1 1 auto; }
.gate__open.is-wide { flex: 1; min-height: 54px; border-color: rgba(245, 166, 35, .6); color: var(--ivory); }
.gift-btn[hidden], .gate__open[hidden], .gate__pair[hidden] { display: none; }
.gate__open:focus-visible, .gift-btn:focus-visible, .act-cta:focus-visible, .act-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.rsvp__actions .chip .btn__svg { width: 19px; height: 19px; color: var(--gold); }
.rsvp__actions .chip[hidden] { display: none; }

/* Bouton flottant de la story : « Confirmer ma présence », puis « Mon billet » */
.answer-btn {
  position: absolute;
  left: calc(12px + var(--safe-l));
  bottom: calc(14px + var(--safe-b));
  z-index: 55;
  height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #F8B43C, var(--gold));
  color: var(--wine);
  font-size: clamp(15px, calc(var(--u) * 4.3), 17px);
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(245, 166, 35, .8);
  cursor: pointer;
  transition: opacity .6s ease, visibility 0s, transform .15s;
}
.answer-btn:active { transform: scale(.97); }
.answer-btn[hidden] { display: none; }
.answer-btn .btn__svg { width: 21px; height: 21px; }

/* Feuille de réponse (bottom sheet) */
.asheet { position: absolute; inset: 0; z-index: 85; display: flex; align-items: flex-end; justify-content: center; }
.asheet[hidden] { display: none; }
.asheet__backdrop { position: absolute; inset: 0; background: rgba(20, 0, 6, .62); animation: fade .3s ease both; }
.asheet__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 94%;
  display: flex;
  flex-direction: column;
  border-radius: 28px 28px 0 0;
  background: var(--ivory);
  color: var(--wine);
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .7);
  animation: asheetIn .42s var(--ease-out) both;
  padding-bottom: var(--safe-b);
}
@keyframes asheetIn { from { transform: translateY(100%); } to { transform: none; } }
.asheet__grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(58, 0, 16, .18); margin: 10px auto 0; flex: none; }
.asheet__top { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px 0; min-height: 44px; flex: none; }
.asheet__nav { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: rgba(58, 0, 16, .65); cursor: pointer; }
.asheet__nav[hidden] { display: grid; visibility: hidden; }
.asheet__dots { display: flex; gap: 6px; }
.asheet__dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(58, 0, 16, .16); transition: width .3s, background .3s; }
.asheet__dots i.is-on { width: 22px; border-radius: 4px; background: var(--wine); }
.asheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 0 22px 26px; display: grid; gap: 16px; }
.as-recap { display: grid; gap: 2px; justify-items: center; text-align: center; padding-bottom: 14px; border-bottom: 1px solid rgba(58, 0, 16, .1); }
.as-recap__for { font-size: clamp(14px, calc(var(--u) * 3.9), 16px); font-style: italic; color: rgba(58, 0, 16, .65); }
.as-recap__for b { font-style: normal; font-weight: 600; color: var(--wine); }
.as-recap__when { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: clamp(17px, calc(var(--u) * 4.7), 19px); font-weight: 600; }
.as-recap__when .btn__svg { width: 20px; height: 20px; color: var(--orchid); }
.as-recap__where { font-size: clamp(14px, calc(var(--u) * 3.9), 16px); font-style: italic; color: var(--orchid); }
.as-step { display: grid; gap: 14px; animation: asStepIn .38s var(--ease-out) both; }
.as-step.is-back { animation-name: asStepBack; }
@keyframes asStepIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes asStepBack { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.as-q { font-family: var(--script); font-size: clamp(30px, calc(var(--u) * 8.6), 38px); line-height: 1.1; text-align: center; color: var(--wine); font-weight: 500; }
.as-q--sm { font-size: clamp(27px, calc(var(--u) * 7.6), 33px); }
.as-cards { display: grid; gap: 10px; }
.acard {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 12px 16px;
  text-align: left;
  border-radius: 18px;
  border: 1.5px solid rgba(58, 0, 16, .16);
  background: #fff;
  color: var(--wine);
  cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s, box-shadow .2s;
}
.acard:active { transform: scale(.985); }
.acard__ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--blush); color: var(--orchid); flex: none; transition: background .2s, color .2s; }
.acard__txt { flex: 1; font-size: clamp(19px, calc(var(--u) * 5.4), 22px); font-weight: 600; line-height: 1.15; }
.acard__txt small { display: block; font-size: clamp(14px, calc(var(--u) * 3.9), 16px); font-style: italic; font-weight: 400; color: rgba(58, 0, 16, .62); margin-top: 2px; }
.acard__tick { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(58, 0, 16, .2); display: grid; place-items: center; color: transparent; flex: none; transition: background .2s, border-color .2s, color .2s; }
.acard__tick .btn__svg { width: 16px; height: 16px; stroke-width: 2.4; }
.acard.is-sel { background: var(--wine); border-color: var(--wine); color: var(--ivory); box-shadow: 0 14px 28px -16px rgba(58, 0, 16, .8); }
.acard.is-sel .acard__txt small { color: var(--champagne); }
.acard.is-sel .acard__ico { background: var(--gold); color: var(--wine); }
.acard.is-sel .acard__tick { background: var(--gold); border-color: var(--gold); color: var(--wine); }
.acard:focus-visible, .as-send:focus-visible, .asheet__nav:focus-visible, .acopy:focus-visible, .ago:focus-visible, .as-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.as-current { text-align: center; font-size: clamp(14px, calc(var(--u) * 3.9), 16px); font-style: italic; color: var(--orchid); }
.as-answer { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--blush); font-size: clamp(17px, calc(var(--u) * 4.8), 19px); font-weight: 600; }
.as-answer .btn__svg { color: var(--orchid); width: 20px; height: 20px; }
.as-msg { display: grid; gap: 8px; }
.as-msg label { font-size: clamp(16px, calc(var(--u) * 4.5), 18px); font-weight: 600; }
.as-msg label small { font-weight: 400; font-style: italic; color: rgba(58, 0, 16, .6); }
.as-msg textarea { width: 100%; padding: 12px 14px; border-radius: 16px; border: 1.5px solid rgba(58, 0, 16, .18); background: #fff; font: 17px/1.4 var(--serif); color: var(--wine); resize: none; }
.as-msg textarea:focus { outline: none; border-color: var(--orchid); box-shadow: 0 0 0 3px rgba(184, 91, 160, .18); }
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.as-chips button { padding: 8px 12px; border: 0; border-radius: 999px; background: var(--blush); color: var(--wine); font-size: 15.5px; cursor: pointer; }
.as-send {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--wine);
  color: var(--ivory);
  font-size: clamp(18px, calc(var(--u) * 5.1), 21px);
  font-weight: 600;
  box-shadow: 0 14px 28px -16px rgba(58, 0, 16, .9);
  cursor: pointer;
}
.as-send:disabled { opacity: .7; cursor: default; }
.as-note { text-align: center; font-size: clamp(13px, calc(var(--u) * 3.7), 15px); font-style: italic; color: rgba(58, 0, 16, .62); }
.as-error { text-align: center; font-size: clamp(14px, calc(var(--u) * 3.9), 16px); color: #A1192E; }
.as-error[hidden] { display: none; }
.as-spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(250, 248, 243, .35); border-top-color: var(--ivory); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.as-slots { display: flex; justify-content: center; gap: 10px; }
.as-slots span { width: 58px; height: 68px; display: grid; place-items: center; border: 1.5px solid rgba(58, 0, 16, .2); border-radius: 14px; background: #fff; color: var(--wine); font: 600 34px/1 var(--serif); transition: border-color .15s, box-shadow .15s; }
.as-slots span.is-cur { border-color: var(--orchid); box-shadow: 0 0 0 3px rgba(184, 91, 160, .18); }
.as-slots span.is-full { border-color: rgba(58, 0, 16, .45); }
.as-slots.is-shake { animation: asShake .4s; }
@keyframes asShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.as-pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.as-key { min-height: 52px; display: grid; place-items: center; padding: 0; border: 1.5px solid rgba(58, 0, 16, .16); border-radius: 12px; background: #fff; color: var(--wine); font: 600 23px/1 var(--serif); cursor: pointer; touch-action: manipulation; transition: background .12s, transform .12s; }
.as-key:active { background: var(--blush); transform: scale(.95); }
.as-key--del { background: var(--blush); }
.as-key .btn__svg { width: 26px; height: 26px; }
.as-key:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Feuille « Cadeaux » */
.gnote { text-align: center; font-size: clamp(15px, calc(var(--u) * 4.2), 17px); font-style: italic; color: rgba(58, 0, 16, .72); line-height: 1.35; }
.gcards { display: grid; gap: 12px; }
.gcard { display: grid; gap: 8px; padding: 14px; border-radius: 18px; border: 1.5px solid rgba(58, 0, 16, .14); background: #fff; }
.gcard__head { display: flex; align-items: center; gap: 12px; }
.gcard__ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--blush); color: var(--orchid); flex: none; }
.gcard__head b { display: block; font-size: clamp(19px, calc(var(--u) * 5.2), 21px); font-weight: 600; line-height: 1.1; }
.gcard__head small { font-size: 14.5px; font-style: italic; color: var(--orchid); }
.gcard__val { font-size: clamp(22px, calc(var(--u) * 6.4), 26px); font-weight: 600; letter-spacing: .04em; overflow-wrap: anywhere; }
.gcard__val--link { font-size: clamp(17px, calc(var(--u) * 5), 20px); letter-spacing: 0; }
.gcard__who { font-size: 15px; font-style: italic; color: rgba(58, 0, 16, .62); margin-top: -6px; }
.gcard__btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.acopy, .ago { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; border-radius: 999px; font-size: clamp(15px, calc(var(--u) * 4.4), 17px); font-weight: 600; text-decoration: none; cursor: pointer; }
.acopy { border: 1.5px solid var(--wine); background: none; color: var(--wine); transition: background .2s, color .2s; }
.acopy.is-ok { background: var(--wine); color: var(--ivory); }
.ago { border: 1.5px solid var(--wine); background: var(--wine); color: var(--ivory); }
.acopy .btn__svg, .ago .btn__svg { width: 19px; height: 19px; }
.gtip { font-size: 14.5px; font-style: italic; color: rgba(58, 0, 16, .62); line-height: 1.3; }
.as-close { min-height: 48px; border: 1.5px solid rgba(58, 0, 16, .2); border-radius: 999px; background: none; font-size: 18px; color: var(--wine); cursor: pointer; }

/* Écran « C'est noté » : couche par-dessus la story ou l'accueil */
.adone { position: absolute; inset: 0; z-index: 82; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(120% 70% at 50% 0%, #6a1636 0%, var(--wine) 45%, var(--wine-deep) 100%); color: var(--ivory); animation: fade .4s ease both; }
.adone[hidden] { display: none; }
.adone__close { position: absolute; top: calc(10px + var(--safe-t)); right: 12px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(245, 217, 168, .3); border-radius: 50%; background: none; color: var(--champagne); cursor: pointer; }
.adone__in { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: calc(46px + var(--safe-t)) 22px calc(20px + var(--safe-b)); text-align: center; }
.dn-ring { width: 62px; height: 62px; flex: none; }
.dn-ring circle { fill: rgba(245, 166, 35, .12); stroke: var(--gold); stroke-width: 2; stroke-dasharray: 190; stroke-dashoffset: 190; animation: dnDraw .7s .15s ease forwards; }
.dn-ring path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: dnDraw .45s .65s ease forwards; }
.dn-ring--heart circle { stroke: var(--orchid-light); fill: rgba(184, 91, 160, .12); }
.dn-ring--heart path { stroke: var(--orchid-light); stroke-width: 2; fill: rgba(184, 91, 160, .2); stroke-dasharray: 120; stroke-dashoffset: 120; }
@keyframes dnDraw { to { stroke-dashoffset: 0; } }
.adone h2 { font-family: var(--script); font-weight: 500; font-size: clamp(34px, calc(var(--u) * 9.6), 42px); line-height: 1.05; color: var(--orchid-light); }
.dn-who { font-size: clamp(18px, calc(var(--u) * 5), 21px); }
.dn-when { font-size: clamp(15px, calc(var(--u) * 4.1), 17px); font-style: italic; color: var(--champagne); margin-top: -4px; line-height: 1.3; }
.dn-when b { font-style: normal; font-weight: 500; color: var(--ivory); }
.dn-wallet { position: relative; width: 100%; height: 150px; margin-top: 2px; display: grid; justify-items: center; overflow: hidden; }
.dn-wallet__t { width: 188px; padding: 0; border: 0; background: none; transform: rotate(-3deg); transform-origin: 50% 0; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .5)); cursor: pointer; transition: transform .3s var(--ease-out); }
.dn-wallet__t:active { transform: rotate(-3deg) scale(.98); }
.dn-wallet__t svg { display: block; width: 100%; height: auto; }
.dn-wallet::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none; background: linear-gradient(180deg, rgba(40, 0, 10, 0), rgba(36, 0, 10, .96) 48%, #240009 70%); }
.dn-wallet__cap { position: absolute; z-index: 2; bottom: 4px; left: 0; right: 0; font-size: 15px; font-style: italic; color: var(--champagne); pointer-events: none; }
.dn-btns { width: 100%; display: grid; gap: 10px; }
.dn-tip { font-size: 14.5px; font-style: italic; color: rgba(245, 217, 168, .8); margin-top: -2px; line-height: 1.3; }
.dn-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dn-outline { min-height: 50px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 8px; border: 1px solid rgba(245, 166, 35, .6); border-radius: 999px; background: none; color: var(--ivory); font-size: clamp(16px, calc(var(--u) * 4.5), 18px); cursor: pointer; }
.dn-outline .btn__svg { color: var(--gold); width: 20px; height: 20px; }
.dn-outline[hidden] { display: none; }
.dn-ghost { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(245, 217, 168, .4); border-radius: 999px; background: none; color: var(--ivory); font-size: clamp(17px, calc(var(--u) * 4.9), 19px); cursor: pointer; }
.dn-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; margin-top: auto; padding-top: 8px; }
.dn-links .act-link { font-size: clamp(14px, calc(var(--u) * 4), 16px); }
.dn-petal { position: absolute; left: var(--x, 50%); top: -30px; width: 14px; height: 20px; border-radius: 80% 0 80% 0; opacity: 0; z-index: 1; pointer-events: none; animation: dnFall linear forwards; animation-duration: var(--d); animation-delay: var(--dl); }
.dn-petal--g { background: #F5A623; } .dn-petal--o { background: #B85BA0; } .dn-petal--l { background: #E4B4D6; } .dn-petal--c { background: #FBD38A; }
@keyframes dnFall { 0% { opacity: 0; transform: translateY(0) rotate(0); } 10% { opacity: .9; } 100% { opacity: 0; transform: translateY(820px) translateX(var(--dx)) rotate(var(--rot)); } }
@media (prefers-reduced-motion: reduce) { .dn-petal { display: none; } .act-cta--pulse { animation: none; } }

/* ---------- 9. États de la story ---------- */
/* Avant l'ouverture : story non montée, commandes masquées */
.stage.is-waiting .slide__inner { display: none; }
.stage.is-waiting .controls,
.stage.is-waiting .segments,
.stage.is-waiting .answer-btn { opacity: 0; visibility: hidden; }
.controls,
.segments { transition: opacity .8s ease .4s, visibility 0s; }
/* Écran final : plus rien à mettre en pause, plus besoin du bouton Confirmer ma présence */
.stage.is-final .ctrl--pause { display: none; }
.stage.is-final .answer-btn { opacity: 0; visibility: hidden; }
.slide--rsvp .petals { opacity: .45; } /* formulaire : les pétales passent au second plan */
.slide--rsvp .slide__inner { padding-top: 0; }
.slide--rsvp .slide__body { flex: 1 1 auto; padding-top: calc(var(--u) * 9 + var(--safe-t)); }
.fit.rsvp { margin: auto; gap: 0; }

/* Pause (bouton, espace, maintien du doigt ou de la souris, onglet masqué) :
   fige tout ce qui rythme le défilement */
.stage.is-paused .timed { animation-play-state: paused; }

/* ---------- 10. Téléphone à l'horizontale : la story se regarde à la verticale ---------- */
.rotate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px calc(24px + var(--safe-r)) 24px calc(24px + var(--safe-l));
  background: radial-gradient(ellipse at 50% 40%, #5a0f27 0%, var(--wine) 55%, var(--wine-deep) 100%);
  color: var(--ivory);
  text-align: center;
}
.rotate svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: tilt 2.6s var(--ease-soft) infinite;
}
.rotate p { font-size: 22px; letter-spacing: .04em; }
.rotate small { font-size: 16px; font-style: italic; color: var(--champagne); }
@keyframes tilt { 0%, 25% { transform: rotate(-90deg); } 55%, 100% { transform: rotate(0deg); } }
/* Affiché par main.js d'après l'orientation réelle du téléphone (pas quand le clavier est ouvert) */
.is-landscape .rotate { display: flex; }

/* ---------- 11. Mouvements réduits ---------- */
@media (prefers-reduced-motion: reduce) {
  .kb,
  .gate__photo { animation: none; }
  .petals { display: none; }
  .rotate svg { animation: none; }
}

/* ---------- 12. Volets poétiques (Notre Histoire) ---------- */

/* Titre long (ex. "La saison qui nous précédait") */
.head__title--long {
  white-space: normal;
  text-wrap: balance;
  font-size: clamp(20px, calc(var(--u) * 6), 30px);
  line-height: 1.2;
}

/* Bloc de texte poétique : strophes séparées, italique, respiration généreuse */
.poem {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 3.2);
  max-width: 24em;
  text-align: center;
  animation: up .9s var(--ease-out) .5s both;
}
.poem p {
  font-size: clamp(14px, calc(var(--u) * 4), 18px);
  font-style: italic;
  line-height: 1.78;
  color: rgba(250, 248, 243, .94);
}

/* ---------- 13. Poème qui défile : une strophe affichée, puis effacée vers le haut
   pendant que la suivante entre (main.js › runPoemScroll) ---------- */
.poem-scroll {
  position: relative;
  width: 100%;
  max-width: 24em;
  height: calc(var(--u) * 30);
}
.poem-scroll__stanza {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s var(--ease-soft), transform .6s var(--ease-out);
}
.poem-scroll__stanza p {
  font-size: clamp(16px, calc(var(--u) * 4.6), 21px);
  font-style: italic;
  line-height: 1.75;
  color: rgba(250, 248, 243, .94);
}
.poem-scroll__stanza.is-current { opacity: 1; transform: translateY(0); }
.poem-scroll__stanza.is-leaving { opacity: 0; transform: translateY(-34px); }
/* Échange de messages (« Une Réponse ») : une voix par strophe, même défilement que les poèmes */
.poem-scroll__stanza--franck p { color: var(--gold-light); }
.poem-scroll__stanza--sintia p { color: var(--orchid-light); }
.poem-scroll__dots { display: flex; justify-content: center; gap: 6px; margin-top: calc(var(--u) * 2); }
.poem-scroll__dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(250, 248, 243, .3); }
.poem-scroll__dots i.is-current { background: var(--gold); }
.poem-scroll__finale {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .9s var(--ease-soft), transform .9s var(--ease-out);
}
.poem-scroll__finale.is-shown { opacity: 1; transform: none; }

/* Volet "photo seule" (temps 1 d'un poème en deux temps) : pas de différence de gabarit,
   juste l'absence du bloc poème — le visuel réutilise .slide--photo tel quel. */

@media (prefers-reduced-motion: reduce) {
  .poem-scroll__stanza,
  .poem-scroll__finale { transition: opacity .3s linear; transform: none; }
}

/* ---------- Billet d'entrée ---------- */
.btn__svg { width: 21px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.billet-view { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(14px + var(--safe-t)) 14px calc(22px + var(--safe-b)); }
.billet-view[hidden] { display: none; }
.billet-view__backdrop { position: fixed; inset: 0; background: rgba(20, 0, 6, .88); animation: fade .25s ease both; }
.billet-view__panel { position: relative; width: min(360px, 100%); margin: auto; display: grid; gap: 12px; justify-items: center; animation: up .5s var(--ease-out) both; }
.billet-view__close { justify-self: end; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(245, 217, 168, .4); background: rgba(250, 248, 243, .1); color: var(--ivory); cursor: pointer; }
.billet-view__ticket { width: 100%; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45)); }
.billet-view__ticket svg { display: block; width: 100%; height: auto; }
.billet-view__ticket svg text { font-variant-numeric: lining-nums; }
.billet-view__error { color: #FFD3C9; font-size: 16px; text-align: center; }
.billet-view__error[hidden] { display: none; }
.billet-view__actions { width: 100%; display: grid; gap: 8px; }
.btn--ghost-light { background: rgba(250, 248, 243, .1); color: var(--ivory); border-color: rgba(245, 217, 168, .45); }
.btn--ghost-light:hover { background: rgba(250, 248, 243, .18); }

/* Impression : seul le billet est imprimé, centré en haut d'une feuille A4, à 92 mm de large, avec un trait de coupe */
@media print {
  @page { size: A4; margin: 0; }
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; }
  body > *:not(.billet-view) { display: none !important; }
  body::before { display: none !important; }
  .billet-view { position: static !important; display: block !important; overflow: visible !important; padding: 16mm 0 0 !important; }
  .billet-view__backdrop, .billet-view__close, .billet-view__actions, .billet-view__error { display: none !important; }
  .billet-view__panel { width: 92mm !important; margin: 0 auto !important; animation: none !important; }
  .billet-view__ticket { filter: none !important; outline: .3mm dashed #8a8a8a; outline-offset: 3mm; }
  .billet-view__ticket svg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
