/**
 * Styles spécifiques pour les templates de voitures
 * Couleurs du logo : #e12020 (rouge), #ffffff (blanc), #2b23e2 (bleu)
 */

/* Layout sans sidebar - Masquer complètement la sidebar */
.single-voiture #content-area,
.archive-voiture #content-area {
  display: block;
}

.single-voiture #left-area,
.archive-voiture #left-area {
  width: 100%;
  float: none;
}

/* Masquer complètement la sidebar sur les pages voitures */
.single-voiture #sidebar,
.archive-voiture #sidebar,
.single-voiture .et_pb_sidebar,
.archive-voiture .et_pb_sidebar,
.single-voiture .sidebar,
.archive-voiture .sidebar {
  display: none !important;
}

/* Masquer aussi les widgets de sidebar */
.single-voiture .widget,
.archive-voiture .widget,
.single-voiture .et_pb_widget,
.archive-voiture .et_pb_widget {
  display: none !important;
}

/* S'assurer que le contenu prend toute la largeur */
.single-voiture #main-content .container,
.archive-voiture #main-content .container {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 2rem;
}

.single-voiture #content-area,
.archive-voiture #content-area {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Masquer tous les éléments de sidebar possibles */
.single-voiture .et_pb_column_1_3,
.archive-voiture .et_pb_column_1_3,
.single-voiture .et_pb_column_1_4,
.archive-voiture .et_pb_column_1_4 {
  display: none !important;
}

/* S'assurer que la colonne principale prend toute la largeur */
.single-voiture .et_pb_column_2_3,
.archive-voiture .et_pb_column_2_3,
.single-voiture .et_pb_column_3_4,
.archive-voiture .et_pb_column_3_4 {
  width: 100% !important;
  margin-right: 0 !important;
}

/* En-tête de la voiture */
.single-car-header {
  background: linear-gradient(
    135deg,
    rgba(225, 32, 32, 0.8) 0%,
    rgba(43, 35, 226, 0.8) 100%
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 4rem 0;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.single-car-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.single-car-header .container {
  position: relative;
  z-index: 2;
}

.single-car-header h1 {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.car-subtitle {
  color: #ffffff;
  font-size: 1.2rem;
  margin: 0;
  opacity: 0.9;
}

/* Contenu principal */
.car-main-content {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

/* Galerie d'images */
.car-gallery {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  height: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Sidebar d'informations */
.car-info-sidebar {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 2rem;
}

/* Prix */
.car-price-large {
  font-size: 2.5rem;
  font-weight: 700;
  color: #000;
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa;
}

/* Spécifications */
.car-specs-detailed h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e12020 !important;
  padding-bottom: 0.5rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  font-weight: 600;
  color: #333;
}

.spec-value {
  color: #e12020;
  font-weight: 500;
}

/* Contact */
.car-contact h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2rem 0 1rem 0;
  border-bottom: 2px solid #e12020;
  padding-bottom: 0.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: #e12020;
  color: #ffffff;
}

.contact-item:hover a {
  color: #ffffff;
}

.contact-icon {
  font-size: 1.2rem;
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.contact-item a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

/* Description */
.car-description {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.car-description h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e12020;
  padding-bottom: 0.5rem;
}

/* Équipements */
.car-features {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.car-features h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e12020;
  padding-bottom: 0.5rem;
}

.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
}

.feature-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  color: #333;
}

.feature-item::before {
  content: "✓";
  color: #e12020;
  font-weight: bold;
  margin-right: 0.75rem;
  font-size: 1.1rem;
}

/* Navigation entre voitures */
.car-navigation {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

.nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.nav-previous,
.nav-next {
  text-align: center;
}

.nav-previous a,
.nav-next a {
  display: block;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.nav-previous a:hover,
.nav-next a:hover {
  background: #e12020;
  color: #ffffff;
  border-color: #e12020;
}

.nav-subtitle {
  display: block;
  font-size: 0.9rem;
  color: inherit;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.nav-title {
  display: block;
  font-weight: 600;
  color: inherit;
}

/* Archive des voitures */
.archive-header {
  background: linear-gradient(135deg, #e12020 0%, #2b23e2 100%);
  color: #ffffff;
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 2rem;
}

.archive-title {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.archive-description {
  color: #ffffff;
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.9;
}

/* Filtres */
.cars-filters {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.cars-filters h3 {
  color: #2b23e2;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e12020;
  padding-bottom: 0.5rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background: #ffffff;
  transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #e12020;
  box-shadow: 0 0 0 3px rgba(225, 32, 32, 0.1);
}

.filter-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* 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: #ffffff;
  border-color: #e12020;
}

.btn-primary:hover {
  background: #c41a1a;
  border-color: #c41a1a;
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: #e12020;
  border-color: #e12020;
}

.btn-outline:hover {
  background: #e12020;
  color: #ffffff;
}

/* Pagination */
.cars-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.cars-pagination .page-numbers {
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
}

.cars-pagination .page-numbers:hover,
.cars-pagination .page-numbers.current {
  background: #e12020;
  color: #ffffff;
  border-color: #e12020;
}

/* Responsive */
@media (max-width: 768px) {
  .car-main-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .car-info-sidebar {
    position: static;
  }

  .car-gallery {
    height: 600px;
  }

  .car-gallery img {
    height: 100%;
  }

  .nav-links {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    flex-direction: column;
  }

  .single-car-header h1,
  .archive-title {
    font-size: 2rem;
  }

  .single-car-header {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .single-car-header,
  .archive-header {
    padding: 2rem 0;
  }

  .car-info-sidebar,
  .car-description,
  .car-features,
  .car-navigation,
  .cars-filters {
    padding: 1.5rem;
  }

  .single-car-header h1,
  .archive-title {
    font-size: 1.75rem;
  }

  .single-car-header {
    padding: 2rem 0;
  }

  .car-gallery {
    height: 400px;
  }

  .car-gallery img {
    height: 100%;
  }
}
