/* ===================================
   Yinde Clean — Custom Styles
   =================================== */

/* --- Smooth Scrolling --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* --- Global Selection --- */
::selection {
  background-color: rgba(46, 204, 135, 0.2);
  color: #1A1A2E;
}

/* ===================================
   ANIMATIONS
   =================================== */

/* Hero scroll indicator */
@keyframes scrollDown {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.5; }
  100% { transform: translateY(0); opacity: 1; }
}

.animate-scroll-down {
  animation: scrollDown 2s ease-in-out infinite;
}

/* Fade-in-up animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

/* Scroll-triggered animation */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   NAVIGATION
   =================================== */

/* Glassmorphism on scroll */
#navbar {
  background: transparent;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar.scrolled {
  background: rgba(26, 43, 74, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(26, 43, 74, 0.15);
}

#navbar.scrolled #nav-inner {
  height: 4.5rem;
}

#navbar.scrolled #logo-text {
  color: white;
}

#navbar.scrolled .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

#navbar.scrolled .nav-link:hover {
  color: white;
}

/* Active nav link */
.nav-link.active {
  color: white !important;
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #2ECC87;
  border-radius: 50%;
}

/* Hamburger Menu */
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  position: absolute;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-line.top { transform: translateY(-7px); }
.hamburger-line.middle { transform: translateY(0); }
.hamburger-line.bottom { transform: translateY(7px); }

.menu-open .hamburger-line.top {
  transform: rotate(45deg);
}

.menu-open .hamburger-line.middle {
  opacity: 0;
  transform: translateX(-10px);
}

.menu-open .hamburger-line.bottom {
  transform: rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 21, 37, 0.98);
  backdrop-filter: blur(20px);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-link {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease-out;
}

.mobile-menu-overlay.open .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-overlay.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-overlay.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-overlay.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-overlay.open .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu-overlay.open .mobile-nav-link:nth-child(6) { transition-delay: 0.35s; }

/* ===================================
   HERO
   =================================== */

.hero-particles {
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.1), transparent),
    radial-gradient(2px 2px at 80% 20%, rgba(255,255,255,0.08), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(255,255,255,0.06), transparent),
    radial-gradient(2px 2px at 60% 50%, rgba(255,255,255,0.05), transparent);
}

/* ===================================
   SERVICE CARDS
   =================================== */

.service-accent-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: #2ECC87;
  border-radius: 16px 0 0 16px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-accent-bar {
  width: 4px;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26, 43, 74, 0.12);
}

.service-card-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26, 43, 74, 0.25);
}

/* ===================================
   GALLERY
   =================================== */

.gallery-filter {
  color: #6B7280;
  background: white;
  border: 1px solid #E5E7EB;
}

.gallery-filter:hover {
  color: #1A1A2E;
  border-color: #2ECC87;
}

.gallery-filter.active {
  background: #2ECC87;
  color: white;
  border-color: #2ECC87;
}

.gallery-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item.hidden-item {
  opacity: 0;
  transform: scale(0.9);
  position: absolute;
  pointer-events: none;
}

/* ===================================
   TESTIMONIALS CAROUSEL
   =================================== */

.testimonial-dot {
  background: rgba(26, 43, 74, 0.2);
}

.testimonial-dot.active {
  background: #2ECC87;
  width: 2rem;
  border-radius: 9999px;
}

/* ===================================
   FAQ ACCORDION
   =================================== */

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-content {
  max-height: 200px;
}

.faq-item.open .faq-trigger i {
  transform: rotate(180deg);
}

/* ===================================
   LIGHTBOX
   =================================== */

#lightbox.active {
  display: flex;
}

#lightbox img {
  transition: opacity 0.3s ease;
}

/* ===================================
   WHATSAPP BUTTON
   =================================== */

.whatsapp-btn {
  animation: whatsappPulse 3s ease-in-out infinite;
}

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6); }
}

/* ===================================
   COOKIE BANNER
   =================================== */

#cookie-banner.show {
  transform: translateY(0);
}

/* ===================================
   FORM
   =================================== */

.contact-input:focus {
  box-shadow: 0 0 0 3px rgba(46, 204, 135, 0.15);
}

/* Select arrow override */
select.contact-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

/* ===================================
   STATS FLOATING BAR
   =================================== */

.stats-floating-bar {
  position: relative;
}

/* ===================================
   SCROLL INDICATOR
   =================================== */

.scroll-indicator {
  animation: fadeInUp 1s ease-out 1.5s both;
}

/* ===================================
   LOADING ANIMATION
   =================================== */

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

/* ===================================
   RESPONSIVE ADJUSTMENTS
   =================================== */

@media (max-width: 640px) {
  .hero-particles {
    display: none;
  }

  /* Smaller hero text on mobile */
  #accueil h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  /* Better spacing on mobile cards */
  .service-card {
    padding: 1.5rem;
  }

  /* Process step connection on mobile */
  .process-step::before {
    display: none;
  }

  /* Stats section mobile */
  #stats .font-extrabold {
    font-size: 2rem;
  }

  /* Footer columns mobile */
  footer .grid {
    text-align: center;
  }

  footer .flex.items-center.gap-3 {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* Adjust FAQ for mobile */
  .faq-trigger span {
    font-size: 0.9375rem;
  }

  /* Gallery 2 cols */
  #gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  /* Process connection line adjustments */
  .process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 2rem;
    right: -1.5rem;
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, rgba(46, 204, 135, 0.3), rgba(46, 204, 135, 0.1));
  }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
  #navbar, .whatsapp-btn, #cookie-banner, .scroll-indicator {
    display: none !important;
  }

  section {
    page-break-inside: avoid;
  }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

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

  html {
    scroll-behavior: auto;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }

  .fade-in-up {
    opacity: 1;
    transform: none;
  }
}

/* Focus visible styles */
:focus-visible {
  outline: 2px solid #2ECC87;
  outline-offset: 2px;
  border-radius: 4px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #2ECC87;
  outline-offset: 2px;
}
