/* =========================================================
   Cécile & Laurent — 24 juillet 2027
   Palette beige / crème, accents or et champagne (pokéball)
   ========================================================= */

/* Polices hébergées sur le site (aucune requête vers Google).
   Polices variables : un seul fichier couvre toutes les graisses. */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost.woff2") format("woff2");
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Parisienne";
  src: url("../fonts/parisienne.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Couleurs */
  --cream: #faf6ef;
  --ivory: #f4ede1;
  --sand: #ebe0cd;
  --beige: #d8c7ab;
  --taupe: #a8957a;
  --brown: #5a4a3b;
  --brown-soft: #7a6858;
  --gold: #b8924a;
  --gold-dark: #a37f3d;
  --gold-light: #d9bc7e;
  --gold-text: #8a6a1e;   /* or lisible pour les textes et boutons (contraste AA) */
  --gold-text-dark: #765a16;
  --champagne-soft: #f3ead9; /* fond doux des icônes et encadrés */
  --paper: #fffdf9;           /* fond des cartes et champs */
  --lantern: #f2b65a;
  --ball-top: #dcc392;    /* champagne : la pokéball fondue dans la palette beige et or */
  --ball-bottom: #fffdf9;
  --ball-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M5 50a45 45 0 0 1 90 0z' fill='%23dcc392'/%3E%3Cpath d='M5 50a45 45 0 0 0 90 0z' fill='%23fffdf9'/%3E%3Cg fill='none' stroke='%23b8924a' stroke-width='5'%3E%3Ccircle cx='50' cy='50' r='45'/%3E%3Cpath d='M5 50h31M64 50h31'/%3E%3Ccircle cx='50' cy='50' r='14' fill='%23fffdf9'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='6.5' fill='none' stroke='%23b8924a' stroke-width='3'/%3E%3C/svg%3E");
  --error: #a0524a;

  /* Typographies */
  --font-title: "Cormorant Garamond", Georgia, serif;
  --font-script: "Parisienne", cursive;
  --font-body: "Jost", system-ui, sans-serif;

  /* Échelle d'espacements (utilisée partout) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --section-y: clamp(64px, 9vw, 104px);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  /* Petites étiquettes en majuscules (dates, rôles, libellés…) */
  --label-size: 0.9rem;
  --label-track: 0.18em;

  /* Calligraphie des sous-titres */
  --script-size: 2.5rem;
  --shadow: 0 12px 32px -20px rgba(90, 74, 59, 0.45);
  --max: 1080px;
  --header-h: 68px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s-4)); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.7;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* Sprite SVG partagé (pokéballs), invisible en lui-même */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Lien « Aller au contenu » : visible seulement au clavier */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 200;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-sm);
  background: var(--brown);
  color: var(--cream);
}
.skip-link:focus { top: var(--s-4); }
a { color: var(--gold-text); }
p { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  color: var(--brown);
}

.script { font-family: var(--font-script); font-weight: 400; color: var(--gold-text); line-height: 1.25; }

/* Nos prénoms : capitales espacées façon faire-part, & calligraphié en or */
.names {
  font-family: var(--font-title);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding-left: 0.14em; /* compense l'espacement pour bien centrer */
  color: var(--brown);
}
.names .amp {
  font-family: var(--font-script);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.15em;
  line-height: 0;
  color: var(--gold-text);
  margin: 0 0.12em 0 0.02em;
}

.container { width: min(var(--max), 100% - 2 * var(--s-4)); margin-inline: auto; }
.narrow { max-width: 680px; margin-inline: auto; }

