/* ============================================================
   Naomi-Belen & David Jacob — 19 septembre 2026 — Chexbres
   Single-page app with tab navigation
   ============================================================ */

:root {
  --cream:      #f5ede0;
  --cream-card: rgba(248, 242, 231, 0.72);
  --ink:        #2a3a4c;
  --ink-soft:   #4a5a6a;
  --muted:      #8a8075;
  --gold:       #b08a52;
  --rule-c:     #cdbfa8;
  --serif:      "Cormorant Garamond", Georgia, serif;
  --sans:       "Montserrat", system-ui, sans-serif;
  --script:     "Mrs Saint Delafield", cursive;
  --shadow:     0 12px 36px rgba(42, 58, 76, 0.09);
  --shadow-s:   0 4px 16px rgba(42, 58, 76, 0.06);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img  { display: block; max-width: 100%; height: auto; }
a    { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold); }
button { cursor: pointer; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

html { scroll-behavior: smooth; }

/* ── Paper background using JPEG texture ──────────────── */
body {
  font-family: var(--serif);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  background-color: var(--cream);
  background-image: url("Photos/Texture.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-blend-mode: multiply;
}

/* Soft vignette over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  touch-action: none;
  z-index: 9999;
  background: radial-gradient(ellipse at 50% 35%,
    transparent 45%,
    rgba(44, 30, 10, 0.055) 100%);
}

html, body { overflow-y: auto; }

/* ============================================================
   LOGIN GATE
   ============================================================ */
.login-gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 200;
  background-color: var(--cream);
  background-image: url("Photos/Texture.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  background-blend-mode: multiply;
}

.login-card {
  width: 100%;
  max-width: 430px;
  text-align: center;
  padding: 3.5rem 2.5rem 3rem;
  border: 1px solid var(--rule-c);
  box-shadow: var(--shadow);
  background: var(--cream-card);
  backdrop-filter: blur(2px);
}

.login-mono {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.55em;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.login-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.login-sub {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 2rem;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#login-form input {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  padding: 0.9rem 1rem;
  background: transparent;
  border: 1px solid var(--rule-c);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
#login-form input:focus { border-color: var(--gold); }

#login-form button {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  padding: 0.88rem;
  background: var(--ink);
  color: var(--cream);
  border: none;
  transition: background 0.2s;
}
#login-form button:hover { background: var(--gold); }

#login-error {
  min-height: 1.1em;
  font-family: var(--sans);
  font-size: 0.74rem;
  color: #a8453c;
  letter-spacing: 0.06em;
}

.login-hint {
  margin-top: 1.75rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ============================================================
   PERSISTENT HEADER (illustration + names + nav tabs)
   ============================================================ */
.site-header {
  text-align: center;
  padding-top: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--cream);
  background-image: url("Photos/Texture.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  background-blend-mode: multiply;
  box-shadow: 0 2px 12px rgba(42, 58, 76, 0.07);
}

.header-top {
  padding: 0 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}

/* Church illustration — couleur originale */
.header-img {
  width: 180px;
  margin: 0 auto 0.5rem;
  mix-blend-mode: multiply;
}

/* ── Names: the dominant typographic element ── */
.header-names {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  letter-spacing: 0.05em;
  line-height: 1.15;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
}
.mobile-br { display: none; }
.header-names .amp {
  font-style: italic;
  color: var(--gold);
  font-weight: 300;
  margin: 0 0.1em;
}

/* ── Date · location ── */
.header-meta {
  margin-top: 0.75rem;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── Days remaining ── */
.header-days {
  margin-top: 0.2rem;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── Tab navigation ── */
.tab-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2rem;
  border-bottom: 1px solid var(--rule-c);
}

.tab-btn {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.15rem;
  margin-bottom: -1px;
  transition: color 0.18s, border-color 0.18s;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Italic & inside N & D tab */
.tab-amp {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
  font-size: 1.1em;
  margin: 0 0.05em;
}

/* ============================================================
   PAGES (shown/hidden via JS)
   ============================================================ */
.pages { min-height: 60vh; }

.page {
  display: none;
  animation: fadeIn 0.32s ease;
}
.page.active { display: block; }

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

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
.section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  text-align: center;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.1rem auto 3rem;
}
.rule::before, .rule::after {
  content: "";
  width: 54px;
  height: 1px;
  background: var(--rule-c);
}
.rule span {
  display: inline-block;
  width: 5px; height: 5px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

/* Smaller rule variant for sub-sections */
.rule--sub {
  margin: 0.75rem auto 2.5rem;
}
.rule--sub::before, .rule--sub::after {
  width: 32px;
}

.section-intro {
  max-width: 620px;
  margin: 0 auto 2.5rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
.section-note {
  margin-top: 2rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
}

/* ============================================================
   ACCUEIL PAGE
   ============================================================ */
.hero-photo {
  width: 100%;
  max-height: 580px;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  max-height: 580px;
  object-fit: cover;
  object-position: center 35%;
  filter: saturate(0.9);
  display: block;
}

.home-intro { padding-top: 4rem; }

.intro-text {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto;
}

/* Verse paragraph */
.intro-verse {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 1.25rem auto 0;
  padding: 1rem 1.5rem;
  border-left: 2px solid var(--rule-c);
  text-align: left;
}

/* Closing paragraph with calligraphy signature */
.intro-closing {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 2.5rem auto 0;
  font-style: italic;
}

.calligraphy-sig {
  display: block;
  font-family: var(--script);
  font-style: normal;
  font-size: 2.2rem;
  color: var(--ink);
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

/* Inline link that looks like a text button */
.inline-link {
  font-family: var(--serif);
  font-size: inherit;
  color: var(--gold);
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule-c);
  padding: 0;
  cursor: pointer;
  font-style: italic;
}
.inline-link:hover { color: var(--ink); }

/* ============================================================
   RSVP PAGE
   ============================================================ */
.rsvp-form-wrap {
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
}

.rsvp-form-wrap iframe {
  display: block;
  border: none !important;
  width: 100%;
  height: 2000px;
  background-color: transparent !important;
  overflow: hidden;
}

/* ============================================================
   NOTRE HISTOIRE PAGE
   ============================================================ */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 70px 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 880px;
  margin: 0 auto;
}

.story-fig { text-align: center; }

.portrait {
  aspect-ratio: 3/4;
  overflow: hidden;
  border: 1px solid var(--rule-c);
  box-shadow: var(--shadow-s);
  margin-bottom: 1.5rem;
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}

.fig-name {
  font-family: "Mrs Saint Delafield", cursive;
  font-weight: 400;
  font-size: 2.6rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.fig-lastname {
  font-family: "Mrs Saint Delafield", cursive;
  font-size: 2.6rem;
  color: var(--ink);
}

.fig-text {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 300px;
  margin: 0 auto;
}

.story-amp {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3rem, 5.5vw, 4.5rem);
  color: var(--gold);
  align-self: center;
  padding-top: 3.5rem;
}

.story-closing {
  max-width: 600px;
  margin: 3.5rem auto 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ============================================================
   LE JOUR J PAGE — 3 cards + Infos Pratiques
   ============================================================ */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 980px;
  margin: 0 auto;
}

.card {
  flex: 1 1 280px;
  max-width: 340px;
}

.card {
  padding: 2.25rem 1.6rem;
  border: 1px solid var(--rule-c);
  background: var(--cream-card);
  text-align: center;
  transition: transform 0.22s, box-shadow 0.22s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-eye {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.card-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
}

.card-time {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.card-addr {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  line-height: 1.9;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.card-link {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.2rem;
}
.card-link.muted { border-bottom-color: transparent; color: var(--muted); }

/* Infos sub-section title */
.infos-subtitle {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 4rem;
}

/* ============================================================
   INFOS PRATIQUES GRID
   ============================================================ */
.infos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem 3rem;
  max-width: 860px;
  margin: 0 auto;
  text-align: left;
}

.info-block h4 {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule-c);
}
.info-block p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--ink-soft);
}
.info-block a { color: var(--gold); border-bottom: 1px solid var(--rule-c); }

/* ============================================================
   PHOTOS PAGE
   ============================================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 1000px;
  margin: 0 auto;
}
.g-item { aspect-ratio: 4/5; overflow: hidden; }
.g-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
  transition: transform 0.5s ease;
}
.g-item:hover img { transform: scale(1.04); }

/* ============================================================
   CADEAU PAGE
   ============================================================ */
.bank {
  max-width: 580px;
  margin: 0 auto;
  border: 1px solid var(--rule-c);
  background: var(--cream-card);
}

.bank-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--rule-c);
}
.bank-row:last-child { border-bottom: none; }

.bank-lbl {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.bank-val {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}
.bank-val.mono {
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.copy-btn {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.38rem 0.7rem;
  background: transparent;
  border: 1px solid var(--rule-c);
  color: var(--ink-soft);
  transition: all 0.18s;
}
.copy-btn:hover  { background: var(--ink);  color: var(--cream); border-color: var(--ink);  }
.copy-btn.copied { background: var(--gold); color: var(--cream); border-color: var(--gold); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 2.75rem 1.5rem 3.5rem;
  border-top: 1px solid var(--rule-c);
}

.footer-mono {
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
}

/* Italic & in footer, gold like the header */
.footer-amp {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
  font-size: 1.3em;
  margin: 0 0.15em;
  vertical-align: -0.05em;
}

.footer-date {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}
.footer-note {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-amp  { padding-top: 0; }
  .cards      { grid-template-columns: 1fr; max-width: 460px; }
  .infos      { grid-template-columns: 1fr 1fr; }
  .gallery    { grid-template-columns: 1fr 1fr; }
  .bank-row   { grid-template-columns: 1fr; gap: 0.3rem; }
  .copy-btn   { justify-self: start; }
  .tab-btn    { font-size: 0.62rem; letter-spacing: 0.18em; padding: 0.65rem 0.85rem; }
}

@media (max-width: 540px) {
  .site-header { padding-top: 1.25rem; }
  .header-img  { width: 140px; }
  .header-names {
    white-space: normal;
    font-size: clamp(1.9rem, 7.5vw, 2.5rem);
  }
  .mobile-br { display: block; }
  .section     { padding: 3.5rem 1.25rem; }
  .infos       { grid-template-columns: 1fr; }
  .tab-btn     { font-size: 0.58rem; letter-spacing: 0.12em; padding: 0.6rem 0.65rem; }
  .intro-verse { padding: 0.75rem 1rem; }
}
