/* =========================================================================
   Kévin & Janice — Invitation de mariage
   Thème « charcoal » monochrome inspiré du template Soria :
   fond anthracite, typographie serif élégante, grandes images pleine largeur.
   ========================================================================= */

:root {
  /* Page sombre (charcoal monochrome) */
  --bg:        #242422;
  --bg-deep:   #191917;
  --bg-soft:   #2c2c29;
  --text:      #ece9e2;
  --muted:     #9d978c;
  --line:      #3a3a37;
  --accent:    #c9bfac;  /* champagne discret */
  --accent-2:  #e0d7c5;  /* plus clair (liens / survol) */

  /* Papier clair (carte, enveloppe, modale, admin) */
  --paper:      #f6f3ed;
  --paper-2:    #ece6da;
  --paper-ink:  #2b2925;
  --paper-muted:#6e685e;
  --paper-line: #e2dac9;

  --shadow:  0 24px 60px -24px rgba(0, 0, 0, 0.6);
  --shadow-soft: 0 18px 50px -20px rgba(0, 0, 0, 0.35);

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans:  'Jost', 'Helvetica Neue', Arial, sans-serif;
  --script:'Great Vibes', cursive;
  --display:'Cinzel', 'Cormorant Garamond', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* =========================================================================
   Préchargeur
   ========================================================================= */
.preloader {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: #1a1a18;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.preloader.hide { opacity: 0; visibility: hidden; }
.preloader__mark { position: relative; width: 130px; height: 130px; display: flex; align-items: center; justify-content: center; }
.preloader__mono {
  font-family: var(--script); font-size: 2.6rem; color: var(--accent);
  opacity: 0; animation: monoIn 1s ease 0.2s forwards;
}
@keyframes monoIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
.preloader__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(201, 191, 172, 0.18);
  border-top-color: var(--accent);
  animation: ringSpin 1.1s linear infinite;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-weight: 300;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; }
a { color: var(--accent-2); text-decoration: none; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 400;
}

/* ---- Boutons ---------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 0.95rem 2.4rem;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.35s ease;
  border-radius: 1px;
}
.btn:hover { background: var(--accent); color: #1d1d1b; }
.btn--filled { background: var(--accent); color: #1d1d1b; border-color: var(--accent); }
.btn--filled:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost { border-color: var(--line); color: var(--muted); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--text); }

/* ---- Sélecteur de langue --------------------------------------------- */
.langbar {
  position: fixed; top: 1.4rem; right: 1.6rem; z-index: 50;
  display: flex; gap: 0.2rem;
  background: rgba(20, 20, 19, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 40px; padding: 0.25rem;
}
.langbar button {
  border: none; background: transparent;
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(236, 233, 226, 0.7);
  padding: 0.35rem 0.7rem; border-radius: 40px; cursor: pointer;
  transition: all 0.3s ease;
}
.langbar button.active { background: var(--accent); color: #1d1d1b; }

/* ---- Hero ------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: flex-start;
  text-align: left; color: #fff;
  padding: 2rem clamp(1.6rem, 9vw, 8rem); overflow: hidden;
  background: linear-gradient(150deg, #3a3a37, #1c1c1a) center/cover no-repeat;
}
/* L'image éventuelle se met via background-image en style inline sur .hero.
   Voile renforcé à gauche pour la lisibilité du texte par-dessus la photo. */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(90deg, rgba(15,15,14,0.72) 0%, rgba(15,15,14,0.4) 42%, rgba(15,15,14,0.12) 100%),
    linear-gradient(rgba(18, 18, 17, 0.25), rgba(18, 18, 17, 0.45));
}
.hero__inner { position: relative; z-index: 1; max-width: 640px; }
.hero__sub {
  letter-spacing: 0.45em; text-transform: uppercase; font-size: 0.78rem;
  margin-bottom: 1.8rem; color: rgba(255, 255, 255, 0.82);
}
.hero__names {
  font-family: var(--display);
  font-size: clamp(2.6rem, 9vw, 6rem);
  font-weight: 600; line-height: 1.08; color: #fff;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
}
.hero__names .amp {
  display: block; font-family: var(--script);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  color: var(--accent); margin: 0.15rem 0; font-weight: 400;
  letter-spacing: 0; text-transform: none;
}
.hero__meta { margin-top: 2rem; font-size: 1.05rem; letter-spacing: 0.18em; color: rgba(255, 255, 255, 0.9); }
.hero__date { display: block; margin-top: 0.6rem; font-style: italic; font-family: var(--serif); font-size: 1.3rem; color: var(--accent-2); }
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 1;
  font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75);
}
.hero__scroll::after { content: ''; display: block; width: 1px; height: 38px; background: rgba(255, 255, 255, 0.5); margin: 0.6rem auto 0; }

