/* ==========================================================================
   CONFORT GROUP - DESIGN MODERNE UI/UX (CSS LOCAL)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Animations & Keyframes
   -------------------------------------------------------------------------- */

/* Continuous road dash motion effect */
@keyframes roadDashMove {
  0% { stroke-dashoffset: 60; }
  100% { stroke-dashoffset: 0; }
}
.animate-road-flow {
  stroke-dasharray: 18, 14;
  animation: roadDashMove 1.2s linear infinite;
}

/* Radar Ping Animation for Map Pins */
@keyframes pingSlow {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
.animate-radar-pulse {
  animation: pingSlow 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Pulse Glow & Halo animations */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.35; transform: scale(0.98); }
  50% { opacity: 0.75; transform: scale(1.05); }
}
.animate-pulse-glow {
  animation: pulseGlow 2.8s ease-in-out infinite;
}

@keyframes beamGlow {
  0%, 100% { opacity: 0.2; transform: scale(0.95); }
  50% { opacity: 0.5; transform: scale(1.1); }
}
.animate-beam-glow {
  animation: beamGlow 3.5s ease-in-out infinite;
}

@keyframes roadDashesAdvance {
  0% { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}
.loader-road-dashes {
  stroke-dasharray: 12 10;
  animation: roadDashesAdvance 0.8s linear infinite;
}

/* Floating vehicle motion effect */
@keyframes carFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-5px) scale(1.008); }
}
.animate-car-float {
  animation: carFloat 4.5s ease-in-out infinite;
}

/* Velocity Streamers Animations */
@keyframes streamPass {
  0% { transform: translateX(100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(-100%); opacity: 0; }
}
.speed-stream-1 {
  animation: streamPass 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.speed-stream-2 {
  animation: streamPass 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite 0.8s;
}
.speed-stream-3 {
  animation: streamPass 2.1s cubic-bezier(0.4, 0, 0.2, 1) infinite 1.4s;
}

/* Road Dash Stream */
@keyframes roadStreamMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.road-dash-stream {
  display: flex;
  width: 200%;
  animation: roadStreamMove 1s linear infinite;
}

/* Shimmer Button Effect */
@keyframes shimmer {
  100% { transform: translateX(100%); }
}
.animate-shimmer {
  position: relative;
  overflow: hidden;
}
.animate-shimmer::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  animation: shimmer 2.5s infinite;
}

/* --------------------------------------------------------------------------
   2. Utilitaires UI/UX & Glassmorphisme
   -------------------------------------------------------------------------- */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-card-dark {
  background: rgba(3, 32, 68, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.blue-gradient-text {
  background: linear-gradient(135deg, #05346E 0%, #0A4994 50%, #032044 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #F1F5F9;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #FEBD01;
}

/* --------------------------------------------------------------------------
   3. Accessibilité & Mouvement Réduit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .animate-road-flow,
  .animate-radar-pulse,
  .loader-road-dashes,
  .animate-pulse-glow,
  .animate-beam-glow,
  .animate-car-float,
  .speed-stream-1,
  .speed-stream-2,
  .speed-stream-3,
  .road-dash-stream,
  .animate-shimmer::after {
    animation: none !important;
  }
  #ConfortGroupLoader {
    transition: opacity 0.2s linear !important;
  }
  html {
    scroll-behavior: auto !important;
  }
}
