/* =========================================================
   Mémorial Adiso Wovve — feuille de style
   Ambiance : « bougie de souvenir » (yahrzeit) — noir chaud + or.
   Mobile-first. Support RTL (hébreu). Mouvement très retenu.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg:        #100d0a;   /* noir chaud */
  --bg-2:      #15110c;
  --bg-3:      #1c1711;
  --card:      #181310;

  --text:      #f1ece1;   /* blanc cassé chaud */
  --text-soft: #b9b0a0;
  --text-dim:  #847868;

  --gold:      #c9a24a;   /* or bougie */
  --gold-soft: #e3c986;
  --gold-glow: #f3d98f;

  --border:      rgba(228, 214, 180, 0.13);
  --border-soft: rgba(228, 214, 180, 0.07);

  --serif:    "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --he-serif: "Frank Ruhl Libre", "Cormorant Garamond", serif;
  --sans:     "Assistant", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --nav-h: 66px;
  --maxw: 1200px;
  --radius: 7px;

  --shadow: 0 22px 55px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.42);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grain chaud très léger pour la profondeur (n'interfère pas avec les clics) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Couche d'embers (particules) fixe derrière tout le contenu */
#embers-global {
  position: fixed;
  inset: 0;
  z-index: -1;            /* au-dessus du fond, derrière le contenu */
  pointer-events: none;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.12; }

::selection { background: rgba(201, 162, 74, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

[dir="rtl"] { font-family: var(--he-serif); }

/* Barre de défilement discrète */
* { scrollbar-width: thin; scrollbar-color: var(--bg-3) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a2219; }

/* ---------- Ornement (filet or + losange) ---------- */
.ornament {
  position: relative;
  width: 130px; height: 12px;
  margin: 1.25rem auto 0;
}
.ornament::before {
  content: "";
  position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; transform: translateY(-50%);
  background: linear-gradient(to right, transparent, var(--gold) 22%, var(--gold) 78%, transparent);
  opacity: 0.65;
}
.ornament::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 6px; height: 6px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 10px rgba(201, 162, 74, 0.5);
}

/* ---------- Guillemets décoratifs or (citation) ---------- */
.quoted::before,
.quoted::after {
  font-family: var(--serif);
  color: var(--gold);
  opacity: 0.55;
  font-weight: 600;
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -0.4em;
}
.quoted::before { content: "\201C"; margin-inline-end: 0.1em; }
.quoted::after  { content: "\201D"; margin-inline-start: 0.1em; }

/* Ornement : le filet se dessine à l'apparition de la section */
.section__head .ornament::before {
  transform: translateY(-50%) scaleX(0);
  transition: transform 0.9s var(--ease) 0.15s;
}
.section__head.is-visible .ornament::before {
  transform: translateY(-50%) scaleX(1);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--gold-soft);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 0.8em 1.9em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.15s ease, box-shadow 0.3s ease;
}
.btn:hover {
  background: var(--gold);
  color: #1a140a;                 /* texte foncé sur or = contraste AA */
  box-shadow: 0 10px 30px rgba(201, 162, 74, 0.22);
}
.btn:active { transform: translateY(1px); }
.btn--lg { font-size: 1.05rem; padding: 0.95em 2.5em; }

/* =========================================================
   EFFETS (barre de progression, embers de bougie)
   ========================================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(to right, var(--gold), var(--gold-glow));
  z-index: 60; pointer-events: none;
}
.hero__embers {
  position: absolute; inset: 0;
  z-index: 0; pointer-events: none;
  opacity: 0.85;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  background: #14110b;                            /* bandeau plein OPAQUE -> nom + liens lisibles */
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border-soft);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}
.nav.is-scrolled {
  background: #100d0a;
}
.nav__inner {
  max-width: 920px;              /* texte resserré vers l'intérieur (sur la bande centrale) */
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--text);
}
.nav__menu { display: flex; gap: clamp(1.2rem, 3vw, 2.6rem); }
.nav__menu a {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  position: relative;
  padding: 0.35em 0;
  transition: color 0.25s ease;
}
.nav__menu a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease);
}
.nav__menu a:hover { color: var(--gold-soft); }
.nav__menu a:hover::after { width: 100%; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  background: none; border: none; cursor: pointer;
  padding: 9px;
}
.nav__toggle span {
  display: block; height: 1.5px; width: 100%;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: rgba(13, 10, 8, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
    padding: 0.5rem 0 1.3rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.3s ease, visibility 0.3s ease;
  }
  .nav__menu.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__menu a { width: 100%; text-align: center; padding: 1rem 0; font-size: 0.9rem; }
  .nav__menu a::after { display: none; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 38%) 1fr;
  overflow: hidden;
  text-align: center;
}
.hero__side { position: relative; overflow: hidden; background: var(--bg-2); }
.hero__img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
  transform: scale(1.06);              /* marge pour Ken Burns + parallaxe (pilotés par GSAP) */
  will-change: transform;
}
.hero__side--left .hero__img  { object-position: 50% 20%; transform-origin: 50% 30%; }
.hero__side--right .hero__img { object-position: 50% 30%; transform-origin: 50% 35%; }

