/* ===== ECUDEAL – Custom Styles ===== */

* { box-sizing: border-box; }

body { font-family: 'Inter', sans-serif; }

/* Navbar scroll effect */
#navbar {
  background: transparent;
}
#navbar.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* Counter animation */
.counter { will-change: contents; }

/* Service card hover */
.service-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.service-card:hover { transform: translateY(-2px); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #030712; }
::-webkit-scrollbar-thumb { background: #1a2540; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6366f1; }

/* Form focus styles */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Upload drag zone */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
}

/* Progress bar animation */
@keyframes progress {
  from { width: 0%; }
}
.progress-bar { animation: progress 2s ease-out forwards; }

/* Badge pulse */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
}

/* Fade in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease forwards; }

/* Selection color */
::selection { background: rgba(99, 102, 241, 0.3); color: white; }

/* ── Boutons CTA — dégradé indigo avec relief ────────────────────────────── */
.bg-brand-500 {
  background: linear-gradient(160deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%) !important;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}
.bg-brand-500:hover,
.hover\:bg-brand-600:hover {
  background: linear-gradient(160deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%) !important;
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

/* ── Liens & accents texte — indigo clair plus lisible ───────────────────── */
.text-brand-400 {
  color: #a5b4fc !important;
}
.hover\:text-brand-300:hover {
  color: #c7d2fe !important;
}

/* ── Logo icon gradient ───────────────────────────────────────────────────── */
.from-brand-400 { --tw-gradient-from: #818cf8 !important; }
.to-brand-600   { --tw-gradient-to:   #4f46e5 !important; }

/* ── Autofill : écraser le fond jaune navigateur ─────────────────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #263348 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  border-color: rgba(255,255,255,0.1) !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* Autofill dans les formulaires clairs (dashboard) */
#section-upload input:-webkit-autofill,
#section-upload input:-webkit-autofill:hover,
#section-upload input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #f9fafb inset !important;
  -webkit-text-fill-color: #111827 !important;
  caret-color: #111827;
  border-color: #d1d5db !important;
}

/* ── Désactiver :invalid visuel avant soumission ─────────────────────────── */
input:invalid {
  box-shadow: none !important;
  outline: none !important;
}
input:not(:placeholder-shown):invalid {
  border-color: rgba(239,68,68,0.5) !important;
}

/* ── Logo : E qui tombe ───────────────────────────────────────────────────── */

/* ── Titre hero : aurora gradient animé ──────────────────────────────────── */
.text-chrome {
  background: linear-gradient(
    120deg,
    #818cf8 0%,
    #a78bfa 20%,
    #e879f9 40%,
    #60a5fa 60%,
    #818cf8 80%,
    #a78bfa 100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: aurora-flow 5s linear infinite;
}

@keyframes aurora-flow {
  0%   { background-position: 0% center; }
  100% { background-position: 250% center; }
}

/* ── Révélation au chargement : blur → net + slide up ─────────────────────── */
.hero-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  animation: hero-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ── Accessibilité : désactiver animations pour les utilisateurs sensibles ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
