@font-face { font-family: 'blosta-a'; src: url('assets/fonts/blosta-a.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'blosta-b'; src: url('assets/fonts/blosta-b.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'blosta-c'; src: url('assets/fonts/blosta-c.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'seasons-r'; src: url('assets/fonts/seasons-r.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'seasons-b'; src: url('assets/fonts/seasons-b.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'adu'; src: url('assets/fonts/adu.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'contrail'; src: url('assets/fonts/contrail.woff2') format('woff2'); font-display: block; }
/* ============ Mariage Teney & Alexis — canvas PDF-fidèle ============ */
:root {
  --sage: #839c91;
  --sage-lt: #b3ccc2;
  --band: #dbe6e1;
  --contact: #dee9e4;
  --ink: #1d1d1b;
  --paper: #fbfbfb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  font-family: 'Simonetta', serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; }

/* ---------- sections canvas ---------- */
main { display: block; }
.s {
  position: relative;
  aspect-ratio: 1024 / 576;
  container-type: inline-size;
  --u: 0.09765625cqw;
  overflow: hidden;
}

/* desktop art background */
.art { position: absolute; inset: 0; width: 100%; height: 100%; }
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* text layer */
.t { position: absolute; inset: 0; z-index: 2; }

/* ---------- lines (desktop canvas) ---------- */
.ln {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  font-size: calc(var(--fs) * var(--u));
  line-height: var(--lh, 1.25);
  letter-spacing: var(--ls, 0);
  transform: rotate(var(--rot, 0deg));
  transform-origin: 0 calc(var(--asc, 0.8) * 1em);
  white-space: pre;
  margin: 0;
}
.f-sim { font-family: 'Simonetta', serif; font-weight: 400; }
.f-sim.f-b { font-weight: 900; }
.f-sim.f-i { font-style: italic; }
.f-bree { font-family: 'Bree Serif', serif; font-weight: 400; }
.f-league { font-family: 'League Spartan', sans-serif; font-weight: 700; }

.c-ink { color: #000; }
.c-white { color: #fff; }
.c-sage { color: var(--sage-lt); }
.c-deep { color: var(--sage); }

/* design fonts extracted from the PDF (subsets) */
.f-blosta-a { font-family: 'blosta-a'; }
.f-blosta-b { font-family: 'blosta-b'; }
.f-blosta-c { font-family: 'blosta-c', 'Great Vibes', cursive; }
.f-seasons-r { font-family: 'seasons-r', 'Playfair Display', serif; }
.f-seasons-b { font-family: 'seasons-b', 'Playfair Display', serif; }
.f-adu { font-family: 'adu'; }
.f-contrail { font-family: 'contrail'; }
.bk { font-weight: 400; font-kerning: none; font-variant-ligatures: none; font-feature-settings: "kern" 0, "liga" 0, "calt" 0; }

/* ---------- buttons ---------- */
.btn {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  background: #fff;
  border: calc(0.34 * var(--u)) solid #040606;
  border-radius: calc(50 * var(--u)) / calc(50 * var(--u));
  box-shadow: 0 calc(3.1 * var(--u)) 0 0 #040606;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  z-index: 3;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(calc(1 * var(--u))); box-shadow: 0 calc(2.1 * var(--u)) 0 0 #040606; }
.btn:active { transform: translateY(calc(3.1 * var(--u))); box-shadow: 0 0 0 0 #040606; }
.btn .ln { letter-spacing: var(--ls, 0); }

/* ---------- form fields ---------- */
.fld {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
}
.fld input, .fld textarea {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 calc(14 * var(--u));
  background: #fff;
  border: calc(1.5 * var(--u)) solid var(--sage);
  border-radius: calc(16.65 * var(--u));
  font-family: 'Simonetta', serif;
  font-size: calc(14 * var(--u));
  color: #000;
  text-align: center;
  outline: none;
}
.fld input::placeholder, .fld textarea::placeholder { color: var(--sage-lt); opacity: 1; }
.fld input:focus-visible, .fld textarea:focus-visible {
  border-color: var(--sage);
  box-shadow: 0 0 0 calc(2 * var(--u)) rgba(131, 156, 145, 0.35);
}
.fld--area textarea { border-color: var(--sage-lt); resize: none; line-height: calc(30 * var(--u)); }
.fld--radio, .fld--check {
  cursor: pointer;
  background: #fff;
  box-shadow: inset 0 0 0 calc(1.5 * var(--u)) var(--sage);
  border-radius: calc(16.65 * var(--u));
}
.fld--radio input, .fld--check input { position: absolute; opacity: 0; width: 1px; height: 1px; border: 0; padding: 0; }
.dot {
  position: absolute;
  left: calc(var(--dx) * var(--u));
  top: calc(var(--dy) * var(--u));
  width: calc(var(--dw) * var(--u));
  height: calc(var(--dh) * var(--u));
  border-radius: 50%;
  border: calc(1.5 * var(--u)) solid var(--sage);
  background: transparent;
  transition: background 0.15s ease;
}
.fld input:checked ~ .dot { background: var(--sage-lt); border-color: var(--sage-lt); }
.fld input:focus-visible ~ .dot { box-shadow: 0 0 0 calc(2 * var(--u)) rgba(131, 156, 145, 0.35); }
.fld--check { transition: background 0.15s ease; }
.fld--check:has(input:checked) { background: var(--sage-lt); }
.fld--check:has(input:checked) .ln { color: var(--ink); }

.frm__status {
  position: absolute;
  left: calc(57.6 * var(--u));
  top: calc(552 * var(--u));
  font-size: calc(10 * var(--u));
  color: var(--sage);
  margin: 0;
}

/* ---------- burger + drawer ---------- */
.burger {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 50;
  width: 44px; height: 44px;
  border: 1px solid rgba(29, 29, 27, 0.25);
  border-radius: 50%;
  background: rgba(251, 251, 251, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.burger.show { opacity: 1; pointer-events: auto; }
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(78vw, 340px);
  z-index: 49;
  background: var(--paper);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 76px 28px 28px;
}
.drawer.open { transform: translateX(0); }
.drawer a {
  font-family: 'Simonetta', serif;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(131, 156, 145, 0.25);
}
.drawer a:last-child { border-bottom: 0; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* mobile-only elements hidden on desktop */
.m-only { display: none; }

/* ============================================================
   MOBILE — flux empilé
   ============================================================ */
@media (max-width: 860px) {
  .s { aspect-ratio: auto; overflow: visible; padding: 44px 20px 40px; }
  .art { display: none; }
  .m-only { display: block; }
  .t { position: relative; inset: auto; z-index: auto; }

  .ln {
    position: static;
    display: inline;
    font-size: max(11px, calc(var(--fs) * 0.62px + 6.5px));
    line-height: 1.45;
    transform: none;
    white-space: normal;
  }
  .ln + .ln::before { content: " "; }
  .blk { display: block; margin: 0 0 14px; }

  .bk {
    position: static;
    width: auto; height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
  .bk-script { font-family: 'Great Vibes', cursive; font-weight: 400; }
  .map-caps { display: none; }
  .letter { display: block; text-align: center; margin: 0 0 6px; }
  .letter .ln { font-size: 52px; }
  .bk-seasons { font-family: 'Simonetta', serif; font-weight: 400; }

  /* hero */
  .s1 { padding: 0; position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center; }
  .m-bg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
  }
  .s1 .t, .s2 .t { position: relative; z-index: 2; }
  .s1 .t { padding: 60px 24px 46px; width: 100%; }
  .hero-name { margin: 0 0 10px; font-weight: 400; text-align: center; }
  .hero-name .ln { color: #fff; font-size: 56px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
  .env { text-align: center; margin: 26px 0 34px; position: relative; display: flex; flex-direction: column; align-items: center; }
  .env__img { width: min(250px, 70%); height: auto; }
  .env .ln { color: #000; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -40%); font-size: 15px; letter-spacing: 1.5px; }
  .s1 .c-white, .s2 .c-white { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4); }
  .s1 .blk, .s2 .blk { text-align: center; }
  .s1 .blk:last-child { margin-bottom: 0; }

  /* invitation */
  .s2 { padding-bottom: 28px; }
  .m-collage { margin: 20px 0; }
  .m-collage img { width: 100%; height: auto; }
  .cap-r { display: block; text-align: right; opacity: 0.9; }
  .s2 .blk:first-child { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); font-size: 15px; }

  /* journal */
  .m-map { margin: 18px -20px; }
  .m-map img { width: 100%; height: auto; }
  .km { margin-top: 2px; }
  .km .ln { font-size: 34px; font-weight: 900; letter-spacing: 1px; }

  /* check-in */
  .m-pass { margin: 8px 0 18px; text-align: center; }
  .m-pass img { width: min(320px, 86%); height: auto; }
  .cols { display: block; background: var(--band); border-radius: 22px; padding: 24px 18px 10px; }
  .col { margin: 0 0 26px; text-align: center; }
  .col__icon { width: 58px; height: auto; margin: 0 auto 10px; }
  .col__t, .col__b { margin: 0 0 8px; }
  .col__t .ln { font-size: 17px; font-weight: 900; }
  .h-lg .ln, .h-xl .ln, .h-xxl .ln { font-size: max(30px, calc(var(--fs) * 0.62px + 6.5px)); }

  /* buttons mobile */
  .btn {
    position: static;
    display: inline-block;
    width: auto; height: auto;
    padding: 12px 26px;
    border-radius: 999px;
    border: 1px solid #040606;
    box-shadow: 0 3px 0 0 #040606;
  }
  .btn .ln { font-size: 13px; letter-spacing: 2.4px; }
  .frm { display: block; }
  .frm .btn, .btn--b3 { margin-top: 6px; }
  .m-cascade { position: relative; margin: 22px -20px 8px; }
  .m-cascade img { width: 100%; height: auto; }
  .m-cascade .btn { position: absolute; right: 20px; bottom: 18px; }

  /* form mobile */
  .fld {
    position: static;
    width: 100%; height: auto;
    margin: 0 0 12px;
  }
  .fld input, .fld textarea { font-size: 16px; height: 48px; border-radius: 999px; border-width: 1.5px; padding: 0 16px; }
  .fld--area textarea { height: 48px; line-height: 46px; }
  .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
  .row2 .fld { margin: 0; }
  .dot { position: static; display: none; }
  .fld--radio, .fld--check {
    display: flex; align-items: center; justify-content: center;
    height: 48px; border: 1.5px solid var(--sage); border-radius: 999px; box-shadow: none;
    background: #fff; position: relative;
  }
  .fld--radio .ln, .fld--check .ln { font-size: 14px; }
  .fld--radio:has(input:checked), .fld--check:has(input:checked) { background: var(--sage-lt); }
  .fld--radio::before {
    content: "";
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--sage);
    margin-right: 8px;
    background: transparent;
  }
  .fld--radio:has(input:checked)::before { background: var(--sage-lt); }
  .frm__status { position: static; font-size: 13px; margin: 6px 0 12px; }

  /* séjour */
  .srows { display: block; }
  .srow {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 4px 14px;
    margin: 0 0 18px;
    background: #fff;
    border-radius: 22px;
    padding: 18px 16px;
    box-shadow: 0 1px 2px rgba(29, 29, 27, 0.05);
  }
  .srow__icon { grid-column: 1; grid-row: 1 / span 3; width: 52px; height: auto; align-self: start; }
  .srow__date { grid-column: 2; font-size: 15px; letter-spacing: 3px; }
  .srow__time { grid-column: 2; font-size: 26px; letter-spacing: 3px; }
  .srow__t { grid-column: 2; margin: 4px 0 2px; }
  .srow__t .ln { font-size: 13px; letter-spacing: 2.5px; color: var(--sage); }
  .srow__b { grid-column: 2; margin: 0; }
  .srow__photo { grid-column: 1 / -1; width: 100%; height: auto; border-radius: 16px; margin-top: 10px; }

  /* lettre */
  .m-letter-l, .m-letter-r { margin: 6px -20px 16px; }
  .m-letter-l img, .m-letter-r img { width: 100%; height: auto; }
  .lettxt {
    background: #fff;
    border: 1px solid rgba(131, 156, 145, 0.3);
    border-radius: 16px;
    padding: 20px 18px;
    margin: 0 0 18px;
  }
  .lettxt .blk { margin-bottom: 12px; }

  /* contact */
  .script-h { margin: 0 0 16px; font-weight: 400; }
  .script-h .ln { font-size: 44px; }
  .m-couple { margin: 0 0 16px; }
  .m-couple img { width: min(300px, 80%); height: auto; }
  .crow { display: block; margin-bottom: 14px; }
  .crow .aw { display: block; }
  .aw { color: inherit; text-decoration: none; }
  .aw:hover { text-decoration: underline; }
  .giftline { text-align: center; margin-top: 26px; }
  .gift-ico { width: 64px; height: auto; margin: 0 auto 10px; display: block; }
}

@media (min-width: 861px) {
  .m-only { display: none !important; }
}

@media (max-width: 860px) {
  .lbl2 .ln + .ln { display: none; }
}
@media (max-width: 860px) {
  .fld, .fld--radio, .fld--check, .btn { left: auto; top: auto; }
  .row2 { align-items: stretch; }
}

@media (max-width: 860px) {
  .m-cascade { margin-bottom: 0; }
  .s5 .cap-photo { margin-top: -34px; padding-right: 4px; position: relative; z-index: 3; }
  .m-pass { background: var(--band); border-radius: 22px; padding: 18px 0; }
}

/* ============ Eau animée (WebGL, par-dessus le fond) ============ */
.water {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.water.on { opacity: 1; }
@media (max-width: 860px) { .d-only { display: none !important; } }

/* ============ Formulaire RSVP intégré (section 5) ============ */
.rsvp-fillout {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  z-index: 3;
  border-radius: calc(16 * var(--u));
  overflow: hidden;
  background: #fff;
}
.rsvp-fillout iframe { display: block; }
@media (max-width: 860px) {
  .rsvp-fillout {
    position: relative;
    left: auto; top: auto;
    width: 100%;
    height: 640px;
    border-radius: 20px;
    margin: 0 0 18px;
  }
}

/* ============ Lettre mobile : texte posé sur la feuille ============ */
@media (max-width: 860px) {
  .s7 .paper {
    position: relative;
    margin: -44px -20px 18px;
    aspect-ratio: 360 / 576;
    container-type: inline-size;
    background: url('assets/art/s7-paper-m.webp') center / cover no-repeat;
  }
  .s7 .paper .letter, .s7 .paper .lettxt { position: static; margin: 0; padding: 0; background: none; border: 0; }
  .s7 .paper .blk { margin: 0; }
  .s7 .paper .ln {
    position: absolute;
    display: block;
    left: calc((var(--x) - 85) * 100cqw / 360);
    top: calc(var(--y) * 100cqw / 360);
    font-size: calc(var(--fs) * 100cqw / 360);
    line-height: var(--lh, 1.25);
    letter-spacing: var(--ls, 0);
    transform: rotate(var(--rot, 0deg));
    transform-origin: 0 calc(var(--asc, 0.8) * 1em);
    white-space: pre;
  }
  .s7 .paper .ln + .ln::before { content: none; }
  .s7 .paper .bk-script { font-family: 'blosta-b'; }
}

/* ============ Intro : enveloppe qui s'ouvre ============ */
.intro { display: none; }
.intro-on .intro {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #2f4a4a;
  cursor: pointer;
}
.intro-on body { overflow: hidden; }
.intro__sea { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.28) 100%);
  pointer-events: none;
}
.envx {
  position: relative;
  z-index: 2;
  width: min(82vw, 540px, calc(56svh * 1.42));
  aspect-ratio: 801 / 564;
  margin-top: 22svh;
  perspective: 1800px;
  container-type: inline-size;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.28));
  opacity: 0;
  transform: translateY(30px) scale(0.94);
}
.envx > * { position: absolute; inset: 0; }
.envx__back {
  inset: 2.3% 2.1% 2.1% 1.9%;
  background: linear-gradient(#d6d1c9, #e6e2dc 60%);
  border-radius: 1.2%;
  z-index: 1;
}
.envx__card {
  inset: 6% 7% 8% 7%;
  z-index: 2;
  background: #fbfbfb;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 5cqw;
  text-align: center;
  color: var(--ink);
}
.envx__names { font-family: 'blosta-a', 'Great Vibes', cursive; font-size: 10.5cqw; line-height: 1.45; }
.envx__names + .envx__names { margin-top: -1cqw; }
.envx__sub { font-family: 'Simonetta', serif; font-size: 2.6cqw; letter-spacing: 0.3em; margin-top: 2cqw; }
.envx__date { font-family: 'Simonetta', serif; font-size: 2.4cqw; letter-spacing: 0.15em; margin-top: 1.5cqw; }
.envx__pocket {
  width: 100%;
  height: 100%;
  z-index: 3;
  clip-path: polygon(0 14.3%, 50% 52.8%, 100% 14.3%, 100% 100%, 0 100%);
}
.envx__flap { z-index: 4; transform-origin: 50% 2.3%; transform-style: preserve-3d; }
.envx__flap-out, .envx__flap-in {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 100% 14.3%, 50% 52.8%, 0 14.3%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.envx__flap-out img { position: absolute; inset: 0; width: 100%; height: 100%; }
.envx__flap-out .envx__seal { inset: auto; left: 42.4%; top: 23.5%; width: 14.9%; height: 22.3%; }
.envx__flap-in { background: linear-gradient(#cfc9c0, #ddd8d1); transform: rotateY(180deg); }
.intro__skip {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  font-family: 'Simonetta', serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}
.intro.play .envx { animation: envIn 0.7s 0.1s ease-out forwards, envOut 0.9s 3.7s ease-in forwards; }
.intro.play .envx__flap { animation: flapOpen 0.9s 0.9s cubic-bezier(.45,.05,.35,1) forwards; }
.intro.play .envx__card { animation: cardOut 1.1s 1.8s cubic-bezier(.3,.1,.25,1) forwards; }
.intro.play { animation: introOut 0.8s 3.9s ease forwards; }
.intro.skip { animation: introOut 0.4s ease forwards !important; }
@keyframes envIn { to { opacity: 1; transform: none; } }
@keyframes envOut { from { opacity: 1; transform: none; } to { opacity: 1; transform: translateY(-4%) scale(1.12); } }
@keyframes flapOpen {
  0% { transform: rotateX(0deg); z-index: 4; }
  60% { z-index: 4; }
  61% { z-index: 0; }
  100% { transform: rotateX(180deg); z-index: 0; }
}
@keyframes cardOut { to { transform: translateY(-60%); } }
@keyframes introOut { to { opacity: 0; visibility: hidden; } }



/* ============ Vidéo de la cascade (desktop : zone droite) ============ */
.fallwrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.fallwrap.on { opacity: 1; }
.fallvid {
  position: absolute;
  left: calc(550.4 * var(--u));
  top: calc(-86.4 * var(--u));
  width: calc(476.8 * var(--u));
  height: calc(947.2 * var(--u));
  object-fit: fill;
  display: block;
}
.cascvid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.cascvid.on { opacity: 1; }
.m-cascade { position: relative; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .fallwrap, .cascvid { display: none !important; } }