/* ---------- Page de connexion (le mot de passe est vérifié par Cloudflare) ---------- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--s-5) var(--s-4);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(242, 182, 90, 0.18), transparent 60%),
    var(--ivory);
  overflow: hidden;
}

.gate-card {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  text-align: center;
  background: rgba(250, 246, 239, 0.88);
  backdrop-filter: blur(4px);
  border: 1px solid var(--beige);
  border-radius: var(--radius-lg);
  padding: var(--s-7) var(--s-6) var(--s-6);
  box-shadow: var(--shadow);
}
.gate-card .emblem { width: 64px; margin: 0 auto var(--s-4); }
/* Photo en arche, la pokéball posée à cheval sur son bas */
.gate-card .gate-photo { width: 160px; margin: 0 auto; box-shadow: var(--shadow); }
.gate-photo + .emblem {
  position: relative;
  z-index: 1;
  width: 44px;
  margin: -22px auto var(--s-3);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--cream);
}
.gate-card .script { display: block; font-size: var(--script-size); }
.gate-card h1 { font-size: clamp(1.3rem, 6vw, 1.7rem); white-space: nowrap; margin-top: var(--s-2); }
.gate-card p { color: var(--brown-soft); font-size: 1.1rem; margin: var(--s-3) 0 var(--s-5); }

.gate-form { display: flex; flex-direction: column; gap: var(--s-3); }
.gate-card.shake { animation: shake 0.4s; }

@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.form-error { color: var(--error); font-size: 1.1rem; text-align: center; margin: 0; }
.form-error:empty { display: none; }

@media (max-width: 420px) {
  .gate-card { padding: var(--s-6) var(--s-5) var(--s-5); }
}

/* ---------- En-tête & navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--sand);
}

/* Menu centré : les onglets se répartissent de part et d'autre de la pokéball */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: var(--s-5);
  height: var(--header-h);
}
.nav-menu { display: contents; }
.nav-left { grid-column: 1; grid-row: 1; }
.nav-right { grid-column: 3; grid-row: 1; }
/* Les six onglets ont la même largeur et occupent toute la ligne */
.nav-links li { flex: 1 1 0; text-align: center; }

.brand {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--brown);
  font-family: var(--font-title);
  font-size: 1.4rem;
  line-height: 1;
  white-space: nowrap;
}
.brand .emblem { width: 36px; transition: transform 0.4s; }
.brand:hover .emblem { transform: rotate(-20deg); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--brown);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: var(--s-1) 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--gold-text); border-color: var(--gold-light); }
.nav-links .btn { padding: 10px 22px; border: 1px solid var(--gold-text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--s-2);
  margin-right: calc(-1 * var(--s-2));
  cursor: pointer;
  color: var(--brown);
}
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: currentColor; margin: 5px 0; transition: transform 0.25s, opacity 0.25s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; grid-column: 3; grid-row: 1; justify-self: end; }
  /* Le menu se déplie sous l'en-tête, les deux listes l'une sous l'autre */
  .nav-menu {
    display: block;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, border-color 0.35s;
  }
  .nav-open .nav-menu { max-height: 480px; border-color: var(--sand); }
  .nav-links { flex-direction: column; gap: 0; justify-self: stretch; }
  .nav-links li { flex: none; width: 100%; }
  .nav-links a { display: block; padding: var(--s-4) 0; border: none; }
  .nav-right li:last-child { padding: var(--s-2) 0 var(--s-5); }
  .nav-links .btn { display: inline-block; padding: 12px 32px; }
}

/* ---------- Boutons & champs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  color: var(--cream) !important;
  background: var(--gold-text);
  border: 1px solid var(--gold-text);
  border-radius: 999px;
  padding: 15px 32px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--gold-text-dark); transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(184, 146, 74, 0.8); }
.btn-ghost { background: transparent; color: var(--gold-text) !important; }
.btn-ghost:hover { background: rgba(184, 146, 74, 0.08); }
.btn-sm { padding: 11px 22px; font-size: 0.85rem; }

input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1.1rem;
  color: var(--brown);
  background: var(--paper);
  border: 1px solid var(--beige);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--brown-soft); opacity: 0.85; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold-text);
  box-shadow: 0 0 0 3px rgba(184, 146, 74, 0.15);
}
select {
  appearance: none;
  padding-right: 40px;
  background: #fffdf9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b8924a' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center;
}
textarea { resize: vertical; min-height: 96px; }

/* ---------- Ornements ---------- */

/* Pokéball (SVG #ball) : liseré or, haut champagne, bas crème */
.emblem { display: block; color: var(--gold); aspect-ratio: 1; height: auto; }

