/* =========================================================
   Vanina & Serge · Carnet de cérémonie
   ========================================================= */
:root {
  --paper: #f3eee3;
  --paper-2: #e9e1cf;
  --card: #fbf8f1;
  --ink: #123c2b;
  --ink-soft: #46604f;
  --ink-deep: #0c2b1f;
  --gold: #ac8735;
  --gold-2: #c9a65c;
  --gold-3: #e7d3a2;
  --wax: #9e2b25;
  --line: rgba(18, 60, 43, .18);
  --line-strong: rgba(18, 60, 43, .4);

  --serif: "Minion Variable Concept", "minion-pro", "Minion Pro", Georgia, "Times New Roman", serif;

  --g: clamp(16px, 4.5vw, 64px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .9, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
main, footer { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  font-weight: 400;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em, i { font-style: italic; }
sup { font-size: .6em; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* paper fibres */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/paper.jpg") center / cover no-repeat; opacity: .35; mix-blend-mode: multiply;
}
.grain {
  position: fixed; inset: -50%; z-index: 300; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Type ---------- */
.label {
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px; font-weight: 500;
}
.smallcaps { letter-spacing: .12em; text-transform: uppercase; font-size: .88em; font-weight: 600; }
.title {
  margin: 0; font-weight: 400;
  font-size: clamp(42px, 6.4vw, 96px); line-height: 1; letter-spacing: -.015em;
}
.title em { color: var(--gold); }
.title--sm { font-size: clamp(34px, 4.4vw, 62px); }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.w > span { display: inline-block; }

.link-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  padding: 6px 0; color: var(--ink);
}
.link-btn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform-origin: right; transition: transform .6s var(--ease);
}
.link-btn::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease) .05s;
}
.link-btn:hover::after { transform: scaleX(0); }
.link-btn:hover::before { transform: scaleX(1); }
.link-btn:hover { color: var(--gold); }

