/* ==========================================================================
   PAGE VÉHICULE — Split layout (galerie | infos)
   ========================================================================== */

:root {
  /* Palette monochrome — thème CLAIR (rampe inversée, identique à style.css) */
  --black: #ffffff;
  --white: #0b0b0c;
  --gray-100: #16181b;
  --gray-200: #292c31;
  --gray-300: #464b51;
  --gray-400: #6a7077;
  --gray-500: #898f97;
  --gray-600: #c4c7cb;
  --gray-700: #e0e2e5;
  --gray-800: #edeef0;
  --gray-900: #f7f8f9;
  --green: #111111;
}

.vehicle-main {
  padding-top: 72px;
  min-height: 100vh;
  background: var(--black);
}

/* ==========================================================================
   SPLIT LAYOUT — galerie gauche / infos droite
   ========================================================================== */

.vp-split {
  display: grid;
  grid-template-columns: 62% 38%;
  min-height: calc(100vh - 72px);
  border-bottom: 1px solid var(--gray-800);
}

/* Galerie — colonne gauche sticky */
.vp-split__left {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0d0d0d;
  border-right: 1px solid var(--gray-800);
}

.vp-gallery__main {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--gray-900);
}

.vp-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: blur(0.3px);
}
.vp-gallery__main:hover img { transform: translateZ(0) scale(1.02); }

/* Navigation arrows */
.vp-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: white;
  transition: all 0.2s;
}
.vp-gallery__arrow:hover {
  background: rgba(0,0,0,0.82);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-50%) scale(1.06);
}
.vp-gallery__arrow--prev { left: 20px; }
.vp-gallery__arrow--next { right: 20px; }

/* Counter */
.vp-gallery__counter {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.8);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  z-index: 10;
  letter-spacing: 1px;
}

/* Expand */
.vp-gallery__expand {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.75);
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  z-index: 10;
  transition: all 0.2s;
}
.vp-gallery__expand:hover { background: rgba(0,0,0,0.85); color: white; }

/* Thumbnail strip */
.vp-gallery__strip {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: #080808;
  border-top: 1px solid var(--gray-800);
  overflow-x: auto;
  scrollbar-width: none;
}
.vp-gallery__strip::-webkit-scrollbar { display: none; }

.vp-gallery__thumb {
  flex-shrink: 0;
  width: 88px;
  height: 58px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.38;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.vp-gallery__thumb:hover { opacity: 0.65; }
.vp-gallery__thumb.active { opacity: 1; border-color: var(--white); }
.vp-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: blur(0.2px);
}

/* ==========================================================================
   PANNEAU INFOS — colonne droite
   ========================================================================== */

.vp-split__right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 40px 40px;
  overflow-y: auto;
  height: calc(100vh - 72px);
  position: sticky;
  top: 72px;
  background: var(--black);
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
  flex-shrink: 0;
}
.back-link:hover { color: var(--gray-300); }
.back-link svg { transition: transform 0.2s; }
.back-link:hover svg { transform: translateX(-3px); }

/* Header */
.vpi-header { display: flex; flex-direction: column; gap: 6px; }

.vpi-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray-400);
}

.vpi-edition {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 3px;
}

.vpi-sold {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: #dc2626;
  color: white;
  padding: 2px 8px;
  border-radius: 3px;
}

.vpi-name {
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}

.vpi-version {
  font-size: 14px;
  color: var(--gray-400);
  font-weight: 400;
}

.vpi-km {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

/* Price bar */
.vpi-price-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--gray-700);
  border-radius: 6px;
  overflow: hidden;
}

.vpi-price-col {
  padding: 16px 20px;
  text-align: center;
}
.vpi-price-col:first-child { border-right: 1px solid var(--gray-700); }

.vpi-price-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.vpi-price-value {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
}
.vpi-price-value span {
  font-size: 0.72em;
  font-weight: 400;
  color: var(--gray-500);
}

/* Description */
.vpi-desc {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.75;
}

/* CTAs */
.vpi-ctas {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vpi-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
}

.vpi-btn--phone {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.vpi-btn--phone:hover { background: #e5e5e5; }

.vpi-btn--email {
  background: transparent;
  color: var(--gray-300);
  border-color: var(--gray-700);
}
.vpi-btn--email:hover { border-color: var(--gray-400); color: var(--white); }

/* Disclaimer */
.vpi-disclaimer {
  font-size: 10px;
  color: var(--gray-600);
  text-align: center;
  line-height: 1.5;
  margin-top: -8px;
}

/* Sold message */
.vpi-sold-msg {
  padding: 20px;
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
  border: 1px solid var(--gray-800);
  border-radius: 6px;
}

/* Trust */
.vpi-trust {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--gray-800);
  padding-top: 16px;
}

.vpi-trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--gray-500);
}
.vpi-trust-item svg { color: var(--gray-600); flex-shrink: 0; }

/* Share */
.vpi-share { display: flex; gap: 8px; }

