/* ============================================================
   KOUPAT HAYECHOUOT RASHBI — Custom styles
   Tailwind handles 90% — this file extends with parallax,
   reveal animations, donation widget states & carrousel.
============================================================ */

:root {
  --gold: #D4AF37;
  --gold-dark: #B8941F;
  --gold-light: #E8C75A;
  --ink: #1E293B;
  --night: #0F172A;
  --cream: #F9FAFB;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { overflow-x: hidden; }

/* ===== HEADER : two states (dark hero / light scrolled) ===== */

/* Default state — over hero (dark background) : white text + subtle dark gradient veil */
#site-header {
  background-image: linear-gradient(to bottom, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0));
  background-color: transparent;
  transition: background-color .35s ease, background-image .35s ease, box-shadow .35s ease, backdrop-filter .35s ease;
}
#site-header .header-brand {
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: color .25s ease, text-shadow .25s ease;
}
#site-header .header-brand-sub {
  color: var(--gold-light);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: color .25s ease;
}
#site-header .nav-link {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: color .25s ease, text-shadow .25s ease;
}
#site-header .nav-link:hover { color: var(--gold-light); }
#site-header .menu-toggle-btn {
  color: #FFFFFF;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
  transition: color .25s ease, filter .25s ease;
}

/* Scrolled state — over white sections : dark text, glass background */
#site-header.scrolled {
  background-image: none;
  background-color: rgba(249, 250, 251, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(30, 41, 59, 0.06), 0 10px 30px -20px rgba(30, 41, 59, 0.2);
}
#site-header.scrolled .header-brand { color: var(--ink); text-shadow: none; }
#site-header.scrolled .header-brand-sub { color: var(--gold-dark); text-shadow: none; }
#site-header.scrolled .nav-link {
  color: rgba(30, 41, 59, 0.82);
  text-shadow: none;
}
#site-header.scrolled .nav-link:hover { color: var(--gold-dark); }
#site-header.scrolled .menu-toggle-btn { color: var(--ink); filter: none; }

.logo-mark { box-shadow: 0 6px 20px -6px rgba(212, 175, 55, 0.6), inset 0 0 0 1px rgba(212, 175, 55, 0.4); }

/* ===== Active nav link indicator ===== */
.nav-link { position: relative; padding-bottom: 2px; }
.nav-link.nav-link-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* ===== Discreet "Faire un don" button (header) ===== */
.btn-donate-discrete {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  border: 1.5px solid var(--gold-light);
  color: var(--gold-light);
  background: transparent;
  transition: all .25s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.btn-donate-discrete:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  text-shadow: none;
  transform: translateY(-1px);
}
#site-header.scrolled .btn-donate-discrete {
  border-color: var(--gold);
  color: var(--gold-dark);
  text-shadow: none;
}
#site-header.scrolled .btn-donate-discrete:hover {
  background: var(--gold);
  color: var(--ink);
}

/* ===== PARALLAX backgrounds ===== */
.parallax-bg {
  position: absolute;
  inset: -10% 0 -10% 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  will-change: transform;
}
/* Mobile: drop fixed (iOS doesn't support background-attachment:fixed reliably) */
@media (max-width: 1024px) {
  .parallax-bg { background-attachment: scroll; inset: 0; }
}

/* ===== REVEAL on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ===== MISSION cards ===== */
.mission-card {
  position: relative;
  padding: 2rem 1.75rem;
  background: #fff;
  border: 1px solid rgba(30, 41, 59, 0.06);
  border-radius: 1.5rem;
  box-shadow: 0 8px 30px -15px rgba(30, 41, 59, 0.12);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  overflow: hidden;
}
.mission-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -20px rgba(30, 41, 59, 0.2);
  border-color: rgba(212, 175, 55, 0.4);
}
.mission-icon {
  width: 3.5rem; height: 3.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
  color: var(--gold-dark);
  margin-bottom: 1.25rem;
  transition: transform .35s ease, background .35s ease;
}
.mission-icon svg { width: 1.6rem; height: 1.6rem; }
.mission-card:hover .mission-icon { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: #fff; transform: rotate(-4deg); }
.mission-title { font-family: 'Cormorant Garamond', serif; font-size: 1.55rem; font-weight: 600; color: var(--ink); margin-bottom: 0.5rem; }
.mission-text { font-size: 0.95rem; color: rgba(30,41,59,0.7); line-height: 1.6; }
.mission-bar {
  display: block; margin-top: 1.5rem;
  height: 2px; width: 2.5rem;
  background: var(--gold);
  transition: width .35s ease;
}
.mission-card:hover .mission-bar { width: 4rem; }

/* ===== PLACE cards (lieux saints) ===== */
.place-card {
  position: relative; overflow: hidden;
  border-radius: 1.5rem;
  aspect-ratio: 4 / 5;
  box-shadow: 0 12px 35px -18px rgba(30, 41, 59, 0.4);
  isolation: isolate;
}
.place-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.place-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15,23,42,0.2) 50%, rgba(15,23,42,0) 100%);
  z-index: 1;
}
.place-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.5rem 1.5rem 1.75rem;
  z-index: 2;
  color: #fff;
}
.place-card figcaption strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem; font-weight: 600;
  margin-top: 0.25rem;
  letter-spacing: -0.01em;
}
.place-card figcaption em {
  display: inline-block;
  font-style: normal;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
}
.place-card:hover img { transform: scale(1.06); }

