/* ═══════════════════════════════════════════════════════════════════════════
   Ronde & Carré se marient — feuille de style unique.
   Parti pris : papier crème, encre chaude, tracés tremblés. Rien n'est droit.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Papier & encre */
  --paper:        #faf4e8;
  --paper-warm:   #f4ead6;
  --paper-deep:   #ece0c8;
  --ink:          #3a362e;
  --ink-soft:     #6d6555;

  /* Champêtre */
  --sage:         #7e8f6b;
  --sage-dark:    #55654a;
  --sage-pale:    #dfe6d4;
  --terracotta:   #c2703c;
  --terracotta-d: #9c5529;
  --ochre:        #d7a343;
  --ochre-pale:   #f6e6bd;
  --rose:         #c98c82;
  --rose-pale:    #f6dcd6;

  /* Rythme */
  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  /* Bordures « tracées à la main » : rayons volontairement asymétriques. */
  --hand-1: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --hand-2: 18px 225px 18px 255px / 255px 18px 225px 18px;
}

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

html {
  scroll-behavior: smooth;
  /* Les décors du hero sont légèrement tournés : leur boîte dépasse de quelques px. */
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.06rem, 0.4vw + 1rem, 1.22rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Lavis de couleur très pâle en fond, pour que le crème ne soit jamais plat. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 40rem at 15% 0%,   rgba(126, 143, 107, .17), transparent 60%),
    radial-gradient(50rem 36rem at 90% 22%,  rgba(215, 163,  67, .15), transparent 62%),
    radial-gradient(48rem 34rem at 50% 100%, rgba(201, 140, 130, .16), transparent 60%);
  pointer-events: none;
}

/* ── Grain de papier ────────────────────────────────────────────────────────
   Bruit fractal en SVG inline, posé sur toute la page en multiply. C'est lui
   qui empêche les aplats de faire « écran » plutôt que « papier ». */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 9999;
  pointer-events: none;
  opacity: .38;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.svg-defs { position: absolute; width: 0; height: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 10000; border-radius: 0 0 .5rem 0;
}
.skip:focus { left: 0; top: 0; }

:focus-visible {
  outline: 3px dashed var(--terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Typographie ─────────────────────────────────────────────────────────── */

h1, h2, h3 { font-weight: 500; line-height: 1.12; margin: 0; }

h2 {
  font-family: 'Caveat', 'Cormorant Garamond', cursive;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--terracotta-d);
  margin-bottom: 1.5rem;
  letter-spacing: .01em;
}

h3 {
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  letter-spacing: .01em;
  margin-bottom: .35rem;
}

p { margin: 0 0 1rem; }

.eyebrow {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: var(--sage-dark);
  letter-spacing: .06em;
  margin-bottom: .25rem;
  transform: rotate(-1.4deg);
}

.link, .story a, .card a, .faq a {
  color: var(--terracotta-d);
  text-decoration-color: var(--rose);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .22em;
}
.link:hover { color: var(--ink); }

/* ── Boutons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  line-height: 1;
  padding: .78rem 1.7rem .62rem;
  color: var(--paper);
  background: var(--terracotta);
  border: 2px solid var(--terracotta-d);
  border-radius: var(--hand-1);
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(58, 54, 46, .18);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover, .btn:focus-visible {
  transform: translate(-2px, -2px) rotate(-.8deg);
  box-shadow: 6px 6px 0 rgba(58, 54, 46, .2);
  background: var(--terracotta-d);
}
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(58,54,46,.2); }

.btn--ghost {
  background: transparent;
  color: var(--sage-dark);
  border-color: var(--sage);
  border-radius: var(--hand-2);
}
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--sage-pale); color: var(--ink); }

.btn--small { font-size: 1.15rem; padding: .5rem 1.05rem .38rem; box-shadow: 2px 2px 0 rgba(58,54,46,.16); }
.btn--big   { font-size: clamp(1.5rem, 3vw, 2rem); padding: 1rem 2.4rem .85rem; }

/* ── Navigation ──────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .7rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-stuck {
  border-bottom-color: var(--paper-deep);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
}

.nav-mark {
  font-family: 'Caveat', cursive;
  font-size: 1.7rem;
  color: var(--terracotta-d);
  text-decoration: none;
  white-space: nowrap;
}

.nav nav { flex: 1; min-width: 0; }
.nav ul {
  display: flex;
  gap: clamp(.6rem, 2vw, 1.6rem);
  margin: 0; padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav ul::-webkit-scrollbar { display: none; }

.nav ul a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: .03em;
  white-space: nowrap;
  padding-bottom: 2px;
}
/* Soulignement au crayon : une petite vague SVG plutôt qu'un trait droit. */
.nav ul a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='5' viewBox='0 0 60 5'%3E%3Cpath d='M1 3c10-3 20 3 30 0s18-3 28 0' fill='none' stroke='%23c2703c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 60px 5px;
  opacity: 0;
  transform: scaleX(.4);
  transition: opacity .2s ease, transform .25s ease;
}
.nav ul a:hover, .nav ul a:focus-visible, .nav ul a.is-current { color: var(--ink); }
.nav ul a:hover::after, .nav ul a:focus-visible::after, .nav ul a.is-current::after {
  opacity: 1; transform: scaleX(1);
}

