:root {
  --color-bg: #f7f3ee;
  --color-bg-muted: #f0e7dd;
  --color-bg-soft: #faf6f1;
  --color-text: #3b3026;
  --color-accent: #b8875b;
  --color-accent-soft: #d0aa80;
  --color-olive: #7b8b52;
  --color-border: rgba(102, 77, 58, 0.18);
  --color-card: rgba(255, 255, 255, 0.92);

  --font-serif: "Cormorant Garamond", "Playfair Display", "DM Serif Display",
    Georgia, "Times New Roman", serif;
  --font-script: "Great Vibes", "Cormorant Garamond", cursive;

  --radius-soft: 18px;
  --radius-pill: 999px;

  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.08);
  --transition-fast: 180ms ease-out;
  --transition-soft: 260ms ease;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at top left, #fefaf5 0, #f3ebdf 40%, #f7f3ee 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

main {
  background: transparent;
}

.container {
  width: min(1120px, 100% - 3rem);
  margin: 0 auto;
}

.section {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.section-muted {
  background: linear-gradient(
    135deg,
    rgba(247, 243, 238, 0.9),
    rgba(238, 227, 213, 0.9)
  );
}

.section-inner {
  position: relative;
  z-index: 1;
}

.section-heading {
  margin-bottom: 3rem;
}

.section-heading.center {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.section-heading h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 3vw, 2.7rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-intro {
  margin-top: 0.75rem;
  color: rgba(59, 48, 38, 0.8);
}

.overline {
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.78rem;
  color: rgba(59, 48, 38, 0.6);
  margin: 0 0 0.5rem;
}

.lead {
  font-size: 1.1rem;
  line-height: 1.8;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* Hero */

.hero {
  position: relative;
  min-height: 100vh;
  color: #fdfaf6;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #1a120c;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.04);
  will-change: transform;
  transition: transform 18s ease-out;
}

.hero:hover .hero-video {
  transform: scale(1.06);
}

.hero-media-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(224, 204, 175, 0.7), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(20, 15, 10, 0.85), transparent 60%);
  mix-blend-mode: soft-light;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fdf8f0;
  padding: 5rem 0 3.5rem;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.78rem;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 1s 0.1s forwards ease-out;
}

.hero-names {
  font-size: clamp(3.4rem, 6vw, 4.6rem);
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 1.1s 0.25s forwards ease-out;
}

.hero-subtitle {
  margin-top: 1.25rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 1s 0.45s forwards ease-out;
}

.hero-scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 3.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 1s 0.65s forwards ease-out;
}

.hero-scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(
    to bottom,
    rgba(250, 244, 235, 0),
    rgba(250, 244, 235, 0.8)
  );
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(250, 244, 235, 0),
    rgba(250, 244, 235, 1)
  );
  transform: translateY(-100%);
  animation: scrollPulse 1.8s infinite ease-out;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transition-soft),
    color var(--transition-soft), border-color var(--transition-soft),
    box-shadow var(--transition-soft), transform 140ms ease-out;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    #b8875b,
    #8d6a4b
  );
  color: #fdf8f0;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 40px rgba(94, 66, 40, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 48px rgba(94, 66, 40, 0.45);
}

.btn-outline {
  border-color: rgba(59, 48, 38, 0.24);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(14px);
}

.btn-outline:hover {
  background: rgba(253, 248, 241, 0.9);
  border-color: rgba(59, 48, 38, 0.4);
}

/* Welcome */

.section-welcome {
  background: radial-gradient(circle at top left, #fdf7ee 0, #f5ece1 45%, #f7f3ee 100%);
}

.welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 3rem;
  align-items: center;
}

.signature-block {
  text-align: right;
}

.signature-label {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(59, 48, 38, 0.6);
}

.signature {
  margin: 0.4rem 0 0;
  font-size: 2rem;
}

/* Countdown */

.section-countdown {
  text-align: center;
}

.countdown {
  display: inline-flex;
  align-items: stretch;
  justify-content: center;
  gap: 1.4rem;
  padding: 1.5rem 2.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(139, 118, 95, 0.35);
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.8), rgba(243, 234, 222, 0.9));
  box-shadow: 0 18px 50px rgba(145, 118, 90, 0.35);
  margin-top: 2.4rem;
  position: relative;
}

.countdown::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.countdown-item {
  min-width: 70px;
}

.countdown-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.1rem;
  letter-spacing: 0.08em;
}

.countdown-label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(59, 48, 38, 0.6);
}

.countdown-separator {
  align-self: center;
  opacity: 0.28;
}

/* RSVP */

