/* =============================================
   VEHICULE.CSS — Page détail véhicule
   ============================================= */

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

/* --- Breadcrumb --- */
.detail-breadcrumb {
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 24px;
}
.breadcrumb-container {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  font-size: 13px;
  color: var(--grey-muted);
}
.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-weight: 500;
  font-size: 13px;
  transition: gap var(--transition);
}
.back-link:hover { gap: 12px; }
.back-link svg { width: 16px; height: 16px; }
.breadcrumb-sep { opacity: 0.3; }

/* --- Layout principal --- */
.detail-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
}

/* --- GALERIE --- */
.detail-gallery { position: sticky; top: 88px; min-width: 0; }

.gallery-main-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  aspect-ratio: 4/3;
}
.gallery-main {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
  cursor: zoom-in;
}
.gallery-main video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--grey-muted);
  font-size: 14px;
  background: linear-gradient(135deg, #0f1a0f, #1a2a1a);
}
.gallery-placeholder svg { width: 80px; height: 80px; opacity: 0.3; }

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.gallery-nav:hover { background: var(--green); border-color: var(--green); }
.gallery-nav svg { width: 20px; height: 20px; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-nav.hidden { display: none; }

.gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: rgba(0,0,0,0.6);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.gallery-expand {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.gallery-expand:hover { background: var(--green); border-color: var(--green); }
.gallery-expand svg { width: 17px; height: 17px; }

/* --- LIGHTBOX PLEIN ÉCRAN --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: #050505;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }

.lightbox-content {
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-content img,
.lightbox-content video {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}
.lightbox-close:hover { background: var(--green); border-color: var(--green); }
.lightbox-close svg { width: 20px; height: 20px; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}
.lightbox-nav:hover { background: var(--green); border-color: var(--green); }
.lightbox-nav svg { width: 24px; height: 24px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
}

@media (max-width: 768px) {
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-nav svg { width: 20px; height: 20px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; }
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--green) transparent;
}
.gallery-thumb {
  flex-shrink: 0;
  width: 76px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition);
  background: var(--dark-card);
}
.gallery-thumb img,
.gallery-thumb video { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--green); }
.gallery-thumb:hover { border-color: var(--green-light); }
.gallery-thumb-video { position: relative; }
.gallery-thumb-video .thumb-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  color: var(--white);
  border-radius: 50%;
  font-size: 9px;
  padding-left: 2px;
  pointer-events: none;
}

/* --- INFOS VÉHICULE --- */
.detail-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.detail-depot-tag {
  display: inline-block;
  padding: 3px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--off-white);
}
.detail-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 12px;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--grey-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.detail-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-meta span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.detail-meta span:first-child::before { display: none; }

.detail-price {
  font-family: var(--font-head);
  font-size: clamp(36px, 4vw, 52px);
  color: var(--green-light);
  letter-spacing: 0.02em;
  margin-bottom: 28px;
  line-height: 1;
}

.detail-ctas {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.detail-btn {
  flex: 1;
  min-width: 160px;
  justify-content: center;
  gap: 8px;
}

.detail-points {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.detail-points h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-muted);
  margin-bottom: 14px;
}
.points-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.points-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--off-white);
}
.points-list li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 13px;
}

.detail-quick-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quick-spec {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quick-spec-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-muted);
}
.quick-spec-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
}

/* --- Description & Fiche technique --- */
.detail-full {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.detail-section-title {
  font-family: var(--font-head);
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(130,160,132,0.25);
}
.detail-desc {
  font-size: 15px;
  color: var(--grey-muted);
  line-height: 1.85;
  white-space: pre-line;
}
.specs-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background var(--transition);
}
.spec-row:last-child { border-bottom: none; }
.spec-row:hover { background: rgba(130,160,132,0.04); }
.spec-label {
  font-size: 13px;
  color: var(--grey-muted);
  font-weight: 500;
}
.spec-value {
  font-size: 13px;
  color: var(--off-white);
  font-weight: 600;
  text-align: right;
}

/* --- Autres véhicules --- */
.detail-others {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 64px 24px;
}
.detail-others-container { max-width: var(--max-w); margin: 0 auto; }
.detail-others-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 36px;
  text-align: center;
}
.others-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .detail-container { grid-template-columns: 1fr; gap: 40px; }
  .detail-gallery { position: static; }
  .detail-full { grid-template-columns: 1fr; gap: 40px; }
  .others-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .detail-container { padding: 32px 20px; }
  .detail-full { padding: 0 20px 56px; }
  .detail-ctas { flex-direction: column; }
  .detail-btn { min-width: unset; }
  .detail-quick-specs { grid-template-columns: 1fr 1fr; }
  .others-grid { grid-template-columns: 1fr; }
  .detail-others { padding: 48px 20px; }
}

@media (max-width: 480px) {
  .detail-quick-specs { grid-template-columns: 1fr; }
}
