/* =========================
   VEHICLE SHOW - STYLE ANNONCE
========================= */

.vehicle-detail-hero {
    padding: 34px 0 70px;
    background: #f4f6f8;
}

.vehicle-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 390px;
    gap: 28px;
    align-items: start;
}

/* GALERIE */

.vehicle-gallery {
    position: relative;
    min-width: 0;
}

.vehicle-main-photo {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 520px;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: #e5e7eb;
    cursor: zoom-in;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
}

.vehicle-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-main-photo span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 11px 18px;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.vehicle-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.vehicle-thumbnail {
    position: relative;
    overflow: hidden;
    height: 92px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #e5e7eb;
    cursor: pointer;
    opacity: 0.72;
    transition: 0.2s ease;
}

.vehicle-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-thumbnail:hover,
.vehicle-thumbnail.is-active {
    opacity: 1;
    border-color: #111827;
}

/* CARTE INFO */

.vehicle-summary {
    position: sticky;
    top: 110px;
    padding: 28px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
}

.back-link {
    display: inline-flex;
    margin-bottom: 20px;
    color: #64748b;
    font-size: 14px;
    font-weight: 800;
}

.back-link:hover {
    color: var(--primary-dark);
}

.vehicle-summary .kicker {
    margin-bottom: 10px;
}

.vehicle-summary h1 {
    margin-bottom: 18px;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.vehicle-detail-price {
    display: block;
    margin-bottom: 18px;
    color: #0f172a;
    font-size: 34px;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.vehicle-detail-description {
    margin-bottom: 24px;
    color: #334155;
    font-size: 15px;
}

/* INFOS CLÉS */

.vehicle-specs-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0 0 26px;
    border-top: 1px solid #e5e7eb;
}

.vehicle-specs-detail div {
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.vehicle-specs-detail dt {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.vehicle-specs-detail dd {
    margin: 0;
    color: #111827;
    font-size: 15px;
    font-weight: 900;
}

/* ACTIONS */

.vehicle-detail-actions {
    display: grid;
    gap: 12px;
}

.vehicle-detail-actions .btn {
    width: 100%;
}

/* LIGHTBOX FIX MOBILE/DESKTOP */

.lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100vw !important;
    height: 100dvh !important;
    padding: 0 !important;
    background: #000 !important;
    overflow: hidden !important;
}

.lightbox.is-open {
    display: flex !important;
}

.lightbox-image {
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.lightbox-close {
    position: fixed !important;
    top: max(18px, env(safe-area-inset-top)) !important;
    right: 18px !important;
    z-index: 100001 !important;
    width: 54px !important;
    height: 54px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #111827 !important;
    font-size: 34px !important;
    cursor: pointer !important;
}

.lightbox-nav {
    position: fixed !important;
    top: 50% !important;
    z-index: 100001 !important;
    width: 46px !important;
    height: 46px !important;
    transform: translateY(-50%) !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #111827 !important;
    font-size: 34px !important;
    cursor: pointer !important;
}

.lightbox-prev {
    left: 12px !important;
}

.lightbox-next {
    right: 12px !important;
}

.lightbox-counter {
    position: fixed !important;
    left: 50% !important;
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
    z-index: 100001 !important;
    transform: translateX(-50%) !important;
    padding: 8px 14px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    .vehicle-detail-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-summary {
        position: static;
    }

    .vehicle-main-photo {
        height: 440px;
    }

    .vehicle-thumbnails {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .lightbox {
        padding: 0 !important;
        background: #000 !important;
        backdrop-filter: none !important;
        align-items: center !important;
        justify-content: center !important;
        touch-action: pan-x pan-y pinch-zoom;
    }

    .lightbox-image {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        object-fit: contain !important;
        box-shadow: none !important;
        touch-action: pinch-zoom;
    }

    .lightbox-close {
        top: max(14px, env(safe-area-inset-top)) !important;
        right: 14px !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 32px !important;
        background: rgba(255, 255, 255, 0.96) !important;
    }

    .lightbox-nav {
        display: none !important;
    }

    .lightbox-counter {
        bottom: max(18px, env(safe-area-inset-bottom)) !important;
        background: rgba(255, 255, 255, 0.92) !important;
    }
}

@media (max-width: 640px) {
    .vehicle-detail-hero {
        padding: 22px 0 54px;
    }

    .vehicle-main-photo {
        height: 300px;
        border-radius: 16px;
    }

    .vehicle-main-photo span {
        left: 14px;
        right: 14px;
        bottom: 14px;
        text-align: center;
    }

    .vehicle-thumbnails {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .vehicle-thumbnails::-webkit-scrollbar {
        display: none;
    }

    .vehicle-thumbnail {
        width: 92px;
        min-width: 92px;
        height: 70px;
        border-radius: 10px;
    }

    .vehicle-summary {
        padding: 22px;
        border-radius: 16px;
    }

    .vehicle-specs-detail div {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

/* =========================
   LIGHTBOX SCROLL LOCK
========================= */

html.lightbox-open,
body.lightbox-open {
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
}
