/* 💍 /mariage/ only — Bernard's « Salons de la mariée » offer (20 Nov 2026).
   « une deco qui fait mariage mais pas trop bling bling »: an ivory faire-part
   on the site's own dark ground, one champagne hairline, a line-art sprig,
   a book serif from the visitor's own system (no new font files). Nothing
   glitters, nothing animates, no masks or filters — phones stay light.
   Radius 0, like the rest of the site. All text pairs AA:
   ink #231e18 on ivory 15.9:1 · gold text #7a5a22 on ivory 5.9:1.
   ⚠️ New filename on purpose: /css/* is immutable for a year — bump ?v=. */

.wed {
  --ivory: #f7f2e8;
  --wed-ink: #231e18;
  --wed-gold: #7a5a22;      /* gold that READS: text on ivory */
  --wed-line: #c9ad7a;      /* champagne: hairlines and the sprig only */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  padding: 48px 0 64px;
}

.wed__wrap {
  display: grid; gap: 40px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: start;
}
@media (max-width: 860px) { .wed__wrap { grid-template-columns: minmax(0, 1fr); gap: 34px; } }

/* ---------- the faire-part ---------- */

/* 21 Nov — « more life colour-wise on the edge, lift it up a little »:
   a gilded edge (champagne → antique gold → champagne, 3 px gradient
   border), a warm gold glow + deep drop shadow lifting the card off the
   dark ground, and a soft light on the top of the ivory. All STATIC paint:
   no animation, no filter, no mask (iPhone memory rule). */