/* Halo + étincelles autour des noms, animation d'entrée déclenchée par body.loaded */
.hero__namewrap { position: relative; display: inline-block; }
.hero__glow {
  position: absolute; left: 50%; top: 50%; width: 130%; height: 200%;
  transform: translate(-50%, -50%); z-index: -1; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(201, 191, 172, 0.28) 0%, rgba(201, 191, 172, 0.08) 38%, transparent 68%);
  filter: blur(6px);
}
.hero__spark {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px 2px rgba(231, 220, 171, 0.9);
  opacity: 0; pointer-events: none;
}
.hero__spark.s1 { top: 6%;  left: -4%; }
.hero__spark.s2 { top: 18%; right: -3%; }
.hero__spark.s3 { bottom: 12%; left: 8%; }
.hero__spark.s4 { bottom: 0%; right: 14%; }

/* États initiaux (avant chargement) */
.hero__sub, .hero__names, .hero__meta { opacity: 0; }

/* Entrée une fois la page chargée */
body.loaded .hero__sub   { animation: heroFade 1s ease 0.15s forwards; }
body.loaded .hero__names { animation: heroNames 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s forwards; }
body.loaded .hero__meta  { animation: heroFade 1s ease 1.15s forwards; }
body.loaded .hero__glow  { animation: glowIn 1.8s ease 0.7s forwards, glowPulse 6s ease-in-out 2.6s infinite; }
body.loaded .hero__spark { animation: twinkle 3.2s ease-in-out infinite; }
body.loaded .hero__spark.s1 { animation-delay: 1.0s; }
body.loaded .hero__spark.s2 { animation-delay: 1.6s; }
body.loaded .hero__spark.s3 { animation-delay: 2.1s; }
body.loaded .hero__spark.s4 { animation-delay: 2.6s; }