/* Séparateur sous les titres : deux filets et une pokéball au centre */
.divider {
  height: 22px;
  width: min(240px, 70%);
  margin: var(--s-4) auto 0;
  background:
    var(--ball-img) center / 22px no-repeat,
    linear-gradient(to right, transparent, var(--gold-light) 25%, var(--gold-light) 40%, transparent 40%, transparent 60%, var(--gold-light) 60%, var(--gold-light) 75%, transparent) center / 100% 1px no-repeat;
}

/* Petite pokéball en CSS (programme, contacts, formulaire…) */
.ball {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: linear-gradient(to bottom,
    var(--ball-top) 0 calc(50% - 1px),
    var(--gold) calc(50% - 1px) calc(50% + 1px),
    var(--ball-bottom) calc(50% + 1px));
}
.ball::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34%;
  height: 34%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--gold);
}
.ball-sm { width: 18px; height: 18px; border-width: 1px; }
.ball-sm::after { border-width: 1px; }
.ball-center { display: block; margin-inline: auto; }

/* Texte provisoire à remplacer */
.placeholder { background: rgba(217, 188, 126, 0.22); border-radius: 4px; padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- Sections ---------- */

.section { padding: var(--section-y) 0; }
.section-alt { background: var(--ivory); }
.section-tight { padding-top: var(--s-6); }

.section-head { text-align: center; margin-bottom: var(--s-7); }
.section-head .script { display: block; font-size: var(--script-size); }
.section-head h2 { font-size: clamp(2.4rem, 5.5vw, 3.3rem); margin-top: var(--s-1); }
.section-head p { max-width: 560px; margin: var(--s-5) auto 0; color: var(--brown-soft); }

.page-hero {
  text-align: center;
  padding: var(--s-8) 0 var(--s-6);
  background: radial-gradient(ellipse at 50% 0%, rgba(242, 182, 90, 0.14), transparent 70%);
}
.page-hero .emblem { width: 52px; margin: 0 auto var(--s-4); }
.page-hero .script { display: block; font-size: var(--script-size); }
.page-hero h1 { font-size: clamp(2.5rem, 6vw, 3.4rem); margin-top: var(--s-1); }
.page-hero p { max-width: 580px; margin: var(--s-5) auto 0; color: var(--brown-soft); }

/* ---------- Save the date (hero) ---------- */

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--s-7) 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(242, 182, 90, 0.22), transparent 55%),
    linear-gradient(to bottom, var(--cream), var(--ivory));
}

.hero-emblem {
  position: absolute;
  width: min(620px, 120vw);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--brown-soft);
  opacity: 0.07;
  animation: spin 160s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.hero-content { position: relative; z-index: 2; }

.emblem-trigger { display: block; background: none; border: none; padding: 0; margin: 0 auto var(--s-4); cursor: pointer; }
.emblem-trigger .emblem { width: 48px; transform-origin: 50% 90%; }
.emblem-trigger:hover .emblem,
.emblem-trigger.wobble .emblem { animation: wobble 0.7s ease-in-out; }

/* La pokéball qui tremble avant la capture */
@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-16deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(4deg); }
}

.hero .eyebrow {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--brown-soft);
}
.hero .script { display: block; font-size: clamp(2.4rem, 7vw, 3.8rem); margin-top: var(--s-2); }

.hero h1 {
  font-size: clamp(1.4rem, 7vw, 4.4rem);
  white-space: nowrap;
  line-height: 1.1;
  margin-top: var(--s-3);
}

.hero-date {
  font-family: var(--font-body);
  font-weight: 300;
  font-variant-numeric: lining-nums;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  letter-spacing: 0.3em;
  margin-top: var(--s-5);
  padding-left: 0.3em; /* compense l'espacement des lettres pour bien centrer */
}
.hero-place { color: var(--brown-soft); letter-spacing: 0.08em; margin-top: var(--s-1); }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 104px);
  justify-content: center;
  gap: var(--s-3);
  margin: var(--s-6) 0;
}
.countdown div {
  padding: var(--s-3) var(--s-2) var(--s-2);
  border: 1px solid var(--beige);
  border-radius: var(--radius-sm);
  background: rgba(250, 246, 239, 0.75);
}
.countdown strong { display: block; font-family: var(--font-body); font-weight: 300; font-variant-numeric: lining-nums tabular-nums; font-size: 1.85rem; line-height: 1.15; }
.countdown span { display: block; margin-top: var(--s-1); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brown-soft); }

