/* ─── Reset & base ─────────────────────────────────────────────────── */

:root {
  --cream:    #fbf8ef;
  --brown:    #3e362f;
  --taupe:    #8c7d6d;
  --muted:    #6b5e52;
  --border:   rgba(140, 125, 103, 0.22);
  --panel:    rgba(255, 255, 255, 0.48);
}

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

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--cream);
  color: var(--brown);
  font-family: "Georgia", serif;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ─── Fonts ─────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Vogue";
  src: url("Vogue.ttf") format("truetype");
  font-weight: normal; font-style: normal;
}
@font-face {
  font-family: "LaMonarchie";
  src: url("La Monarchie de Saint Ombre.ttf") format("truetype");
  font-weight: normal; font-style: normal;
}
@font-face {
  font-family: "Faith";
  src: url("faith.otf") format("opentype"), url("faith.ttf") format("truetype");
  font-weight: normal; font-style: normal;
}
@font-face {
  font-family: "FontaineDeDiamant";
  src: url("Fontaine de Diamant.ttf") format("truetype");
  font-weight: normal; font-style: normal;
}
@font-face {
  font-family: "GaryDownley";
  src: url("GaryDownleyScript_PERSONAL_USE_ONLY.otf") format("opentype");
  font-weight: normal; font-style: normal;
}
@font-face {
  font-family: "BightriedRanbell";
  src: url("Bighried Ranbell.woff2") format("woff2"),
       url("Bighried Ranbell.woff") format("woff"),
       url("Bighried Ranbell.otf") format("opentype"),
       url("Bighried Ranbell.ttf") format("truetype");
  font-weight: normal; font-style: normal;
}
@font-face {
  font-family: "BlackMing";
  src: url("Black Ming.otf") format("opentype"), url("Black Ming.ttf") format("truetype");
  font-weight: normal; font-style: normal;
}
@font-face {
  font-family: "BlissfulCalligraphy";
  src: url("Blissful Calligraphy Script Font.otf") format("opentype"),
       url("Blissful Calligraphy Script Font.ttf") format("truetype");
  font-weight: normal; font-style: normal;
}

/* ─── Animations ────────────────────────────────────────────────────── */

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

@keyframes lineGrow {
  from { width: 0; opacity: 0; }
  to   { width: 52px; opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ─── Header ────────────────────────────────────────────────────────── */

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 52px 40px 32px;
  background: var(--cream);
  width: 100%;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.8s ease both;
}

.site-title {
  font-family: "BlackMing", serif;
  font-size: clamp(3.2rem, 8vw, 7rem);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brown);
  margin: 0;
  line-height: 1.1;
  text-align: center;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.main-nav a {
  color: var(--brown);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-family: "Georgia", serif;
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--taupe);
}

.nav-active {
  color: var(--taupe) !important;
  border-bottom: 1px solid var(--taupe);
  padding-bottom: 2px;
}

/* ─── Section title (shared) ────────────────────────────────────────── */

.section-title {
  font-family: "Vogue", serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brown);
  text-align: center;
  margin: 0 0 12px;
  animation: fadeUp 1s ease both;
}

.section-title + .title-rule {
  display: block;
  width: 0;
  height: 1px;
  background: var(--taupe);
  margin: 0 auto 52px;
  animation: lineGrow 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

/* ─── Panel (shared card style) ─────────────────────────────────────── */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 36px 32px;
}

.panel-title {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ─── Hero (index) ──────────────────────────────────────────────────── */

.hero-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 72px 24px 64px;
  text-align: center;
  animation: fadeUp 1s ease 0.2s both;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.save-date,
.rsvp-deadline {
  margin: 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--taupe);
  font-size: 0.95rem;
}

.hero-date {
  margin: 0;
  font-size: 2rem;
  color: var(--brown);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.04em;
}

.domaine-info {
  text-align: center;
  margin-top: 8px;
}

.domaine-logo {
  max-width: 380px;
  height: auto;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.domaine-address {
  font-size: 0.82rem;
  color: var(--taupe);
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
}

.rsvp-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 13px 40px;
  border: 1px solid var(--brown);
  color: var(--brown);
  background: transparent;
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-family: "Georgia", serif;
  transition: background 0.25s, color 0.25s;
}

.rsvp-btn:hover {
  background: var(--brown);
  color: var(--cream);
}

/* ─── Page wrapper ──────────────────────────────────────────────────── */