@keyframes heroFade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes heroNames {
  from { opacity: 0; transform: translateY(26px); filter: blur(8px); letter-spacing: 0.22em; }
  to   { opacity: 1; transform: none; filter: blur(0); letter-spacing: 0.04em; }
}
@keyframes glowIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes glowPulse { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Si l'utilisateur réduit les animations : tout reste visible, sans mouvement */
@media (prefers-reduced-motion: reduce) {
  .hero__sub, .hero__names, .hero__meta { opacity: 1; animation: none; }
  .hero__glow { opacity: 0.8; animation: none; }
  .hero__spark { animation: none; }
}

/* ---- Sections génériques --------------------------------------------- */
.section { padding: clamp(4.5rem, 11vw, 8rem) 1.6rem; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.section__head h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0.7rem 0; color: var(--text); }
.section__head p { color: var(--muted); }
.divider { width: 60px; height: 1px; background: var(--accent); margin: 1.2rem auto; position: relative; }
.divider::before, .divider::after { content: '◦'; color: var(--accent); position: absolute; top: -0.7rem; font-size: 0.8rem; }
.divider::before { left: -1.1rem; }
.divider::after { right: -1.1rem; }
.alt { background: var(--bg-soft); }

/* ---- Moments : galerie éditoriale ------------------------------------ */
.moments {
  position: relative; overflow: hidden;
  background: radial-gradient(70% 55% at 50% 26%, rgba(201, 191, 172, 0.055), transparent 72%);
}
.moments .section__head, .moments__list { position: relative; z-index: 1; }
.moments__list {
  display: flex; flex-direction: column; gap: clamp(3.5rem, 9vw, 7rem);
  max-width: 1080px; margin: 0 auto;
}
.mrow { display: flex; align-items: center; gap: clamp(1.5rem, 5vw, 4.5rem); }
.mrow:nth-child(even) { flex-direction: row-reverse; }
.mrow__media { flex: 1 1 56%; opacity: 0; will-change: transform, opacity; } /* piloté par reveal.js */
.mrow__text  { flex: 1 1 44%; opacity: 0; will-change: transform, opacity; }

.mrow__frame {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px;
  box-shadow: 0 40px 80px -34px rgba(0, 0, 0, 0.82);
}
.mrow__frame::after { /* fin liseré doré intérieur */
  content: ''; position: absolute; inset: 12px; z-index: 1; pointer-events: none;
  border: 1px solid rgba(201, 191, 172, 0.42);
}
.mrow__img {
  position: absolute; inset: -7%; background-size: cover; background-position: center;
  filter: saturate(0.97) contrast(1.02);
  animation: kenburns 22s ease-in-out infinite alternate;
  transition: filter 0.8s ease;
}
.mrow:hover .mrow__img { filter: saturate(1.06) contrast(1.05) brightness(1.07); }
@keyframes kenburns {
  from { transform: scale(1.02) translate(0, 0); }
  to   { transform: scale(1.12) translate(-2.5%, -2.5%); }
}
.mrow__num { display: block; font-family: var(--display); font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1; color: rgba(201, 191, 172, 0.28); }
.mrow__title { font-family: var(--script); font-size: clamp(2.4rem, 6vw, 3.6rem); color: var(--text); margin: 0.2rem 0 0; line-height: 1.1; }
.mrow__rule { display: block; width: 62px; height: 1px; background: var(--accent); margin: 1.1rem 0; }
.mrow__sub { color: var(--muted); max-width: 360px; font-size: 1.06rem; }
@media (max-width: 760px) {
  .mrow, .mrow:nth-child(even) { flex-direction: column; }
  .mrow__media, .mrow__text { width: 100%; flex-basis: auto; }
  .mrow__rule { margin-left: 0; }
}

/* ---- Bloc accès ------------------------------------------------------- */
.access { max-width: 520px; margin: 0 auto; text-align: center; }
.access h2 { color: var(--text); }
.access p { color: var(--muted); }
.access form { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.code-input {
  font-family: var(--sans); font-size: 1.1rem; letter-spacing: 0.35em;
  text-align: center; text-transform: uppercase;
  padding: 1.1rem; border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  color: var(--text); border-radius: 2px;
}
.code-input::placeholder { color: var(--muted); letter-spacing: 0.2em; }
.code-input:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,0.07); }
.access__nocode { display: inline-block; margin-top: 1.6rem; font-size: 0.85rem; color: var(--accent-2); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.notice { margin-top: 1rem; font-size: 0.9rem; min-height: 1.2rem; }
.notice--error { color: #e0a99b; }
.notice--ok { color: var(--accent-2); }

/* ---- Formulaires (sur surfaces claires : modale, carte, admin) -------- */
.field { text-align: left; display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper-muted); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem; padding: 0.85rem 1rem;
  border: 1px solid var(--paper-line); background: #fff; color: var(--paper-ink); border-radius: 3px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 90px; }

/* ---- Modale ----------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 1.5rem;
  background: rgba(10, 10, 9, 0.66); backdrop-filter: blur(4px);
}
.modal.open { display: flex; }
.modal__box {
  background: var(--paper); border: 1px solid var(--paper-line);
  max-width: 480px; width: 100%; padding: 2.6rem; border-radius: 4px;
  box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; color: var(--paper-ink);
}
.modal__box h3 { font-size: 1.9rem; margin-bottom: 0.6rem; color: var(--paper-ink); }
.modal__box p.intro { color: var(--paper-muted); font-size: 0.92rem; margin-bottom: 1.6rem; }
.modal form { display: flex; flex-direction: column; gap: 1.1rem; }
.modal__actions { display: flex; gap: 0.8rem; margin-top: 0.6rem; }
.modal__actions .btn { flex: 1; }
.modal .btn { color: var(--paper-ink); border-color: var(--accent); }
.modal .btn--filled { color: #1d1d1b; }
.modal .btn--ghost { border-color: var(--paper-line); color: var(--paper-muted); }
.modal .btn--ghost:hover { background: var(--paper-2); color: var(--paper-ink); }

/* ---- Footer ----------------------------------------------------------- */
/* ---- Confirmation : deux cartes claires ------------------------------ */
.rsvp-sec .section__head { margin-bottom: 2.6rem; }
.rsvp-cards {
  display: flex; align-items: stretch; justify-content: center; flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 1.8rem); max-width: 900px; margin: 0 auto;
}
.rsvp-card {
  flex: 1 1 320px; max-width: 380px; text-align: center;
  background: linear-gradient(180deg, rgba(46, 46, 42, 0.6), rgba(24, 24, 22, 0.6));
  border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(2rem, 4vw, 2.6rem) clamp(1.4rem, 4vw, 2rem);
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}
.rsvp-card:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 28px 54px -26px rgba(0, 0, 0, 0.72); }
.rsvp-card__ic {
  display: flex; align-items: center; justify-content: center;
  width: 62px; height: 62px; margin: 0 auto 1.1rem; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent);
}
.rsvp-card__ic svg { width: 28px; height: 28px; }
.rsvp-card h3 { font-family: var(--serif); font-size: 1.6rem; color: var(--text); margin-bottom: 1.2rem; }
.rsvp-card form { display: flex; flex-direction: column; gap: 0.9rem; }
.rsvp-card--req p { color: var(--muted); font-size: 0.96rem; margin-bottom: 1.6rem; }
.rsvp-or { display: flex; align-items: center; color: var(--accent); font-size: 1.1rem; }
@media (max-width: 620px) { .rsvp-or { display: none; } }

