/* ==================== ENHANCEMENTS PREMIUM ==================== */
/* Micro-animations, skeleton, gradient texte, stagger, modale */

/* ==================== 1. MICRO-ANIMATIONS HOVER CARTES ==================== */
/* Déjà partiellement en place — on renforce l'ombre dorée */
.vehicle-card:hover {
    transform: translateY(-10px) scale(1.015) !important;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.5),
        0 24px 48px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(197, 160, 89, 0.18),
        0 0 0 1px rgba(197, 160, 89, 0.35) !important;
}

/* ==================== 2. SKELETON LOADING ==================== */
.skeleton-card {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.09) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

.skeleton-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.09) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

.skeleton-line--title  { width: 70%; height: 16px; }
.skeleton-line--pills  { width: 55%; height: 10px; }
.skeleton-line--price  { width: 40%; height: 18px; margin-top: 0.5rem; }

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== 3. GRADIENT TEXTE DORÉ ==================== */
.hero-title,
.section-title,
.about-title {
    background: linear-gradient(135deg, #c8a96e 0%, #f0d080 45%, #c8a96e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vehicle-price {
    background: linear-gradient(135deg, #c8a96e 0%, #f0d080 60%, #c8a96e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== 4. STAGGER ENTRÉE DES CARTES ==================== */
.vehicle-card {
    opacity: 0;
    transform: translateY(24px);
    animation: cardEnter 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes cardEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délais stagger — jusqu'à 12 cartes */
.vehicle-card:nth-child(1)  { animation-delay: 0ms; }
.vehicle-card:nth-child(2)  { animation-delay: 60ms; }
.vehicle-card:nth-child(3)  { animation-delay: 120ms; }
.vehicle-card:nth-child(4)  { animation-delay: 180ms; }
.vehicle-card:nth-child(5)  { animation-delay: 240ms; }
.vehicle-card:nth-child(6)  { animation-delay: 300ms; }
.vehicle-card:nth-child(7)  { animation-delay: 360ms; }
.vehicle-card:nth-child(8)  { animation-delay: 420ms; }
.vehicle-card:nth-child(9)  { animation-delay: 480ms; }
.vehicle-card:nth-child(10) { animation-delay: 540ms; }
.vehicle-card:nth-child(11) { animation-delay: 600ms; }
.vehicle-card:nth-child(12) { animation-delay: 660ms; }

/* ==================== 5. TRANSITION GRILLE AU FILTRAGE ==================== */
.gallery-grid {
    transition: opacity 0.25s ease;
}

.gallery-grid.filtering {
    opacity: 0.3;
    pointer-events: none;
}

/* ==================== 6. ANIMATION COMPTEUR ==================== */
.counter-text {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.counter-text.updating {
    transform: scale(1.15);
    opacity: 0.6;
}

/* ==================== 7. INDICATEUR PROGRESSION PHOTOS MODALE ==================== */
.modal-photo-counter {
    position: absolute;
    bottom: 12px;
    right: 14px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
    user-select: none;
}

/* ==================== 8. SWIPE TACTILE MODALE ==================== */
/* Feedback visuel pendant le swipe */
.modal-photo-wrap {
    touch-action: pan-y;
    user-select: none;
}

.modal-photo-wrap.swiping {
    transition: none !important;
}

/* ==================== 9. LIGHTBOX ZOOM ==================== */
.modal-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: lightboxIn 0.2s ease;
}

@keyframes lightboxIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-lightbox-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.8);
    animation: lightboxImgIn 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes lightboxImgIn {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.modal-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

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

/* Curseur zoom sur l'image principale */
#modalMainImage {
    cursor: zoom-in;
}

/* ==================== 10. RESPONSIVE ==================== */
@media (max-width: 768px) {
    .modal-photo-counter {
        font-size: 0.6rem;
        padding: 0.25rem 0.55rem;
        bottom: 8px;
        right: 10px;
    }
}