/* Couche de lumière chaude qui dérive lentement (effet « vivant ») dans la bande */
.hero__glow {
  position: absolute; inset: -12%;
  z-index: 0; pointer-events: none;
  background: radial-gradient(42% 38% at 50% 42%, rgba(201, 162, 74, 0.24), rgba(201, 162, 74, 0) 70%);
  animation: heroGlowDrift 17s ease-in-out infinite alternate;
}
@keyframes heroGlowDrift {
  0%   { transform: translate3d(-4%, -2%, 0) scale(1);    opacity: 0.65; }
  100% { transform: translate3d(5%, 3%, 0)  scale(1.14); opacity: 1; }
}
.hero__band {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);              /* bande pleine -> texte parfaitement lisible */
  border-left: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.55);
  padding: 2.5rem clamp(1rem, 3vw, 2.4rem);
  container-type: inline-size;       /* permet de dimensionner la phrase en cqw (1 seule ligne) */
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 100%;
}
/* L'entrée échelonnée du hero est pilotée par GSAP (initMotion).
   Sans GSAP / en reduced-motion, le contenu reste simplement visible. */

.hero__eyebrow {
  margin: 0 0 0.7rem;
  font-size: clamp(0.74rem, 2.5vw, 0.92rem);
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-glow);
}
.hero__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  letter-spacing: 0.012em;
  text-wrap: balance;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.6), 0 0 34px rgba(243, 217, 143, 0.16);
}
.hero__name-he {
  margin: 0.55rem 0 0;
  font-family: var(--he-serif);
  font-size: clamp(1.15rem, 3.5vw, 1.75rem);
  font-weight: 500;
  color: var(--text);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.hero__ornament { margin: 1.7rem auto; }
.hero__phrase {
  font-family: var(--he-serif);
  /* cqw = % de la largeur de la bande -> la phrase tient toujours sur UNE ligne */
  font-size: clamp(0.9rem, 4.5cqw, 1.5rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
  margin: 0 auto;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.65), 0 0 26px rgba(243, 217, 143, 0.14);
}
.hero__scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.hero__scroll-line {
  display: block;
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scrollPulse 2.4s ease-in-out infinite;
}

@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(22px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: scaleY(0.55); }
  50%      { opacity: 1; transform: scaleY(1); }
}

/* Hero triptyque -> empilé sur mobile/tablette : image / bande / image */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: 32vh auto 32vh;
  }
  .hero__band {
    border-left: none; border-right: none;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    padding: 2.6rem 1.4rem;
  }
}

/* =========================================================
   SECTIONS (commun)
   ========================================================= */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4.5rem, 11vw, 9rem) clamp(1.2rem, 4vw, 2.5rem);
  position: relative;
}
.section__head { text-align: center; margin-bottom: clamp(2.6rem, 5vw, 4rem); }
.section__title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 500;
  letter-spacing: 0.015em;
  text-wrap: balance;
}
.section__sub {
  margin: 1.1rem auto 0;
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 48ch;
}

/* ---------- About ---------- */
.about__body {
  max-width: 60ch;
  margin: 0 auto;
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  line-height: 1.95;
  color: var(--text-soft);
}
.about__body p + p { margin-top: 1.4rem; }
.about__body .about__benediction {
  text-align: center;
  margin-top: 2.6rem;
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  color: var(--gold-soft);
  letter-spacing: 0.02em;
}
.about__figure { margin: 2.8rem 0 0; }
.about__figure img {
  width: 100%; display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}