/* ---------- Opening (envelope) ---------- */
.opening {
  position: fixed; inset: 0; z-index: 500;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(28px, 5vh, 48px);
  background: var(--paper);
  padding: 24px;
}
.opening::before { content: ""; position: absolute; inset: 0; background: url("../img/paper.jpg") center / cover no-repeat; opacity: .45; mix-blend-mode: multiply; pointer-events: none; }
.opening__to { position: relative; margin: 0; text-align: center; font-size: clamp(22px, 3vw, 30px); font-style: italic; }
.opening__to span { display: block; font-style: normal; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.opening__to b { font-weight: 400; }
.envelope {
  position: relative; width: min(500px, 86vw); aspect-ratio: 1.5;
  perspective: 1600px;
  filter: drop-shadow(0 30px 40px rgba(12, 43, 31, .22));
}
.envelope__back, .envelope__pocket, .envelope__flap { position: absolute; inset: 0; }
.envelope__back { background: var(--ink); border-radius: 4px; }
.envelope__card {
  position: absolute; left: 6%; right: 6%; top: 7%; bottom: 7%;
  background: var(--card); border-radius: 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  box-shadow: inset 0 0 0 6px var(--card), inset 0 0 0 7px var(--gold-3);
}
.envelope__logo { width: 46%; }
.envelope__card p { margin: 0; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.envelope__pocket {
  background: linear-gradient(170deg, #1a4a36, var(--ink) 60%);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  border-radius: 4px;
}
.envelope__flap { transform-origin: 50% 0; transform-style: preserve-3d; z-index: 3; }
.envelope__flap::before, .envelope__flap span {
  content: ""; position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.envelope__flap::before { background: linear-gradient(180deg, #1f5640, #164532); }
/* doublure dorée à l'intérieur du rabat */
.envelope__flap span {
  transform: rotateX(180deg);
  clip-path: polygon(0 100%, 100% 100%, 50% 42%);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.1) 0 2px, transparent 2px 9px),
    linear-gradient(0deg, var(--gold-2), var(--gold));
}
.seal {
  position: absolute; z-index: 5; left: 50%; top: 58%;
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  display: grid; place-items: center;
  transition: transform .5s var(--ease);
}
.seal:hover { transform: scale(1.06) rotate(-4deg); }
.seal__wax {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 35% 30%, #d9bb76, var(--gold) 45%, #7e6122 100%);
  border-radius: 48% 52% 50% 46% / 50% 46% 54% 50%;
  box-shadow: inset 0 0 0 7px rgba(126, 97, 34, .55), inset 0 0 0 9px rgba(240, 220, 170, .4), 0 6px 14px rgba(0,0,0,.35);
}
.seal__mark { position: relative; font-size: 30px; color: #5b4416; letter-spacing: -.02em; text-shadow: 0 1px 0 rgba(255,240,200,.5); }
.seal__mark i { color: #f3e2b5; font-size: .8em; padding: 0 1px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px var(--g);
  transition: transform .7s var(--ease), background-color .5s, box-shadow .5s;
}
.nav.is-solid { background: rgba(243, 238, 227, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-110%); }
.nav__brand { display: block; justify-self: start; line-height: 0; }
.nav__brand .logo { display: block; height: 58px; width: auto; }
.nav__meta { margin: 0; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); overflow: hidden; height: 1.5em; }
.nav__meta span { display: inline-block; }
.nav__right { justify-self: end; display: flex; align-items: center; gap: 28px; }
.nav__rsvp { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.nav__rsvp:hover { color: var(--gold); }
.nav__index { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; min-height: 44px; }
.nav__index-lines { display: grid; gap: 6px; width: 26px; }
.nav__index-lines i { display: block; height: 1px; background: currentColor; transition: transform .6s var(--ease), width .6s var(--ease); }
.nav__index-lines i:last-child { width: 60%; justify-self: end; }
.index-open .nav__index-lines i:first-child { transform: translateY(3.5px) rotate(20deg); }
.index-open .nav__index-lines i:last-child { width: 100%; transform: translateY(-3.5px) rotate(-20deg); }

.sommaire {
  position: fixed; inset: 0; z-index: 190;
  display: grid; place-items: center; padding: 90px var(--g) 40px;
  background: rgba(233, 225, 207, .6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s;
}
.index-open .sommaire { opacity: 1; visibility: visible; }
.sommaire__page {
  width: min(620px, 100%); background: var(--card);
  padding: clamp(32px, 6vw, 64px);
  box-shadow: 0 30px 80px rgba(12,43,31,.18), inset 0 0 0 10px var(--card), inset 0 0 0 11px var(--gold-3);
  transform: translateY(30px) rotate(-1.5deg); transition: transform .8s var(--ease);
}
.index-open .sommaire__page { transform: none; }
.sommaire__list { list-style: none; margin: 0 0 30px; padding: 0; }
.sommaire__list a {
  display: flex; align-items: baseline; gap: 12px;
  font-size: clamp(22px, 3.4vw, 32px); padding: 8px 0;
  transition: color .3s, padding .5s var(--ease);
}
.sommaire__list a i { flex: 1; border-bottom: 1px dotted var(--line-strong); transform: translateY(-6px); }
.sommaire__list a b { font-weight: 400; font-size: .7em; color: var(--gold); }
.sommaire__list a:hover { color: var(--gold); padding-left: 12px; }
.sommaire__foot { margin: 0; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Folio (marque de page) ---------- */
.folio {
  position: absolute; top: 34px; z-index: 2;
  /* même bord gauche pour tous les titres, que la section soit pleine largeur ou non */
  left: max(var(--g), calc((100% - var(--max)) / 2 + var(--g)));
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft);
}

/* ---------- Pages ---------- */
.page { position: relative; padding: clamp(110px, 13vw, 180px) var(--g); max-width: var(--max); margin: 0 auto; }
.page::before { content: ""; position: absolute; top: 0; left: var(--g); right: var(--g); height: 1px; background: var(--line); }
.page__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px 60px; flex-wrap: wrap; margin-bottom: clamp(50px, 7vw, 90px); }
.page__aside { margin: 0; max-width: 320px; font-style: italic; color: var(--ink-soft); font-size: 18px; }
.page__aside b { font-style: normal; font-weight: 600; color: var(--ink); }

/* ---------- Couverture ---------- */
.cover {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto;
  padding: 92px calc(var(--g) + 18px) 34px;
  overflow: hidden; isolation: isolate;
}
.cover__frame { position: absolute; inset: 80px var(--g) 18px; border: 1px solid var(--line-strong); pointer-events: none; z-index: 2; }
.cover__frame::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(172,135,53,.45); }
.cover__watermark {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 35%, transparent 100%);
}
.cover__watermark img {
  width: 100%; height: 118%; object-fit: cover; object-position: 50% 40%;
  opacity: .16; filter: grayscale(1) sepia(.35) contrast(1.05);
  will-change: transform;
}
.cover__bottom {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-size: clamp(14px, 1.15vw, 16px); letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
  padding: 14px 6px;
}
.cover__center { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 0; pointer-events: none; }
.cover__center a { pointer-events: auto; }
.cover__kicker { margin: 0 0 18px; font-size: clamp(15px, 1.3vw, 18px); letter-spacing: .2em; text-transform: uppercase; color: #8a6a22; }
.cover__logo { margin: 0; width: min(480px, 72vw, 44vh); }
.cover__logo .logo { width: 100%; height: auto; overflow: visible; }
.cover__line { margin: 18px 0 26px; font-size: clamp(25px, 2.8vw, 38px); line-height: 1.2; }
.cover__dates { display: flex; align-items: center; gap: clamp(20px, 4vw, 54px); }
.cover__dates a { display: flex; align-items: center; gap: 14px; text-align: left; }
.cover__dates b { font-weight: 400; font-size: clamp(64px, 7vw, 100px); line-height: .85; color: var(--ink); transition: color .4s; }
.cover__dates span { font-size: clamp(19px, 1.7vw, 24px); color: var(--ink); line-height: 1.25; }
.cover__dates strong { display: block; font-weight: 400; font-style: italic; color: #8a6a22; font-size: 1.15em; }
.cover__dates a:hover b { color: var(--gold); }
.cover__dates i { font-size: clamp(34px, 4vw, 52px); color: var(--gold); }
.cover__count { margin: 0; letter-spacing: .1em; }
.cover__count b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: 1.2em; font-weight: 600; }
.cover__scroll { display: inline-flex; align-items: center; gap: 10px; }
.cover__scroll svg { width: 16px; height: 16px; fill: none; stroke: var(--gold); stroke-width: 1.3; animation: nudge 2.2s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }
.logo .l-ink { fill: var(--ink); }
.logo .l-gold { fill: var(--gold); }

/* ---------- Familles ---------- */
.familles__inner { max-width: 820px; margin: 0 auto; text-align: center; }
.familles__mono { width: 170px; margin: 0 auto 50px; }
.familles__text p { margin: 0 0 4px; font-size: clamp(19px, 2vw, 23px); }
.familles__lead { font-weight: 600; }
.familles__amp { line-height: 0; margin: 12px 0 !important; }
.familles__amp .logo-part--famille { display: block; width: clamp(30px, 2.6vw, 36px); height: auto; margin: 0 auto; fill: var(--gold); }
.familles__statement { margin: 56px auto 0; font-size: clamp(25px, 3.1vw, 40px); line-height: 1.28; font-style: italic; }
.ink-w { opacity: .18; }

/* ---------- Mariés (cartes à retourner) ---------- */
.maries__grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(20px, 4vw, 60px); }
.maries__and { margin: 0; line-height: 0; }
.flip { display: block; width: 100%; text-align: left; perspective: 1400px; }
.flip--a { rotate: -2deg; }
.flip--b { rotate: 2deg; margin-top: clamp(0px, 8vw, 120px); }
.flip__inner { position: relative; display: block; aspect-ratio: 4 / 5; transform-style: preserve-3d; transition: transform 1.1s var(--ease); }
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip__face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--card); padding: 12px 12px 54px;
  box-shadow: 0 24px 50px rgba(12,43,31,.16), 0 2px 6px rgba(12,43,31,.08);
}
.flip__front img { width: 100%; height: 100%; object-fit: cover; }
.flip__tag { position: absolute; left: 18px; bottom: 18px; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.flip__front::after { content: "Retourner ↻"; position: absolute; right: 18px; bottom: 16px; font-size: 15px; font-style: italic; color: var(--ink-soft); }
.flip__back {
  transform: rotateY(180deg);
  display: flex; flex-direction: column; justify-content: center; gap: 24px;
  padding: clamp(28px, 4vw, 54px);
  background: var(--ink); color: var(--paper);
}
.flip__quote { font-size: clamp(21px, 2.1vw, 28px); line-height: 1.35; font-style: italic; }
.flip__sign { font-size: 15px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-2); }
.flip__name { display: block; margin-top: 22px; font-size: clamp(58px, 6.2vw, 96px); line-height: 0; }
.logo-part { display: block; width: auto; overflow: visible; }
/* mêmes proportions que dans le logo du hero */
.logo-part--vanina { height: 1em; }
.logo-part--serge { height: 1.092em; margin-left: auto; }
.logo-part--and { width: clamp(70px, 9vw, 130px); height: auto; }

/* ---------- Cartons ---------- */
.tickets { display: grid; gap: clamp(36px, 5vw, 64px); }
.ticket {
  position: relative;
  display: grid; grid-template-columns: 1fr clamp(200px, 24vw, 300px);
  background: var(--card);
  box-shadow: 0 24px 60px rgba(12,43,31,.12), 0 2px 4px rgba(12,43,31,.06);
  transition: rotate .9s var(--ease), translate .9s var(--ease), box-shadow .9s var(--ease);
  width: min(1060px, 100%);
}
.ticket--a { rotate: -.8deg; }
.ticket--b { rotate: .8deg; justify-self: end; }
.ticket:hover { rotate: 0deg; translate: 0 -6px; box-shadow: 0 40px 80px rgba(12,43,31,.18); }
.ticket::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--gold-3); pointer-events: none; }
.ticket__main { padding: clamp(30px, 4.5vw, 60px); position: relative; }
.ticket__title { margin: 0 0 14px; font-weight: 400; font-size: clamp(44px, 5.4vw, 78px); line-height: 1; letter-spacing: -.015em; }
.ticket__when { margin: 0; font-size: 21px; }
.ticket__when span { color: var(--ink-soft); font-style: italic; }
.ticket__plan { list-style: none; margin: 0 0 20px; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; max-width: 560px; }
.ticket__plan li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: baseline; font-size: 18px; line-height: 1.35; }
.ticket__plan b { font-weight: 600; color: #8a6a22; }
.ticket__where { margin: 0 0 18px; font-size: 21px; color: var(--gold); font-style: italic; }
.ticket__desc { margin: 0 0 28px; max-width: 520px; color: var(--ink-soft); font-size: 18px; }
.ticket__actions { display: flex; flex-wrap: wrap; gap: 14px 30px; position: relative; z-index: 2; }
.ticket__stub {
  position: relative; display: grid; place-items: center; padding: 34px 24px;
  border-left: 2px dashed var(--line-strong);
}
.ticket__stub::before, .ticket__stub::after {
  content: ""; position: absolute; left: -15px; width: 28px; height: 28px; border-radius: 50%; background: var(--paper);
}
.ticket__stub::before { top: -14px; }
.ticket__stub::after { bottom: -14px; }
.stamp {
  width: 78%; aspect-ratio: 4 / 5; padding: 9px;
  background: radial-gradient(circle at 50% 50%, transparent 3.6px, #fffdf8 4.2px) -7px -7px / 14px 14px;
  filter: drop-shadow(0 4px 8px rgba(12,43,31,.18));
  rotate: 3deg;
  transition: rotate .8s var(--ease), scale .8s var(--ease);
}
.ticket:hover .stamp { rotate: -2deg; scale: 1.03; }
.stamp img { width: 100%; height: 100%; object-fit: cover; }
.postmark { position: absolute; width: 58%; top: 50%; left: -8%; fill: none; stroke: var(--ink); stroke-width: 1; opacity: .7; mix-blend-mode: multiply; rotate: -14deg; }
.postmark text { fill: var(--ink); stroke: none; font-family: var(--serif); font-size: 10.5px; letter-spacing: .18em; }
.ticket__day { position: absolute; right: 22px; top: 14px; margin: 0; font-size: 46px; line-height: 1; color: var(--gold); font-style: italic; }

/* ---------- Histoire (pile de tirages) ---------- */
.histoire { position: relative; }
.histoire::before { content: ""; position: absolute; top: 0; left: var(--g); right: var(--g); height: 1px; background: var(--line); }
.histoire__pin {
  position: relative; height: 100vh; height: 100svh; max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(30px, 6vw, 100px);
  padding: 110px var(--g) 70px;
}
.histoire__stack { position: relative; width: min(420px, 100%, 50vh); aspect-ratio: 4 / 5.4; justify-self: center; }
.print {
  position: absolute; inset: 0; margin: 0;
  background: var(--card); padding: 14px 14px 64px;
  box-shadow: 0 20px 50px rgba(12,43,31,.18), 0 2px 4px rgba(12,43,31,.08);
  will-change: transform;
}
.print img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.print figcaption { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-style: italic; font-size: 21px; color: var(--ink-soft); }
.histoire__texts { position: relative; height: min(600px, calc(100vh - 170px)); }
.heart { color: var(--gold); }
@media (min-width: 901px) { .chap { padding-right: 34px; } }
.histoire__intro { position: absolute; top: -60px; left: 0; max-width: 420px; text-transform: none; letter-spacing: .02em; font-style: italic; font-size: 17px; color: var(--ink-soft); }
.chap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.chap__n { margin: 0 0 12px; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.chap h3 { margin: 0 0 22px; font-weight: 400; font-size: clamp(34px, 3.6vw, 54px); line-height: 1.04; letter-spacing: -.01em; }
.chap p { margin: 0 0 12px; color: var(--ink-soft); font-size: 18px; line-height: 1.45; max-width: 540px; }
.chap__img { display: none; }
.histoire__dots { position: absolute; right: var(--g); top: 50%; display: grid; gap: 12px; translate: 0 -50%; }
.histoire__dots i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--gold); transition: background-color .4s; }
.histoire__dots i.on { background: var(--gold); }

/* ---------- Le grand oui ---------- */
.oui {
  position: relative; overflow: hidden;
  color: var(--ink);
  min-height: 100vh; display: grid; place-items: center;
  padding: clamp(120px, 14vw, 200px) var(--g);
}
.oui::before { content: ""; position: absolute; top: 0; left: var(--g); right: var(--g); height: 1px; background: var(--line); }
.oui__inner { position: relative; z-index: 2; max-width: 1100px; text-align: center; }
.oui__intro { max-width: 600px; margin: 0 auto 60px; font-size: 19px; color: var(--ink-soft); font-style: italic; }
.oui__quote .ink-w:nth-child(2) { color: var(--gold); }
.oui__quote { margin: 0; font-size: clamp(46px, 8vw, 132px); line-height: .98; letter-spacing: -.02em; font-style: italic; }
.oui__rings { position: absolute; z-index: 1; width: clamp(160px, 20vw, 300px); left: 84%; top: 24%; translate: -50% -50%; mix-blend-mode: multiply; will-change: transform; }

/* ---------- Bande de photos ---------- */
.galerie { max-width: none; padding-left: 0; padding-right: 0; }
.galerie .page__head { max-width: var(--max); margin-left: auto; margin-right: auto; padding: 0 var(--g); }
.strip, .strip-nav { --edge: max(var(--g), calc((100% - var(--max)) / 2 + var(--g))); }
.strip {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--edge); scroll-padding-left: var(--edge);
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.strip::-webkit-scrollbar { display: none; }
.strip:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.strip__item {
  flex: none; margin: 0; width: clamp(250px, 30vw, 430px); aspect-ratio: 4 / 5;
  scroll-snap-align: start; overflow: hidden; background: var(--paper-2); cursor: zoom-in;
}
.strip__item img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; pointer-events: none; transition: scale .9s var(--ease); }
.strip__item:hover img { scale: 1.04; }
.strip-nav { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 0 var(--edge); }
.strip-nav__btn {
  width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line-strong);
  font-size: 26px; line-height: 1; transition: background-color .3s, color .3s, opacity .3s;
}
.strip-nav__btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.strip-nav__btn:disabled { opacity: .3; cursor: default; }
.strip-nav__count { font-style: italic; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------- Cadeaux ---------- */
.note {
  position: relative; max-width: 720px;
  background: var(--card); padding: clamp(46px, 6vw, 80px) clamp(26px, 6vw, 80px);
  box-shadow: 0 30px 60px rgba(12,43,31,.14);
  rotate: -1.2deg;
}
.note__tape {
  position: absolute; top: -16px; left: 50%; width: 140px; height: 34px; margin-left: -70px;
  background: rgba(201,166,92,.45); rotate: 2deg;
}
.note .title { margin-bottom: 28px; }
.note p { color: var(--ink-soft); font-size: 18px; margin: 0 0 14px; max-width: 540px; }
.note__sign { margin-top: 30px !important; font-style: italic; font-size: clamp(22px, 2.4vw, 30px) !important; color: var(--ink) !important; line-height: 1.3; }

/* ---------- Monogramme ---------- */
.mono { position: relative; display: block; aspect-ratio: 700 / 629; perspective: 900px; flex: none; }
.mono img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* le VS tourne sur lui-même, l'anneau de texte et de feuilles reste fixe */
.mono__vs { transform-origin: 48.5% 49.4%; }
.mono--spin .mono__vs { animation: mono-spin 7s linear infinite; }
@keyframes mono-spin { to { transform: rotateY(360deg); } }

/* ---------- RSVP : la discussion ---------- */
.chat { max-width: 640px; background: var(--paper-2); box-shadow: 0 24px 60px rgba(12,43,31,.14); display: flex; flex-direction: column; height: min(640px, 82vh); }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--ink); color: var(--paper); flex: none; }
.chat__head img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.chat__head small { display: block; font-size: 14px; line-height: 1.2; color: var(--gold-3); }
.chat__log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 84%; padding: 10px 14px; border-radius: 14px; line-height: 1.32; font-size: 18px; animation: msg-in .45s var(--ease); overflow-wrap: anywhere; }
.msg--them { align-self: flex-start; background: var(--card); border-bottom-left-radius: 3px; }
.msg--me { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 3px; }
.msg--error { background: #f6e4df; color: var(--wax); }
.msg--typing { display: flex; gap: 5px; padding: 15px 16px; }
.msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); animation: typing 1.1s infinite; }
.msg--typing i:nth-child(2) { animation-delay: .15s; }
.msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes msg-in { from { opacity: 0; translate: 0 10px; } }
@keyframes typing { 30% { opacity: .25; translate: 0 -3px; } }
.chat__input { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; background: var(--card); flex: none; min-height: 68px; }
.chat__input:empty { display: none; }
.chat__input input, .chat__input textarea {
  flex: 1 1 180px; min-width: 0; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 24px;
  padding: 10px 18px; background: #fff; font: inherit; font-size: 18px; color: var(--ink); outline: none; resize: none;
}
.chat__input input:focus, .chat__input textarea:focus { border-color: var(--gold); }
.chat__btn { min-height: 48px; padding: 8px 20px; border-radius: 24px; background: var(--ink); color: var(--paper); font-size: 18px; transition: background-color .3s, color .3s; }
.chat__btn:hover { background: #8a6a22; }
.chat__btn--choice { flex: 1 1 auto; background: none; color: var(--ink); border: 1px solid var(--line-strong); }
.chat__btn--choice:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Fin ---------- */
.fin { position: relative; text-align: center; padding: clamp(110px, 14vw, 190px) var(--g) 60px; display: grid; justify-items: center; }
.fin::before { content: ""; position: absolute; top: 0; left: var(--g); right: var(--g); height: 1px; background: var(--line); }
.fin__logo { width: min(380px, 70vw); }
.fin__line { margin: 26px 0 18px; font-size: clamp(26px, 3.4vw, 44px); }
.fin__top { margin-top: 40px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center; padding: 70px 20px 90px;
  background: rgba(233,225,207,.84);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lightbox[hidden] { display: none; }
.lightbox__print { margin: 0; background: var(--card); padding: 14px 14px 56px; box-shadow: 0 40px 90px rgba(12,43,31,.3); position: relative; max-width: min(88vw, 900px); }
.lightbox__print img { max-height: calc(100vh - 230px); width: auto; margin: 0 auto; }
.lightbox__print figcaption { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-style: italic; color: var(--ink-soft); }
.lightbox__btn { position: absolute; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; padding: 10px 6px; border-bottom: 1px solid var(--gold); }
.lightbox__btn:hover { color: var(--gold); }
.lightbox__close { top: 24px; right: var(--g); }
.lightbox__prev { bottom: 30px; left: var(--g); }
.lightbox__next { bottom: 30px; right: var(--g); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  body { font-size: 18px; }
  .nav { grid-template-columns: auto 1fr; }
  .nav__meta, .nav__index-label, .hide-sm { display: none; }

  .nav__brand .logo { height: 50px; }
  .cover { padding: 84px calc(var(--g) + 12px) 26px; }
  .cover__frame { inset: 72px 12px 12px; }
  .cover__dates { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cover__dates b { width: 1.15em; font-size: 62px; }
  .cover__dates i { display: none; }
  .cover__bottom { flex-direction: column; gap: 10px; font-size: 13px; text-align: center; }

  .maries__grid { grid-template-columns: 1fr; gap: 50px; }
  .maries__and { display: none; }
  .flip { max-width: 440px; }
  .flip--b { justify-self: end; margin-top: 0; }

  .ticket { grid-template-columns: 1fr; }
  .ticket--a, .ticket--b { rotate: 0deg; }
  .ticket__stub { border-left: 0; border-top: 2px dashed var(--line-strong); padding: 30px 24px; }
  .ticket__stub::before, .ticket__stub::after { top: -15px; bottom: auto; }
  .ticket__stub::before { left: -14px; }
  .ticket__stub::after { left: auto; right: -14px; }
  .stamp { width: 52%; }
  .postmark { width: 40%; left: 4%; top: 30%; }

  .histoire__pin { display: block; height: auto; padding: 110px var(--g) 40px; }
  .histoire__stack, .histoire__dots { display: none; }
  .histoire__texts { height: auto; }
  .histoire__intro { position: static; margin-bottom: 50px; }
  .chap { position: static; margin-bottom: 70px; }
  .chap__img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; background: var(--card); padding: 10px 10px 34px; margin: 0 0 24px; box-shadow: 0 16px 40px rgba(12,43,31,.16); }
  .chap:nth-child(odd) .chap__img { rotate: 1.5deg; }
  .chap:nth-child(even) .chap__img { rotate: -1.5deg; }

  .oui { min-height: 0; }
  .oui__rings { opacity: .9; left: 78%; top: 14%; width: 130px; }

  .strip__item { width: 78vw; }
  .strip { gap: 10px; }

}

@media (max-width: 480px) {
  .lightbox__print img { max-height: calc(100vh - 260px); }
}

/* écrans peu hauts : la couverture et les chapitres tiennent sans défiler */
@media (max-height: 720px) and (min-width: 901px) {
  .chap h3 { font-size: 32px; margin-bottom: 12px; }
  .chap p { font-size: 16px; margin-bottom: 8px; line-height: 1.38; }
  .histoire__pin { padding-top: 84px; padding-bottom: 30px; }
  .histoire__texts { height: calc(100vh - 124px); }
}
@media (max-height: 720px) {
  .cover { padding-top: 84px; padding-bottom: 22px; }
  .cover__bottom { padding-top: 6px; padding-bottom: 6px; }
  .cover__center { padding: 4px 0; }
  .cover__kicker { margin-bottom: 8px; letter-spacing: .14em; }
  .cover__logo { width: min(480px, 66vw, 34vh); }
  .cover__line { margin: 8px 0 12px; font-size: clamp(22px, 2.4vw, 30px); }
  .cover__dates b { font-size: 54px; }
  .cover__bottom { gap: 4px; }
}

/* sans animation (mouvement réduit ou scripts indisponibles) */
.is-static .histoire__pin { display: block; height: auto; padding: 110px var(--g) 40px; }
.is-static .histoire__stack, .is-static .histoire__dots { display: none; }
.is-static .histoire__texts { height: auto; }
.is-static .histoire__intro { position: static; margin-bottom: 50px; }
.is-static .chap { position: static; margin-bottom: 70px; }
.is-static .chap__img { display: block; width: min(100%, 460px); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; background: var(--card); padding: 10px 10px 34px; margin: 0 0 24px; box-shadow: 0 16px 40px rgba(12,43,31,.16); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ink-w { opacity: 1; }
}
