/* =============================================================
   style.css — Guillaume & Camille · 2027
   Champêtre-chic · Vert olive · Beige · Doré
   ============================================================= */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  /* Palette */
  --c-bg:           #f8f5ef;        /* blanc cassé chaud */
  --c-bg-alt:       #f2ede4;        /* sable clair */
  --c-bg-dark:      #2c2e22;        /* vert foncé/nuit */
  --c-olive:        #6b7354;        /* vert olive principal */
  --c-olive-light:  #8a9469;        /* olive clair */
  --c-olive-dark:   #4a5040;        /* olive sombre */
  --c-sage:         #b7bfa8;        /* sauge pâle */
  --c-sand:         #d4c5a9;        /* beige sable */
  --c-gold:         #b89a5c;        /* doré discret */
  --c-gold-light:   #d4b87a;        /* doré clair */
  --c-text:         #2c2e22;        /* texte principal */
  --c-text-light:   #6b6b5c;        /* texte secondaire */
  --c-white:        #ffffff;
  --c-border:       #ddd5c3;

  /* Typographies */
  --f-serif:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --f-sans:   'Inter', system-ui, sans-serif;

  /* Espacements */
  --sp-xs:   0.5rem;
  --sp-sm:   1rem;
  --sp-md:   2rem;
  --sp-lg:   4rem;
  --sp-xl:   6rem;
  --sp-2xl:  8rem;

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;

  /* Transitions */
  --t-fast: 200ms ease;
  --t-mid:  350ms ease;

  /* Max-widths */
  --max-w:        1100px;
  --max-w-narrow: 680px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  font-size: 16px;
}

body {
  font-family: var(--f-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Utilities ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-md);
}
.container--narrow {
  max-width: var(--max-w-narrow);
}

/* ── NAV ────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
  transition: background var(--t-mid), backdrop-filter var(--t-mid), box-shadow var(--t-mid);
}
.nav.scrolled {
  background: rgba(248, 245, 239, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--c-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  padding-inline: var(--sp-md);
  max-width: var(--max-w);
  margin-inline: auto;
}

.nav__brand {
  font-family: var(--f-serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--c-white);
  transition: color var(--t-fast);
}
.nav.scrolled .nav__brand { color: var(--c-olive-dark); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.nav__links a {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  transition: color var(--t-fast);
}
.nav.scrolled .nav__links a { color: var(--c-text-light); }
.nav__links a:hover { color: var(--c-gold); }
.nav.scrolled .nav__links a:hover { color: var(--c-gold); }

.nav__cta {
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 100px;
  color: var(--c-white) !important;
  transition: background var(--t-fast), border-color var(--t-fast) !important;
}
.nav__cta:hover {
  background: rgba(255,255,255,0.15);
}
.nav.scrolled .nav__cta {
  border-color: var(--c-olive);
  color: var(--c-olive) !important;
}
.nav.scrolled .nav__cta:hover {
  background: var(--c-olive);
  color: var(--c-white) !important;
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--c-white);
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav.scrolled .nav__burger span { background: var(--c-text); }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      160deg,
      rgba(44, 46, 34, 0.72) 0%,
      rgba(74, 80, 64, 0.55) 50%,
      rgba(44, 46, 34, 0.8) 100%
    ),
    /* Texture végétale SVG inline */
    url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #3a4030 0%, #5a6248 40%, #4a5040 70%, #2c2e22 100%);
  background-size: cover, 400px 400px, cover;
  background-position: center, center, center;
}

/* Particules végétales décoratives */
.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(107, 115, 84, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(184, 154, 92, 0.15) 0%, transparent 60%);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--c-white);
  padding: var(--sp-lg) var(--sp-md);
  animation: fadeUp 1.2s ease both;
}

.hero__overline {
  font-family: var(--f-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-gold-light);
  margin-bottom: var(--sp-md);
  animation: fadeUp 1.2s 0.1s ease both;
}

.hero__names {
  font-family: var(--f-serif);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--c-white);
  animation: fadeUp 1.2s 0.2s ease both;
}

.hero__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  margin: var(--sp-md) 0;
  animation: fadeUp 1.2s 0.3s ease both;
}
.hero__divider::before,
.hero__divider::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: rgba(184, 154, 92, 0.5);
}
.hero__leaf { font-size: 1.25rem; }

