/* ================================================================
   LE SAINT ESPRIT — main.css
   Reset · Base · Navigation · Footer · Animations · Composants
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500&display=swap');
@import url('tokens.css');

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: clip;
}
html, body { overflow-x: clip; }

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* ── Typographie de base ─────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ── Utilitaires partagés ───────────────────────────────── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.container {
  width: min(100%, 1100px);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

/* Séparateur doré */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-block: var(--space-xl);
  color: var(--color-stone);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.divider-icon { color: var(--color-gold); font-size: var(--text-md); }

/* Bouton principal */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
  min-height: 44px;
}
.btn-primary {
  background: var(--color-bordeaux);
  color: #fff;
  border: 1px solid var(--color-bordeaux);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--color-bordeaux-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  outline: none;
}
.btn-outline {
  background: transparent;
  color: var(--color-bordeaux);
  border: 1px solid var(--color-bordeaux);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--color-bordeaux);
  color: #fff;
  transform: translateY(-2px);
  outline: none;
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { border-color: var(--color-stone); }

.hero-actions .btn-ghost,
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.hero-actions .btn-ghost:hover,
.hero-actions .btn-ghost:focus-visible,
.btn-ghost-light:hover,
.btn-ghost-light:focus-visible {
  background: #ffffff;
  color: var(--color-bordeaux) !important;
  border-color: #ffffff;
  text-shadow: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ── Section Carte / Google Maps ── */
.resa-map-section {
  background: #EAE2D5;
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-2xl);
  margin: 0;
}
.map-card-wrapper {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.map-card-split {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
}
.map-info-col {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}
.map-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin: 0.25rem 0 0.5rem;
}
.map-subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.map-frame-wrap {
  width: 100%;
  height: 100%;
  min-height: 420px;
  position: relative;
  background: #eeebe5;
}
.map-frame-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}
@media (max-width: 860px) {
  .map-card-split {
    grid-template-columns: 1fr;
  }
  .map-info-col {
    padding: var(--space-lg);
  }
  .map-frame-wrap {
    height: 320px;
    min-height: 320px;
  }
}


/* ── Navigation ─────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding-block: var(--space-md);
  transition: background var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              padding var(--duration-fast) var(--ease-out);
}
.site-header.scrolled {
  background: rgba(245, 240, 230, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border), var(--shadow-sm);
  padding-block: 0.875rem;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--font-logo);
  font-size: 1.75rem;
  color: var(--color-bordeaux);
  letter-spacing: 0.01em;
  line-height: 1;
}
.site-logo a:focus-visible { outline: 2px solid var(--color-bordeaux); border-radius: 2px; }

/* Nav desktop */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.nav-links a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-text);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--duration-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--color-bordeaux);
  transition: width var(--duration-fast) var(--ease-out);
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--color-bordeaux); outline: none; }
.nav-links a:hover::after, .nav-links a:focus-visible::after { width: 100%; }
.nav-links a:focus-visible { outline: 2px solid var(--color-bordeaux); border-radius: 2px; }

.nav-cta {
  font-size: var(--text-sm) !important;
  padding: 0.6rem 1.4rem !important;
}

/* Burger — mobile */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: var(--radius-sm);
  z-index: 110;
}
.nav-burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--color-text);
  transition: all var(--duration-fast) var(--ease-out);
  transform-origin: center;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Header transparent au-dessus d'un hero sombre */
.header-transparent:not(.scrolled) .site-logo a {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.header-transparent:not(.scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.9);
}
.header-transparent:not(.scrolled) .nav-links a:hover,
.header-transparent:not(.scrolled) .nav-links a:focus-visible {
  color: #fff;
}
.header-transparent:not(.scrolled) .nav-links a::after {
  background: #fff;
}
.header-transparent:not(.scrolled) .nav-cta {
  border-color: rgba(255, 255, 255, 0.8) !important;
  color: #fff !important;
}
.header-transparent:not(.scrolled) .nav-cta:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}
.header-transparent:not(.scrolled) .nav-burger span {
  background: #fff;
}

/* Drawer mobile */
.nav-drawer {
  display: flex;
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 105;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: opacity var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-out);
}
.nav-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.nav-drawer a {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-text);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-md);
  transition: color var(--duration-fast);
}
.nav-drawer a:hover { color: var(--color-bordeaux); }
.nav-drawer .btn { margin-top: var(--space-sm); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--color-encre);
  color: rgba(245, 240, 230, 0.75);
  padding-block: var(--space-2xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.3fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(245, 240, 230, 0.1);
}
.footer-logo {
  font-family: var(--font-logo);
  font-size: 2.5rem;
  color: var(--color-stone);
  display: block;
  margin-bottom: var(--space-sm);
}
.footer-tagline {
  font-size: var(--text-sm);
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: var(--space-md);
}
.footer-address {
  font-size: var(--text-sm);
  font-style: normal;
  line-height: 2;
}
.footer-col-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: var(--space-md);
}
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a {
  font-size: var(--text-sm);
  color: rgba(245, 240, 230, 0.65);
  transition: color var(--duration-fast);
}
.footer-links a:hover { color: var(--color-stone); }
.footer-hours {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: var(--text-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-hours-item,
.footer-hours > li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(245, 240, 230, 0.08);
}
.footer-hours-item:last-child,
.footer-hours > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.footer-hours-item .hours-day,
.footer-hours .hours-day {
  color: var(--color-stone);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.footer-hours-item .hours-time,
.footer-hours .hours-time {
  color: rgba(245, 240, 230, 0.85);
  font-size: 0.875rem;
  white-space: nowrap;
}
.footer-hours-item.closed .hours-time,
.footer-hours .closed .hours-time {
  color: rgba(245, 240, 230, 0.45);
  font-style: italic;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-lg);
  font-size: var(--text-xs);
  color: rgba(245, 240, 230, 0.4);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ── Animations scroll (IntersectionObserver) ────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out);
}
.reveal.visible, body.no-js .reveal { opacity: 1; transform: translateY(0); }
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out);
}
.reveal-left.visible, body.no-js .reveal-left { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out);
}
.reveal-right.visible, body.no-js .reveal-right { opacity: 1; transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Délais stagger */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ── Page wrapper ────────────────────────────────────────── */
main { padding-top: 80px; }

/* ── Focus visible global ────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-bordeaux);
  outline-offset: 3px;
}

/* ============================================================
   RESPONSIVE — Mobile-first repensé
   ============================================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (hover: none), (pointer: coarse) {
  /* Désactivation curseur custom et tracking souris sur mobile */
  * { cursor: auto !important; }
  .btn:hover, .btn-primary:hover, .btn-outline:hover {
    transform: none;
    box-shadow: none;
  }
}
