/* =====================================================================
   Noa & Yakov — V2 « Travertin Éditorial »
   Direction : editorial / lookbook, palette travertin chaude,
   typo Fraunces (display) + Jost (labels). Aucune fioriture dorée.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper:      #f3eee6;   /* travertin papier chaud */
  --paper-2:    #ebe3d6;   /* léger creux */
  --ink:        #2a2520;   /* presque noir chaud */
  --ink-soft:   #6c6051;   /* taupe texte secondaire */
  --stone:      #b29a78;   /* accent travertin */
  --stone-deep: #8c7a60;
  --line:       #d8ccba;   /* filets */
  --white:      #ffffff;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Jost', system-ui, sans-serif;

  --gut: clamp(20px, 5vw, 80px);   /* marge latérale */
  --maxw: 1280px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--stone); color: var(--white); }

/* labels / eyebrows */
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 12px;
  font-weight: 500;
  color: var(--stone-deep);
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  #heroPhoto { animation: none !important; }
}

/* =====================================================================
   NAV
   ===================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gut);
  transition: background 0.5s var(--ease), padding 0.4s var(--ease), color 0.4s var(--ease);
  color: var(--paper);
  mix-blend-mode: difference;          /* lisible sur photo claire ou sombre */
}
.nav.solid {
  mix-blend-mode: normal;
  background: rgba(243,238,230,0.86);
  backdrop-filter: blur(10px);
  color: var(--ink);
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.nav-mark { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: 0.04em; }
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 12px; font-weight: 500; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: currentColor; transition: width 0.4s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-date { font-family: var(--sans); letter-spacing: 0.2em; font-size: 12px; font-weight: 500; }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; }
.nav-burger span { width: 26px; height: 2px; background: currentColor; transition: 0.3s var(--ease); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; display: flex; align-items: flex-end; }
#heroPhoto {
  position: absolute; inset: 0; background: var(--ink) center 20% / cover no-repeat;
  transform-origin: center 30%;
  animation: kenburns 28s var(--ease) infinite alternate;
}
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.13); } }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(28,24,20,0.30) 0%, rgba(28,24,20,0) 28%, rgba(28,24,20,0) 50%, rgba(28,24,20,0.72) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin-inline: auto; padding: 0 var(--gut) clamp(40px, 8vh, 90px); color: var(--paper); }
.hero .eyebrow {
  color: var(--paper);
  font-size: clamp(14px, 1.6vw, 19px);
  letter-spacing: 0.26em;
  margin-bottom: 26px;
  text-shadow: 0 2px 20px rgba(20,16,12,0.55);
}
.hero-names {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(62px, 15vw, 220px);
  line-height: 0.86;
  letter-spacing: -0.01em;
}
.hero-names .amp { font-style: italic; font-weight: 300; color: var(--stone); display: inline-block; padding: 0 0.1em; }
.hero-names .b { display: block; padding-left: clamp(20px, 8vw, 160px); }
.hero-foot {
  margin-top: clamp(28px, 4.5vh, 50px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px;
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.22em;
  font-size: clamp(16px, 2vw, 24px); font-weight: 500;
  color: var(--paper);
  text-shadow: 0 2px 18px rgba(20,16,12,0.55);
}
.hero-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--stone); box-shadow: 0 0 0 4px rgba(178,154,120,0.18); }
.scrollcue { position: absolute; right: var(--gut); bottom: 40px; z-index: 2; writing-mode: vertical-rl; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.3em; font-size: 11px; color: rgba(243,238,230,0.8); }
.scrollcue span { display: inline-block; animation: bob 2.4s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* =====================================================================
   SECTIONS génériques
   ===================================================================== */
.section { padding-block: clamp(80px, 13vh, 180px); }
.section-label { display: flex; align-items: center; gap: 16px; margin-bottom: 46px; }
.section-label .ln { height: 1px; width: 56px; background: var(--stone); }

/* ---------- Intro / annonce ---------- */
.intro { display: grid; grid-template-columns: 1fr; gap: clamp(30px, 6vw, 90px); }
@media (min-width: 900px) { .intro { grid-template-columns: 0.85fr 1.15fr; align-items: start; } }
.intro-side .eyebrow { writing-mode: horizontal-tb; }
.intro-side .bsd { font-family: var(--serif); font-size: 22px; color: var(--stone-deep); margin-bottom: 18px; }
.intro-lead { font-size: clamp(26px, 3.6vw, 46px); line-height: 1.24; font-weight: 300; }
.intro-lead em { font-style: italic; color: var(--stone-deep); }
.intro-body { margin-top: 26px; color: var(--ink-soft); max-width: 56ch; }
.families { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px 40px; align-items: center; font-family: var(--sans); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.families b { color: var(--ink); font-weight: 500; }
.families .sep { color: var(--stone); }

/* ---------- Countdown band ---------- */
.countband { background: var(--ink); color: var(--paper); }
.countband .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 30px; padding-block: clamp(40px, 7vh, 72px); }
.count-title { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(24px, 3vw, 40px); }
.count-grid { display: flex; gap: clamp(20px, 4vw, 56px); }
.count-cell { text-align: center; }
.count-num { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 5vw, 64px); line-height: 1; }
.count-cell span { display: block; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.22em; font-size: 11px; color: var(--stone); margin-top: 10px; }