.section-rsvp {
  background: radial-gradient(circle at top, #f9f4ed 0, #eee0d0 40%, #f3ebe0 80%);
}

.rsvp-wrapper {
  display: flex;
  justify-content: center;
}

.envelope {
  position: relative;
  max-width: 560px;
  width: 100%;
  perspective: 2000px;
}

.envelope-body {
  background: radial-gradient(circle at top left, #fdf8f1 0, #f5e9dd 60%, #f0e3d5 100%);
  border-radius: 0 0 var(--radius-soft) var(--radius-soft);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(155, 130, 103, 0.46);
  padding: 2.4rem 2.6rem 2.6rem;
  position: relative;
  overflow: hidden;
}

.envelope-body::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.envelope-flap {
  position: absolute;
  left: 0;
  right: 0;
  top: -56px;
  height: 160px;
  background: linear-gradient(180deg, #f6e5d4 0%, #e8d1bc 55%, #f3e3d1 100%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border-top-left-radius: var(--radius-soft);
  border-top-right-radius: var(--radius-soft);
  border: 1px solid rgba(155, 130, 103, 0.46);
  border-bottom: none;
  transform-origin: top center;
  transform: rotateX(16deg);
  box-shadow: 0 20px 35px rgba(85, 61, 40, 0.4);
}

.rsvp-form {
  position: relative;
  z-index: 1;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-inline {
  display: flex;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  color: rgba(59, 48, 38, 0.7);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(161, 138, 116, 0.5);
  background: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.95rem;
  color: inherit;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background-color var(--transition-fast);
}

textarea {
  border-radius: 18px;
  resize: vertical;
  min-height: 96px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(184, 135, 91, 0.85);
  box-shadow: 0 0 0 1px rgba(184, 135, 91, 0.35);
  background: #fefbf7;
}

.form-note {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: rgba(59, 48, 38, 0.68);
}

.form-success {
  display: none;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--color-olive);
}

.form-success.visible {
  display: block;
}

/* Story */

.section-story p {
  line-height: 1.9;
}

.story-grid {
  display: grid;
  gap: 1.8rem;
  max-width: 800px;
}

/* Timeline */

.section-timeline {
  background: linear-gradient(
    180deg,
    rgba(244, 234, 222, 0.9) 0,
    rgba(247, 243, 238, 0.9) 100%
  );
}

.timeline {
  position: relative;
  margin-top: 3rem;
  max-width: 780px;
  margin-inline: auto;
  padding: 0 1rem 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(121, 97, 73, 0.1),
    rgba(121, 97, 73, 0.35)
  );
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.9rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1.9rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(121, 97, 73, 0.65);
  background: radial-gradient(circle at 30% 0, #fdf7ee, #dac1a4);
  box-shadow: 0 0 0 5px rgba(184, 135, 91, 0.18);
  transform: translateX(-50%);
}

.timeline-item-inner {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.timeline-item:nth-child(even) .timeline-item-inner {
  justify-content: flex-start;
}

.timeline-card-space {
  width: 50%;
  display: flex;
  justify-content: center;
}

.timeline-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(59, 48, 38, 0.7);
  margin: 0 0 0.3rem;
}

.timeline h3 {
  font-family: var(--font-serif);
  margin: 0 0 0.5rem;
}

.timeline p {
  margin: 0;
}

/* Memory lane flip cards */

.memory-card {
  width: 260px;
  height: 340px;
  perspective: 1400px;
  cursor: pointer;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.memory-card:hover .memory-card-inner,
.memory-card.is-flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-face {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(205, 183, 158, 0.9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  padding: 1.3rem 1.4rem;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.memory-card-front {
  align-items: center;
  text-align: center;
  gap: 1.2rem;
}

.memory-card-front .memory-year {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.memory-card-front .memory-label {
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.memory-placeholder {
  flex: 1;
  border-radius: 14px;
  border: 1px dashed rgba(184, 135, 91, 0.45);
  background: linear-gradient(
    135deg,
    rgba(252, 248, 242, 0.9),
    rgba(241, 229, 215, 0.9)
  );
}

.memory-img {
  flex: 1.1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(184, 135, 91, 0.4);
}

.memory-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.02) contrast(1.02);
}

.memory-card-back {
  transform: rotateY(180deg);
  justify-content: flex-start;
  gap: 0.8rem;
}

.memory-card-back p {
  font-size: 0.92rem;
  line-height: 1.7;
}

.memory-hint {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(59, 48, 38, 0.5);
  text-align: center;
}

/* Venue */

.section-venue {
  background: radial-gradient(circle at top, #f7f2eb 0, #f1e5d7 40%, #f7f3ee 100%);
}

.venue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.venue-details {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
}

.venue-details li + li {
  margin-top: 0.4rem;
}

.venue-map-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(181, 153, 121, 0.55);
}

.venue-map-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.venue-map {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(181, 153, 121, 0.5);
}

.venue-map iframe {
  width: 100%;
  height: 260px;
  border: 0;
}

.map-note {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: rgba(59, 48, 38, 0.7);
}

/* Accommodation */

.accommodation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

.accommodation-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  padding: 1.5rem 1.6rem 1.5rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(193, 170, 145, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.accommodation-card h3 {
  font-family: var(--font-serif);
  margin: 0;
  font-size: 1.15rem;
}

.accommodation-card p {
  margin: 0;
  font-size: 0.95rem;
}

/* Gifts */

.section-gifts {
  background: radial-gradient(circle at top left, #f9f1ea 0, #f1e4d7 45%, #f7f3ee 100%);
}

.gifts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.gifts-cta {
  background: rgba(255, 255, 255, 0.93);
  border-radius: 24px;
  padding: 1.8rem 1.7rem;
  border: 1px solid rgba(184, 135, 91, 0.65);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.gifts-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 1.4rem;
}

.gifts-note {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: rgba(59, 48, 38, 0.7);
}

/* FAQ */

.accordion {
  max-width: 720px;
  margin: 0 auto;
}

.accordion-item {
  border-radius: 18px;
  border: 1px solid rgba(176, 152, 126, 0.6);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.1rem;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  font-size: 0.98rem;
  text-align: left;
  cursor: pointer;
}

.accordion-icon {
  font-size: 1.1rem;
  width: 1.4rem;
  text-align: center;
  transition: transform var(--transition-soft);
}

.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.4rem;
  transition: max-height 300ms ease, padding-top 260ms ease,
    padding-bottom 260ms ease;
}

.accordion-item.open .accordion-body {
  padding-top: 0;
  padding-bottom: 1rem;
}

.accordion-body p {
  margin: 0.9rem 0 0.4rem;
  font-size: 0.95rem;
}

/* Contact */

.section-contact {
  background: radial-gradient(circle at top, #f4e7da 0, #efe1d3 45%, #f6f1e9 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.contact-actions {
  text-align: right;
}

.contact-note {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: rgba(59, 48, 38, 0.7);
}

/* Footer */

.footer {
  padding: 1.8rem 0 2.4rem;
  background: #15100c;
  color: rgba(245, 237, 228, 0.8);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.footer-nav {
  display: inline-flex;
  gap: 1.4rem;
}

.footer-nav a {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: rgba(245, 237, 228, 0.8);
}

.footer-nav a:hover {
  color: #ffffff;
}

/* Music toggle */

.music-toggle {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(245, 237, 228, 0.8);
  background: radial-gradient(circle at 30% 0, #fdf7ee, #d9b998);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  backdrop-filter: blur(12px);
  transition: transform 160ms ease-out, box-shadow 200ms ease,
    background 220ms ease, opacity 220ms ease;
}

.music-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.music-toggle.is-off {
  background: radial-gradient(circle at 30% 0, #f3e3d6, #c9b3a0);
  opacity: 0.7;
}

.music-icon {
  font-size: 1.1rem;
  color: #3b3026;
}

.music-toggle.is-off .music-icon {
  opacity: 0.7;
}

/* Entry gate */

.gate-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #f5e8d8 0, #e2d3c1 40%, #d6c7b5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.gate-panel {
  width: min(420px, 100% - 3rem);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 24px;
  padding: 2.4rem 2.2rem 2.2rem;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(190, 163, 132, 0.85);
  text-align: center;
}

.gate-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.gate-subtitle {
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(59, 48, 38, 0.7);
  margin-bottom: 1.6rem;
}

.gate-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(161, 138, 116, 0.6);
  background: rgba(255, 255, 255, 0.96);
  text-align: center;
  letter-spacing: 0.36em;
  text-transform: none;
  font-size: 1rem;
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  outline: none;
  margin-bottom: 0.9rem;
}

.gate-input:focus {
  border-color: rgba(184, 135, 91, 0.9);
  box-shadow: 0 0 0 1px rgba(184, 135, 91, 0.4);
}

.gate-error {
  min-height: 1.2rem;
  font-size: 0.8rem;
  color: #a84545;
  margin-bottom: 1.4rem;
}

.gate-btn {
  width: 100%;
}

.gate-hint {
  margin-top: 1.3rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(59, 48, 38, 0.6);
}

@media (max-width: 540px) {
  .gate-panel {
    padding-inline: 1.6rem;
  }
}

@media (max-width: 540px) {
  .music-toggle {
    right: 1.1rem;
    bottom: 1.2rem;
    width: 42px;
    height: 42px;
  }
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 800ms ease, transform 800ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade-up-slow"] {
  transform: translateY(40px);
}

[data-reveal="fade-up-soft"] {
  transform: translateY(20px);
}

[data-reveal-delay="1"] {
  transition-delay: 120ms;
}

[data-reveal-delay="2"] {
  transition-delay: 220ms;
}

[data-reveal-delay="3"] {
  transition-delay: 320ms;
}

[data-reveal-delay="4"] {
  transition-delay: 420ms;
}

[data-reveal-delay="5"] {
  transition-delay: 520ms;
}

/* Animations */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

/* Responsive */

@media (max-width: 900px) {
  .hero-content {
    padding-top: 4.2rem;
  }

  .welcome-grid,
  .venue-grid,
  .gifts-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .signature-block,
  .contact-actions {
    text-align: left;
  }

  .venue-map iframe {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 4.2rem 0;
  }

  .container {
    width: min(100% - 2.2rem, 760px);
  }

  .welcome-grid {
    gap: 2.2rem;
  }

  .countdown {
    flex-wrap: wrap;
    padding: 1.3rem 1.7rem;
    row-gap: 1rem;
  }

  .accommodation-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gifts-grid {
    gap: 2rem;
  }

  .envelope-body {
    padding: 2rem 1.6rem 2.1rem;
  }
}

@media (max-width: 540px) {
  .hero-names {
    font-size: 3rem;
  }

  .hero-subtitle {
    letter-spacing: 0.16em;
  }

  .timeline {
    padding: 0;
  }

  .timeline-line {
    left: 0.7rem;
  }

  .timeline-item {
    margin-left: 0.4rem;
  }

  .timeline-item-inner {
    justify-content: flex-start;
  }

  .timeline-card-space {
    width: 100%;
    justify-content: flex-start;
  }

  .memory-card {
    width: 230px;
    height: 310px;
  }

  .footer-inner {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .footer-nav {
    flex-wrap: wrap;
  }
}

/* =====================================================================
   THÈME « BEIGE & BLANC, PAPIER GAUFRÉ »
   (ce bloc surcharge les couleurs d'origine, plus haut dans le fichier)
   ===================================================================== */

:root {
  --white: #fdfbf7;
  --paper: #f6efe4;
  --beige: #efe5d6;
  --beige-deep: #e4d6c2;
  --caramel: #a87a50;
  --caramel-deep: #8c6440;
  --ink: #3b3026;
  --ink-soft: rgba(59, 48, 38, 0.7);
  --line: rgba(140, 100, 64, 0.2);
  --color-text: var(--ink);
  --color-olive: var(--caramel-deep);
  --font-sans: "Jost", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --paper-relief: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.035' numOctaves='5' seed='3' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23ffffff' surfaceScale='1.6' diffuseConstant='1.08'%3E%3CfeDistantLight azimuth='225' elevation='58'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.75;
  background: var(--white);
  color: var(--ink);
}

/* Texture de papier en relief sur tout le fond */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--paper-relief);
  mix-blend-mode: multiply;
  opacity: 0.55;
}

main,
footer {
  position: relative;
  z-index: 1;
}

strong {
  font-weight: 500;
}

/* Fonds de sections transparents pour laisser voir le papier :
   blanc, et une section sur deux légèrement beige */
.section,
.section-welcome,
.section-rsvp,
.section-venue,
.section-gifts,
.section-contact,
.section-story {
  background: transparent;
}

.section-muted,
.section-timeline {
  background: rgba(236, 224, 207, 0.5);
}

/* Titres « pressés » dans le papier + ornement sous chaque titre */
.section-heading h2 {
  color: #4a3b2e;
  margin: 0.2rem 0 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85), 0 -1px 0 rgba(90, 65, 40, 0.12);
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 190px;
  height: 26px;
  margin-top: 1rem;
  background: url("ornement.svg") no-repeat left center / contain;
}

.section-heading.center h2::after {
  margin-inline: auto;
  background-position: center;
}

.overline {
  color: var(--caramel);
  font-weight: 400;
}

.section-intro,
.signature-label,
.countdown-label,
.memory-hint,
.map-note,
.gifts-note,
.contact-note,
.form-note,
label,
.timeline-kicker {
  color: var(--ink-soft);
}

.script,
.signature {
  color: var(--caramel);
}

h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--ink);
}

/* Hero */
.hero-media-overlay {
  mix-blend-mode: normal;
  background: linear-gradient(180deg, rgba(28, 20, 13, 0.25) 0%, rgba(28, 20, 13, 0.45) 55%, rgba(28, 20, 13, 0.6) 100%);
}

.hero-names {
  color: #fffaf3;
}

.hero-date {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.hero-subtitle,
.hero-kicker,
.hero-scroll {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* Boutons */
.btn {
  font-family: var(--font-sans);
  font-weight: 400;
}

.btn-primary {
  background: var(--caramel);
  color: #fffaf3;
  border-color: var(--caramel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 26px rgba(120, 80, 45, 0.25);
}

.btn-primary:hover {
  background: var(--caramel-deep);
}

/* Cartes : papier blanc légèrement enfoncé dans le fond */
.accommodation-card,
.program-card,
.info-card,
.gifts-cta,
.venue-map-card,
.accordion-item,
.memory-card-face,
.gate-panel {
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid rgba(140, 100, 64, 0.16);
  box-shadow: inset 0 2px 6px rgba(90, 65, 40, 0.1), inset 0 -1px 0 rgba(255, 255, 255, 0.9), 0 1px 0 rgba(255, 255, 255, 0.8);
}

.memory-card-face {
  box-shadow: 0 14px 34px rgba(70, 50, 30, 0.1);
}

.accommodation-card h3 {
  font-size: 1.3rem;
}

.venue-map,
.memory-img {
  border-color: var(--line);
}

.memory-placeholder {
  border-color: var(--beige-deep);
  background: linear-gradient(135deg, var(--paper), var(--beige));
}

/* Compte à rebours */
.countdown {
  background: rgba(255, 253, 249, 0.75);
  border: 1px solid rgba(140, 100, 64, 0.16);
  box-shadow: inset 0 2px 8px rgba(90, 65, 40, 0.14), 0 1px 0 #fff;
}

.countdown-value {
  color: #4a3b2e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Programme */
.program-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem;
  max-width: 900px;
  margin: 0 auto;
}

.program-card {
  border-radius: 20px;
  padding: 2rem 2.2rem;
}

.program-place-kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--caramel);
}

.program-card h3 {
  margin: 0.3rem 0 0.4rem;
  font-size: 1.8rem;
}

.program-desc {
  margin: 0 0 1.4rem;
  color: var(--ink-soft);
}

.program-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.program-steps li {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.program-time {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--caramel);
  min-width: 4.2rem;
}

/* RSVP */
.envelope-body {
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid rgba(140, 100, 64, 0.16);
  border-radius: var(--radius-soft);
  box-shadow: inset 0 2px 6px rgba(90, 65, 40, 0.1), 0 1px 0 #fff;
}

.envelope-body::before {
  display: none;
}

input,
select,
textarea {
  border-color: rgba(140, 100, 64, 0.28);
  background: #fffdf9;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(168, 122, 80, 0.18);
  background: #ffffff;
}

.field-help {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.guests-block.is-hidden {
  display: none;
}

.guests-block .field-help {
  margin: 0 0 0.9rem;
}

.guest-list {
  display: grid;
  gap: 0.7rem;
}

.guest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 36px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(239, 229, 214, 0.45);
}

.guest-remove {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.guest-remove:hover {
  color: var(--ink);
  border-color: var(--caramel);
}

.guest-child-menu {
  grid-column: 1 / -1;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.2rem;
  padding: 0.2rem 0.4rem 0;
  font-size: 0.9rem;
}

.guest-row.is-child .guest-child-menu {
  display: flex;
}

.guest-child-menu > span {
  font-weight: 400;
  color: var(--caramel);
}

label.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  cursor: pointer;
}

label.radio input {
  width: auto;
  accent-color: var(--caramel);
}

.btn-add {
  margin-top: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--caramel);
  background: transparent;
  color: var(--caramel);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-add:hover {
  background: rgba(239, 229, 214, 0.6);
}

.form-success {
  color: var(--caramel-deep);
}

/* Infos pratiques */
.infos-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card {
  border-radius: 20px;
  padding: 1.8rem 2rem;
}

.info-card h3 {
  margin-top: 0;
}

.info-theme {
  margin: -0.4rem 0 0.6rem;
  font-size: 2rem;
  line-height: 1.2;
}

/* « Bientôt » */
.soon {
  margin-top: auto !important;
  align-self: flex-start;
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-pill);
  background: rgba(168, 122, 80, 0.1);
  color: var(--caramel-deep);
  font-size: 0.78rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.center-note {
  margin-top: 2rem;
  text-align: center;
  color: var(--ink-soft);
}

.center-note a,
.accordion-body a {
  color: var(--caramel-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.center-block {
  margin-inline: auto;
  text-align: center;
}

/* Timeline */
.timeline-line {
  background: linear-gradient(to bottom, rgba(140, 100, 64, 0.1), rgba(140, 100, 64, 0.4));
}

.timeline-item::before {
  border-color: var(--caramel);
  background: #fffdf9;
  box-shadow: 0 0 0 5px rgba(168, 122, 80, 0.15);
}

/* FAQ */
.accordion-header {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink);
}

.accordion-icon {
  color: var(--caramel);
}

/* Pied de page */
.footer {
  background: #3b3026;
  color: rgba(246, 239, 228, 0.82);
}

/* Musique */
.music-toggle {
  background: #fffdf9;
  border-color: var(--line);
}

.music-toggle.is-off {
  background: var(--beige);
}

.music-icon {
  color: var(--caramel);
}

/* Écran d'accès */
.gate-overlay {
  background: var(--paper-relief), radial-gradient(circle at top, #fffdf9 0, var(--paper) 55%, var(--beige) 100%);
  background-blend-mode: multiply, normal;
}

.gate-panel {
  box-shadow: 0 26px 60px rgba(70, 50, 30, 0.16);
}

.gate-panel .ornament {
  display: block;
  width: 150px;
  height: 22px;
  margin: 0 auto 1rem;
  background: url("ornement.svg") no-repeat center / contain;
}

.gate-input:focus {
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(168, 122, 80, 0.18);
}

/* Sélecteur de langue */
.lang-switch {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 0.2rem 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: var(--radius-pill);
}

.lang-btn.is-active {
  background: var(--caramel);
  color: #ffffff;
}

.lang-sep {
  color: var(--line);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .program-grid,
  .infos-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .program-card {
    padding: 1.6rem 1.4rem;
  }
}

@media (max-width: 540px) {
  .guest-row {
    grid-template-columns: minmax(0, 1fr) 36px;
  }

  .guest-type {
    grid-column: 1 / 2;
    grid-row: 2;
  }
}

/* =====================================================================
   ANIMATION D'OUVERTURE : « LE CODE DEVIENT LA DATE »
   1. le papier recouvre doucement la carte, les chiffres tapés restent en place
   2. les 4 chiffres glissent vers leur place dans la date
   3. tous les chiffres tournent comme un compteur et s'arrêtent sur 24 · 07 · 2027
   4. une fine ligne dorée coupe le papier, les deux moitiés s'écartent sur la vidéo
   Uniquement des transform/opacity : fluide sur téléphone.
   ===================================================================== */

.gate-overlay {
  transition: opacity 0.8s ease;
}

.gate-overlay.is-splitting {
  background: transparent;
}

.gate-overlay.is-splitting .gate-panel,
.gate-overlay.is-splitting .lang-switch {
  visibility: hidden;
}

.gate-overlay.is-opening .code-box {
  color: transparent;
  transition: none;
}

.gate-overlay.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.reveal-stage {
  position: fixed;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-overlay.is-opening .reveal-stage {
  visibility: visible;
}

/* chaque moitié est une copie plein écran, découpée à la ligne --split */
.reveal-half {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  will-change: transform;
}

/* le papier de chaque moitié apparaît en fondu par-dessus la carte du code */
.reveal-half::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper-relief), radial-gradient(circle at top, #fffdf9 0, var(--paper) 55%, var(--beige) 100%);
  background-blend-mode: multiply, normal;
  opacity: 0;
  transition: opacity 0.75s ease;
}

.reveal-stage.paper-on .reveal-half::before {
  opacity: 1;
}

.reveal-left {
  clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0);
}

.reveal-right {
  clip-path: inset(0 0 0 var(--split, 50%));
}

.reveal-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reveal-date {
  display: flex;
  align-items: center;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 11vw, 5.6rem);
  color: #4a3b2e;
  font-variant-numeric: lining-nums tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85), 0 -1px 0 rgba(90, 65, 40, 0.12);
}

/* une case = une fenêtre d'un chiffre ; la bande de chiffres défile dedans */
.reveal-date .slot {
  display: block;
  width: 0.6em;
  height: 1.15em;
  overflow: hidden;
  text-align: center;
  transform-origin: center;
}

.reveal-date .strip {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
}

.reveal-date .strip span {
  display: block;
  height: 1.15em;
  line-height: 1.15em;
}

.reveal-date .slot.is-late,
.reveal-date .sep {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.reveal-stage.others-on .reveal-date .slot.is-late,
.reveal-stage.others-on .reveal-date .sep {
  opacity: 1;
}

.reveal-date .sep {
  display: block;
  width: 0.7em;
  text-align: center;
  color: var(--caramel);
}

.reveal-caption {
  margin-top: 0.6rem;
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  color: var(--caramel);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal-stage.show-caption .reveal-caption {
  opacity: 1;
  transform: none;
}

/* la fine ligne dorée qui « coupe » le papier */
.reveal-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split, 50%);
  width: 1px;
  margin-left: -0.5px;
  background: linear-gradient(180deg, transparent, #c9a36f 20%, #a87a50 50%, #c9a36f 80%, transparent);
  box-shadow: 0 0 14px rgba(201, 163, 111, 0.75);
  transform: scaleY(0);
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.5s ease;
}

.reveal-stage.show-seam .reveal-seam {
  transform: scaleY(1);
}

/* ouverture : les deux moitiés s'écartent lentement */
.reveal-left,
.reveal-right {
  transition: transform 1.4s cubic-bezier(0.7, 0, 0.25, 1);
}

.reveal-stage.is-splitting .reveal-left {
  transform: translateX(calc(-1 * var(--split, 50%) - 30px));
}

.reveal-stage.is-splitting .reveal-right {
  transform: translateX(calc(100% - var(--split, 50%) + 30px));
}

.reveal-stage.is-splitting .reveal-seam {
  opacity: 0;
}

/* ombre douce sur les bords coupés pendant l'ouverture */
.reveal-left::after,
.reveal-right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.reveal-left::after {
  left: calc(var(--split, 50%) - 30px);
  background: linear-gradient(90deg, transparent, rgba(70, 50, 30, 0.14));
}

.reveal-right::after {
  left: var(--split, 50%);
  background: linear-gradient(270deg, transparent, rgba(70, 50, 30, 0.14));
}

.reveal-stage.is-splitting .reveal-left::after,
.reveal-stage.is-splitting .reveal-right::after {
  opacity: 1;
}

/* =====================================================================
   SAISIE DU CODE : 4 cases, chiffres affichés en clair
   (même police que l'animation qui suit : les chiffres « continuent »)
   ===================================================================== */

.gate-label {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.code-field {
  position: relative;
  width: fit-content;
  margin: 0 auto 0.4rem;
  cursor: text;
}

/* le vrai champ reste invisible par-dessus les cases (clavier numérique sur téléphone) */
.code-field .gate-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  color: transparent;
  caret-color: transparent;
  font-size: 16px; /* évite le zoom automatique sur iPhone */
  letter-spacing: 0;
  outline: none;
}

.code-boxes {
  display: flex;
  gap: 0.9rem;
}

.code-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.9rem;
  border-bottom: 1.5px solid rgba(140, 100, 64, 0.3);
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 2.6rem;
  line-height: 1;
  color: #4a3b2e;
  font-variant-numeric: lining-nums tabular-nums;
  transition: border-color 0.25s ease;
}

.code-box.is-filled {
  border-bottom-color: var(--caramel);
}

.code-box.is-current {
  border-bottom-color: var(--caramel);
}

/* petit curseur qui clignote dans la case en cours */
.code-box.is-current::after {
  content: "";
  width: 1.5px;
  height: 1.6rem;
  background: var(--caramel);
  animation: codeCaret 1s steps(1) infinite;
}

.code-box.is-pop {
  animation: codePop 0.28s ease;
}

.code-field.is-wrong .code-boxes {
  animation: codeShake 0.42s ease;
}

.code-field.is-wrong .code-box {
  color: #a84545;
  border-bottom-color: #a84545;
}

@keyframes codeCaret {
  50% {
    opacity: 0;
  }
}

@keyframes codePop {
  0% {
    transform: translateY(6px);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

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

.gate-error {
  margin-top: 0.6rem;
}

@media (max-width: 400px) {
  .code-boxes {
    gap: 0.6rem;
  }

  .code-box {
    width: 2.7rem;
    height: 3.5rem;
    font-size: 2.3rem;
  }
}

/* Rouleaux « casino » : léger flou pendant qu'ils tournent, petit choc à l'arrêt */
.reveal-date .slot.is-spinning .strip {
  filter: blur(0.6px);
}

.reveal-date .slot.is-stopped {
  animation: reelStop 0.32s cubic-bezier(0.3, 0, 0.3, 1);
}

@keyframes reelStop {
  0% {
    transform: translateY(0.09em);
  }
  45% {
    transform: translateY(-0.03em);
  }
  100% {
    transform: none;
  }
}

/* Message d'erreur du code : une phrase drôle, en italique, qui apparaît en douceur */
.gate-error {
  min-height: 2.8em;
  max-width: 300px;
  margin: 0.9rem auto 0.4rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.35;
  color: #9a5a3c;
  animation: gateErrorIn 0.4s ease;
}

.gate-error:empty {
  animation: none;
}

@keyframes gateErrorIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* =====================================================================
   BOUTON SON : en haut à droite, dans la barre FR | IT
   ===================================================================== */

.lang-switch .music-toggle {
  position: static;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0 0 0 0.1rem;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  opacity: 1;
  color: var(--caramel);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch .music-toggle:hover {
  transform: none;
  box-shadow: none;
  background: rgba(168, 122, 80, 0.12);
}

.icon-sound {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sound path:first-child {
  fill: currentColor;
  stroke: none;
}

.icon-sound .mute {
  display: none;
}

/* son coupé : on barre le haut-parleur */
.lang-switch .music-toggle.is-off {
  background: transparent;
  color: var(--ink-soft);
}

.music-toggle.is-off .icon-sound .wave {
  display: none;
}

.music-toggle.is-off .icon-sound .mute {
  display: inline;
}

/* petites ondes qui « respirent » quand la musique joue */
.music-toggle:not(.is-off) .icon-sound .wave {
  animation: soundWave 1.6s ease-in-out infinite;
}

.music-toggle:not(.is-off) .icon-sound .wave + .wave {
  animation-delay: 0.3s;
}

@keyframes soundWave {
  50% {
    opacity: 0.35;
  }
}

/* =====================================================================
   ACCUEIL PERSONNALISÉ, ADRESSES, AGENDA, BOUTON RSVP FLOTTANT
   ===================================================================== */

/* « Bienvenue, famille … » au-dessus des prénoms, sur la vidéo */
.hero-welcome {
  margin: 0 0 1.4rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 3.2vw, 1.6rem);
  color: #fffaf3;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeUp 1.2s 0.4s forwards ease-out;
}

.hero-welcome::after {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  margin: 0.9rem auto 0;
  background: rgba(255, 250, 243, 0.6);
}

/* Adresse + liens d'itinéraire dans les cartes du programme */
.place {
  margin-top: 1.3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.place-address {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.place-address::before {
  content: "⌖ ";
  color: var(--caramel);
}

.place-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.place-link {
  padding: 0.38rem 0.95rem;
  border: 1px solid rgba(168, 122, 80, 0.45);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--caramel-deep);
  background: rgba(255, 253, 249, 0.7);
  transition: background 0.2s ease, color 0.2s ease;
}

.place-link:hover {
  background: var(--caramel);
  color: #fffaf3;
}

.map-place {
  border-top: 0;
  margin-top: 0.8rem;
  padding-top: 0;
}

.map-place .map-note {
  margin: 0 0 0.5rem;
}

/* Ajouter à mon agenda */
.calendar-actions {
  margin-top: 2.6rem;
  text-align: center;
}

.calendar-title {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
}

.calendar-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.cal-btn {
  font-size: 0.75rem;
}

.cal-btn-ghost {
  border: 1px solid var(--caramel);
  color: var(--caramel-deep);
  background: rgba(255, 253, 249, 0.7);
}

.cal-btn-ghost:hover {
  background: rgba(239, 229, 214, 0.8);
}

/* Bouton « Répondre à l'invitation » flottant : téléphone uniquement */
.rsvp-float {
  display: none;
}

@media (max-width: 768px) {
  .rsvp-float {
    display: block;
    position: fixed;
    left: 50%;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 45;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-pill);
    background: var(--caramel);
    color: #fffaf3;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 12px 30px rgba(90, 60, 35, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .rsvp-float.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }
}

/* les adresses s'alignent en bas des deux cartes du programme */
.program-card {
  display: flex;
  flex-direction: column;
}

.program-card .place {
  margin-top: auto;
}

.program-card .program-steps {
  margin-bottom: 1.3rem;
}

/* =====================================================================
   MENU VERTICAL À DROITE
   Une fine ligne avec des points ; le nom de la section en cours est affiché,
   tous les noms apparaissent au survol.
   ===================================================================== */

.side-nav {
  position: fixed;
  right: 1.4rem;
  top: 50%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  transform: translate(12px, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.side-nav.is-visible {
  opacity: 1;
  transform: translate(0, -50%);
  pointer-events: auto;
}

/* la fine ligne verticale qui relie les points */
.side-nav::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 0.8rem;
  bottom: 0.8rem;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(168, 122, 80, 0.35) 12%, rgba(168, 122, 80, 0.35) 88%, transparent);
}

.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.38rem 0;
}

.side-dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(168, 122, 80, 0.6);
  background: var(--white);
  transition: transform 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

.side-label {
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 4px 14px rgba(70, 50, 30, 0.08);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.35s ease;
  pointer-events: none;
}

/* section en cours : point plein + nom visible */
.side-link.is-active .side-dot {
  background: var(--caramel);
  border-color: var(--caramel);
  transform: scale(1.35);
}

.side-link.is-active .side-label {
  opacity: 1;
  transform: none;
  color: var(--caramel-deep);
}

/* au survol du menu : tous les noms apparaissent */
@media (hover: hover) {
  .side-nav:hover .side-label {
    opacity: 1;
    transform: none;
  }

  .side-link:hover .side-dot {
    border-color: var(--caramel);
    transform: scale(1.25);
  }

  .side-link:hover .side-label {
    color: var(--ink);
  }
}

/* téléphone : menu plus discret, seul le nom de la section en cours s'affiche */
@media (max-width: 768px) {
  .side-nav {
    right: 0.55rem;
  }

  .side-link {
    padding: 0.32rem 0;
    gap: 0.5rem;
  }

  .side-dot {
    width: 7px;
    height: 7px;
  }

  .side-nav::before {
    right: 3px;
  }

  .side-label {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
  }
}

/* laisse la place au menu vertical sur les écrans d'ordinateur moyens */
@media (min-width: 769px) and (max-width: 1320px) {
  .container {
    width: min(1120px, 100% - 9rem);
  }
}

/* sur téléphone, un peu de marge à droite pour les points du menu */
@media (max-width: 768px) {
  main .container {
    width: min(100% - 3.4rem, 760px);
    margin-left: 1.1rem;
  }
}

/* =====================================================================
   PASSE LISIBILITÉ + PREMIUM
   ===================================================================== */

:root {
  --ink-soft: rgba(59, 48, 38, 0.8);
  --foil-text: linear-gradient(110deg, #7a5a2e 0%, #b8955c 32%, #8a6838 58%, #c2a06a 80%, #9a7743 100%);
  --paper-radius: 4px;
}

/* ---------- 1. LISIBILITÉ ---------- */

/* texte courant : plus gros, moins fin */
body {
  font-size: 1.125rem; /* 18 px */
  font-weight: 400;
  line-height: 1.75;
}

/* le relief du papier un peu plus discret pour que le texte ressorte */
body::before {
  opacity: 0.42;
}

/* intros en encre pleine (plus de gris) */
.section-intro {
  color: var(--ink);
  font-size: 1.05rem;
}

/* petits titres : caramel plus foncé, un peu plus grands */
.overline,
.program-place-kicker,
.card-kicker {
  color: var(--caramel-deep);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.24em;
}

.countdown-label,
label,
.memory-hint,
.side-label {
  font-weight: 400;
}

.countdown-label {
  font-size: 0.78rem;
}

/* texte de bienvenue : comme une citation, en grand */
.section-welcome .lead {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
}

/* Notre histoire : une colonne de lecture centrée, comme un livre */
.section-story .section-heading {
  text-align: center;
}

.section-story .section-heading h2::after {
  margin-inline: auto;
  background-position: center;
}

.section-story .story-grid,
.section-program .story-grid {
  max-width: 640px;
  margin-inline: auto;
}

.section-story .story-grid p {
  line-height: 1.85;
}

/* première lettre de l'histoire en lettrine */
.section-story .story-grid p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  font-family: var(--font-script);
  font-size: 3.6em;
  line-height: 0.8;
  color: var(--caramel);
}

/* ---------- 2. PREMIUM : TITRES AVEC UN MOT MANUSCRIT ---------- */

.section-heading h2 {
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 400;
  font-size: clamp(2.3rem, 4.6vw, 3.5rem);
  line-height: 1.15;
}

.section-heading h2 em {
  font-family: var(--font-script);
  font-style: normal;
  font-weight: 400;
  font-size: 1.22em;
  letter-spacing: 0;
  padding: 0 0.06em;
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

/* ---------- 2. PREMIUM : COINS « PAPETERIE » + DOUBLE FILET ---------- */

.accommodation-card,
.program-card,
.info-card,
.gifts-cta,
.venue-map-card,
.accordion-item,
.envelope-body,
.countdown {
  position: relative;
  border-radius: var(--paper-radius);
}

.accommodation-card::after,
.program-card::after,
.info-card::after,
.gifts-cta::after,
.venue-map-card::after,
.envelope-body::after,
.countdown::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(168, 122, 80, 0.22);
  border-radius: 2px;
  pointer-events: none;
}

.countdown::before {
  display: none;
}

.memory-card-face,
.venue-map,
.memory-img,
.gate-panel {
  border-radius: var(--paper-radius);
}

/* champs et boutons : coins nets, plus « carton d'invitation » */
input,
select,
textarea,
.guest-row,
.guest-remove {
  border-radius: 3px;
}

.btn,
.btn-add,
.place-link,
.soon {
  border-radius: 2px;
}

.code-box {
  border-radius: 0;
}

/* ---------- 2. PREMIUM : TOUCHE DE DORURE ---------- */

.signature,
.countdown-value,
.program-time,
.info-theme,
.reveal-caption {
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

/* petite ligne dorée en haut des cartes du programme et des infos */
.program-card::before,
.info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--foil-text);
  border-radius: var(--paper-radius) var(--paper-radius) 0 0;
}

/* bouton principal : caramel avec un léger reflet doré au survol */
.btn-primary {
  background: linear-gradient(110deg, #9a6c44, #b8875b 45%, #9a6c44);
  background-size: 220% 100%;
  background-position: 0 0;
  transition: background-position 0.7s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background-position: 100% 0;
}

/* ---------- Téléphone ---------- */
@media (max-width: 600px) {
  body {
    font-size: 1.0625rem; /* 17 px */
  }

  .section-heading h2 {
    font-size: clamp(2rem, 8.5vw, 2.5rem);
  }
}

/* =====================================================================
   BARRE DU HAUT : COMPTE À REBOURS
   Apparaît en glissant depuis le haut une fois la vidéo passée.
   ===================================================================== */

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  background: var(--paper-relief), rgba(251, 247, 240, 0.9);
  background-blend-mode: multiply, normal;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(168, 122, 80, 0.18);
  box-shadow: 0 6px 24px rgba(70, 50, 30, 0.06);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
}

.top-bar.is-visible {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

/* la barre ne doit jamais passer au-dessus de l'écran du code */
body.is-locked .top-bar {
  display: none;
}

.top-bar-names {
  position: absolute;
  left: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-script);
  font-size: 1.7rem;
  line-height: 1;
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.top-countdown {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.tc-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}

.tc-item b {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.45rem;
  font-variant-numeric: lining-nums tabular-nums;
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tc-item span {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tc-sep {
  color: rgba(168, 122, 80, 0.5);
}

/* le sélecteur de langue se centre dans la barre quand elle est là */
.lang-switch {
  transition: top 0.4s ease;
}

body.has-top-bar .lang-switch {
  top: 12px;
}

/* les liens internes ne finissent pas cachés sous la barre */
section[id] {
  scroll-margin-top: 62px;
}

@media (max-width: 900px) {
  .top-bar-names {
    display: none;
  }

  .top-bar {
    justify-content: flex-start;
    padding-left: 1rem;
  }
}

@media (max-width: 480px) {
  .top-bar {
    height: 56px;
  }

  body.has-top-bar .lang-switch {
    top: 9px;
  }

  .top-countdown {
    gap: 0.5rem;
  }

  .tc-sep {
    display: none;
  }

  .tc-item b {
    font-size: 1.2rem;
  }

  .tc-item span {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }
}

/* monogramme « L & L » dans la barre du haut */
.top-bar-names {
  font-size: 2.1rem;
  letter-spacing: 0.02em;
  padding: 0.1em 0.15em;
}

.top-bar-names span {
  display: inline-block;
  margin: 0 0.18em 0 0.12em;
  font-size: 0.8em;
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* monogramme : plus petit, et assez d'espace pour que les boucles de l'écriture ne soient pas coupées */
.top-bar-names {
  font-size: 1.6rem;
  line-height: 1.5;
  padding: 0.1em 0.3em 0.25em 0.2em;
}

/* =====================================================================
   PROGRAMME EN FRISE
   Ordinateur : frise horizontale, une accolade par lieu, la route en pointillés.
   Téléphone : la frise devient verticale.
   ===================================================================== */

.frise-wrap {
  max-width: 1040px;
  margin: 0 auto;
}

.frise-groups,
.frise-addrs {
  display: grid;
  grid-template-columns: 2fr 1fr 4fr;
}

.frise-group {
  position: relative;
  padding-bottom: 0.9rem;
  margin-bottom: 1.4rem;
  text-align: center;
  font-family: var(--font-script);
  font-size: 2.3rem;
  line-height: 1.25;
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* l'accolade sous le nom du lieu */
.frise-group::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 10px;
  border: 1px solid rgba(168, 122, 80, 0.5);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.frise-road {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.4rem;
  padding-bottom: 1.7rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.2;
}

.frise {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

/* la ligne de la frise */
.frise::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3.15rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 122, 80, 0.6) 6%, rgba(168, 122, 80, 0.6) 94%, transparent);
}

/* la route : la ligne devient pointillée entre les deux lieux */
.frise-spacer {
  position: relative;
}

.frise-spacer::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: calc(3.15rem - 1px);
  height: 3px;
  border-top: 1px dashed rgba(168, 122, 80, 0.85);
  background: var(--white);
}

.frise-item {
  position: relative;
  padding: 0 0.3rem;
  text-align: center;
}

.frise-item time {
  display: block;
  height: 2.6rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.25;
  font-variant-numeric: lining-nums tabular-nums;
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.frise-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 13px;
  height: 13px;
  margin: 0.25rem auto 1rem;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--caramel);
  box-shadow: 0 0 0 5px rgba(253, 251, 247, 0.95);
}

.frise-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--caramel);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.frise-road .frise-icon {
  width: 24px;
  height: 24px;
}

.frise-item p {
  margin: 0.4rem 0 0;
  font-size: 0.98rem;
  line-height: 1.35;
}

.frise-addrs {
  margin-top: 2.6rem;
}

.frise-addrs .place,
.frise-m-addr .place {
  margin: 0;
  padding: 0;
  border: 0;
  text-align: center;
}

.frise-addrs .place-links {
  justify-content: center;
}

.frise-m-place,
.frise-m-addr {
  display: none;
}

/* Téléphone : frise verticale */
@media (max-width: 760px) {
  .frise-groups,
  .frise-addrs {
    display: none;
  }

  .frise {
    display: block;
    margin-left: 0.4rem;
    padding-left: 2.2rem;
    border-left: 1px solid rgba(168, 122, 80, 0.5);
  }

  .frise::before {
    display: none;
  }

  .frise-spacer {
    height: 2.6rem;
    margin-left: -2.2rem;
    border-left: 1px dashed rgba(168, 122, 80, 0.9);
    transform: translateX(-1px);
    background: var(--white);
  }

  .frise-spacer::after {
    display: none;
  }

  .frise-item {
    display: grid;
    grid-template-columns: 5.2rem 30px 1fr;
    align-items: center;
    padding: 0.75rem 0;
    text-align: left;
  }

  .frise-item time {
    height: auto;
    font-size: 1.6rem;
  }

  .frise-dot {
    position: absolute;
    left: -2.2rem;
    margin: 0 0 0 -7px;
  }

  .frise-item p {
    margin: 0 0 0 0.6rem;
  }

  .frise-m-place {
    display: block;
    margin: 0.6rem 0 0.2rem;
    font-family: var(--font-script);
    font-size: 2.1rem;
    line-height: 1.3;
    background: var(--foil-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .frise-m-addr {
    display: block;
    margin: 0.4rem 0 0.6rem;
  }

  .frise-m-addr .place {
    text-align: left;
  }

  .frise-m-addr .place-links {
    justify-content: flex-start;
  }
}

/* =====================================================================
   THÈME RETENU : ENDUIT À LA CHAUX + RAPPELS SAUGE / OLIVE
   (proposition n°2, choisie le 2026-11-16)
   ===================================================================== */

/* Rappels sauge / olive communs à toutes les propositions.
   Le vert reste en petites touches : ornements, points, icônes, liens, détails. */
:root {
  --olive: #6b7a4b;
  --olive-deep: #56623a;
  --sage: #a7b48f;
  --sage-light: #dde3d0;
  --sage-wash: #f1f3ea;
}

/* rameau d'olivier sous les titres et dans l'écran du code */
.section-heading h2::after,
.gate-panel .ornament {
  background-image: url("branche-olive.svg") !important;
}

/* petits titres en olive */
.overline,
.program-place-kicker,
.card-kicker,
.cine-part-label {
  color: var(--olive-deep) !important;
}

/* icônes et points de la frise */
.frise-icon {
  stroke: var(--olive) !important;
}

.frise-dot {
  border-color: var(--olive) !important;
}

.frise-group::after {
  border-color: rgba(107, 122, 75, 0.45) !important;
}

/* menu vertical, langue, son */
.side-link.is-active .side-dot {
  background: var(--olive) !important;
  border-color: var(--olive) !important;
}

.side-link.is-active .side-label {
  color: var(--olive-deep) !important;
}

.lang-btn.is-active {
  background: var(--olive) !important;
}

.lang-switch .music-toggle {
  color: var(--olive) !important;
}

/* liens d'itinéraire et petites étiquettes */
.place-link {
  border-color: rgba(107, 122, 75, 0.45) !important;
  color: var(--olive-deep) !important;
}

.place-link:hover {
  background: var(--olive) !important;
  color: #fff !important;
}

.place-address::before {
  color: var(--olive) !important;
}

.soon {
  background: var(--sage-wash) !important;
  color: var(--olive-deep) !important;
}

/* formulaire : menu enfant, ajouter une personne */
.guest-child-menu > span,
.btn-add {
  color: var(--olive) !important;
}

.btn-add {
  border-color: var(--olive) !important;
}

label.radio input {
  accent-color: var(--olive);
}

/* fine ligne sauge sous la barre du haut */
.top-bar {
  border-bottom-color: rgba(107, 122, 75, 0.28) !important;
}

/* 2 · Enduit à la chaux — mur de mas chaulé, nuages doux, sections sauge très pâle */
:root { --white: #fbf8f2; --paper: #f4eee4; --beige: #ece4d6; }
body { background: var(--white); }
body::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1800' height='1800'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.006' numOctaves='4' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.78 0 0 0 0 0.72 0 0 0 0 0.62 0 0 0 1 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.55' intercept='-0.18'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: multiply; opacity: 0.8; }
.section-muted, .section-timeline { background: rgba(232, 237, 222, 0.5); }
.btn-primary { background: linear-gradient(110deg, #56623a, #6b7a4b 45%, #56623a) !important; background-size: 220% 100% !important; }
.top-bar { background: rgba(251, 248, 242, 0.92); }

/* même enduit à la chaux pour l'écran du code et l'animation d'ouverture */
:root { --paper-relief: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1800' height='1800'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.006' numOctaves='4' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.78 0 0 0 0 0.72 0 0 0 0 0.62 0 0 0 1 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.55' intercept='-0.18'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E"); }

/* =====================================================================
   NOTRE HISTOIRE : L'ENCRE SUIT LE DÉFILEMENT
   ===================================================================== */

/* le texte est d'abord très pâle, comme écrit au crayon */
.story-grid.ink-on .ink-w {
  color: rgba(59, 48, 38, 0.16);
  transition: color 0.45s ease;
}

/* puis chaque mot se remplit d'encre */
.story-grid.ink-on .ink-w.is-ink {
  color: var(--ink);
}

/* la lettrine dorée apparaît dès que l'encre commence */
.section-story .story-grid.ink-on p:first-child::first-letter {
  color: rgba(168, 122, 80, 0.25);
}

.section-story .story-grid.ink-on.ink-started p:first-child::first-letter {
  color: var(--caramel);
}

/* =====================================================================
   NOS SOUVENIRS : LE LIVRE
   Photo à gauche, texte à droite. Les pages se tournent quand on fait défiler
   (le livre reste fixe à l'écran le temps de lire), ou avec les flèches.
   ===================================================================== */

.section-timeline {
  overflow: visible;
}

.book-scroller {
  position: relative;
  /* la hauteur est réglée par script.js : une « étape » de défilement par page */
  height: 420vh;
  margin-top: 1rem;
}

.book-stage {
  --page-h: min(600px, calc(100vh - 62px - 150px));
  --page-w: calc(var(--page-h) * 0.74);
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-content: center;
  column-gap: 1.6rem;
  padding: 1.5rem 0 1.2rem;
}

.book {
  position: relative;
  width: calc(var(--page-w) * 2);
  height: var(--page-h);
  perspective: 2400px;
  grid-row: 1;
  grid-column: 2;
}

/* ombre du livre posé sur la table */
.book::before {
  content: "";
  position: absolute;
  inset: 3% -1% -3%;
  border-radius: 6px;
  box-shadow: 0 30px 60px rgba(60, 45, 30, 0.22), 0 6px 14px rgba(60, 45, 30, 0.12);
  pointer-events: none;
}

.bk-base,
.bk-leaf {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
}

.bk-base-left {
  left: 0;
}

.bk-base-right,
.bk-leaf {
  left: 50%;
}

.bk-leaf {
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1.15s cubic-bezier(0.645, 0.045, 0.355, 1);
  will-change: transform;
}

.bk-leaf.is-turned {
  transform: rotateY(-180deg);
}

.bk-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.bk-back {
  transform: rotateY(180deg);
}

/* ombre qui passe sur la page pendant qu'elle tourne */
.bk-face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, rgba(40, 30, 20, 0.28), transparent 60%);
}

.bk-back::after {
  background: linear-gradient(270deg, rgba(40, 30, 20, 0.28), transparent 60%);
}

.bk-leaf.is-turning .bk-face::after {
  animation: bkShade 1.15s ease;
}

@keyframes bkShade {
  50% {
    opacity: 1;
  }
}

/* le papier des pages */
.bk-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 2.2rem 2.2rem 1.8rem;
  background: var(--paper-relief), #fffdf8;
  background-blend-mode: multiply, normal;
  border: 1px solid rgba(140, 100, 64, 0.16);
  overflow: hidden;
}

/* creux de la reliure au centre */
.bk-left-page {
  border-radius: 6px 0 0 6px;
  box-shadow: inset -26px 0 30px -24px rgba(60, 45, 30, 0.35);
}

.bk-right-page {
  border-radius: 0 6px 6px 0;
  box-shadow: inset 26px 0 30px -24px rgba(60, 45, 30, 0.35);
}

.bk-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: rgba(60, 45, 30, 0.18);
  pointer-events: none;
  z-index: 50;
}

/* page photo */
.bk-label {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--olive-deep, var(--caramel-deep));
}

.bk-photo {
  flex: 1;
  min-height: 0;
  padding: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(60, 45, 30, 0.14);
  transform: rotate(-1deg);
}

.bk-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bk-photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  background: linear-gradient(160deg, #fbf8f2, #f1ece1);
  transform: none;
}

.bk-mono {
  font-family: var(--font-script);
  font-size: 3.4rem;
  line-height: 1.2;
  padding: 0 0.2em;
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bk-empty-txt,
.bk-end-txt {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.bk-date {
  margin: 1rem 0 0;
  text-align: center;
  font-family: var(--font-script);
  font-size: 2rem;
  line-height: 1.2;
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* page texte */
.bk-right-page {
  justify-content: center;
}

.bk-kicker {
  margin: 0 0 1.1rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--olive-deep, var(--caramel-deep));
}

.bk-text {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.6vh + 0.4rem, 1.3rem);
  line-height: 1.65;
  color: var(--ink);
}

.bk-text::first-letter {
  font-family: var(--font-script);
  font-size: 2.6em;
  line-height: 0.8;
  float: left;
  margin: 0.08em 0.1em 0 0;
  color: var(--caramel);
}

.bk-folio {
  position: absolute;
  bottom: 1rem;
  right: 1.4rem;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.bk-m-photo {
  display: none;
}

/* pages de fin */
.bk-end-left,
.bk-end-right {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
}

.bk-tobe {
  margin: 0;
  font-family: var(--font-script);
  font-size: 3rem;
  line-height: 1.2;
  padding: 0 0.2em;
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bk-ornament {
  display: block;
  width: 170px;
  height: 24px;
  background: url("branche-olive.svg") center / contain no-repeat;
}

.bk-end-date {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  color: var(--ink);
}

/* flèches */
.bk-arrow {
  grid-row: 1;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(107, 122, 75, 0.45);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.9);
  color: var(--olive, var(--caramel));
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
  padding-bottom: 0.15em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(60, 45, 30, 0.1);
  transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.bk-arrow:hover:not(:disabled) {
  background: var(--olive, var(--caramel));
  color: #fff;
  transform: scale(1.06);
}

.bk-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.bk-prev {
  grid-column: 1;
}

.bk-next {
  grid-column: 3;
}

/* repère de chapitre (petits points) */
.bk-dots {
  grid-row: 2;
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.bk-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(107, 122, 75, 0.6);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.bk-dots button.is-on {
  background: var(--olive, var(--caramel));
  transform: scale(1.3);
}

/* ----- Téléphone : une seule page à la fois (photo en haut, texte dessous) ----- */
@media (max-width: 760px) {
  .book-stage {
    --page-w: min(88vw, 400px);
    --page-h: min(calc(100vh - 62px - 140px), 640px);
    grid-template-columns: auto;
    grid-template-rows: 1fr auto;
    column-gap: 0;
    padding-top: 1rem;
  }

  .book {
    width: var(--page-w);
    grid-column: 1;
  }

  .bk-base-left,
  .bk-back,
  .bk-spine {
    display: none;
  }

  .bk-base-right,
  .bk-leaf {
    left: 0;
    width: 100%;
  }

  /* la page tournée s'efface en partant vers la gauche */
  .bk-leaf {
    transition: transform 0.9s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.4s ease 0.5s;
  }

  .bk-leaf.is-turned {
    transform: rotateY(-110deg);
    opacity: 0;
  }

  .bk-right-page {
    border-radius: 6px;
    box-shadow: inset 14px 0 20px -16px rgba(60, 45, 30, 0.3);
    justify-content: flex-start;
    padding: 1.2rem 1.3rem 2.2rem;
  }

  .bk-m-photo {
    display: block;
    flex: 1;
    min-height: 0;
    margin-bottom: 1rem;
    padding: 6px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(60, 45, 30, 0.12);
  }

  .bk-m-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .bk-kicker {
    margin-bottom: 0.5rem;
    font-size: 0.66rem;
  }

  .bk-text {
    font-size: 1rem;
    line-height: 1.55;
  }

  .bk-end-right {
    justify-content: center;
  }

  /* flèches sous le livre, de part et d'autre des points */
  .bk-arrow {
    grid-row: 2;
    width: 42px;
    height: 42px;
    font-size: 1.7rem;
    margin-top: 0.8rem;
  }

  .bk-prev {
    grid-column: 1;
    justify-self: start;
  }

  .bk-next {
    grid-column: 1;
    justify-self: end;
  }

  .bk-dots {
    grid-column: 1;
    align-self: center;
    margin-top: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bk-leaf {
    transition-duration: 0.01s;
  }
}

/* =====================================================================
   RSVP : ENVOI RÉEL
   ===================================================================== */

/* piège à robots (invisible) */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  display: none;
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  border-left: 2px solid #a24b3c;
  background: rgba(162, 75, 60, 0.06);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: #8a3d30;
}

.form-error.visible {
  display: block;
  animation: gateErrorIn 0.35s ease;
}

.rsvp-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* le message de remerciement qui remplace le formulaire */
.rsvp-done {
  position: relative;
  z-index: 1;
  padding: 1.6rem 0.4rem 0.6rem;
  text-align: center;
}

.rsvp-done.is-in {
  animation: rsvpDoneIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes rsvpDoneIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rsvp-done-mono {
  display: inline-block;
  font-family: var(--font-script);
  font-size: 3.2rem;
  line-height: 1.2;
  padding: 0 0.2em;
  background: var(--foil-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rsvp-done-title {
  margin: 0.2rem 0 0.6rem;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--ink);
}

.rsvp-done-text {
  margin: 0 auto;
  max-width: 420px;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--ink);
}

.rsvp-done-mail {
  margin: 1rem auto 1.4rem;
  max-width: 420px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
