* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f8fafc;
  min-height: 100vh;
  color: #334155;
  line-height: 1.6;
  padding: 20px;
}

.card {
  width: 100%;
  max-width: 1200px;
  background: white;
  padding: 30px;
  border-radius: 15px;
  -webkit-box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  display: block;
}

#vehicleName {
  text-align: center;
  font-size: 2.5rem;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 30px;
}

.main-layout {
  width: 100%;
  overflow: hidden;
  margin-bottom: 30px;
}

.left-column {
  width: 65%;
  float: left;
  padding-right: 20px;
}

.right-column {
  width: 35%;
  float: right;
}

.carousel {
  position: relative;
  width: 100%;
  height: 400px;
  background: #f1f5f9;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 20px;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  margin-top: -25px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  text-align: center;
  line-height: 50px;
  font-size: 20px;
}

.nav-arrow:hover {
  background: white;
}

.nav-arrow-left {
  left: 15px;
}

.nav-arrow-right {
  right: 15px;
}

.nav-arrow:hover {
  background: white;
  transform: translateY(-5%) scale(1.005); /* Petit zoom au hover */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.nav-arrow::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.nav-arrow-left::before {
  background-image: url("https://src.aubota.xyz/img/left_arrow.svg");
}

.nav-arrow-right::before {
  background-image: url("https://src.aubota.xyz/img/right_arrow.svg");
}

.carousel span {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: block;
}

.dots {
  text-align: center;
  margin-bottom: 20px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  margin: 0 4px;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.dot.active {
  background: #475569;
  width: 24px;
  border-radius: 12px;
}

.infos {
  background: white;
  border-radius: 15px;
  -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
}

.owner-profile {
  text-align: center;
  margin-bottom: 25px;
}

.avatar {
  width: 60px;
  height: 60px;
  background: #3b82f6;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  font-weight: bold;
  margin: 0 auto 15px;
  text-align: center;
  line-height: 60px;
}

.owner-name {
  font-size: 20px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 5px;
}

.owner-title {
  color: #64748b;
}

.separator {
  height: 1px;
  background: #e2e8f0;
  margin: 20px 0;
}

.infos p {
  margin: 15px 0;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.infos p span:first-child {
  float: left;
  color: #64748b;
  font-weight: 500;
}

.infos p span:last-child {
  float: right;
  color: #1e293b;
  font-weight: 600;
}

.badge {
  background: #dbeafe;
  color: #1e40af;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.social-link {
  overflow: hidden;
}

.social-link a {
  color: #3b82f6;
  text-decoration: none;
}

.stats-section {
  margin-top: 25px;
}

.stats-title {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 15px;
  font-size: 18px;
}

.stats-grid {
  width: 100%;
  overflow: hidden;
}

.stat-item {
  width: 48%;
  float: left;
  margin: 1%;
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.stat-item.blue {
  background: #dbeafe;
}
.stat-item.green {
  background: #dcfce7;
}
.stat-item.purple {
  background: #f3e8ff;
}
.stat-item.orange {
  background: #fed7aa;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-item.blue .stat-value {
  color: #1d4ed8;
}
.stat-item.green .stat-value {
  color: #16a34a;
}
.stat-item.purple .stat-value {
  color: #7c3aed;
}
.stat-item.orange .stat-value {
  color: #ea580c;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
}

.stat-item.blue .stat-label {
  color: #1d4ed8;
}
.stat-item.green .stat-label {
  color: #16a34a;
}
.stat-item.purple .stat-label {
  color: #7c3aed;
}
.stat-item.orange .stat-label {
  color: #ea580c;
}

.specs {
  background: white;
  border-radius: 15px;
  -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-top: 20px;
  clear: both;
}

.specs h3 {
  font-size: 24px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 25px;
}

.specs p {
  margin: 15px 0;
  padding: 15px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.specs p span:first-child {
  float: left;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.specs p span:last-child {
  float: right;
  color: #1e293b;
  font-weight: 600;
}

.odometer-container {
    display: inline-block;
    position: relative;
    overflow: hidden; /* Cache les chiffres qui sortent du conteneur */
    height: 40px; /* Hauteur suffisante pour contenir un chiffre */
}

.odometre {
    display: inline-block;
    font-family: "Courier New", monospace;
    color: white;
}

.odometer-digit {
  font-family: 'Courier New', Courier, monospace;
  width: 40px;
  height: 40px;
  background: #1e293b;
  color: white;
  border-radius: 4px;
  font-size: 18px;
  font-weight: bold;
  overflow: hidden;
  position: relative;
  float: left;
  margin-right: 2px;
  text-align: center;
  line-height: 40px;
}

.odometer-roller {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400%; /* Hauteur suffisante pour afficher tous les chiffres (0-9) */
    transition: transform 0.5s ease-in-out;
}

.odometer-roller span {
    display: block;
    height: 40px; /* Hauteur de chaque chiffre */
    line-height: 40px; /* Centrer verticalement */
    text-align: center;
    font-size: 18px;
    color: white;
}

.unit-toggle {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  float: right;
  margin-left: 10px;
}

.unit-toggle:hover {
  background: #e2e8f0;
}

.mods {
  background: white;
  border-radius: 15px;
  -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-top: 20px;
  clear: both;
}

.mods h3 {
  font-size: 24px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 25px;
}

.mods p {
  margin: 15px 0;
  padding: 15px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.icon-text {
  font-size: 16px;
  margin-right: 8px;
}

@media (max-width: 1024px) {
  .left-column,
  .right-column {
    width: 100%;
    float: none;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .card {
    padding: 20px;
  }

  #vehicleName {
    font-size: 2rem;
  }

  .carousel {
    height: 300px;
  }

  .stat-item {
    width: 100%;
    float: none;
    margin: 10px 0;
  }

  .nav-arrow {
    width: 40px;
    height: 40px;
    line-height: 40px;
    margin-top: -20px;
  }
}

.clearfix:after {
  content: "";
  display: table;
  clear: both;
}

/* Style de la popup */
#popup {
    display: none; /* Masqué par défaut */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 300px;
    text-align: center;
}

/* Style de la popup */
#popup {
    display: none; /* Masqué par défaut */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 350px;
    text-align: center;
}

/* Fond semi-transparent */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Style du bouton de fermeture (croix) */
#close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
    cursor: pointer;
    color: #333;
    background: transparent;
    border: none;
}

#close-btn:hover {
    color: #ff0000;
}

/* Texte principal */
#popup p {
    font-size: 18px;
    margin: 0 0 20px;
    color: #1e293b;
}

#popup p span {
    font-weight: bold;
    color: #475569;
}

/* Bouton de redirection */
#redirect-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
}

#redirect-btn:hover {
    background-color: #45a049;
}

/* Style pour les petits écrans */
@media (max-width: 768px) {
    #popup {
        width: 90%;
        padding: 20px;
    }
}