@media (max-width: 720px) {
  .nav nav { order: 3; flex-basis: 100%; }
  .nav { flex-wrap: wrap; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  text-align: center;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3rem, 8vw, 6rem);
}

.hero-deco {
  position: absolute;
  top: 4rem;
  width: clamp(70px, 11vw, 130px);
  opacity: .85;
  pointer-events: none;
}
.hero-deco svg { width: 100%; height: auto; }
.hero-deco--left  { left:  clamp(-1rem, 1vw, 2rem); transform: rotate(-6deg); }
.hero-deco--right { right: clamp(-1rem, 1vw, 2rem); transform: rotate(5deg); }
@media (max-width: 860px) { .hero-deco { opacity: .45; width: 64px; top: 2rem; } }

.names {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(.4rem, 2vw, 1.4rem);
  font-family: 'Caveat', cursive;
  font-size: clamp(3.6rem, 13vw, 8.5rem);
  color: var(--ink);
  margin: .2rem 0 .6rem;
}
.names .name:first-of-type { transform: rotate(-2deg); }
.names .name:last-of-type  { transform: rotate(1.6deg); }

.amp { display: block; width: clamp(38px, 7vw, 74px); flex: none; }
.amp svg { width: 100%; height: auto; display: block; }

.hero-date {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.hero-date-sep { margin: 0 .6rem; color: var(--terracotta); }
@media (max-width: 560px) {
  .hero-date span { display: block; }
  .hero-date-sep { display: none !important; }
}

.scene { max-width: 620px; margin: 0 auto clamp(1.5rem, 4vw, 2.5rem); }
.scene svg { width: 100%; height: auto; display: block; }

/* Le cœur bat, les fleurs respirent. Discrètement. */
.heart { transform-origin: 230px 158px; animation: beat 2.6s ease-in-out infinite; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  12%      { transform: scale(1.13); }
  24%      { transform: scale(1); }
  36%      { transform: scale(1.08); }
  48%      { transform: scale(1); }
}
.bloom { transform-origin: 230px 110px; animation: sway 7s ease-in-out infinite; }
@keyframes sway {
  0%, 100% { transform: rotate(-1.1deg); }
  50%      { transform: rotate(1.1deg); }
}

.hero-cta { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* ── Compte à rebours ────────────────────────────────────────────────────── */

.countdown {
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem) var(--gutter);
}
.countdown-title {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--sage-dark);
  margin-bottom: 1rem;
  transform: rotate(-1deg);
}
.cd-list {
  display: flex;
  justify-content: center;
  gap: clamp(.5rem, 2.5vw, 1.5rem);
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.cd-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(64px, 17vw, 108px);
  padding: .8rem .5rem .6rem;
  background: var(--paper-warm);
  border: 2px solid var(--paper-deep);
  border-radius: var(--hand-1);
}
.cd-list li:nth-child(even) { border-radius: var(--hand-2); transform: rotate(1deg); }
.cd-list li:nth-child(odd)  { transform: rotate(-1deg); }
.cd-num {
  font-family: 'Caveat', cursive;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
  color: var(--terracotta-d);
  font-variant-numeric: tabular-nums;
}
.cd-lab {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.countdown-note { font-style: italic; color: var(--ink-soft); }

/* ── Séparateur ──────────────────────────────────────────────────────────── */

.divider { max-width: 420px; margin: clamp(1rem, 4vw, 2.5rem) auto; padding: 0 var(--gutter); }
.divider svg { width: 100%; height: auto; display: block; }

/* ── Sections ────────────────────────────────────────────────────────────── */

.section {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter);
  text-align: center;
}