.page-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

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

.rsvp-section {
  display: grid;
  gap: 36px;
}

.rsvp-intro {
  text-align: center;
}

.rsvp-intro h2 {
  font-size: 2.2rem;
  font-weight: 400;
  font-style: italic;
  margin: 8px 0 0;
  color: var(--brown);
}

.rsvp-form {
  display: grid;
  gap: 20px;
}

.rsvp-form fieldset {
  border: none; padding: 0; margin: 0;
}

.rsvp-form label,
.rsvp-form legend {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.rsvp-form input[type="text"],
.rsvp-form input[type="email"],
.rsvp-form input[type="date"],
.rsvp-form textarea,
.rsvp-form select {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--brown);
  padding: 10px 0;
  font: 1rem "Georgia", serif;
  outline: none;
  transition: border-color 0.2s;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus,
.rsvp-form select:focus {
  border-bottom-color: var(--brown);
}

.rsvp-form textarea {
  min-height: 100px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  grid-column: 1 / -1;
}

.rsvp-form > fieldset:nth-child(1),
.rsvp-form > fieldset:nth-child(n+3) {
  grid-column: 1 / -1;
}

#conjoint-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  grid-column: 1 / -1;
}

.radio-group, .checkbox-group {
  display: grid;
  gap: 0;
}

.radio-group label,
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--brown);
  cursor: pointer;
}

.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"],
.rsvp-form input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--taupe);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  vertical-align: middle;
  transition: border-color 0.2s, background 0.2s;
}

.radio-group input[type="radio"]:checked,
.checkbox-group input[type="checkbox"]:checked,
.rsvp-form input[type="checkbox"]:checked {
  background: var(--brown);
  border-color: var(--brown);
}

.radio-group input[type="radio"]::after,
.checkbox-group input[type="checkbox"]::after,
.rsvp-form input[type="checkbox"]::after {
  content: '';
  position: absolute;
  display: none;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: 1.5px solid #fbf8ef;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.radio-group input[type="radio"]:checked::after,
.checkbox-group input[type="checkbox"]:checked::after,
.rsvp-form input[type="checkbox"]:checked::after {
  display: block;
}

.rsvp-form button {
  width: fit-content;
  padding: 13px 40px;
  border: 1px solid var(--brown);
  background: transparent;
  color: var(--brown);
  font-size: 0.72rem;
  font-family: "Georgia", serif;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
  grid-column: 1 / -1;
  justify-self: center;
}

.rsvp-form button:hover {
  background: var(--brown);
  color: var(--cream);
}

/* ─── Page Mariage ──────────────────────────────────────────────────── */

.mariage-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.mariage-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 56px;
  animation: fadeIn 1.2s ease both;
}

.mariage-photo {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  display: block;
}

.mariage-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 48px 32px 32px;
  background: linear-gradient(to top, rgba(40, 32, 24, 0.6), transparent);
  display: flex;
  justify-content: center;
}

.mariage-date-label {
  font-family: "Vogue", serif;
  font-size: 1.2rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.mariage-content {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.mariage-title {
  font-family: "Vogue", serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0;
  animation: fadeUp 1s ease both;
}

.mariage-text {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 2;
  margin: 0;
}

/* ─── Page Domaine ──────────────────────────────────────────────────── */

.domaine-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.domaine-intro {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.domaine-intro p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 2.1;
  margin: 0;
  font-style: italic;
}

.domaine-figure {
  margin: 0 0 72px;
  padding: 0;
}

.domaine-figure-img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  display: block;
}

.domaine-chapitre {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.domaine-chapitre-titre {
  font-family: "Vogue", serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0 0 28px;
}

.domaine-chapitre p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 2;
  margin: 0 0 14px;
}

.domaine-chapitre p:last-child { margin-bottom: 0; }

.domaine-liste {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.domaine-liste li {
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.domaine-liste li:first-child {
  border-top: 1px solid var(--border);
}

/* ─── Page Accès ────────────────────────────────────────────────────── */

.acces-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.acces-figure {
  margin: 0 0 0;
  padding: 0;
}

.acces-figure-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.acces-map-wrap {
  margin-bottom: 0;
  border-top: 1px solid var(--border);
}

.acces-adresse {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 28px 0 20px;
  border-top: 1px solid var(--border);
}

.acces-directions {
  display: block;
  margin: 20px auto 36px;
  width: fit-content;
  color: var(--brown);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 32px;
  border: 1px solid var(--taupe);
  transition: background 0.2s, color 0.2s;
}

.acces-directions:hover {
  background: var(--taupe);
  color: var(--cream);
}

.acces-itineraires {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

.itineraire-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.flag {
  flex-shrink: 0;
}

.itineraire h3 {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0;
}

.itineraire-moyen {
  margin-bottom: 20px;
}

.itineraire-moyen:last-child { margin-bottom: 0; }

.moyen-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 8px;
}

.itineraire-moyen p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.85;
  margin: 0;
}

/* ─── Page Infos ────────────────────────────────────────────────────── */

.infos-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.infos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.info-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 36px 32px;
}

.info-card-header {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.info-card-header h3 {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0;
}

.info-icon { display: none; }

.info-card-body p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.85;
  margin: 0;
}

/* ─── Page de garde (mot de passe) ─────────────────────────────────── */

.gate-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}