/* ===== HASKAMOT carousel ===== */
.haskamot-track {
  display: flex;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.haskamot-card {
  flex: 0 0 100%;
  padding: 2rem 0.5rem 2rem;
  text-align: center;
  position: relative;
}
@media (min-width: 768px) {
  .haskamot-card { padding: 3rem 4rem; }
}
.haskamot-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 7rem; line-height: 0.5;
  color: var(--gold);
  opacity: 0.4;
  margin-bottom: 1rem;
  display: block;
  user-select: none;
}
.haskamot-card footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(30, 41, 59, 0.1);
}
.haskamot-btn {
  width: 2.75rem; height: 2.75rem;
  border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid rgba(30, 41, 59, 0.12);
  color: var(--ink);
  transition: all .25s ease;
}
.haskamot-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: scale(1.05); }
.haskamot-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 9999px;
  background: rgba(30, 41, 59, 0.2);
  transition: all .3s ease;
}
.haskamot-dot.active { background: var(--gold); width: 1.5rem; border-radius: 9999px; }

/* ===== "La dure réalité" — stat cards (qui-sommes-nous) ===== */
.reality-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 1.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .35s ease, border-color .35s ease, background .35s ease;
}
.reality-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(255, 255, 255, 0.06);
}
.reality-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 600;
  color: var(--gold-light);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.reality-label {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* ===== CALLBACK FORM — Time-slot buttons ===== */
.slot-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.25rem;
  padding: 1rem 0.5rem;
  background: #fff;
  border: 2px solid rgba(30, 41, 59, 0.1);
  border-radius: 1rem;
  transition: all .25s ease;
  cursor: pointer;
  min-height: 80px;
}
.slot-btn:hover {
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.04);
  transform: translateY(-2px);
}
.slot-btn .slot-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.slot-btn .slot-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(30, 41, 59, 0.55);
}
.slot-btn.slot-active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212,175,55,0.14), rgba(212,175,55,0.04));
  box-shadow: 0 8px 24px -8px rgba(212,175,55,0.5);
  transform: translateY(-2px);
}
.slot-btn.slot-active .slot-label { color: var(--gold-dark); font-weight: 600; }

/* ===== CONTACT icons ===== */
.contact-icon {
  flex-shrink: 0;
  width: 2.75rem; height: 2.75rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.06));
  color: var(--gold-dark);
}
.contact-icon svg { width: 1.25rem; height: 1.25rem; }

/* ===== SOCIAL links footer ===== */
.social-link {
  width: 2.5rem; height: 2.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  transition: all .25s ease;
}
.social-link:hover { background: var(--gold); color: var(--ink); transform: translateY(-2px); }

/* ===== Number counter style polish ===== */
.counter { display: inline-block; font-variant-numeric: tabular-nums; }

/* ===== Hide native number spinners for cleaner UI ===== */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* ===== Form field invalid state ===== */
.is-invalid {
  border-color: #DC2626 !important;
  background-color: rgba(220, 38, 38, 0.04) !important;
}

/* ===== Subtle animation on initial load for hero ===== */
@keyframes glow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}
#hero .animate-pulse { animation: glow 2.4s ease-in-out infinite; }

/* ===== Hero text legibility — ombre portée subtile sur le titre ===== */
#hero h1,
#hero p { text-shadow: 0 2px 12px rgba(15, 23, 42, 0.45); }
#hero .font-hebrew { text-shadow: 0 2px 8px rgba(15, 23, 42, 0.6); }