/* ---- Footer ----------------------------------------------------------- */
.footer { text-align: center; padding: clamp(3rem, 7vw, 5rem) 1.5rem; background: var(--bg-deep); color: var(--text); border-top: 1px solid var(--line); }
.footer__top { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1.3rem; }
.footer__top::before, .footer__top::after {
  content: ''; width: clamp(40px, 14vw, 120px); height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.footer__diamond { color: var(--accent); font-size: 0.9rem; }
.footer__names { font-family: var(--script); font-size: clamp(2.2rem, 6vw, 3rem); color: var(--accent); line-height: 1; }
.footer__meta { font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-top: 0.7rem; }
.footer__dot { margin: 0 0.5rem; color: var(--accent); }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1rem, 4vw, 2.2rem); margin: 1.9rem 0 1.5rem; }
.footer__links a { position: relative; color: rgba(236, 233, 226, 0.68); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; transition: color 0.3s ease; }
.footer__links a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 1px; background: var(--accent); transition: width 0.3s ease; }
.footer__links a:hover { color: #fff; }
.footer__links a:hover::after { width: 100%; }
.footer__thanks { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.08rem; margin-bottom: 1rem; }
.footer__copy { font-size: 0.68rem; letter-spacing: 0.15em; color: rgba(157, 151, 140, 0.6); }

/* ---- Lueur de lumière fixée en bas de la fenêtre --------------------- */
.bottom-glow {
  position: fixed; left: 0; right: 0; bottom: 0; height: 150px; z-index: 30;
  pointer-events: none;
  background: radial-gradient(130% 110% at 50% 100%,
              rgba(201, 191, 172, 0.22) 0%,
              rgba(201, 191, 172, 0.08) 36%,
              transparent 70%);
  animation: glowBreath 7s ease-in-out infinite;
}
@keyframes glowBreath { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }

/* ---- Barre latérale droite (hover) ----------------------------------- */
.sidenav { position: fixed; top: 50%; right: 0; transform: translateY(-50%); z-index: 55; }
.sidenav ul {
  list-style: none; display: flex; flex-direction: column; gap: 0.15rem;
  background: rgba(20, 20, 19, 0.5); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12); border-right: none;
  border-radius: 12px 0 0 12px; padding: 0.7rem 0.55rem;
  transition: background 0.3s ease;
}
.sidenav:hover ul { background: rgba(20, 20, 19, 0.72); }
.sidenav a {
  display: flex; align-items: center; gap: 0.7rem; justify-content: flex-end;
  color: rgba(236, 233, 226, 0.72); padding: 0.45rem 0.4rem; border-radius: 6px;
  transition: color 0.3s ease;
}
.sidenav a:hover { color: #fff; }
.sidenav .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  flex: none; order: 2; transition: box-shadow 0.3s ease;
}
.sidenav a:hover .dot { box-shadow: 0 0 9px var(--accent); }
.sidenav .lbl {
  order: 1; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  transition: max-width 0.4s ease, opacity 0.4s ease;
}
.sidenav:hover .lbl { max-width: 180px; opacity: 1; }
@media (max-width: 600px) { .sidenav { display: none; } }