/* Une bande de couleur avec un bord haut/bas irrégulier, comme du papier déchiré. */
.section--story, .section--place {
  max-width: none;
  background: var(--paper-warm);
  position: relative;
  margin-block: clamp(1.5rem, 5vw, 3rem);
}
.section--story::before, .section--story::after,
.section--place::before, .section--place::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 14px;
  background: var(--paper);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='14' viewBox='0 0 600 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0h600v6c-40 6-80-4-120 1s-80 8-120 3-80-9-120-4-80 8-120 3S40 3 0 8Z' fill='%23000'/%3E%3C/svg%3E") repeat-x center / 600px 14px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='14' viewBox='0 0 600 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0h600v6c-40 6-80-4-120 1s-80 8-120 3-80-9-120-4-80 8-120 3S40 3 0 8Z' fill='%23000'/%3E%3C/svg%3E") repeat-x center / 600px 14px;
}
.section--story::before, .section--place::before { top: 0; }
.section--story::after,  .section--place::after  { bottom: 0; transform: rotate(180deg); }

.section--story > *, .section--place > * { position: relative; z-index: 1; }

.story {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: left;
  font-size: 1.1em;
}
.story p:first-of-type::first-letter {
  font-family: 'Caveat', cursive;
  float: left;
  font-size: 3.6em;
  line-height: .8;
  padding: .06em .12em 0 0;
  color: var(--terracotta);
}
.signature {
  font-family: 'Caveat', cursive;
  font-size: 1.9rem;
  text-align: right;
  color: var(--sage-dark);
  transform: rotate(-2deg);
  margin-top: 1.5rem;
}

/* ── Timeline du jour J ──────────────────────────────────────────────────── */

.timeline {
  list-style: none;
  margin: 2rem auto 0;
  padding: 0;
  max-width: 700px;
  text-align: left;
  position: relative;
}
/* Le fil vertical : une ligne ondulée, pas un trait. */
.timeline::before {
  content: '';
  position: absolute;
  top: .8rem; bottom: 2rem;
  left: clamp(84px, 21vw, 118px);
  width: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='90' viewBox='0 0 8 90'%3E%3Cpath d='M4 0c-4 15 8 30 0 45S0 75 4 90' fill='none' stroke='%237e8f6b' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") repeat-y center / 8px 90px;
  opacity: .7;
}

