/* Styles et animations liés à l'automobile pour le portfolio */

/* Élément décoratif - Circuit imprimé/tracé automobile */
.circuit-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10,10 L30,10 C35,10 35,15 40,15 L60,15 C65,15 65,10 70,10 L90,10 L90,30 C90,35 85,35 85,40 L85,60 C85,65 90,65 90,70 L90,90 L70,90 C65,90 65,85 60,85 L40,85 C35,85 35,90 30,90 L10,90 L10,70 C10,65 15,65 15,60 L15,40 C15,35 10,35 10,30 Z' fill='none' stroke='rgba(79, 70, 229, 0.15)' stroke-width='1'/%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

/* Effet de ligne de vitesse */
.speed-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  opacity: 0.1;
}

.speed-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: speed-line-anim 5s infinite linear;
}

@keyframes speed-line-anim {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Effet de dashboard */
.dashboard-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-header {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
}

.dashboard-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4F46E5;
  margin-right: 10px;
  box-shadow: 0 0 8px #4F46E5;
  animation: pulse 2s infinite;
}

/* Éléments de navigation automobile */
.auto-nav-item {
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.auto-nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #F97316, transparent);
  transform: translateX(-100%);
  transition: all 0.4s ease;
}

.auto-nav-item:hover::before {
  transform: translateX(0);
}

.auto-nav-item::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.auto-nav-item:hover::after {
  opacity: 1;
}

/* Effet de compteur de vitesse */
.speedometer {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0F172A, #1E293B);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.speedometer:hover {
  transform: scale(1.1);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.7), 0 0 15px rgba(79, 70, 229, 0.3);
}

.speedometer::before {
  content: '';
  position: absolute;
  width: 40%;
  height: 2px;
  background-color: #F97316;
  bottom: 50%;
  left: 50%;
  transform-origin: left center;
  transform: rotate(45deg);
  box-shadow: 0 0 5px rgba(249, 115, 22, 0.7);
}

.speedometer::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #F97316, #4F46E5);
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(79, 70, 229, 0.7);
}

/* Effet de batterie automobile */
.battery-indicator {
  width: 60px;
  height: 20px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.battery-level {
  height: 100%;
  width: 80%;
  background: linear-gradient(90deg, #10B981, #4F46E5);
  position: relative;
  animation: battery-pulse 4s infinite;
}

@keyframes battery-pulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* Effet de défilement de route */
.road-scroll {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.1) 20px, transparent 20px, transparent 40px);
  animation: road-scroll-anim 3s linear infinite;
  opacity: 0.3;
}

@keyframes road-scroll-anim {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 0;
  }
}