/* ---------- Events ---------- */
.events { display: flex; flex-direction: column; }
.event {
  display: grid; grid-template-columns: 1fr; gap: 8px 40px; align-items: baseline;
  padding-block: clamp(36px, 5vw, 60px); border-top: 1px solid var(--line);
  transition: background 0.5s var(--ease);
}
.events .event:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .event { grid-template-columns: 90px 1.1fr 1fr auto; align-items: center; } }
.event:hover { background: var(--paper-2); }
.event-no { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(30px, 4vw, 52px); color: var(--stone); }
.event-name { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.05; }
.event-name small { display: block; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.2em; font-size: 11px; color: var(--ink-soft); margin-top: 12px; }
.event-meta { color: var(--ink-soft); }
.event-meta .when { font-family: var(--sans); letter-spacing: 0.16em; text-transform: uppercase; font-size: 13px; color: var(--ink); }
.event-meta .where { margin-top: 6px; font-style: italic; }
.event-cta { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; display: inline-flex; align-items: center; gap: 9px; color: var(--ink); white-space: nowrap; }
.event-cta svg { width: 16px; height: 16px; }
.event-cta:hover { color: var(--stone-deep); }

/* ---------- Quote / parallax ---------- */
.quote { position: relative; min-height: 78vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; color: var(--paper); }
.quote-bg { position: absolute; inset: 0; background: var(--ink) center/cover no-repeat; background-attachment: fixed; }
.quote::after { content: ''; position: absolute; inset: 0; background: rgba(26,22,18,0.55); }
.quote-inner { position: relative; z-index: 1; padding: 0 var(--gut); max-width: 900px; }
.quote-he { font-family: var(--serif); font-size: clamp(22px, 3.4vw, 40px); direction: rtl; line-height: 1.5; }
.quote-fr { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(18px, 2.2vw, 26px); margin-top: 22px; color: rgba(243,238,230,0.9); }

/* ---------- Couple names hebrew accent ---------- */
.hebnames { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 6vw, 80px); margin-top: 54px; }
.hebnames .person { text-align: center; }
.hebnames .person .lat { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 4vw, 52px); }
.hebnames .person .heb { font-family: var(--serif); font-size: clamp(20px, 2.6vw, 30px); color: var(--stone-deep); direction: rtl; margin-top: 6px; }
.hebnames .amp { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 3vw, 40px); color: var(--stone); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(170px, 21vw, 290px); grid-auto-flow: dense; gap: clamp(10px, 1.4vw, 18px); }
.gitem { position: relative; overflow: hidden; cursor: pointer; background: var(--paper-2); }
.gitem img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease), filter 0.6s var(--ease); }
.gitem:hover img { transform: scale(1.06); }
.gitem figcaption { position: absolute; left: 16px; bottom: 14px; z-index: 2; color: var(--paper); font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px; opacity: 0; transform: translateY(8px); transition: 0.5s var(--ease); }
.gitem::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(26,22,18,0.6)); opacity: 0; transition: 0.5s var(--ease); }
.gitem:hover figcaption, .gitem:hover::after { opacity: 1; transform: none; }
/* compo asymétrique */
.gitem.tall { grid-column: span 2; grid-row: span 2; }
.gitem.wide { grid-column: span 2; }
.gitem.std { grid-column: span 2; }
@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .gitem.tall, .gitem.wide, .gitem.std { grid-column: span 1; grid-row: auto; }
  .gitem { aspect-ratio: 3/4; }
}
/* parallaxe fixe = janky sur iOS -> scroll normal sur tactile */
@media (max-width: 820px) {
  .quote-bg { background-attachment: scroll; }
  .quote { min-height: 62vh; }
}