.wed__card {
  position: relative;
  color: var(--wed-ink);
  padding: 46px 40px 40px;
  text-align: center;
  border: 3px solid transparent;
  background:
    radial-gradient(120% 55% at 50% 0%, #fffcf4 0%, rgba(255,252,244,0) 70%) padding-box,
    linear-gradient(var(--ivory), var(--ivory)) padding-box,
    linear-gradient(135deg, #f4e4b4 0%, #b8893a 22%, #f8e9c0 48%, #a8792b 74%, #eed79c 100%) border-box;
  box-shadow:
    0 0 0 1px rgba(214, 185, 128, .28),
    0 0 46px -6px rgba(214, 178, 110, .38),
    0 28px 60px -18px rgba(0, 0, 0, .75);
}
/* one hairline frame, inset — now in a richer gold to echo the edge */
.wed__card::before {
  content: ""; position: absolute; inset: 12px;
  border: 1px solid #b8893a;
  pointer-events: none;
}
@media (max-width: 480px) {
  .wed__card { padding: 38px 24px 32px; }
  .wed__card::before { inset: 9px; }
}

.wed__sprig { display: block; margin: 0 auto 18px; color: var(--wed-line); width: 150px; height: auto; }

.wed__kicker {
  font-weight: 700; font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--wed-gold); margin: 0 0 14px;
}

.wed__title {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(38px, 5.4vw, 60px); line-height: 1.02; letter-spacing: -.01em;
  margin: 0 0 22px;
}
.wed__price {
  display: block; font-style: normal; font-family: var(--font);
  font-weight: 800; font-size: .78em; letter-spacing: -.02em;
  margin-top: 10px;
}
.wed__price::before, .wed__price::after {
  content: ""; display: inline-block; vertical-align: middle;
  width: 34px; height: 1px; background: var(--wed-line); margin: 0 14px;
}

.wed__intro {
  font-family: var(--serif); font-size: 18px; line-height: 1.55;
  max-width: 34ch; margin: 0 auto 22px;
}

.wed__list {
  list-style: none; padding: 0; margin: 0 auto 22px; max-width: 36ch;
  border-top: 1px solid var(--wed-line);
}
.wed__list li {
  padding: 11px 4px; border-bottom: 1px solid var(--wed-line);
  font-size: 15.5px; font-weight: 500;
}
.wed__list li:last-child { font-family: var(--serif); font-style: italic; font-size: 17px; font-weight: 400; }

.wed__note { font-size: 14px; line-height: 1.55; max-width: 38ch; margin: 0 auto 22px; color: #4a4239; }

.wed__until {
  display: inline-block; margin: 0 0 26px;
  border: 1px solid var(--wed-gold); color: var(--wed-gold);
  padding: 8px 14px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em;
}

.wed__sign { font-family: var(--serif); font-style: italic; font-size: 18px; margin: 0; }
.wed__sign span {
  display: block; margin-top: 6px;
  font-family: var(--font); font-style: normal; font-weight: 700;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--wed-gold);
}

/* ---------- the form (site's own fields, on the dark ground) ---------- */

.wed__h2 {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(24px, 2.8vw, 30px); line-height: 1.2;
  margin: 0 0 22px; color: var(--ink);
}
.wed__h2::after {
  content: ""; display: block; width: 46px; height: 1px;
  background: var(--wed-line); margin-top: 16px;
}
.wed__form .field input:focus, .wed__form .field textarea:focus { border-color: var(--wed-line); outline: none; }
.wed__form .submit:hover { background: var(--wed-line); }

.wed__tel { margin: 18px 0 0; font-size: 14px; color: var(--ink-70); }
.wed__tel a, .wed__ended a { color: var(--ink); font-family: var(--mono); }
.wed__ended { font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 40ch; }

/* ---------- his two photos (20 Nov) ----------
   Printed-photo look: ivory mat + the same champagne hairline as the card.
   Shown whole at their own ratio — no crop, no captions, nothing moves. */
.wed__photos {
  display: grid; gap: 24px; margin-top: 44px;
  grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start;
}
@media (max-width: 640px) { .wed__photos { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 34px; } }
.wed__fig {
  margin: 0; background: var(--ivory); padding: 10px;
  outline: 1px solid var(--wed-line); outline-offset: -5px;
}
.wed__fig img { width: 100%; height: auto; }

/* ---------- ✉️ LAYER 1 — l'invitation s'ouvre (20 Nov) ----------
   Only under html.wed-env (set in <head>; off with ?env=0, reduced motion,
   no JS). Plays ONCE on load, ~2.6 s, then the envelope is gone for good
   (fill-mode both → opacity 0 + visibility hidden). Transforms + opacity
   only. Timeline: envelope lands 0–.4 s · flap opens .45–1.1 s · card rises
   out of the pocket .95–2.1 s · envelope sinks away 1.5–2.6 s.
   To remove the layer: delete this block, the .wed__env div and the
   head script (the .wed__stage wrapper is harmless). */
.wed__stage { position: relative; }
.wed__env { display: none; }

/* No wrapper box: each piece stacks on its own against the card, so the
   card (z 2) can rise in FRONT of the back + opened flap and BEHIND the
   pocket. A wrapper with opacity/transform would make one layer and break it. */
.wed-env .wed__env { display: contents; }
.wed-env .wed__env > * {
  position: absolute; left: 0; right: 0; top: 0;
  pointer-events: none;
  animation: wedEnvIn .4s ease-out both, wedEnvOut .9s cubic-bezier(.5, 0, .75, 0) 1.75s both;
}
.wed__env-back, .wed__env-front { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
.wed-env .wed__env-back  { z-index: 1; }
.wed-env .wed__env-front { z-index: 3; }
.wed-env .wed__env-flap {
  aspect-ratio: 16 / 6; z-index: 4;
  transform-origin: 50% 0;
  /* opacity-only in/out here: transform belongs to the flip */
  animation: wedFadeIn .4s ease-out both,
             wedFlap .65s cubic-bezier(.45, .05, .3, 1) .45s both,
             wedFadeOut .9s cubic-bezier(.5, 0, .75, 0) 1.75s both;
}
.wed__env-flap svg { display: block; width: 100%; height: 100%; }
.wed__seal {
  position: absolute; left: 50%; top: 96%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; background: #f7f2e8; border: 1px solid #c9ad7a;
  color: #7a5a22; font-weight: 800; font-size: 13px; letter-spacing: .08em;
  display: flex; align-items: center; justify-content: center;
  animation: wedSeal .25s ease-in .45s both;
}

/* the card starts small INSIDE the envelope (hidden by flap + pocket), is
   pulled half out, then grows to full size while the envelope sinks away.
   --wt (envelope top), --wy0/--wy1 (card start / pulled-out offset) and --ws
   (start scale) are measured by the script at the end of <main>, because
   the card is ~3x taller on a phone than on a computer; defaults below. */
.wed__stage { --wt: 60px; --wy0: 110px; --wy1: 10px; --ws: .25; }
.wed-env .wed__env > * { top: var(--wt); }
.wed-env .wed__card {
  z-index: 2;
  transform-origin: 50% 0;
  animation: wedCard 1.9s cubic-bezier(.45, .05, .25, 1) .95s both;
}

@keyframes wedEnvIn  { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes wedEnvOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(90px); visibility: hidden; } }
@keyframes wedFlap {
  0%   { transform: perspective(900px) rotateX(0deg);   z-index: 4; }
  49%  { z-index: 4; }
  50%  { z-index: 0; }
  100% { transform: perspective(900px) rotateX(180deg); z-index: 0; }
}
@keyframes wedFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes wedFadeOut { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
@keyframes wedSeal { to { opacity: 0; transform: scale(.85); } }
@keyframes wedCard {
  0%   { opacity: 0; transform: translateY(var(--wy0)) scale(var(--ws)); }
  8%   { opacity: 1; }
  38%  { opacity: 1; transform: translateY(var(--wy1)) scale(var(--ws)); }
  100% { opacity: 1; transform: none; }
}
@media (max-width: 480px) {
  .wed__seal { width: 38px; height: 38px; margin: -19px 0 0 -19px; font-size: 11px; }
}
