/* Les polices sont chargées via <link> dans index.html (pas de @import bloquant). */

:root {
  --color-berlioz-black: #070707;
  --color-berlioz-dark: #0E100F;
  --color-berlioz-charcoal: #1A1C1A;
  --color-berlioz-gold: #C5A880;
  --color-berlioz-gold-light: #E2CFA8;
  --color-berlioz-gold-dark: #9A805B;
  --color-berlioz-surface: #EFECE5;
}

html {
  font-size: 112.5%; /* 100% = taille d'origine */
  scroll-behavior: smooth;
  scroll-padding-top: 6rem; /* compense le header fixe (h-24) */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--color-berlioz-black);
  color: var(--color-berlioz-surface);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-cinzel {
  font-family: 'Cinzel', serif;
}

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

.skip-to-content {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-berlioz-gold);
  color: #000;
  padding: 0.75rem 1.5rem;
  z-index: 100;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
}

.glass-dark {
  background: rgba(14, 16, 15, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(197, 168, 128, 0.2);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.glass-header {
  background: rgba(7, 7, 7, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.03);
  }
}

.animate-glow {
  animation: pulseGlow 6s infinite ease-in-out;
}

.text-gold-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, #E2CFA8 50%, #C5A880 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #FFFFFF;
  -webkit-box-shadow: 0 0 0px 1000px #070707 inset;
  transition: background-color 5000s ease-in-out 0s;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-berlioz-black);
}

::-webkit-scrollbar-thumb {
  background: var(--color-berlioz-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-berlioz-gold-light);
}

button, a {
  touch-action: manipulation;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Boule de lumière "soleil" au centre des liens du menu au survol / focus */
a.nav-glow {
  position: relative;
  isolation: isolate;
  transition-property: color, text-shadow, border-color;
  transition-duration: 0.3s;
}

a.nav-glow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130px;
  height: 130px;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 246, 225, 0.65) 0%,
    rgba(240, 220, 175, 0.45) 22%,
    rgba(197, 168, 128, 0.22) 45%,
    rgba(197, 168, 128, 0) 70%
  );
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

a.nav-glow:hover::before,
a.nav-glow:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

a.nav-glow:hover,
a.nav-glow:focus-visible {
  color: #FFFFFF;
  text-shadow: 0 0 10px rgba(255, 240, 205, 0.9);
}

/* Menu mobile : boule plus petite pour rester dans l'écran */
a.nav-glow.block::before {
  width: 100px;
  height: 100px;
  left: 40px;
}

@keyframes sunPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.12); }
}


/* Slider du hero : fondu enchaîné lent et fluide.
   L'image sortante reste opaque jusqu'à la fin du fondu de l'image entrante. */
.slide-item {
  transition-property: opacity;
  transition-duration: 2.5s;
  transition-timing-function: ease-in-out;
}
.slide-item.opacity-0 {
  transition-delay: 2.5s;
}
@media (prefers-reduced-motion: reduce) {
  .slide-item { transition-duration: 2.5s !important; }
}


/* Impression de la rubrique « Que faire en cas de décès ? » */
@media print {
  header, footer, .skip-to-content, .no-print, #heroSlider, section:not(#deces) { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  main { padding: 0 !important; }
  #deces { background: #fff !important; padding: 0 !important; border: 0 !important; }
  #deces * {
    color: #000 !important; background: transparent !important; box-shadow: none !important;
    backdrop-filter: none !important; text-shadow: none !important; border-color: #999 !important;
  }
  #deces .grid { display: block !important; }
  #deces article { break-inside: avoid; margin-bottom: 14pt; border: 1px solid #999 !important; }
}