/* ==========================================================
   Bar Mitzvah de Lyor Yehouda — feuille de style
   Palette fixe : bleu nuit #03162E / ivoire #F6EFE2 / champagne #E7CA91
   ========================================================== */
:root {
  --nuit: #03162E;
  --ivoire: #F6EFE2;
  --champagne: #E7CA91;
  --or-brun: #A8834B;
  --marine-logo: #051D3B;
  --toupie-bleu: #1F4C9C;
  --toupie-bleu-fonce: #173C80;
  --toupie-or: #D6A752;

  --f-display: "Cinzel", "Cormorant Garamond", "Times New Roman", serif;
  --f-serif: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --f-sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --f-he: "Noto Serif Hebrew", "Frank Ruhl Libre", "David", "Times New Roman", serif;

  --gutter: clamp(16px, 5vw, 40px);
  --arch-w: min(560px, calc(100vw - 2 * var(--gutter) - 20px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-variant-numeric: lining-nums;
  background: var(--nuit);
  color: var(--ivoire);
  font-family: var(--f-sans);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
p { margin: 0; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
[lang="he"] { font-family: var(--f-he); }

/* ---------- Pages ---------- */
.page {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(28px + env(safe-area-inset-top, 0px)) var(--gutter) calc(96px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  --fg: var(--ivoire);
  --accent: var(--champagne);
  --line: rgba(231, 202, 145, .55);
  --line-soft: rgba(231, 202, 145, .28);
  --muted: rgba(246, 239, 226, .72);
  --t-body: var(--champagne);
  --t-side: #CDAE72;
  --t-top: #F1DDB2;
  --t-letter: var(--nuit);
}
.page--nuit { background: var(--nuit); color: var(--ivoire); }
.page--ivoire {
  background: var(--ivoire);
  color: var(--marine-logo);
  --fg: var(--marine-logo);
  --accent: var(--or-brun);
  --line: rgba(168, 131, 75, .7);
  --line-soft: rgba(168, 131, 75, .35);
  --muted: rgba(5, 29, 59, .72);
  /* toupie : couleurs d'origine (bleu + lettres or) */
  --t-body: var(--toupie-bleu);
  --t-side: var(--toupie-bleu-fonce);
  --t-top: #2A5DB3;
  --t-letter: var(--toupie-or);
}

/* toupie : classes internes du symbole */
.t-body { fill: var(--t-body); }
.t-side { fill: var(--t-side); }
.t-top  { fill: var(--t-top); }
.t-letter { fill: var(--t-letter); font-family: var(--f-he); font-weight: 700; font-size: 17px; }

/* ---------- Logo ---------- */
.logo { width: clamp(64px, 16vw, 92px); height: auto; margin: 4px auto 22px; }
.logo--cover { width: clamp(110px, 30vw, 150px); margin: 14px auto 18px; }

.bsd {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: var(--gutter);
  font-size: 15px;
  color: var(--accent);
  letter-spacing: .02em;
}

/* ---------- Arche (filet double + filet décalé, comme la maquette) ---------- */
.arch {
  position: relative;
  width: var(--arch-w);
  container-type: inline-size;
  border: 1px solid var(--line);
  border-radius: 9999px 9999px 0 0;
  padding: 0 0 clamp(36px, 8cqw, 52px);
}
.arch::before {                       /* filet intérieur */
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 9999px 9999px 0 0;
  pointer-events: none;
}
.arch::after {                        /* filet décalé à droite / en bas */
  content: "";
  position: absolute;
  top: 34%;
  right: -11px;
  bottom: -11px;
  left: 22%;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  pointer-events: none;
}
.arch__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24cqw clamp(22px, 8cqw, 54px) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.arch--cover .arch__inner { padding-top: 33cqw; }
.arch--form .arch__inner { padding-top: 22cqw; }

/* verset en arc (page 1) */
.arc-verse {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: auto;
  overflow: visible;
  z-index: 2;
}
.arc-text {
  font-family: var(--f-he);
  font-size: 19px;
  fill: var(--champagne);
  direction: rtl;
  unicode-bidi: plaintext;
  letter-spacing: .02em;
}
.arc-text text { fill: rgba(231, 202, 145, .78); }
/* לִי (fin de לְרַגְלִי) + אוֹר = ליאור : lien visuel avec le prénom */
.arc-text .arc-lamed, .arc-lamed { fill: #F7CF73; font-size: 27px; font-weight: 700; }
.arc-text .arc-or, .arc-or { fill: #F7CF73; font-size: 23px; font-weight: 700; }


/* toupies suspendues (page 1) — fil doré + toupie, comme la référence */
.hanging {
  position: absolute;
  top: 0;
  width: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 0;
}
.hanging span { width: 1px; background: var(--line); }
.hanging svg { width: 30px; height: 50px; }
.hanging--l { left: max(10px, calc(50% - var(--arch-w) / 2 - 44px)); }
.hanging--l span { height: 150px; }
.hanging--r { right: max(10px, calc(50% - var(--arch-w) / 2 - 44px)); }
.hanging--r span { height: 96px; }

/* ---------- Typographie ---------- */
.verse-fr {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(13px, 3.6cqw, 16px);
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: clamp(18px, 5cqw, 28px);
}
.script {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(19px, 5.4cqw, 26px);
  color: var(--fg);
}
.kicker {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 10px 0 2px;
}
.eyebrow {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.display {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(30px, 10.5cqw, 52px);
  letter-spacing: .14em;
  line-height: 1.12;
  text-transform: uppercase;
  color: var(--accent);
  padding-left: .14em;             /* compense le letter-spacing final */
}
.display--long { font-size: clamp(23px, 7.6cqw, 40px); letter-spacing: .1em; }
.page--ivoire .display { color: var(--marine-logo); }

.name {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(34px, 11cqw, 58px);
  letter-spacing: .06em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--fg);
}
.name-he {
  font-size: clamp(22px, 6.4cqw, 30px);
  color: var(--accent);
  margin-top: 8px;
}

.dates {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 400px;
  margin-top: clamp(22px, 6cqw, 32px);
  font-family: var(--f-display);
  color: var(--fg);
}
.dates__side { font-size: clamp(10px, 3cqw, 12px); letter-spacing: .26em; text-transform: uppercase; }
.dates__side:first-child { text-align: right; }
.dates__side:last-child { text-align: left; }
.dates__mid {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0 14px;
  display: flex; flex-direction: column; align-items: center;
}
.dates__days { font-family: var(--f-display); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-top: clamp(22px, 6cqw, 32px); }
.dates__days + .dates { margin-top: 8px; }
.dates__mid strong { white-space: nowrap; font-variant-numeric: lining-nums; }
.dates__mid strong { font-weight: 400; font-size: clamp(24px, 7.6cqw, 34px); letter-spacing: .08em; color: var(--accent); }
.city {
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: .5em;
  padding-left: .5em;
  text-transform: uppercase;
  margin-top: 14px;
}
.parasha {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(15px, 4cqw, 18px);
  color: var(--muted);
  margin-top: 10px;
}
.parasha [lang="he"] { font-style: normal; color: var(--accent); }

.date {
  font-family: var(--f-serif);
  font-size: clamp(19px, 5.4cqw, 24px);
  margin-top: 8px;
}
.date-he { font-size: 15px; color: var(--accent); margin-top: 2px; }

.lead {
  font-family: var(--f-serif);
  font-size: clamp(17px, 4.6cqw, 20px);
  line-height: 1.4;
  color: var(--fg);
  max-width: 34ch;
}
.lead [lang="he"] { font-size: .9em; color: var(--accent); }
.block-title {
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.time {
  font-family: var(--f-display);
  font-size: clamp(24px, 7cqw, 32px);
  letter-spacing: .06em;
  color: var(--fg);
}
.time--lead { margin: 4px 0 10px; color: var(--accent); }
.page--ivoire .time--lead { color: var(--marine-logo); }

/* séparateur à toupie */
.sep {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 70%;
  max-width: 260px;
  margin: clamp(18px, 5cqw, 26px) auto;
}
.sep span { flex: 1; height: 1px; background: var(--line); }
.sep svg { width: 13px; height: 22px; flex: none; }
.sep--small { margin: clamp(22px, 6cqw, 32px) auto; width: 46%; }

/* moments du vendredi */
.moments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  margin-bottom: 22px;
}
.moment { padding: 4px 8px; display: flex; flex-direction: column; align-items: center; }
.moment + .moment { border-left: 1px solid var(--line); }
.picto { width: 34px; height: 34px; color: var(--accent); margin-bottom: 8px; }
.moment__label {
  font-family: var(--f-sans);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* lieu */
.place { margin: 6px 0 18px; }
.lead + .place { margin-top: 16px; }
.place__name {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(20px, 5.8cqw, 26px);
  line-height: 1.2;
  color: var(--fg);
}
.place__addr {
  font-family: var(--f-sans);
  font-size: 14px;
  letter-spacing: .03em;
  color: var(--muted);
  margin-top: 6px;
}
.place__addr em { font-style: normal; font-size: 13px; letter-spacing: .08em; }

.follow {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(16px, 4.4cqw, 19px);
  color: var(--fg);
  margin-bottom: 20px;
}
.follow__dot { color: var(--accent); line-height: 1; font-size: 1.4em; margin: 2px 0; }

/* boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 26px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}
.btn::before {
  content: "";
  width: 12px; height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c-4 0-7 3-7 7 0 5 7 13 7 13s7-8 7-13c0-4-3-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c-4 0-7 3-7 7 0 5 7 13 7 13s7-8 7-13c0-4-3-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn:hover, .btn:focus-visible { background: var(--accent); color: var(--nuit); }
.page--ivoire .btn:hover, .page--ivoire .btn:focus-visible { color: var(--ivoire); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn--solid, .btn--ghost { }
.rsvp .btn::before, .recap .btn::before { content: none; }
.btn--solid { background: var(--accent); color: var(--nuit); }
.btn--solid:hover, .btn--solid:focus-visible { background: transparent; color: var(--accent); }
.btn--ghost { border-color: var(--line-soft); color: var(--muted); }

/* lien vers la page suivante */
.next {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .35s ease;
}
.next span { font-size: 18px; line-height: 1; color: var(--accent); }
.next:hover { color: var(--accent); }

/* famille (page 1) */
.family {
  margin-top: clamp(30px, 6vw, 44px);
  text-align: center;
  max-width: 560px;
  font-family: var(--f-serif);
  color: var(--ivoire);
}
.family__gp { font-size: clamp(15px, 3.8vw, 18px); color: var(--muted); }
.family__gp--row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 26px; margin-top: 2px; }
.family__parents {
  font-family: var(--f-display);
  font-size: clamp(17px, 4.6vw, 22px);
  letter-spacing: .14em;
  color: var(--champagne);
  margin-top: 18px;
}
.family__siblings { font-size: clamp(17px, 4.4vw, 20px); margin-top: 2px; }
.family__text {
  font-style: italic;
  font-size: clamp(16px, 4.2vw, 19px);
  line-height: 1.5;
  color: var(--muted);
  margin-top: 14px;
}

/* ---------- Formulaire RSVP ---------- */
.rsvp { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 22px; }
.field label, .field__label, .q legend {
  display: block;
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.opt { letter-spacing: .08em; text-transform: none; font-family: var(--f-serif); font-style: italic; color: var(--muted); font-size: 14px; }
.field input[type="text"], .field textarea, .stepper input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ivoire);
  font-family: var(--f-serif);
  font-size: 20px;
  font-variant-numeric: lining-nums;
  padding: 6px 2px 8px;
  transition: border-color .3s ease;
}
.field textarea { resize: vertical; font-size: 18px; }
.field input:focus, .field textarea:focus, .stepper input:focus { outline: none; border-bottom-color: var(--champagne); }
.stepper { display: flex; align-items: center; gap: 14px; }
.counts { margin-top: 14px; padding: 4px 4px 0; }
.count { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.count + .count { border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 6px; }
.count label {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 20px;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--ivoire);
}
.count .stepper { gap: 10px; }
.count .stepper input { width: 52px; }
.stepper input { width: 64px; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--champagne);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease;
}
.stepper__btn:hover { background: var(--champagne); color: var(--nuit); }
.stepper__btn:focus { outline: none; }
.stepper__btn:focus-visible { outline: 1px solid var(--champagne); outline-offset: 3px; }
@media (hover: none) { .stepper__btn:hover { background: transparent; color: var(--champagne); } }

.q {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 0;
  padding: 18px 0 0;
  min-width: 0;
}
.q legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; color: var(--muted); }
.q legend strong {
  display: block;
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--ivoire);
  margin-top: 4px;
}
.q__num { color: var(--champagne); margin-right: 6px; }
.choice { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-family: var(--f-serif);
  font-size: 18px;
  color: var(--muted);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.choice label:hover span { border-color: var(--line); color: var(--ivoire); }
.choice input:checked + span { background: var(--champagne); border-color: var(--champagne); color: var(--nuit); }
.choice input:focus-visible + span { outline: 2px solid var(--champagne); outline-offset: 3px; }
.err { font-size: 13px; color: #F0B49A; margin-top: 6px; }
.rsvp .btn--solid { align-self: center; margin-top: 6px; }

.recap { width: 100%; text-align: left; }
.recap .block-title { text-align: center; }
.recap dl { margin: 0 0 16px; border-top: 1px solid var(--line-soft); }
.recap dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.recap dt { font-size: 13px; letter-spacing: .06em; color: var(--muted); }
.recap dd { margin: 0; font-family: var(--f-serif); font-size: 18px; text-align: right; color: var(--ivoire); }
.recap__how { font-family: var(--f-serif); font-style: italic; font-size: 16px; color: var(--muted); text-align: center; margin-bottom: 16px; }
.recap__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.recap__note { text-align: center; margin-top: 10px; font-size: 13px; color: var(--champagne); }

.foot { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--f-serif); color: var(--muted); }
.foot svg { width: 14px; height: 24px; }

/* ---------- Navigation discrète ---------- */
.nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgba(231, 202, 145, .35);
  background: rgba(3, 22, 46, .92);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  transition: background-color .5s ease, border-color .5s ease;
}
.nav a {
  display: flex; align-items: center; justify-content: center;
  min-width: 44px; height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(246, 239, 226, .7);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .35s ease, color .35s ease;
}
.nav a.is-active { background: var(--champagne); color: var(--nuit); }
.nav.on-ivoire { background: rgba(246, 239, 226, .92); border-color: rgba(168, 131, 75, .45); }
.nav.on-ivoire a { color: rgba(5, 29, 59, .75); }
.nav.on-ivoire a.is-active { background: var(--marine-logo); color: var(--ivoire); }

@media (max-width: 620px) {
  .nav a { padding: 0; width: 34px; min-width: 34px; font-size: 0; position: relative; }
  .nav a::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
  .nav a.is-active { width: auto; padding: 0 12px; font-size: 10px; }
  .nav a.is-active::after { content: none; }
  .nav a.is-active span { display: inline; }
  .hanging { display: none; }
}
@media (min-width: 621px) {
  .nav a span { display: inline; }
}

/* ---------- Animations (presque imperceptibles) ---------- */
@media (prefers-reduced-motion: no-preference) {
  body { animation: pageIn 1.1s ease both; }
  .reveal { opacity: 0; transform: translateY(10px); transition: opacity 1.2s ease, transform 1.2s ease; }
  .reveal.is-in { opacity: 1; transform: none; }
  @keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* נ״י (נרו יאיר) à côté du prénom hébreu, comme sur le faire-part de référence */
.ny {
  font-size: .58em;
  vertical-align: .95em;
  line-height: 0;
  margin-inline-start: .3em;
  color: var(--champagne);
}
