/* ===== Belvys - Animations & Polish ===== */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Hero entrance animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(234, 42, 51, 0.2); }
  50% { box-shadow: 0 0 40px rgba(234, 42, 51, 0.4); }
}

/* Hero content: animation handled in inline styles in index.html for priority */
/* Keep this definition for other pages that might use it */
@keyframes slideFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-100vw);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* This is overridden by inline styles in index.html for the hero */
.hero-reveal {
  opacity: 0;
  animation: slideFromLeft 8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.hero-reveal-delay-1 { animation-delay: 1s; }
.hero-reveal-delay-2 { animation-delay: 3s; }
.hero-reveal-delay-3 { animation-delay: 5s; }
.hero-reveal-delay-4 { animation-delay: 7s; }
.hero-reveal-delay-5 { animation-delay: 9s; }

/* Scroll-triggered reveal (JS adds .revealed) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll.revealed-delay-1 { transition-delay: 0.1s; }
.reveal-on-scroll.revealed-delay-2 { transition-delay: 0.2s; }
.reveal-on-scroll.revealed-delay-3 { transition-delay: 0.3s; }
.reveal-on-scroll.revealed-delay-4 { transition-delay: 0.4s; }

/* Button hover effects */
.btn-animate {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-animate:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(234, 42, 51, 0.3);
}

.btn-animate:active {
  transform: translateY(0) scale(0.98);
}

/* Card hover lift */
.card-hover {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dark .card-hover:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Gradient text animation */
.gradient-text-animate {
  background-size: 200% auto;
  animation: gradientShift 4s ease infinite;
}

/* Hero image subtle parallax */
.hero-img-wrap {
  transition: transform 0.5s ease-out;
}

/* Navbar scroll effect */
nav.nav-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.dark nav.nav-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Benefit icons bounce on hover */
.benefit-icon {
  transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.benefit-icon:hover {
  transform: scale(1.1);
}

/* Link underline animation */
.link-underline {
  position: relative;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}

.link-underline:hover::after {
  width: 100%;
}

/* Testimonial card entrance */
.testimonial-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(234, 42, 51, 0.3);
  box-shadow: 0 20px 40px -15px rgba(234, 42, 51, 0.15);
}

/* Promo banner overlay shimmer */
.promo-shine {
  position: relative;
  overflow: hidden;
}

.promo-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transition: left 0.6s ease;
}

.promo-shine:hover::before {
  left: 100%;
}

/* Social icons hover */
.social-icon {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1);
}

.social-icon img {
  transition: transform 0.3s ease;
}

.social-icon:hover img {
  transform: scale(1.1);
}

/* ===== Titres & Sous-titres animés ===== */
.title-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.title-animate.revealed {
  opacity: 1;
  transform: translateY(0);
}

.title-animate::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #ea2a33, #f97316);
  margin-top: 0.25em;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.title-animate.revealed::after {
  width: 80px;
}

/* Titre sur fond sombre (promo) */
.promo-shine .title-animate::after {
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0.6));
}

.subtitle-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out 0.2s, transform 0.7s ease-out 0.2s;
}

.subtitle-animate.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Titres avec effet de soulignement au survol */
.title-hover-underline {
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
}

.title-hover-underline::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ea2a33;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.title-hover-underline:hover::before {
  width: 100%;
}

/* ===== Boutons CTA animés ===== */
.btn-cta {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px -8px rgba(234, 42, 51, 0.45);
}

.btn-cta:hover::before {
  left: 100%;
}

.btn-cta:active {
  transform: translateY(0) scale(0.98);
}

/* CTA secondaire (outline) */
.btn-cta-outline:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.15);
}
