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

/* H1 invisible pour SEO */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #000000;
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Header languette pyramidale */
.header-tab {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.header-tab-content {
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 14px 40px 16px;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  display: flex;
  align-items: center;
  gap: 40px;
  min-width: 550px;
}

.header-left {
  text-align: left;
}

.header-right {
  text-align: right;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 40px;
}

.header-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: 1px;
  color: #ffffff;
}

.header-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2px;
}

.header-address {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.header-contact-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.header-phone {
  display: inline-block;
  color: #4ade80;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  transition: color 0.2s;
}

.header-phone:hover {
  color: #22c55e;
}

/* Logo fixe en arrière-plan */
.background-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.background-logo img {
  width: 500px;
  height: auto;
  opacity: 0.25;
  filter: brightness(10);
}

/* Container principal des véhicules */
.vehicles-container {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 100px 20px 20px;
  display: flex;
  flex-direction: column;
}

/* Toolbar avec tri */
.vehicles-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-control label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.sort-select {
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.sort-select:hover {
  background: rgba(40, 40, 40, 0.8);
  border-color: rgba(255, 255, 255, 0.25);
}

.sort-select:focus {
  border-color: #4ade80;
}

.sort-select option {
  background: #1a1a1a;
  color: #ffffff;
}

/* Grille des véhicules */
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-content: start;
}

/* Carte véhicule */
.vehicle-card {
  position: relative;
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Effet de reflet brillant */
.vehicle-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.8) 50%,
    transparent 60%,
    transparent 100%
  );
  z-index: 10;
  transition: left 0.6s ease;
  pointer-events: none;
}

.vehicle-card:hover::before {
  left: 100%;
}

.vehicle-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.vehicle-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.vehicle-info {
  padding: 24px;
}

.vehicle-model {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #ffffff;
}

.vehicle-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vehicle-mileage {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
}


.vehicle-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4ade80;
}

/* Badge VENDU */
.sold-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #dc2626;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Carte vendue */
.vehicle-card.sold .vehicle-image {
  filter: grayscale(60%);
}

.vehicle-card.sold .vehicle-price {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: line-through;
}

/* Bouton toggle vendus */
.toggle-sold-btn {
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.toggle-sold-btn:hover {
  background: rgba(40, 40, 40, 0.8);
  border-color: rgba(255, 255, 255, 0.25);
}

.toggle-sold-btn.active {
  background: #dc2626;
  border-color: #dc2626;
}

/* Masquer les véhicules vendus */
.vehicles-grid.hide-sold .vehicle-card.sold {
  display: none;
}

/* Message si aucun véhicule */
.no-vehicles {
  text-align: center;
  padding: 100px 20px;
  color: rgba(0, 0, 0, 0.5);
  font-size: 1.2rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 15px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: rgba(30, 30, 30, 0.95);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  display: flex;
  flex-direction: column;
}

.modal-image-container {
  position: relative;
}

.modal-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  cursor: zoom-in;
}

/* Vignettes dans la modal */
.modal-thumbnails {
  display: none;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.6);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-thumbnail {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.modal-thumbnail:hover {
  opacity: 0.8;
}

.modal-thumbnail.active {
  opacity: 1;
  border-color: #4ade80;
}

.modal-info {
  padding: 30px;
}

/* Encart contact dans la modal */
.modal-contact {
  background: #dc2626;
  color: #fff;
  padding: 16px 20px;
  border-radius: 10px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.modal-contact.hidden {
  display: none;
}

.modal-contact-available {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-contact-address {
  font-size: 0.9rem;
  opacity: 0.9;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-contact-address:hover {
  opacity: 1;
}

.modal-contact-phone {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-contact a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.modal-contact a:hover {
  text-decoration: underline;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.modal-price {
  font-size: 2rem;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 25px;
}

.modal-table {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.modal-table-row {
  display: contents;
}

.modal-table-cell {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-table-cell.label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.modal-table-cell.value {
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 85%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

/* Navigation lightbox */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  /* Modal responsive */
  .modal {
    padding: 10px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .modal-content {
    max-height: none;
    margin: 10px 0;
  }

  .modal-image {
    height: 200px;
  }

  .modal-info {
    padding: 16px;
    padding-bottom: 20px;
  }

  .modal-title {
    font-size: 1.3rem;
  }

  .modal-price {
    font-size: 1.4rem;
    margin-bottom: 16px;
  }

  .modal-table {
    grid-template-columns: 1fr 1fr;
  }

  .modal-table-cell {
    padding: 8px 6px;
    font-size: 0.8rem;
  }

  .modal-contact {
    margin-top: 16px;
    padding: 14px 16px;
  }

  .modal-contact-available {
    font-size: 1rem;
  }

  .modal-contact a {
    font-size: 1.1rem;
  }

  /* Vignettes responsive */
  .modal-thumbnails {
    padding: 6px 8px;
    gap: 5px;
    justify-content: flex-start;
  }

  .modal-thumbnail {
    width: 40px;
    height: 30px;
    border-radius: 4px;
    border-width: 1px;
  }

  /* Header responsive */
  .header-tab {
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
  }

  .header-tab-content {
    border-radius: 0;
    flex-direction: column;
    gap: 12px;
    min-width: auto;
    padding: 12px 20px 14px;
  }

  .header-left,
  .header-right {
    text-align: center;
  }

  .header-right {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 0;
    padding-top: 12px;
  }

  .vehicles-container {
    padding-top: 180px;
  }

  .vehicles-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .sort-control {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .sort-select,
  .toggle-sold-btn {
    width: 100%;
    text-align: center;
  }

  .background-logo img {
    width: 300px;
  }

  .vehicles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vehicle-card {
    border-radius: 12px;
  }

  .vehicle-image {
    height: 200px;
  }
}

@media (min-width: 1200px) {
  .vehicles-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