.hero-note { font-size: 1.1rem; color: var(--brown-soft); margin-top: var(--s-4); }

@media (max-width: 420px) {
  .countdown { grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
  .countdown strong { font-size: 1.6rem; }
  /* Sur téléphone, libellés en minuscules : plus étroits, ils tiennent dans les cases */
  .countdown div { padding-inline: 2px; }
  .countdown span { font-size: 0.85rem; letter-spacing: 0; text-transform: none; }
}

/* Lanternes flottantes */
.lanterns { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

.lantern {
  position: absolute;
  bottom: -60px;
  width: var(--w, 16px);
  aspect-ratio: 3 / 4;
  border-radius: 30% 30% 22% 22% / 22% 22% 30% 30%;
  background: linear-gradient(to bottom, #f7d08a, var(--lantern) 55%, #d98b3a);
  box-shadow: 0 0 18px 6px rgba(242, 182, 90, 0.35);
  opacity: 0;
  animation: rise var(--d, 18s) linear var(--delay, 0s) infinite;
}
.lantern::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 14%;
  width: 34%;
  height: 22%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff3d6;
  filter: blur(1.5px);
}

@keyframes rise {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: var(--o, 0.55); }
  50%  { transform: translate(var(--drift, 20px), -55vh); }
  85%  { opacity: var(--o, 0.55); }
  100% { transform: translate(0, -110vh); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-emblem { animation: none; }
  .lantern { display: none; }
}

/* ---------- Cartes (base commune) ---------- */

.card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: var(--s-5);
  box-shadow: var(--shadow);
}
.section:not(.section-alt) .card { background: var(--paper); }
.card h3 { font-size: 1.65rem; }
.card p { color: var(--brown-soft); font-size: 1.12rem; }

/* Tenue : couleurs à éviter, en échantillons de tissu */
.dress-ban {
  margin-top: var(--s-2);
  padding-top: var(--s-4);
  border-top: 1px dashed var(--beige);
}
.card .dress-ban-title {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--brown);
  margin-bottom: var(--s-3);
}
.swatches { display: flex; gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
.swatches li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: var(--label-size);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brown-soft);
  text-align: center;
}
/* L'échantillon : un carré de tissu au bord cranté */
.swatches li::before {
  content: "";
  width: 36px;
  height: 28px;
  background: var(--c);
  border: 1px solid var(--sand);
  border-radius: 3px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 6px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 6px 100%;
  box-shadow: inset 0 0 0 1px rgba(90, 74, 59, 0.08);
}
/* Un fin trait en diagonale barre l'échantillon */
.swatches li::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  width: 44px;
  height: 1px;
  background: var(--brown);
  box-shadow: 0 0 0 1px var(--cream);
  transform: translateX(-50%) rotate(-38deg);
}
.card .card-link { margin-top: auto; padding-top: var(--s-2); font-size: 1.1rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--s-5);
}

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--champagne-soft);
  color: var(--gold-dark);
  margin-bottom: var(--s-2);
}
.card-icon svg { width: 20px; height: 20px; }

/* ---------- Notre histoire ---------- */

.story { position: relative; max-width: 860px; margin: 0 auto; }
.story::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--beige) 6%, var(--beige) 94%, transparent);
}

/* Chaque chapitre : texte d'un côté de la frise, photo de l'autre */
.chapter {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--s-8);
  align-items: center;
}
.chapter + .chapter { margin-top: var(--s-7); }
/* Repère sur la frise : une pokéball */
.chapter::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--ball-img) center / contain no-repeat;
  box-shadow: 0 0 0 5px var(--cream);
}
.chapter .card, .chapter .photo { grid-row: 1; }
.chapter:nth-child(odd) .card { grid-column: 1; }
.chapter:nth-child(odd) .photo { grid-column: 2; }
.chapter:nth-child(even) .card { grid-column: 2; }
.chapter:nth-child(even) .photo { grid-column: 1; }