.hero__date {
  font-family: var(--f-serif);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.9);
  animation: fadeUp 1.2s 0.35s ease both;
}

.hero__city {
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-gold-light);
  margin-top: var(--sp-xs);
  animation: fadeUp 1.2s 0.4s ease both;
}

.hero__btn {
  margin-top: var(--sp-lg);
  animation: fadeUp 1.2s 0.5s ease both;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}
.hero__scroll-line {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

/* ── SECTIONS ───────────────────────────────────────────────── */
.section {
  padding-block: var(--sp-xl);
}
.section--story   { background: var(--c-bg); }
.section--program { background: var(--c-bg-alt); }
.section--venue   { background: var(--c-bg); }
.section--rsvp    { background: var(--c-bg-dark); }
.section--infos   { background: var(--c-bg-alt); }

.section__label {
  font-family: var(--f-serif);
  font-size: 5rem;
  font-weight: 300;
  color: var(--c-border);
  line-height: 1;
  margin-bottom: -1rem;
  user-select: none;
}
.section--rsvp .section__label { color: rgba(255,255,255,0.06); }

.section__title {
  font-family: var(--f-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--c-olive-dark);
  margin-bottom: var(--sp-sm);
}
.section--rsvp .section__title { color: var(--c-white); }

.section__deco {
  width: 48px;
  height: 2px;
  background: linear-gradient(to right, var(--c-gold), transparent);
  margin-bottom: var(--sp-lg);
}
.section--rsvp .section__deco { background: linear-gradient(to right, var(--c-gold), transparent); }

/* ── STORY ──────────────────────────────────────────────────── */
.story__text {
  font-family: var(--f-serif);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--c-text-light);
  white-space: pre-line;
}

/* ── TIMELINE ───────────────────────────────────────────────── */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-md);
  counter-reset: timeline;
}

.timeline__item {
  position: relative;
  background: var(--c-bg);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  border: 1px solid var(--c-border);
  transition: transform var(--t-mid), box-shadow var(--t-mid);
}
.timeline__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(44, 46, 34, 0.1);
}

.timeline__time {
  font-family: var(--f-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-xs);
}

.timeline__title {
  font-family: var(--f-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--c-olive-dark);
  margin-bottom: 0.75rem;
}

.timeline__desc {
  font-size: 0.9rem;
  color: var(--c-text-light);
  line-height: 1.7;
}

/* ── VENUE ──────────────────────────────────────────────────── */
.venue__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  align-items: start;
}

.venue__name {
  font-family: var(--f-serif);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--c-olive-dark);
  margin-bottom: var(--sp-xs);
}
.venue__address {
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-md);
}
.venue__desc {
  font-size: 1rem;
  color: var(--c-text-light);
  line-height: 1.75;
  margin-bottom: var(--sp-md);
  white-space: pre-line;
}

.venue__map-wrap {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(44, 46, 34, 0.15);
  border: 1px solid var(--c-border);
}
#map {
  height: 380px;
  width: 100%;
}

/* ── RSVP ───────────────────────────────────────────────────── */
.rsvp__deadline {
  font-family: var(--f-sans);
  font-size: 0.875rem;
  color: var(--c-sage);
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-lg);
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field--row {
  flex-direction: row;
  gap: var(--sp-sm);
}
.field--half {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field--fieldset {
  border: none;
  padding: 0;
}

.field__label {
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-sage);
}

.field__input {
  font-family: var(--f-sans);
  font-size: 1rem;
  color: var(--c-white);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-md);
  padding: 0.875rem 1rem;
  transition: border-color var(--t-fast), background var(--t-fast);
  appearance: none;
  -webkit-appearance: none;
}
.field__input::placeholder { color: rgba(255,255,255,0.3); }
.field__input:focus {
  outline: none;
  border-color: var(--c-gold);
  background: rgba(255,255,255,0.1);
}
.field__input--number {
  text-align: center;
  max-width: 100%;
}
.field__textarea {
  resize: vertical;
  min-height: 120px;
}