.gate-title {
  font-family: "BlackMing", serif;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  color: var(--brown);
  margin: 0 0 12px;
  line-height: 1.1;
  animation: fadeUp 1s ease both;
}

.gate-date {
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0;
  animation: fadeUp 1s ease 0.15s both;
}

.gate-rule {
  display: block;
  width: 0;
  height: 1px;
  background: var(--taupe);
  margin: 24px auto 40px;
  animation: lineGrow 1.2s ease 0.4s both;
}

.gate-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 320px;
  animation: fadeUp 1s ease 0.3s both;
}

.gate-label {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--taupe);
}

.gate-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--brown);
  font: 1rem "Georgia", serif;
  padding: 10px 0;
  text-align: center;
  letter-spacing: 0.12em;
  outline: none;
  transition: border-color 0.2s;
}

.gate-input:focus {
  border-bottom-color: var(--brown);
}

.gate-input--error {
  border-bottom-color: #b94a48;
}

.gate-error {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: #b94a48;
  margin: 0;
  font-style: italic;
}

.gate-btn {
  margin-top: 8px;
  padding: 12px 44px;
  border: 1px solid var(--brown);
  background: transparent;
  color: var(--brown);
  font-size: 0.72rem;
  font-family: "Georgia", serif;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.gate-btn:hover {
  background: var(--brown);
  color: var(--cream);
}

/* ─── Page Merci ────────────────────────────────────────────────────── */

.merci-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.merci-text {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 2;
  font-style: italic;
  margin: 0;
}

/* ─── Page Contact ──────────────────────────────────────────────────── */

.contact-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  text-align: center;
}

.contact-bloc {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 48px 40px;
  margin-bottom: 2px;
}

.contact-names {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--brown);
  margin: 0 0 24px;
  letter-spacing: 0.04em;
}

.contact-address {
  font-style: normal;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 2;
  margin: 0 0 20px;
  letter-spacing: 0.06em;
}

.contact-phone {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--taupe);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-phone:hover {
  border-bottom-color: var(--taupe);
}

.contact-photo {
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: none;
}

.contact-img {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  display: block;
}

/* ─── Form notice ───────────────────────────────────────────────────── */

.form-notice {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--brown);
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  grid-column: 1 / -1;
}

/* ─── reCAPTCHA v3 ──────────────────────────────────────────────────── */

.grecaptcha-badge {
  visibility: hidden !important;
}

.recaptcha-notice {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 8px 0 0;
  text-align: center;
  grid-column: 1 / -1;
  line-height: 1.8;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.recaptcha-notice a {
  color: var(--taupe);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Captcha ───────────────────────────────────────────────────────── */

.captcha-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  grid-column: 1 / -1;
}

.captcha-note {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--taupe);
  margin: 0;
  font-style: italic;
}

#submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .site-header { padding: 40px 24px 24px; gap: 20px; }

  .domaine-sections { grid-template-columns: 1fr; }
  .domaine-espaces { border-top: 1px solid var(--border); }

  .acces-itineraires { grid-template-columns: 1fr; gap: 32px; }
  .acces-figure-img { max-height: 260px; }

  .infos-grid { grid-template-columns: 1fr; }

  .espaces-list { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .espaces-list { grid-template-columns: 1fr; }
}

@media (min-width: 720px) {
  .rsvp-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rsvp-form fieldset:nth-child(5),
  .rsvp-form fieldset:nth-child(6) {
    grid-column: 1 / -1;
  }
}