.chapter-year {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--label-size);
  letter-spacing: var(--label-track);
  color: var(--gold-text);
  line-height: 1.4;
}
.chapter h3 { font-size: 1.65rem; }

@media (max-width: 720px) {
  .story::before { left: 6px; }
  .chapter { grid-template-columns: 1fr; row-gap: var(--s-4); padding-left: var(--s-6); }
  .chapter::before { left: 6px; top: 30px; }
  .chapter:nth-child(n) .card,
  .chapter:nth-child(n) .photo { grid-column: 1; }
  .chapter:nth-child(n) .photo { grid-row: 1; }
  .chapter:nth-child(n) .card { grid-row: 2; }
}

/* ---------- Photos ---------- */

.photo {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
  box-shadow: var(--shadow);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* Fin liseré intérieur, comme un passe-partout */
.photo::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 253, 249, 0.6);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}

/* Emplacement vide, à remplacer par une <img> */
.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-4);
  text-align: center;
  color: var(--brown-soft);
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  background:
    repeating-linear-gradient(135deg, rgba(216, 199, 171, 0.22) 0 1px, transparent 1px 14px),
    linear-gradient(160deg, var(--ivory), var(--sand));
}
.photo-placeholder::before {
  content: "";
  width: 34px;
  height: 34px;
  opacity: 0.75;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8957a' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l1.5-2h7L17 8h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Arche (clin d'œil à la fenêtre de la tour) */
.photo.arch { aspect-ratio: 3 / 4; border-radius: 999px 999px var(--radius) var(--radius); }
.photo.arch::after { border-radius: 999px 999px calc(var(--radius) - 6px) calc(var(--radius) - 6px); }

/* Galerie de 3 arches entre deux sections */
.gallery-band { padding-top: var(--section-y); } /* la section suivante apporte l'espace du bas */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: var(--s-5);
  align-items: end;
  max-width: 900px;
}
.gallery .photo { width: 100%; }
@media (max-width: 600px) {
  .gallery { gap: var(--s-3); }
  .gallery .photo-placeholder span { display: none; }
}

/* Grande photo pleine largeur avant le pied de page */
.photo-band { position: relative; }
.photo-band .photo {
  aspect-ratio: 21 / 9;
  min-height: 320px;
  width: 100%;
  border-radius: 0;
  box-shadow: none;
}
.photo-band .photo::after { display: none; }
.photo-band .photo-placeholder { justify-content: flex-start; padding-top: var(--s-7); }
.photo-band-text {
  position: absolute;
  inset: auto 0 0;
  padding: var(--s-8) var(--s-4) var(--s-6);
  text-align: center;
  color: var(--cream);
  background: linear-gradient(to top, rgba(90, 74, 59, 0.6), transparent);
  pointer-events: none;
}
.photo-band-text .script { display: block; font-size: clamp(2.4rem, 6vw, 3.4rem); color: var(--cream); }
.photo-band-text p { font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; margin-top: var(--s-1); }
@media (max-width: 600px) {
  .photo-band .photo { aspect-ratio: 4 / 5; min-height: 0; }
}

/* ---------- Programme (le parcours) ---------- */

.journey-day + .journey-day { margin-top: var(--s-7); }

.day-title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--label-size);
  text-transform: uppercase;
  letter-spacing: var(--label-track);
  text-align: center;
  color: var(--brown-soft);
  margin-bottom: var(--s-5);
}

.journey {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 560px;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: var(--s-5);
  padding-bottom: var(--s-6);
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: "";
  position: absolute;
  left: 13.5px;
  top: 36px;
  bottom: var(--s-2);
  border-left: 1.5px dotted var(--beige);
}
.step:last-child::before { display: none; }
.step .ball { margin-top: 2px; }

.step-time {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: var(--label-size);
  color: var(--gold-text);
  letter-spacing: var(--label-track);
  line-height: 1.6;
  margin-top: 3px;
}
.step h3 { font-size: 1.65rem; margin: var(--s-1) 0; }
.step p { color: var(--brown-soft); }

/* ---------- Contacts ---------- */

.contact-card { align-items: center; text-align: center; padding-block: var(--s-6); }
.contact-card .ball { margin-bottom: var(--s-2); }
.contact-card .role { font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--brown-soft); }
.contact-card h3 { margin-bottom: var(--s-1); }
.contact-card a { overflow-wrap: anywhere; }