/* =========================================================================
   Section cadeau / cagnotte lune de miel — bannière large et incitative
   ========================================================================= */
.gift {
  position: relative; overflow: hidden; text-align: center;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(201, 191, 172, 0.07), transparent 60%),
    linear-gradient(180deg, #211f1c 0%, #2a2824 50%, #211f1c 100%);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.gift__wide { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; }

/* Aura dorée qui respire */
.gift__aura {
  position: absolute; left: 50%; top: 42%; width: 900px; height: 700px; max-width: 160vw;
  transform: translate(-50%, -50%); z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse, rgba(201, 191, 172, 0.16) 0%, transparent 62%);
  animation: giftAura 6s ease-in-out infinite;
}
@keyframes giftAura {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.07); }
}
/* Cœurs qui montent doucement sur toute la largeur */
.gift__hearts { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.gift__hearts span { position: absolute; bottom: -8%; color: rgba(201, 191, 172, 0.5); animation: floatHeart 10s linear infinite; }
.gift__hearts span:nth-child(1) { left: 8%;  font-size: 0.8rem; animation-delay: 0s; }
.gift__hearts span:nth-child(2) { left: 21%; font-size: 1.1rem; animation-delay: 2.1s; }
.gift__hearts span:nth-child(3) { left: 34%; font-size: 0.7rem; animation-delay: 4s; }
.gift__hearts span:nth-child(4) { left: 47%; font-size: 1rem;   animation-delay: 1.1s; }
.gift__hearts span:nth-child(5) { left: 60%; font-size: 0.85rem; animation-delay: 3.2s; }
.gift__hearts span:nth-child(6) { left: 72%; font-size: 1.2rem; animation-delay: 5.3s; }
.gift__hearts span:nth-child(7) { left: 84%; font-size: 0.75rem; animation-delay: 0.6s; }
.gift__hearts span:nth-child(8) { left: 94%; font-size: 1rem;   animation-delay: 2.8s; }
@keyframes floatHeart {
  0% { transform: translateY(0) scale(0.6) rotate(0deg); opacity: 0; }
  15% { opacity: 0.7; } 85% { opacity: 0.5; }
  100% { transform: translateY(-420px) scale(1) rotate(18deg); opacity: 0; }
}

/* En-tête */
.gift__head { max-width: 640px; margin: 0 auto; }
.gift__icon { position: relative; width: 72px; height: 72px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; }
.gift__heart { font-size: 2.6rem; line-height: 1; color: #e6c98f; text-shadow: 0 0 22px rgba(224, 201, 143, 0.8); animation: heartbeat 1.7s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.2); } 30% { transform: scale(1); }
  45% { transform: scale(1.12); } 60% { transform: scale(1); }
}
.gift__ring { position: absolute; inset: 4px; border-radius: 50%; border: 1px solid rgba(224, 201, 143, 0.55); animation: ringPulse 2.4s ease-out infinite; }
@keyframes ringPulse { 0% { transform: scale(0.55); opacity: 0.85; } 100% { transform: scale(1.7); opacity: 0; } }
.gift h2 { color: var(--text); font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 0.3rem; }
.gift__lead { color: var(--muted); margin: 0.9rem auto 0; max-width: 620px; font-size: 1.05rem; }

/* « Et si vous nous offriez… » */
.gift__expintro { font-family: var(--serif); font-style: italic; color: var(--accent-2); font-size: clamp(1.3rem, 3vw, 1.85rem); margin: 2.8rem 0 1.7rem; }

/* Tuiles d'expériences (concret = donne envie) */
.gift__exps { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1rem, 2.5vw, 2rem); }
.exp {
  flex: 1 1 190px; max-width: 240px; min-width: 150px;
  padding: 1.8rem 1.1rem; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}