.vpi-share__btn {
  flex: 1;
  padding: 9px 12px;
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  border-radius: 6px;
  color: var(--gray-400);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: all 0.2s;
}
.vpi-share__btn:hover { border-color: var(--gray-500); color: var(--white); }

/* ==========================================================================
   SECTION DÉTAILS (sous le split)
   ========================================================================== */

.vp-details-section {
  background: var(--black);
  padding: 60px 0;
  border-bottom: 1px solid var(--gray-800);
}

.vp-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.vp-details-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

/* Specs table */
.vpi-specs-table {
  border: 1px solid var(--gray-800);
  border-radius: 10px;
  overflow: hidden;
}

.vpi-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-800);
  gap: 20px;
}
.vpi-spec-row:last-child { border-bottom: none; }
.vpi-spec-row:hover { background: #0f0f0f; }

.vpi-spec-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
}

.vpi-spec-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  text-align: right;
}

/* Points forts */
.vp-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.vp-highlight {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: 12px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}
.vp-highlight:hover {
  border-color: var(--gray-600);
  background: #1a1a1a;
}

.vp-highlight__icon {
  width: 44px;
  height: 44px;
  background: var(--gray-800);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-300);
  flex-shrink: 0;
}

.vp-highlight__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-200);
  line-height: 1.35;
}

/* Checklist 2 colonnes */
.vp-options-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
}

.vp-option-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-900);
  font-size: 13px;
  color: var(--gray-300);
  line-height: 1.4;
}
.vp-option-check svg { color: var(--green); flex-shrink: 0; }
.vp-option-check span { min-width: 0; }

@media (max-width: 640px) {
  .vp-options-2col { grid-template-columns: 1fr; }
  .vp-highlights { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   NAVIGATION VÉHICULES
   ========================================================================== */

.vp-nav-vehicles {
  padding: 48px 0;
  border-top: 1px solid var(--gray-800);
}

.vp-nav-vehicles__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 20px;
}

.vp-nav-vehicles__grid {
  display: grid;
  gap: 12px;
}

.vp-nav-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}
.vp-nav-card:hover { border-color: var(--gray-600); background: #1a1a1a; transform: translateY(-2px); }
.vp-nav-card--right { justify-content: flex-end; }

.vp-nav-card img {
  width: 88px;
  height: 58px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: blur(0.2px);
}

.vp-nav-card__info { display: flex; flex-direction: column; gap: 3px; }

.vp-nav-card__dir {
  font-size: 10px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.vp-nav-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.vp-nav-card__price {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */

.vp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.97);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.vp-lightbox.open { opacity: 1; pointer-events: all; }

.vp-lightbox__img {
  max-width: min(92vw, 800px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  image-rendering: auto;
}

.vp-lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: inherit;
}
.vp-lightbox__close:hover { background: rgba(255,255,255,0.14); }

.vp-lightbox__counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  letter-spacing: 2px;
}

.vp-lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.2s;
}
.vp-lightbox__arrow:hover { background: rgba(255,255,255,0.12); }
.vp-lightbox__arrow--prev { left: 24px; }
.vp-lightbox__arrow--next { right: 24px; }

@media (max-width: 640px) { .vp-lightbox__arrow { display: none; } }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 960px) {
  .vp-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .vp-split__left {
    position: static;
    height: auto;
  }

  .vp-gallery__main {
    aspect-ratio: 4/3;
  }

  .vp-split__right {
    position: static;
    height: auto;
    overflow-y: visible;
    padding: 28px 24px 40px;
  }

  .vp-details-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .vp-gallery__thumb { width: 72px; height: 48px; }
}

@media (max-width: 640px) {
  .vp-split__right { padding: 24px 20px 36px; }
  .vp-gallery__arrow { width: 38px; height: 38px; }
  .vp-gallery__arrow--prev { left: 10px; }
  .vp-gallery__arrow--next { right: 10px; }
}

/* ==========================================================================
   MISC
   ========================================================================== */

.footer--simple {
  background: #080808;
  border-top: 1px solid var(--gray-800);
  padding: 24px 0;
  text-align: center;
}
.footer--simple p { font-size: 12px; color: var(--gray-600); margin: 0; }
.footer--simple a { color: var(--gray-500); text-decoration: none; }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--gray-400);
}

/* ==========================================================================
   THÈME CLAIR — fonds sombres codés en dur convertis en surfaces claires.
   NB : les contrôles de galerie et la lightbox restent volontairement
   sombres, car ils sont posés par-dessus les photos des véhicules.
   ========================================================================== */
.vp-split__left { background: var(--gray-900); }
.vp-gallery__strip { background: var(--gray-900); }
.vpi-spec-row:hover { background: var(--gray-900); }
.vp-highlight:hover { background: var(--gray-900); }
.vp-nav-card:hover { background: var(--gray-900); }
.footer--simple { background: var(--gray-900); }

/* Bouton téléphone (noir) : survol en gris foncé plutôt que clair */
.vpi-btn--phone:hover { background: #2a2d31; }

/* Badge "Vendu" en noir au lieu du rouge */
.vpi-sold { background: #111; }