/* ── Checkboxes ─────────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.85);
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-label__box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.05);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.checkbox-label__box::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--c-white);
  border-bottom: 2px solid var(--c-white);
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.checkbox-label input:checked + .checkbox-label__box {
  background: var(--c-gold);
  border-color: var(--c-gold);
}
.checkbox-label input:checked + .checkbox-label__box::after {
  opacity: 1;
}
.checkbox-label input:focus-visible + .checkbox-label__box {
  outline: 2px solid var(--c-gold);
  outline-offset: 2px;
}

/* ── Gift Block ─────────────────────────────────────────────── */
.gift-block {
  border-radius: var(--r-lg);
  border: 1px solid rgba(184, 154, 92, 0.35);
  background: rgba(184, 154, 92, 0.07);
  overflow: hidden;
  transition: opacity var(--t-mid), transform var(--t-mid);
}
.gift-block[hidden] { display: none; }

.gift-block__inner {
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.gift-block__emoji {
  font-size: 2rem;
  text-align: center;
}

.gift-block__message {
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  text-align: center;
  white-space: pre-line;
}

.gift-block__suggestion {
  font-family: var(--f-sans);
  font-size: 0.9rem;
  color: var(--c-gold-light);
  text-align: center;
}

.gift-block__link {
  align-self: center;
}

.gift-block__amount { margin-top: var(--sp-xs); }
.gift-block__amount[hidden] { display: none; }

.checkbox-label--gift {
  justify-content: center;
  color: var(--c-gold-light);
}

/* ── Feedback ───────────────────────────────────────────────── */
.form-feedback {
  border-radius: var(--r-md);
  padding: var(--sp-sm) var(--sp-md);
  font-size: 0.9375rem;
  line-height: 1.55;
}
.form-feedback[hidden] { display: none; }
.form-feedback--success {
  background: rgba(107, 115, 84, 0.25);
  border: 1px solid var(--c-olive);
  color: var(--c-sage);
}
.form-feedback--error {
  background: rgba(180, 90, 80, 0.15);
  border: 1px solid rgba(180, 90, 80, 0.5);
  color: #e0a09a;
}

/* ── BOUTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border-radius: 100px;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn--outline {
  border: 1.5px solid rgba(255,255,255,0.7);
  color: var(--c-white);
  background: transparent;
}
.btn--outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--c-white);
}

.btn--primary {
  background: var(--c-gold);
  color: var(--c-white);
  border: 1.5px solid var(--c-gold);
}
.btn--primary:hover {
  background: var(--c-gold-light);
  border-color: var(--c-gold-light);
  box-shadow: 0 4px 20px rgba(184, 154, 92, 0.35);
}

.btn--submit {
  align-self: flex-start;
  margin-top: var(--sp-xs);
}
.btn--submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── INFOS ──────────────────────────────────────────────────── */
.infos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-md);
}

.infos-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  transition: transform var(--t-mid), box-shadow var(--t-mid);
}
.infos-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(44, 46, 34, 0.08);
}

.infos-card__icon {
  font-size: 1.75rem;
  margin-bottom: var(--sp-sm);
  line-height: 1;
}

.infos-card__title {
  font-family: var(--f-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--c-olive-dark);
  margin-bottom: 0.5rem;
}

.infos-card__text {
  font-size: 0.9rem;
  color: var(--c-text-light);
  line-height: 1.7;
}
.infos-card__text a {
  color: var(--c-gold);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--t-fast);
}
.infos-card__text a:hover { text-decoration-color: var(--c-gold); }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: var(--c-bg-dark);
  padding: var(--sp-md);
  text-align: center;
}
.footer__text {
  font-family: var(--f-sans);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Reveal on scroll ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Leaflet overrides ──────────────────────────────────────── */
.leaflet-container {
  font-family: var(--f-sans) !important;
}
.leaflet-popup-content-wrapper {
  border-radius: var(--r-md) !important;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 900px) {
  .venue__inner {
    grid-template-columns: 1fr;
  }
  #map { height: 300px; }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --sp-xl: 4rem;
    --sp-2xl: 5rem;
  }

  /* Nav burger */
  .nav__burger { display: flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(248, 245, 239, 0.97);
    padding: var(--sp-md);
    gap: var(--sp-sm);
    border-bottom: 1px solid var(--c-border);
    backdrop-filter: blur(10px);
  }
  .nav__links.open {
    display: flex;
  }
  .nav__links a { color: var(--c-text-light) !important; }
  .nav__cta { color: var(--c-olive) !important; }

  .field--row { flex-direction: column; }

  .btn--submit { align-self: stretch; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

#map { height: 380px !important; }