.exp:hover {
  transform: translateY(-7px); border-color: var(--accent);
  background: rgba(201, 191, 172, 0.07);
  box-shadow: 0 24px 46px -24px rgba(0, 0, 0, 0.75);
}
.exp__ic {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin: 0 auto 0.95rem; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent);
  transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.exp:hover .exp__ic { background: var(--accent); color: #1d1d1b; box-shadow: 0 0 20px rgba(201, 191, 172, 0.55); }
.exp__ic svg { width: 26px; height: 26px; }
.exp__lbl { font-family: var(--serif); font-size: 1.08rem; color: var(--text); }

/* CTA : reflet brillant + pulsation + survol qui soulève */
.gift__btn {
  position: relative; overflow: hidden; margin-top: 2.8rem;
  font-size: 0.85rem; padding: 1.2rem 3.4rem; border: none; font-weight: 500;
  color: #2a2008; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, #f0d59c 0%, #d4a961 48%, #b8894a 100%);
}
.gift__btn::after {
  content: ''; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg); animation: btnShine 3.4s ease-in-out infinite;
}
@keyframes btnShine { 0% { left: -130%; } 38%, 100% { left: 140%; } }
/* Battement de cœur + halo pulsant pour donner envie de cliquer */
.gift__btn { animation: ctaBeat 2.4s ease-in-out infinite, ctaGlow 2.4s ease-in-out infinite; }
.gift__btn:hover {
  animation-play-state: paused; transform: scale(1.05);
  background: linear-gradient(135deg, #f6deab 0%, #dfb56d 48%, #c5934f 100%);
  color: #2a2008; box-shadow: 0 0 30px rgba(224, 201, 143, 0.65);
}
@keyframes ctaBeat {
  0%, 100% { transform: scale(1); }
  8%  { transform: scale(1.07); }
  16% { transform: scale(1); }
  24% { transform: scale(1.04); }
  32% { transform: scale(1); }
}
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 191, 172, 0.55), 0 0 18px rgba(201, 191, 172, 0.25); }
  50% { box-shadow: 0 0 0 14px rgba(201, 191, 172, 0), 0 0 26px rgba(201, 191, 172, 0.5); }
}
.gift__reassure { margin-top: 1.2rem; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .moment__img, .gift__aura, .gift__hearts span, .gift__heart, .gift__ring,
  .gift__btn::after, .gift__btn { animation: none; }
}

/* =========================================================================
   PAGE INVITATION (enveloppe ivoire + carte papier sur fond charcoal)
   ========================================================================= */
.inv-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.2rem;
  background: radial-gradient(circle at 50% 0%, #2b2b28 0%, #1a1a18 100%);
}
.inv-wrap { width: 100%; max-width: 620px; }

