/* Style pour la grille des véhicules */
.vehicules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Tablet: dimension intermédiaire (ex. 600x600 max) */
@media (min-width: 768px) and (max-width: 1023px) {
    .vehicule-single .vehicle-gallery {
        display: flex;
        justify-content: center;
    }

    .vehicule-single .gallery-grid {
        width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .vehicule-single .gallery-grid .slick-slide {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 600px;
    }

    .vehicule-single .gallery-grid .slick-slide img {
        width: 600px;
        height: 600px;
        object-fit: contain;
    }
}

/* Mobile: largeur fluide, hauteur auto avec contrainte viewport */
@media (max-width: 767px) {
    .vehicule-single .vehicle-gallery {
        padding-left: 12px;
        padding-right: 12px;
    }

    .vehicule-single .gallery-grid {
        width: 100%;
    }

    .vehicule-single .gallery-grid .slick-slide {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: auto;
        min-height: 260px; /* garantir une zone visible */
    }

    .vehicule-single .gallery-grid .slick-slide img {
        width: 100%;
        height: auto;
        max-height: 70vh;
        object-fit: contain;
    }

    /* Touch targets plus grands pour les contrôles */
    .vehicule-single .slick-prev,
    .vehicule-single .slick-next {
        width: 44px;
        height: 44px;
    }

    .vehicule-single .slick-dots {
        bottom: -10px;
    }
}
/* Style pour chaque carte de véhicule */
.vehicule-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    position: relative; /* Pour positionner correctement le badge */
}

/* Style pour les badges des véhicules */
.vehicule-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vehicule-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vehicule-badge.featured {
    background-color: #ff9800; /* Orange pour la mise en avant */
}

.vehicule-badge.sold {
    background-color: #f44336; /* Rouge pour vendu */
}

.vehicule-badge.reserved {
    background-color: #2196f3; /* Bleu pour réservé */
}

.vehicule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.vehicule-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* Ratio 4:3 pour les images */
    background: #f5f5f5;
}

.vehicule-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vehicule-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 10px;
}

.vehicule-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

/* Style pour les écrans mobiles */
@media (max-width: 767px) {
    .vehicule-badge {
        padding: 5px;
    }
}

.vehicule-card:hover .vehicule-thumbnail img {
    transform: scale(1.05);
}

.vehicule-content {
    padding: 1.5rem;
}

.vehicule-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.vehicule-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.vehicule-price {
    font-weight: 700;
    color: #d32f2f;
    font-size: 1.1rem;
}

/* Badge "Vendu" */
.sold-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #d32f2f;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* Style pour la page single véhicule */
.vehicule-single .entry-header {
    margin-bottom: 2rem;
    text-align: center;
}

.vehicule-single .entry-title {
    margin-bottom: 0.5rem;
    color: #333;
}

/* --- Summary card (single vehicle) --- */
.vehicule-summary-card {
    background: #2b2b2b;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.vehicule-summary-card .summary-image img {
    display: block;
    width: 100%;
    height: auto;
}

.vehicule-summary-card .summary-content {
    padding: 16px 20px;
    color: #e0e0e0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 16px;
    align-items: center;
}

.vehicule-summary-card .summary-title {
    grid-column: 1 / 2;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #54C37E; /* vert branding */
}

.vehicule-summary-card .summary-price {
    grid-column: 2 / 3;
    justify-self: end;
    font-size: 1.8rem;
    font-weight: 800;
    color: #54C37E;
}

.vehicule-summary-card .summary-meta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px 16px;
}

.vehicule-summary-card .meta-item {
    color: #cfcfcf;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vehicule-summary-card .meta-item i {
    color: #8ad9a9;
}

@media (max-width: 767px) {
    .vehicule-summary-card .summary-content {
        grid-template-columns: 1fr;
    }
    .vehicule-summary-card .summary-price {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

.entry-subtitle {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.vehicle-gallery {
    margin-bottom: 3rem;
    position: relative; /* nécessaire pour l'overlay */
}

.vehicule-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    background: #2b2b2b;
    border: 1px solid rgba(255,255,255,0.08);
    color: #e0e0e0;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.vehicule-info-bar .info-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 16px;
    flex: 1 1 auto;
}

.vehicule-info-bar .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cfcfcf;
}

.vehicule-info-bar .meta-item i {
    color: #8ad9a9;
}

.vehicule-info-bar .info-price {
    font-size: 1.6rem;
        align-items: flex-start;
        gap: 10px;
    }
    .vehicule-info-bar .info-price {
        font-size: 1.4rem;
    }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Corriger la galerie en page single: Slick n'aime pas display:grid sur le conteneur */
.vehicule-single .gallery-grid {
    display: block; /* laisser Slick gérer la mise en page */
}

.vehicule-single .gallery-grid.slick-initialized {
    display: block;
}

/* Améliorer la visibilité des flèches/dots Slick sur fond sombre */
.vehicule-single .slick-prev,
.vehicule-single .slick-next {
    background: rgba(0,0,0,0.4);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.vehicule-single .slick-prev:hover,
.vehicule-single .slick-next:hover {
    background: rgba(0,0,0,0.6);
}

.vehicule-single .slick-dots li button:before {
    color: #9e9e9e;
    opacity: 1;
}

.vehicule-single .slick-dots li.slick-active button:before {
    color: #54C37E;
}

.gallery-item {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* En page single, afficher les images à taille naturelle dans le slider */
.vehicule-single .gallery-item {
    padding-top: 0;
    height: auto;
    background: transparent;
    box-shadow: none;
}

.vehicule-single .gallery-item img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Ajustements spécifiques aux slides Slick en page single */
.vehicule-single .gallery-grid .slick-slide {
    text-align: center;
}

.vehicule-single .gallery-grid .slick-slide a {
    display: block;
}

.vehicule-single .gallery-grid .slick-slide img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70vh; /* éviter les débordements verticaux */
}

/* Desktop: limiter les images à 500x500 et centrer */
@media (min-width: 1024px) {
    .vehicule-single .vehicle-gallery {
        display: flex;
        justify-content: center;
    }

    .vehicule-single .gallery-grid {
        width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    .vehicule-single .gallery-grid .slick-slide {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 800px; /* zone fixe pour la slide */
    }

    .vehicule-single .gallery-grid .slick-slide img {
        width: 800px;
        height: 800px;
        object-fit: contain; /* ou 'cover' si vous préférez remplir */
    }
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.vehicle-details {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.vehicle-details h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    margin-bottom: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: #555;
    margin-right: 0.5rem;
}

.vehicle-equipment {
    margin: 2rem 0;
}

.vehicle-equipment h3 {
    color: #333;
    margin-bottom: 1rem;
}

.equipment-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.equipment-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.equipment-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .vehicules-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .vehicules-grid {
        grid-template-columns: 1fr;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
}