.about__figure figcaption {
  margin-top: 0.85rem;
  text-align: center;
  font-family: var(--he-serif);
  font-size: 1rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.about__lead::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.6em;
  line-height: 0.78;
  padding: 0.06em 0.12em 0 0;
  color: var(--gold-soft);
}
.about__quote {
  margin: 2.6rem auto 0;
  text-align: center;
  font-family: var(--he-serif);
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  line-height: 1.7;
  color: var(--text);
}
.placeholder-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--gold-soft);
  background: rgba(201, 162, 74, 0.1);
  border: 1px dashed rgba(201, 162, 74, 0.4);
  border-radius: var(--radius);
  padding: 0.4em 0.9em;
  margin: 0 0 1.7rem;
}

/* =========================================================
   GALLERY — volet roulant (carrousel horizontal / filmstrip)
   ========================================================= */
.gallery__carousel { position: relative; }
/* Fondu doux aux deux bords */
.gallery__carousel::before,
.gallery__carousel::after {
  content: "";
  position: absolute; top: 0; bottom: 18px;
  width: clamp(24px, 6vw, 80px);
  z-index: 2; pointer-events: none;
}
.gallery__carousel::before { left: 0;  background: linear-gradient(to right, var(--bg), transparent); }
.gallery__carousel::after  { right: 0; background: linear-gradient(to left,  var(--bg), transparent); }

.gallery__track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 12px 2px 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--bg-3);
}
.gallery__track::-webkit-scrollbar { height: 8px; }
.gallery__track::-webkit-scrollbar-track { background: var(--bg-3); border-radius: 8px; }
.gallery__track::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 8px; }
.gallery__track.is-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }

.gallery__item {
  flex: 0 0 auto;
  height: clamp(200px, 34vh, 330px);
  aspect-ratio: var(--ar, 3 / 4);     /* largeur = hauteur x vrai ratio -> rangée éditoriale variée */
  width: auto;
  max-width: 82vw;
  scroll-snap-align: center;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-soft);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);   /* profondeur au repos */
  user-select: none;
  /* skeleton shimmer tant que la photo n'est pas chargée */
  background-color: var(--bg-3);
  background-image: linear-gradient(110deg, var(--bg-3) 28%, rgba(201, 162, 74, 0.07) 50%, var(--bg-3) 72%);
  background-size: 220% 100%;
  animation: galShimmer 1.7s ease-in-out infinite;
  transition: transform 0.45s var(--ease), border-color 0.35s ease,
              box-shadow 0.45s ease, opacity 0.45s ease;
}
/* stop du shimmer dès l'image chargée (et pas de shimmer sur les vidéos) */
.gallery__item--video,
.gallery__item:has(img.is-loaded) { background-image: none; animation: none; }
.gallery__item img,
.gallery__item video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease), opacity 0.7s ease;
}
.gallery__item img { opacity: 0; }
.gallery__item img.is-loaded { opacity: 1; }