/* ---------- RSVP ---------- */
.rsvp { background: var(--paper-2); }
.rsvp-grid { display: grid; grid-template-columns: 1fr; gap: clamp(36px, 6vw, 80px); }
@media (min-width: 920px) { .rsvp-grid { grid-template-columns: 0.9fr 1.1fr; } }
.rsvp-head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(38px, 6vw, 78px); line-height: 1; }
.rsvp-head .he { direction: rtl; color: var(--stone-deep); font-size: clamp(20px, 3vw, 30px); margin-top: 14px; }
.rsvp-head p { margin-top: 22px; color: var(--ink-soft); max-width: 40ch; }
.field { margin-bottom: 26px; }
.field label { display: block; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px; color: var(--ink-soft); margin-bottom: 10px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: 19px; color: var(--ink); padding: 8px 0; transition: border-color 0.3s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--stone-deep); }
.field textarea { resize: vertical; min-height: 64px; }
.counter { display: inline-flex; align-items: center; gap: 22px; }
.counter button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 20px; color: var(--ink); cursor: pointer; transition: 0.3s var(--ease); }
.counter button:hover { border-color: var(--stone-deep); background: var(--paper); }
.counter input { width: 48px; text-align: center; border: 0; }
.toggles { display: flex; flex-wrap: wrap; gap: 12px; }
.toggle { position: relative; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 100px; cursor: pointer; transition: 0.3s var(--ease); color: var(--ink-soft); }
.toggle input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.submit { margin-top: 14px; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.22em; font-size: 13px; padding: 18px 40px; background: var(--ink); color: var(--paper); border: 0; border-radius: 100px; cursor: pointer; transition: 0.4s var(--ease); }
.submit:hover { background: var(--stone-deep); }
.submit:disabled { opacity: 0.5; cursor: default; }
.rsvp-success { display: none; text-align: center; padding: 30px 0; }
.rsvp-success .mz { font-family: var(--serif); font-style: italic; font-size: clamp(30px, 5vw, 56px); direction: rtl; }
.rsvp-success p { color: var(--ink-soft); margin-top: 12px; }
.rsvp-error { display: none; color: #a0392c; font-family: var(--sans); font-size: 13px; margin-top: 14px; letter-spacing: 0.05em; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--paper); text-align: center; padding-block: clamp(70px, 12vh, 130px); }
.foot-mark { font-family: var(--serif); font-weight: 300; font-size: clamp(46px, 9vw, 130px); line-height: 0.9; }
.foot-mark .amp { font-style: italic; color: var(--stone); }
.foot-meta { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.24em; font-size: 12px; color: rgba(243,238,230,0.75); margin-top: 26px; }
.foot-he { font-family: var(--serif); font-size: 26px; color: var(--stone); margin-top: 22px; direction: rtl; }
.foot-phones { font-family: var(--sans); font-size: 12px; letter-spacing: 0.1em; color: rgba(243,238,230,0.6); margin-top: 24px; }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(20,17,14,0.94); display: none; align-items: center; justify-content: center; }
.lb.open { display: flex; }
.lb img { max-width: 90vw; max-height: 86vh; object-fit: contain; }
.lb button { position: absolute; background: none; border: 0; color: var(--paper); cursor: pointer; font-size: 30px; }
.lb .x { top: 26px; right: 30px; }
.lb .prev { left: 24px; top: 50%; transform: translateY(-50%); font-size: 44px; }
.lb .next { right: 24px; top: 50%; transform: translateY(-50%); font-size: 44px; }

/* ---------- Music button ---------- */
.music { position: fixed; z-index: 45; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(243,238,230,0.5); background: rgba(42,37,32,0.5); backdrop-filter: blur(6px); color: var(--paper); cursor: pointer; display: grid; place-items: center; transition: 0.3s var(--ease); }
.music:hover { background: var(--ink); }

/* =====================================================================
   Responsive nav
   ===================================================================== */
@media (max-width: 820px) {
  .nav-links, .nav-date { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile { position: fixed; inset: 0; z-index: 49; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; transform: translateY(-100%); transition: transform 0.5s var(--ease); }
  .nav-mobile.open { transform: none; }
  .nav-mobile a { font-family: var(--serif); font-size: 34px; font-weight: 300; }
}
@media (min-width: 821px) { .nav-mobile { display: none; } }

/* =====================================================================
   Sélecteur de langue + Hébreu (RTL)
   ===================================================================== */
.lang-switch {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 11px; font-weight: 500; background: none; border: 1px solid currentColor;
  color: inherit; padding: 6px 13px; border-radius: 100px; cursor: pointer;
  transition: opacity 0.3s var(--ease); margin-inline-start: 6px;
}
.lang-switch:hover { opacity: 0.6; }
.lang-switch.big {
  font-family: var(--serif); text-transform: none; letter-spacing: 0;
  font-size: 22px; padding: 8px 26px; border-color: var(--ink); color: var(--ink); margin-top: 8px;
}

/* ---- RTL / Hébreu ---- */
[dir="rtl"] {
  --serif: 'Noto Serif Hebrew', 'Fraunces', Georgia, serif;
  --sans:  'Heebo', system-ui, sans-serif;
}
[dir="rtl"] body { font-family: var(--serif); }
[dir="rtl"] .hero-names, [dir="rtl"] .foot-mark { font-weight: 400; }
[dir="rtl"] .intro-lead, [dir="rtl"] .rsvp-head h2 { line-height: 1.4; }
/* l'hébreu supporte mal le gros interlettrage des labels */
[dir="rtl"] .eyebrow,
[dir="rtl"] .nav-links a,
[dir="rtl"] .nav-date,
[dir="rtl"] .hero-foot,
[dir="rtl"] .count-cell span,
[dir="rtl"] .event-meta .when,
[dir="rtl"] .event-cta,
[dir="rtl"] .field label,
[dir="rtl"] .toggle span,
[dir="rtl"] .submit,
[dir="rtl"] .foot-meta,
[dir="rtl"] .lang-switch { letter-spacing: 0.03em; }
/* indentation du 2e prénom : à droite en RTL */
[dir="rtl"] .hero-names .b { padding-left: 0; padding-right: clamp(20px, 8vw, 160px); }
/* indicateur de scroll : à gauche en RTL */
[dir="rtl"] .scrollcue { right: auto; left: var(--gut); }