.timeline li {
  display: grid;
  grid-template-columns: clamp(72px, 19vw, 100px) 2.4rem 1fr;
  align-items: start;
  gap: 0;
  padding-bottom: clamp(1.4rem, 3vw, 2rem);
}
.tl-time {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--terracotta-d);
  line-height: 1.3;
  text-align: right;
  padding-right: .6rem;
}
.tl-dot {
  position: relative;
  width: 2.4rem;
  align-self: start;
  margin-top: .55rem;
}
.tl-dot::before {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  width: 15px; height: 15px;
  margin-left: -7.5px;
  background: var(--ochre);
  border: 2px solid var(--paper);
  border-radius: 62% 38% 55% 45% / 45% 55% 45% 55%;
  box-shadow: 0 0 0 2px var(--sage);
}
.timeline li:last-child .tl-dot::before { background: var(--rose); }
@media (max-width: 520px) {
  .tl-time { font-size: 1.2rem; }
}
.tl-body h3 { color: var(--ink); }
.tl-body p  { color: var(--ink-soft); margin: 0; }

/* ── Cartes ──────────────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 3vw, 1.8rem);
  margin-top: 2rem;
  text-align: left;
}
.cards--two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 820px; margin-inline: auto; }

.card {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  background: var(--paper);
  border: 2px solid var(--paper-deep);
  border-radius: var(--hand-1);
  box-shadow: 4px 4px 0 rgba(58, 54, 46, .07);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:nth-child(even) { border-radius: var(--hand-2); }
.card:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: 7px 8px 0 rgba(58, 54, 46, .1); }
.card p:last-child { margin-bottom: 0; }
.card-ico { width: 52px; margin-bottom: .5rem; }
.card-ico svg { width: 100%; height: auto; display: block; }

/* ── RSVP ────────────────────────────────────────────────────────────────── */

.rsvp {
  padding: clamp(2rem, 6vw, 4rem) var(--gutter);
  text-align: center;
}
.rsvp-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.4rem) clamp(1.4rem, 5vw, 3rem);
  background: var(--sage-pale);
  border: 2.5px solid var(--sage);
  border-radius: var(--hand-2);
  box-shadow: 6px 6px 0 rgba(85, 101, 74, .16);
}
.rsvp-inner h2 { color: var(--sage-dark); }
.rsvp-lead { max-width: 46ch; margin-inline: auto; }
.rsvp-actions { margin: 1.6rem 0 .8rem; }
.rsvp-small { font-style: italic; color: var(--ink-soft); font-size: .95em; margin: 0; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */

.faq { max-width: 720px; margin: 2rem auto 0; text-align: left; }

.faq details {
  border-bottom: 2px dashed var(--paper-deep);
  padding: .35rem 0;
}
.faq details:first-of-type { border-top: 2px dashed var(--paper-deep); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: .85rem 2.2rem .85rem .2rem;
  position: relative;
  font-size: 1.1em;
  color: var(--ink);
  transition: color .15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--terracotta-d); }
/* Le chevron : deux traits au crayon qui pivotent à l'ouverture. */
.faq summary::after {
  content: '';
  position: absolute;
  right: .3rem; top: 50%;
  width: 18px; height: 18px;
  margin-top: -9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M3 6c3 3 4 5 6 6 2-1 3-3 6-6' fill='none' stroke='%23c2703c' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .25s ease;
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p {
  margin: 0 0 1rem;
  padding-right: 2rem;
  color: var(--ink-soft);
  animation: unfold .3s ease both;
}
@keyframes unfold {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ── Pied de page ────────────────────────────────────────────────────────── */

.footer {
  margin-top: clamp(2rem, 6vw, 4rem);
  padding: clamp(2rem, 5vw, 3rem) var(--gutter);
  background: var(--sage-dark);
  color: var(--paper);
  text-align: center;
}
.footer-doodle { width: 190px; margin: 0 auto .35rem; }
.footer-doodle svg { width: 100%; height: auto; display: block; }
.footer-names {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: 0 0 .3rem;
}
.footer-small { font-size: .9rem; opacity: .8; margin: 0; }
.footer a { color: var(--paper); text-decoration-color: rgba(250, 244, 232, .5); }

/* ── Apparition au scroll ────────────────────────────────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .3, 1);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .grain, .nav, .hero-deco, .btn { display: none !important; }
  body { background: #fff; }
}