/* ---------- Hébergements ---------- */

.lodging .tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-2); }
.tag {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ivory);
  border: 1px solid var(--sand);
  color: var(--brown-soft);
}
.lodging .btn { align-self: flex-start; margin-top: auto; }
.lodging p { margin-bottom: var(--s-3); }

.tip {
  display: flex;
  gap: var(--s-4);
  align-items: center;
  max-width: 760px;
  margin: 0 auto var(--s-7);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--radius);
  background: var(--champagne-soft);
  border: 1px solid var(--sand);
}
.tip strong { font-weight: 400; color: var(--brown); }

/* ---------- RSVP ---------- */

.rsvp-deadline {
  text-align: center;
  color: var(--brown-soft);
  margin-bottom: var(--s-6);
}
.rsvp-deadline strong {
  display: block;
  margin-top: var(--s-1);
  font-weight: 400;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: var(--label-track);
  color: var(--gold-text);
}

.form-card {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--radius-lg);
  padding: var(--s-7) var(--s-7) var(--s-6);
  box-shadow: var(--shadow);
}
@media (max-width: 600px) { .form-card { padding: var(--s-6) var(--s-5) var(--s-5); } }

/* Chaque partie du formulaire est séparée par un filet, sauf la première */
.form-part {
  border: none;
  border-top: 1px solid var(--sand);
  margin: var(--s-6) 0 0;
  padding: var(--s-6) 0 0;
  min-width: 0;
}
.form-card > .form-part:first-child { border-top: none; margin-top: 0; padding-top: 0; }

/* Le legend flotte pour ne pas couper le filet du fieldset */
.form-part > legend {
  float: left;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  padding: 0;
  margin-bottom: var(--s-5);
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
}
.form-part > legend + * { clear: both; }

.field + .field,
.field + .field-row,
.field-row + .field,
.field-row + .field-row { margin-top: var(--s-5); }

.field { min-width: 0; border: none; margin-inline: 0; padding: 0; }
.field-label {
  display: block;
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  margin-bottom: var(--s-2);
  padding: 0;
}
.field .hint { font-size: 1.1rem; color: var(--brown-soft); margin-top: var(--s-2); }
.req { color: var(--gold-text); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.field-row > .field + .field { margin-top: 0; }
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; gap: var(--s-5); }
}

/* Choix (boutons radio / cases) */
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
.choices-wrap { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 50px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--beige);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.choice input:checked + span { border-color: var(--gold-text); background: rgba(184, 146, 74, 0.1); color: var(--brown); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(184, 146, 74, 0.25); }

.chip > span { min-height: 0; padding: 9px 16px; border-radius: 999px; font-size: 1.1rem; }

/* Liste des invités */
.guest-list { display: flex; flex-direction: column; gap: var(--s-3); }
.guest {
  display: grid;
  grid-template-columns: 88px 1fr 1fr;
  gap: var(--s-3);
  align-items: center;
}
.guest-tag {
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--brown-soft);
}
.guest-me {
  grid-column: 2 / -1;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--ivory);
  color: var(--brown-soft);
}
.guest-child .guest-age { max-width: 100%; }
.guest + .guest { padding-top: var(--s-4); border-top: 1px solid var(--sand); }

