/**
 * Styles spécifiques pour les shortcodes de voitures
 * Ces styles sont chargés sur toutes les pages pour assurer le bon affichage des shortcodes
 */

/* Section voitures récentes */
.latest-cars-section {
  padding: 4rem 0;
  background: #ffffff;
  margin: 2rem 0;
}

.latest-cars-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: #e12020;
  font-size: 2.5rem;
  font-weight: 700;
}

.latest-cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Grille de voitures */
.cars-grid-shortcode {
  margin: 2rem 0;
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Cartes de voitures */
.car-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.car-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.car-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.car-card:hover .car-image img {
  transform: scale(1.05);
}

.car-details {
  padding: 1.5rem;
}

.car-details h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.car-details h3 a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.car-details h3 a:hover {
  color: #e12020;
}

.car-brand {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.car-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.car-specs span {
  background: #f8f9fa;
  color: #666;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid #e9ecef;
}

.car-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e12020;
  margin-top: 0.5rem;
}

/* Statistiques */
.cars-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #e12020;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: #666;
  font-size: 1rem;
  font-weight: 500;
}

/* Recherche rapide */
.cars-search-shortcode {
  margin: 2rem 0;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cars-quick-search {
  max-width: 800px;
  margin: 0 auto;
}

.search-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}

.search-field select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background: white;
}

.search-field select:focus {
  outline: none;
  border-color: #e12020;
  box-shadow: 0 0 0 3px rgba(225, 32, 32, 0.1);
}

/* Boutons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
  color: #333;
  border: 1px solid #ddd;
}

.btn-primary {
  background: #e12020;
  color: white;
  border-color: #e12020;
}

.btn-primary:hover {
  background: #c41a1a;
  border-color: #c41a1a;
  color: white;
}

.btn-outline {
  background: transparent;
  color: #e12020;
  border-color: #e12020;
}

.btn-outline:hover {
  background: #e12020;
  color: white;
}

/* Mise en avant d'une voiture */
.car-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.car-showcase-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.car-showcase-details h3 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.car-showcase-details h3 a {
  color: #333;
  text-decoration: none;
}

.car-showcase-details h3 a:hover {
  color: #e12020;
}

.car-price-large {
  font-size: 2rem;
  font-weight: 700;
  color: #e12020;
  margin: 1rem 0;
}

.car-specs-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.car-specs-showcase span {
  background: #f8f9fa;
  color: #666;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid #e9ecef;
}

.car-contact {
  margin-top: 1.5rem;
}

/* États vides */
.no-cars-found {
  text-align: center;
  padding: 4rem 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

.no-cars-found p {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

/* CTA */
.latest-cars-cta {
  text-align: center;
  margin-top: 2rem;
}

/* Layout sans sidebar pour les pages voitures */
.single-voiture #content-area,
.archive-voiture #content-area {
  display: block;
}

.single-voiture #left-area,
.archive-voiture #left-area {
  width: 100%;
  float: none;
}

/* Responsive */
@media (max-width: 768px) {
  .latest-cars-grid,
  .cars-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cars-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .search-fields {
    grid-template-columns: 1fr;
  }

  .car-showcase {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .latest-cars-section h2 {
    font-size: 2rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .latest-cars-section,
  .cars-search-shortcode,
  .car-showcase {
    padding: 1.5rem;
  }

  .car-details {
    padding: 1rem;
  }

  .car-specs {
    gap: 0.25rem;
  }

  .car-specs span {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }

  .car-price {
    font-size: 1.25rem;
  }

  .latest-cars-section h2 {
    font-size: 1.75rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.car-card {
  animation: fadeInUp 0.6s ease-out;
}

.car-card:nth-child(2) {
  animation-delay: 0.1s;
}

.car-card:nth-child(3) {
  animation-delay: 0.2s;
}