.gallery__item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(16,13,10,0.6), rgba(16,13,10,0) 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery__item:hover img,
.gallery__item:hover video { transform: scale(1.06); }
.gallery__item:hover::after { opacity: 1; }
.gallery__item:hover {
  border-color: rgba(201, 162, 74, 0.5);
  transform: translateY(-6px);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.55), 0 0 30px rgba(201, 162, 74, 0.14);
}
/* Focus : les autres cartes s'estompent légèrement quand on survole la rangée */
@media (hover: hover) and (pointer: fine) {
  .gallery__track:hover .gallery__item:not(:hover) { opacity: 0.62; }
}
@keyframes galShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Badge "play" sur les vidéos */
.gallery__item--video .play-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(16, 13, 10, 0.5);
  border: 1.5px solid var(--gold-soft);
  display: grid; place-items: center;
  pointer-events: none;
  z-index: 2;
  transition: background-color 0.3s ease, transform 0.3s var(--ease);
}
.gallery__item--video .play-badge::before {
  content: "";
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--gold-soft);
}
.gallery__item--video:hover .play-badge {
  background: var(--gold);
  transform: translate(-50%, -50%) scale(1.06);
}
.gallery__item--video:hover .play-badge::before { border-left-color: #1a140a; }

/* Flèches de navigation du carrousel */
.gallery__arrow {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(16, 13, 10, 0.72);
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  font-size: 1.9rem; line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}
.gallery__arrow:hover { background: var(--gold); color: #1a140a; }
.gallery__arrow:disabled { opacity: 0; pointer-events: none; }
.gallery__arrow--prev { left: 4px; }
.gallery__arrow--next { right: 4px; }
@media (max-width: 620px) {
  .gallery__arrow { width: 44px; height: 44px; font-size: 1.6rem; }
  .gallery__track { gap: 12px; }
  .gallery__item { height: clamp(135px, 22vh, 175px); } /* tuiles plus petites -> ~3 visibles */
}

.gallery__hint {
  text-align: center;
  margin: 1.5rem auto 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

/* Deux groupes : Photos / Vidéos */
.gallery__group + .gallery__group { margin-top: clamp(2.4rem, 6vw, 4rem); }
.gallery__label {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 500;
  color: var(--gold-soft);
  text-align: center;
  letter-spacing: 0.05em;
  margin: 0 0 1.2rem;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed; inset: 0;
  z-index: 100;
  background: rgba(8, 6, 4, 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__stage {
  max-width: 92vw; max-height: 84vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__stage img,
.lightbox__stage video {
  max-width: 92vw; max-height: 84vh;
  width: auto; height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
/* Ressort à l'ouverture : sur l'IMAGE uniquement. Un <video> dans un parent
   "transform" plante en lecture inline sur Android/Samsung (écran noir) -> la
   vidéo ne doit avoir AUCUN transform parent. */
.lightbox__stage img {
  transform: scale(0.94);
  transition: transform 0.5s cubic-bezier(0.34, 1.28, 0.64, 1);
}
.lightbox.is-open .lightbox__stage img { transform: scale(1); }
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(241, 236, 225, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background-color 0.25s ease, color 0.25s ease;
  z-index: 2;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: var(--gold); color: #1a140a; }
.lightbox__close {
  top: 20px; right: 20px;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.9rem; line-height: 1;
}
.lightbox__nav {
  top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  font-size: 2rem; line-height: 1;
}
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }
.lightbox__counter {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--gold-soft);
  z-index: 2;
}
@media (max-width: 620px) {
  .lightbox__nav { width: 46px; height: 46px; font-size: 1.6rem; }
  .lightbox__prev { left: 8px; } .lightbox__next { right: 8px; }
  .lightbox__close { top: 12px; right: 12px; }
}

/* =========================================================
   GUESTBOOK
   ========================================================= */
.guestbook { max-width: 780px; }
.gb__pager {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.4rem; margin: 2rem 0 0; direction: ltr;
}
.gb__page {
  min-width: 2.5em; height: 2.5em; padding: 0 0.65em;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-soft);
  border: 1px solid var(--border-soft); border-radius: 9px;
  font-family: var(--sans); font-size: 0.95rem; line-height: 1; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.gb__page:hover:not(:disabled):not(.is-current) { border-color: var(--gold); color: var(--gold-soft); }
.gb__page.is-current { background: var(--gold); color: #1a140a; border-color: var(--gold); font-weight: 600; cursor: default; }
.gb__page:disabled { opacity: 0.35; cursor: default; }
.gb__gap { color: var(--text-dim); padding: 0 0.2em; }
.gb__form {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  box-shadow: var(--shadow);
}
.gb__field { margin-bottom: 1.2rem; }
.gb__field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}
.gb__field input,
.gb__field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85em 0.95em;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.gb__field input::placeholder,
.gb__field textarea::placeholder { color: var(--text-dim); }
.gb__field input:focus,
.gb__field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.15);
}
.gb__submit { margin-top: 0.3rem; }
.gb__submit:disabled { opacity: 0.5; cursor: not-allowed; }
.gb__status {
  margin: 0.95rem 0 0;
  min-height: 1.2em;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.gb__status.is-error { color: var(--gold-soft); }
.gb__status.is-ok { color: #8bb98b; }

.gb__list { margin-top: 2.4rem; display: grid; gap: 1rem; }
.gb__note {
  text-align: center;
  color: var(--text-dim);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  padding: 1.6rem 0;
}
.gb__card {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
}
.gb__card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; margin-bottom: 0.4rem;
}
.gb__card-name { font-weight: 600; color: var(--text); }
.gb__card-date { font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; }
.gb__card-msg { color: var(--text-soft); white-space: pre-wrap; word-break: break-word; }

/* =========================================================
   SHARE
   ========================================================= */
.share { max-width: 740px; text-align: center; }
.share__body { font-size: 1.1rem; color: var(--text-soft); }
.share__hint { font-size: 0.95rem; color: var(--text-dim); margin-top: 0.7rem; }
.share .btn { margin-top: 2rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid var(--border-soft);
  text-align: center;
  padding: 3.4rem 1.4rem 3.8rem;
  background: var(--bg-2);
  position: relative;
}
.footer__ornament { margin: 0 auto 1.6rem; }
.footer__phrase {
  font-family: var(--he-serif);
  font-size: 1.35rem;
  color: var(--text);
  margin: 0 0 1.1rem;
}
.footer__name { color: var(--text-soft); margin: 0 0 0.35rem; font-size: 1.02rem; }
.footer__meta { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

/* =========================================================
   BOUGIES (yahrzeit) — fixées sur les côtés, CSS/SVG animé
   ========================================================= */
.candle-defs { position: absolute; }

.candles-fixed {
  position: fixed;
  bottom: clamp(14px, 3vh, 40px);
  z-index: 30;
  opacity: 0; visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
  pointer-events: none;
}
.candles-fixed.is-visible { opacity: 1; visibility: visible; }
.candles-fixed--left  { left: clamp(10px, 2.5vw, 50px); text-align: center; }
.candles-fixed--right { right: clamp(10px, 2vw, 44px); }

.candles-date {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.4vw, 1.4rem);
  color: var(--gold-soft);
  margin: 0.9rem 0 0;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}
.candles-date--he { font-family: var(--he-serif); color: var(--text-soft); margin-top: 0.2rem; }

/* Bouquet fondu en désordre (droite) */
.candle-pile {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center; flex-wrap: wrap;
  max-width: 210px; padding-bottom: 6px;
}
.candle-pile .candle { margin: 0 -3px; position: relative; z-index: 1; }
.wax-pool {
  position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: 200px; height: 28px; z-index: 0;
  background: radial-gradient(ellipse at 50% 35%, #d8c294, #a98c5e 55%, rgba(92, 74, 46, 0.5) 100%);
  border-radius: 48% 52% 45% 55% / 60% 65% 100% 100%;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.45);
}
.wax-pool::before, .wax-pool::after {
  content: ""; position: absolute; bottom: 0;
  background: radial-gradient(ellipse at 50% 40%, #cdb488, #a98c5e 70%);
  border-radius: 50% 50% 60% 60%;
}
.wax-pool::before { left: -16px; width: 42px; height: 15px; }
.wax-pool::after  { right: -14px; width: 34px; height: 13px; }

/* ---- Bougie ---- */
.candle {
  --cw: 34px; --wh: 92px; --fw: 18px; --fh: 40px;
  display: inline-flex; flex-direction: column; align-items: center;
  position: relative;
}
.candle--xl { --cw: 60px; --wh: 240px; --fw: 32px; --fh: 72px; }
.candle--sm { --cw: 18px; --wh: var(--sm-wh, 46px); --fw: 11px; --fh: 24px; }
.candle--md { --cw: 42px; --wh: 140px; --fw: 22px; --fh: 50px; }

/* Bougie + date en flux pour écrans étroits (les bougies fixes des côtés sont masquées) */
.candle-inline { display: none; }

.candle__flame-box { position: relative; line-height: 0; }
.candle__flame {
  display: block;
  width: var(--fw); height: var(--fh);
  transform-origin: 50% 92%;
  filter: drop-shadow(0 -1px 16px rgba(255, 172, 64, 0.85)) drop-shadow(0 0 5px rgba(255, 224, 150, 0.6));
  animation: flameFlicker 1.7s ease-in-out infinite alternate;
}
.candle__flame-box::after {
  content: ""; position: absolute; left: 50%; top: 42%;
  width: calc(var(--fw) * 5.4); height: calc(var(--fw) * 5.4);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 188, 90, 0.46), rgba(255, 188, 90, 0) 70%);
  border-radius: 50%; z-index: -1; pointer-events: none;
  animation: glowPulse 2.6s ease-in-out infinite alternate;
}
.candle__wick { width: 2px; height: 7px; background: #2c2016; }
.candle__wax {
  position: relative;
  width: var(--cw); height: var(--wh);
  border-radius: 6px 6px 5px 5px;
  background: linear-gradient(90deg, #5c4a2e 0%, #a98c5e 22%, #f0e2c2 50%, #a98c5e 78%, #5c4a2e 100%);
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.35), inset 0 4px 6px rgba(255, 255, 255, 0.18);
}
.candle__wax::before {
  content: ""; position: absolute; top: -4px; left: -1px; right: -1px; height: 12px;
  background: radial-gradient(ellipse at 50% 35%, #f7eed6, #c9b187);
  border-radius: 50%;
}
.candle__wax::after {
  content: ""; position: absolute; top: 9%; right: 16%;
  width: calc(var(--cw) * 0.16); height: 40%;
  background: linear-gradient(#f0e2c2, #b89a68);
  border-radius: 50% 50% 60% 60%; opacity: 0.8;
}

/* Désordre : flammes désynchronisées + hauteurs (fondues) et inclinaisons variées */
.candle-pile .candle:nth-child(2n) .candle__flame { animation-duration: 2.1s; animation-delay: -0.5s; }
.candle-pile .candle:nth-child(3n) .candle__flame { animation-duration: 1.4s; animation-delay: -1s; }
.candle-pile .candle:nth-child(4n) .candle__flame { animation-duration: 1.9s; animation-delay: -0.3s; }
.candle-pile .candle { --sm-wh: 44px; }
.candle-pile .candle:nth-child(2n) { --sm-wh: 30px; transform: rotate(-5deg); }
.candle-pile .candle:nth-child(3n) { --sm-wh: 64px; transform: rotate(4deg); }
.candle-pile .candle:nth-child(4n) { --sm-wh: 22px; transform: rotate(-3deg); }
.candle-pile .candle:nth-child(5n) { --sm-wh: 52px; transform: rotate(6deg); }
.candle-pile .candle:nth-child(6n) { --sm-wh: 36px; transform: rotate(-6deg); }
.candle-pile .candle:nth-child(7n) { --sm-wh: 72px; transform: rotate(3deg); }

@keyframes flameFlicker {
  0%   { transform: scale(1) skewX(0deg); opacity: 0.9; }
  20%  { transform: scale(1.05, 0.96) skewX(2.5deg); opacity: 1; }
  40%  { transform: scale(0.97, 1.05) skewX(-2deg); opacity: 0.95; }
  60%  { transform: scale(1.03, 0.99) skewX(1.5deg) translateX(0.5px); opacity: 1; }
  80%  { transform: scale(0.99, 1.02) skewX(-1deg); opacity: 0.93; }
  100% { transform: scale(1) skewX(0deg); opacity: 0.97; }
}
@keyframes glowPulse {
  0%   { opacity: 0.72; transform: translate(-50%, -50%) scale(0.92); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.16); }
}

@media (max-width: 1280px) {
  .candles-fixed { display: none; }   /* écrans étroits : on évite le chevauchement avec le contenu */
  .candle-inline {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    padding: clamp(2.6rem, 9vw, 4.5rem) 1rem 0;   /* respiration après le hero */
    text-align: center;
  }
}

/* ---- Section « Light a candle » ---- */
.light { max-width: 640px; text-align: center; }
.light__inner { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.light__candle { --cw: 44px; --wh: 132px; --fw: 22px; --fh: 48px; }
.light__candle .candle__flame-box { opacity: 0; transition: opacity 0.9s var(--ease); }
.light__candle.is-lit .candle__flame-box { opacity: 1; }
.light__count {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--text-soft);
}
.light__count #candle-count-num { color: var(--gold-soft); font-weight: 600; font-size: 1.15em; }
.light__msg { min-height: 1.3em; margin: 0; color: var(--gold-soft); font-family: var(--he-serif); }

/* =========================================================
   Révélation au scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__img { animation: none; transform: none; }
  .hero__glow { animation: none; }
  .hero__content > * { opacity: 1; }
  .gallery__track { scroll-behavior: auto; }
}