/* Régime alimentaire, propre à chaque invité */
.guest-diet {
  grid-column: 2 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.guest-diet-label { padding: 0; font-size: 1rem; color: var(--brown-soft); }
.guest-diet-details { display: flex; flex-direction: column; gap: var(--s-1); }
.guest-diet-details.is-hidden { display: none; }

@media (max-width: 520px) {
  .guest { grid-template-columns: 1fr 1fr; gap: var(--s-2); }
  .guest-tag { grid-column: 1 / -1; }
  .guest + .guest { margin-top: var(--s-2); }
  .guest-me { grid-column: 1 / -1; }
  .guest-diet { grid-column: 1 / -1; }
}

/* Champ piège anti-robots : hors de l'écran, ignoré au clavier */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.privacy-note {
  margin-top: var(--s-6);
  font-size: 1rem;
  color: var(--brown-soft);
  text-align: center;
}

/* Texte lu par les lecteurs d'écran, invisible à l'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form-actions { margin-top: var(--s-6); display: flex; flex-direction: column; align-items: center; gap: var(--s-4); }

.is-hidden { display: none !important; }

.rsvp-thanks { text-align: center; }
.rsvp-thanks .emblem { width: 60px; margin: 0 auto var(--s-4); }
.rsvp-thanks h2 { font-size: 2.4rem; }
.rsvp-thanks p { color: var(--brown-soft); margin: var(--s-3) 0 var(--s-6); }
/* Une fois la réponse envoyée, l'introduction et la date limite ne servent plus */
.rsvp-sent .page-hero,
.rsvp-sent .rsvp-deadline { display: none; }
.rsvp-sent main { min-height: 70vh; padding-top: var(--s-8); }

/* ---------- Pied de page ---------- */

.site-footer {
  text-align: center;
  padding: var(--s-7) 0;
  border-top: 1px solid var(--sand);
  color: var(--brown-soft);
  font-size: 1.1rem;
}
.site-footer .names { display: block; font-size: 1.25rem; margin-bottom: var(--s-2); }
.site-footer .ball { display: block; margin: var(--s-4) auto 0; }

/* ---------- Petit secret ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--s-6);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: max-content;
  max-width: calc(100% - 2 * var(--s-4));
  padding: var(--s-3) var(--s-5);
  border-radius: 999px;
  background: var(--brown);
  color: var(--cream);
  font-size: 1.1rem;
  line-height: 1.4;
  box-shadow: var(--shadow);
  transform: translate(-50%, 160%);
  transition: transform 0.45s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.show { transform: translate(-50%, 0); }
.toast .ball { border-color: var(--gold-light); }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(16px); 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; } }

/* ---------- Accessibilité ---------- */

/* Les liens sont toujours soulignés : on les repère sans dépendre de la couleur */
a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
strong { font-weight: 500; }

/* Contour visible quand on navigue au clavier */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Choix sélectionné : coche + bordure épaisse, pas seulement une couleur */
.choice input:checked + span { border-width: 2px; padding: calc(var(--s-3) - 1px) calc(var(--s-4) - 1px); font-weight: 500; }
.chip input:checked + span { padding: 8px 15px; }
.choice input:checked + span::before { content: "\2713"; font-weight: 500; color: var(--gold-text); }

/* Champs oubliés après un envoi : bordure épaisse et pictogramme, en plus du message */
.tried :invalid:not(fieldset) { border: 2px solid var(--error); }
.tried input:invalid:not([type="radio"]):not([type="checkbox"]) {
  padding-right: 40px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%23a0524a'/%3E%3Cpath d='M10 5v6' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.5' r='1.2' fill='%23fff'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
}
.form-error { font-weight: 500; }
.form-error:not(:empty)::before { content: "\26A0\FE0E  "; }

/* ---------- Cadres photo adaptés au portrait comme au paysage ---------- */
/* Dès qu'une vraie photo est en place, le cadre prend sa forme au lieu d'un format imposé */
.photo:has(img),
.photo.arch:has(img) { aspect-ratio: auto; }
.photo:has(img) img { height: auto; }

/* Notre histoire : paysage sur toute la largeur, portrait centré et limité en hauteur */
.chapter .photo:has(img) { justify-self: center; width: fit-content; max-width: 100%; }
.chapter .photo:has(img) img { width: auto; max-width: 100%; max-height: 460px; }

/* Galerie en arches : chaque arche suit la photo, sans devenir démesurée */
.gallery .photo:has(img) img { width: 100%; max-height: 520px; object-fit: cover; }

/* Écran d'accès */
.gate-card .gate-photo:has(img) img { max-height: 220px; object-fit: cover; }

/* La grande photo de fin reste un bandeau : la photo est recadrée (paysage conseillé) */
.photo-band .photo:has(img) { aspect-ratio: 21 / 9; }
.photo-band .photo:has(img) img { height: 100%; }
@media (max-width: 600px) { .photo-band .photo:has(img) { aspect-ratio: 4 / 5; } }