.envelope-stage { perspective: 1400px; display: flex; flex-direction: column; align-items: center; }
.env-hint { margin-top: 1.6rem; font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

.envelope { position: relative; width: 340px; height: 232px; cursor: pointer; transition: transform 0.5s ease; }
.envelope.opened { cursor: default; }
.envelope__body { position: absolute; inset: 0; background: linear-gradient(135deg, #f4efe5, #e6ddcb); border: 1px solid #d8ccb4; border-radius: 6px; box-shadow: var(--shadow); }
.envelope__pocket {
  position: absolute; inset: 0; z-index: 4; border-radius: 6px; overflow: hidden;
  background:
    linear-gradient(135deg, transparent 49.6%, #ddd0b6 50%) no-repeat,
    linear-gradient(-135deg, transparent 49.6%, #ddd0b6 50%) no-repeat,
    linear-gradient(to top, #e9dec6 60%, transparent);
  background-size: 50% 100%, 50% 100%, 100% 100%;
  background-position: left bottom, right bottom, center;
  clip-path: polygon(0 35%, 50% 100%, 100% 35%, 100% 100%, 0 100%);
}
.envelope__flap {
  position: absolute; top: 0; left: 0; width: 100%; height: 50%;
  background: linear-gradient(135deg, #efe7d6, #e2d6bb);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top; transition: transform 0.6s ease; z-index: 6; border-radius: 6px 6px 0 0;
}
.envelope__seal {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; z-index: 7;
  background: radial-gradient(circle at 35% 30%, #d8cbb1, #6f6452);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--script); font-size: 1.6rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); transition: opacity 0.3s ease;
}
.envelope.opening .envelope__flap { transform: rotateX(180deg); z-index: 1; }
.envelope.opening .envelope__seal { opacity: 0; }

.card {
  position: relative; z-index: 5;
  background: var(--paper); border: 1px solid var(--paper-line);
  border-radius: 5px; box-shadow: var(--shadow);
  padding: clamp(2rem, 6vw, 3.4rem);
  opacity: 0; transform: translateY(40px) scale(0.96);
  transition: opacity 0.7s ease 0.35s, transform 0.7s ease 0.35s;
  text-align: center; color: var(--paper-ink);
}
.card.show { opacity: 1; transform: translateY(0) scale(1); }
.card__ornament { font-family: var(--script); color: var(--accent); color: #9a8a6a; font-size: 2rem; }
.card__dear { font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--paper-muted); margin-top: 1rem; }
.card__name { font-family: var(--script); font-size: clamp(2.4rem, 8vw, 3.6rem); color: var(--paper-ink); margin: 0.3rem 0 1.4rem; }
.card__note { color: var(--paper-ink); font-family: var(--serif); font-size: 1.25rem; line-height: 1.6; }
.card__facts { display: flex; justify-content: center; gap: 2.5rem; margin: 2rem 0; flex-wrap: wrap; }
.fact { text-align: center; }
.fact .lbl { font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase; color: #9a8a6a; }
.fact .val { font-family: var(--serif); font-size: 1.05rem; margin-top: 0.3rem; color: var(--paper-ink); }

/* RSVP (dans la carte claire) */
.rsvp { margin-top: 1.2rem; }
.rsvp__q { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 1.4rem; color: var(--paper-ink); }
.rsvp__choices { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.rsvp .btn { color: var(--paper-ink); border-color: #b6a888; }
.rsvp .btn:hover, .rsvp .btn--filled { background: #b6a888; color: #fff; border-color: #b6a888; }
.rsvp .btn--ghost { border-color: var(--paper-line); color: var(--paper-muted); }
.rsvp .btn--ghost:hover { background: var(--paper-2); color: var(--paper-ink); }
.rsvp__details { margin-top: 1.8rem; text-align: left; display: none; flex-direction: column; gap: 1.1rem; }
.rsvp__details.show { display: flex; }

/* Signature */
.sign-box { margin-top: 0.5rem; }
.sign-pad { position: relative; border-bottom: 1.5px solid #c9bb9c; min-height: 72px; display: flex; align-items: center; justify-content: center; }
.sign-input {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none; background: transparent;
  text-align: center; font-family: var(--script); font-size: 2.4rem; color: var(--paper-ink); caret-color: #9a8a6a;
}
.sign-input:focus { outline: none; }
.sign-anim { font-family: var(--script); font-size: 2.6rem; color: var(--paper-ink); white-space: nowrap; pointer-events: none; }
.sign-anim.writing {
  background: linear-gradient(90deg, var(--paper-ink) 0%, var(--paper-ink) 100%) left/0% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: write 1.6s ease forwards;
}
@keyframes write { to { background-size: 100% 100%; } }

.result { text-align: center; }
.result__icon { font-family: var(--script); font-size: 3.4rem; color: #9a8a6a; }
.result__msg { font-family: var(--serif); font-size: 1.4rem; margin-top: 0.8rem; color: var(--paper-ink); }
.result__sign { font-family: var(--script); font-size: 2.6rem; color: var(--paper-ink); margin-top: 1.2rem; }
.result__cta { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; margin-top: 1.8rem; }
.result__divider { width: 56px; height: 1px; background: #c9bb9c; margin-bottom: 0.3rem; }
.result__invite { color: var(--paper-muted); font-size: 0.98rem; max-width: 360px; }
.result__cta .gift__btn { margin-top: 0.4rem; }
.result__back { color: var(--paper-ink); border-color: var(--paper-line); background: transparent; }
.result__back:hover { background: var(--paper-2); color: var(--paper-ink); }

/* ---- Bouton ambiance sonore ------------------------------------------ */
.sound-toggle {
  position: fixed; left: 1.6rem; bottom: 1.4rem; z-index: 50;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 19, 0.55); backdrop-filter: blur(8px);
  color: var(--accent); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.sound-toggle:hover { border-color: var(--accent); transform: scale(1.06); }
.sound-toggle .snd-off { font-size: 1.2rem; line-height: 1; }
.sound-toggle .snd-on { display: none; align-items: flex-end; gap: 3px; height: 16px; }
.sound-toggle.playing .snd-off { display: none; }
.sound-toggle.playing .snd-on { display: flex; }
.sound-toggle .snd-on i {
  width: 3px; height: 100%; background: var(--accent); border-radius: 2px;
  transform-origin: bottom; animation: eq 0.9s ease-in-out infinite;
}
.sound-toggle .snd-on i:nth-child(2) { animation-delay: 0.2s; }
.sound-toggle .snd-on i:nth-child(3) { animation-delay: 0.4s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
@media (max-width: 480px) { .sound-toggle { left: 1rem; bottom: 1rem; width: 42px; height: 42px; } }

/* ---- Notifications (toasts) ------------------------------------------ */
.toast-wrap {
  position: fixed; top: 1.2rem; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 0.6rem;
  align-items: center; pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
  font-family: var(--sans); font-size: 0.9rem; letter-spacing: 0.02em;
  padding: 0.85rem 1.4rem; border-radius: 3px;
  background: #1f1f1d; color: var(--text);
  border: 1px solid var(--accent); border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-soft);
  opacity: 0; transform: translateY(-12px); transition: opacity 0.35s ease, transform 0.35s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast--ok { border-color: #b6a888; border-left-color: #d8cbb1; }
.toast--error { border-color: #b5705f; border-left-color: #d39383; color: #f0d9d2; }
.toast--info { border-color: var(--line); border-left-color: var(--accent); }

.center { text-align: center; }
.mt { margin-top: 1.4rem; }
.hidden { display: none !important; }
.spinner { width: 34px; height: 34px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .envelope { width: 280px; height: 192px; }
  .feature { height: 60vh; min-height: 340px; }
  .langbar { top: auto; bottom: 1rem; right: 50%; transform: translateX(50%); }
}
