/* ========================================
   Coiffure Mile-End — Custom overrides
   (chargé après Tailwind CDN)
   ======================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Header sticky : transparent → solide au scroll ---- */
#site-header {
  background: transparent;
  backdrop-filter: blur(0);
}
#site-header.scrolled {
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 2px 20px rgba(27, 45, 42, 0.06);
}
/* Texte du header en cream quand transparent (au-dessus du hero), dark sinon */
#site-header:not(.scrolled) .nav-link,
#site-header:not(.scrolled) > div > nav > a:first-child,
#site-header:not(.scrolled) #menu-toggle {
  color: #FAF7F2;
}
#site-header:not(.scrolled) .nav-link:hover {
  color: #C9A961;
}
#site-header.scrolled .nav-link,
#site-header.scrolled #menu-toggle {
  color: #1B2D2A;
}
#site-header.scrolled > div > nav > a:first-child {
  color: #2D6A4F;
}

/* ---- Service cards ---- */
.service-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.75rem;
  background: #FAF7F2;
  border: 1px solid rgba(27, 45, 42, 0.06);
  border-radius: 1rem;
  transition: all 0.3s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -10px rgba(27, 45, 42, 0.12);
  border-color: rgba(45, 106, 79, 0.25);
}
.service-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 106, 79, 0.08);
  border-radius: 0.75rem;
  font-size: 1.5rem;
}

/* ---- Review cards ---- */
.review-card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: #FAF7F2;
  border: 1px solid rgba(27, 45, 42, 0.06);
  border-radius: 1rem;
  transition: all 0.3s ease;
}
.review-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -10px rgba(27, 45, 42, 0.12);
}

/* ---- Form inputs ---- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(27, 45, 42, 0.12);
  border-radius: 0.625rem;
  background: #FAF7F2;
  color: #1B2D2A;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: #2D6A4F;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}
.form-input::placeholder {
  color: rgba(107, 114, 128, 0.6);
}
.form-input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #dc2626;
}

/* ---- Fade-in au scroll ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Animation flèche scroll hero ---- */
@keyframes bounce-slow {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -10px); }
}
.animate-bounce-slow {
  animation: bounce-slow 2.4s ease-in-out infinite;
}

/* ---- Galerie : bouton sans style par défaut ---- */
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  break-inside: avoid;
  overflow: hidden;
  border-radius: 0.75rem;
  transition: transform 0.4s ease;
}
.gallery-item img {
  display: block;
  transition: transform 0.6s ease;
}
.gallery-item:hover img {
  transform: scale(1.04);
}
.gallery-item:focus-visible {
  outline: 3px solid #2D6A4F;
  outline-offset: 3px;
}

/* ---- Lightbox ---- */
#lightbox.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- Accessibilité : focus visible ---- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #2D6A4F;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Mobile menu animation ---- */
#mobile-menu:not(.hidden) {
  animation: slideDown 0.25s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Réduit l'animation si l'utilisateur préfère ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in {
    opacity: 1;
    transform: none;
  }
}
