/* ==================================================================
   Premium Motorsport Deluxe — Alta FA · Catalogue véhicules
   ================================================================== */

/* ---------------- Barre de recherche / filtres ---------------- */

.filters {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr auto auto;
  padding: 1.8rem;
}

.search-box { position: relative; }
.search-box .icon {
  position: absolute;
  left: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white-30);
  pointer-events: none;
  height: 1.7rem;
  width: 1.7rem;
}
.search-box .field { padding-left: 3.8rem; }

.filters-row-2 {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  grid-column: 1 / -1;
}

.range-group { align-items: center; display: flex; gap: .8rem; }
.range-group label { color: var(--white-50); font-size: 1.3rem; }
.range-group .field { width: 10rem; }
.range-group .sep { color: var(--white-30); }
.range-group .cur { color: var(--white-50); }

.filters-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-left: auto; }

/* ---------------- Grille de véhicules ---------------- */

.catalogue { padding-top: 3.2rem; }

.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
  margin-top: 2.4rem;
}

.vehicle {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .28s, border-color .28s, box-shadow .28s;
}
.vehicle:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, .35);
  box-shadow: 0 26px 48px -24px rgba(0, 0, 0, .9);
}

.vehicle .thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, #1c1113 0%, #120b0c 100%);
  position: relative;
  overflow: hidden;
}
.vehicle .thumb img { height: 100%; object-fit: cover; width: 100%; display: block; }
.vehicle .thumb .thumb-empty {
  align-items: center;
  color: hsla(0, 0%, 100%, .12);
  display: flex;
  height: 100%;
  justify-content: center;
}
.vehicle .thumb .thumb-empty svg { height: 5rem; width: 5rem; }

.vehicle .thumb .badge { left: 1.2rem; position: absolute; top: 1.2rem; }

.vehicle .thumb .shots {
  background: rgba(10, 4, 5, .78);
  backdrop-filter: blur(4px);
  border: 1px solid var(--line);
  border-radius: 999px;
  bottom: 1.2rem;
  color: var(--white-70);
  font-size: 1.1rem;
  padding: .35rem 1rem;
  position: absolute;
  right: 1.2rem;
}

.vehicle .body { display: flex; flex: 1; flex-direction: column; gap: 1rem; padding: 1.6rem 1.8rem 1.8rem; }
.vehicle .title { font-size: 1.7rem; font-weight: 700; }
.vehicle .price { color: var(--red-soft); font-size: 1.8rem; font-weight: 700; }

/* Caractéristiques rapides : réservoir, coffre, places. */
.vehicle .specs-line {
  color: var(--white-30);
  display: flex;
  flex-wrap: wrap;
  font-size: 1.2rem;
  gap: 1.4rem;
  margin-top: auto;
  padding-top: .4rem;
}
.vehicle .specs-line span { align-items: center; display: flex; gap: .5rem; }
.vehicle .specs-line svg { height: 1.5rem; width: 1.5rem; color: var(--red-soft); opacity: .8; }

/* ---------------- État vide ---------------- */

.empty {
  padding: 7rem 3rem;
  text-align: center;
}
.empty .icon { color: hsla(0, 0%, 100%, .1); }
.empty .icon svg { height: 6.4rem; width: 6.4rem; }
.empty h2 { font-size: 2.2rem; font-weight: 700; margin: 2rem 0 1rem; }
.empty p { color: var(--white-50); font-size: 1.4rem; margin: 0 auto; max-width: 48rem; }
.empty .btn { margin-top: 2.6rem; }

/* ---------------- Pagination ---------------- */

.pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  justify-content: space-between;
  margin-top: 3.2rem;
}
.pages { display: flex; gap: .6rem; }
.pages button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: .8rem;
  color: var(--white-50);
  cursor: pointer;
  font-size: 1.3rem;
  min-width: 3.6rem;
  padding: .8rem 1rem;
  transition: background .2s, color .2s, border-color .2s;
}
.pages button:hover:not(:disabled) { background: hsla(0, 0%, 100%, .08); color: #fff; }
.pages button.current { background: rgba(239, 68, 68, .18); border-color: rgba(239, 68, 68, .4); color: var(--red-soft); }
.pages button:disabled { cursor: not-allowed; opacity: .35; }

.per-page { align-items: center; color: var(--white-30); display: flex; font-size: 1.3rem; gap: .8rem; }
.per-page .opts { display: flex; gap: .4rem; }
.per-page button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: .8rem;
  color: var(--white-50);
  cursor: pointer;
  font-size: 1.25rem;
  padding: .6rem 1rem;
  transition: background .2s, color .2s;
}
.per-page button.current { background: hsla(0, 0%, 100%, .1); color: #fff; }

/* ---------------- Fiche d'un véhicule (modale) ---------------- */

.modal {
  align-items: center;
  background: rgba(6, 2, 3, .75);
  backdrop-filter: blur(6px);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 2.4rem;
  position: fixed;
  z-index: 1000;
}
.modal.open { display: flex; }

.modal-box {
  animation: appear .3s ease;
  max-height: 88vh;
  max-width: 76rem;
  overflow: auto;
  width: 100%;
}
.modal-box .modal-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1.6rem;
  justify-content: space-between;
  padding: 2.2rem 2.4rem;
}
.modal-box h2 { font-size: 2.2rem; font-weight: 700; }
.modal-box .close {
  background: transparent;
  border: none;
  color: var(--white-50);
  cursor: pointer;
  font-size: 2.4rem;
  line-height: 1;
  padding: 0 .4rem;
  transition: color .2s;
}
.modal-box .close:hover { color: #fff; }
.modal-box .modal-body { padding: 2.4rem; }
.modal-cover { aspect-ratio: 16/9; border-radius: 1rem; margin-bottom: 2rem; overflow: hidden; background: #120b0c; }
.modal-cover img { height: 100%; object-fit: cover; width: 100%; }
.modal-shots {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  margin: -1rem 0 2rem;
}
.modal-shots .shot {
  aspect-ratio: 4 / 3;
  background: none;
  border: 1px solid var(--line);
  border-radius: .7rem;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: border-color .2s, opacity .2s;
  opacity: .65;
}
.modal-shots .shot img { height: 100%; object-fit: cover; width: 100%; display: block; }
.modal-shots .shot:hover { opacity: 1; }
.modal-shots .shot.current { border-color: var(--red-soft); opacity: 1; }

.modal-price {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.modal-price .amount { color: var(--red-soft); font-size: 3rem; font-weight: 800; }

.spec-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.spec {
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: hsla(0, 0%, 100%, .03);
  padding: 1.2rem 1.4rem;
}
.spec .k { color: var(--white-30); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; }
.spec .v { font-size: 1.5rem; font-weight: 600; margin-top: .4rem; }

/* ---------------- Performances (jauges à points) ---------------- */

.perf-title {
  color: var(--white-30);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .1em;
  margin: 2.6rem 0 1.4rem;
  text-transform: uppercase;
}
.perf-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.perf {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: hsla(0, 0%, 100%, .03);
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  padding: 1.2rem 1.4rem;
}
.perf .label { align-items: center; display: flex; font-size: 1.35rem; font-weight: 600; gap: .8rem; }
.perf .label svg { color: var(--red-soft); height: 1.8rem; width: 1.8rem; }
.dots { display: flex; gap: .4rem; }
.dot { background: hsla(0, 0%, 100%, .12); border-radius: 50%; height: 1rem; width: 1rem; }
.dot.on { background: var(--red-soft); box-shadow: 0 0 8px -1px var(--red-glow); }

.modal-desc { color: var(--white-70); font-size: 1.4rem; margin-top: 2rem; white-space: pre-wrap; }

/* ---------------- FAQ ---------------- */

.faq-list { display: flex; flex-direction: column; gap: 1.2rem; margin-top: 3rem; }
.faq-item { overflow: hidden; }
.faq-item summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 1.55rem;
  font-weight: 600;
  gap: 1.4rem;
  justify-content: space-between;
  list-style: none;
  padding: 1.8rem 2.2rem;
  transition: color .2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--red-soft); }
.faq-item summary .chev { color: var(--white-30); transition: transform .25s; }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .answer { color: var(--white-50); font-size: 1.4rem; padding: 0 2.2rem 2rem; }

@media screen and (max-width: 862px) {
  .filters { grid-template-columns: 1fr; }
  .filters-actions { margin-left: 0; width: 100%; }
  .filters-actions .btn { flex: 1; }
}
