/* Tablette */
@media screen and (max-width: 1024px) {}

/* Smartphone */
@media screen and (max-width: 767px) {}

/****** widget de recherche ******/

.psw-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.psw-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.psw-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    align-items: end;
}

.psw-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.psw-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.psw-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.psw-btn {
    width: 100%;
    padding: 7px !important;
    background-color: #10baaf;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.psw-btn:hover {
    background-color: #0a9e94;
}

.psw-btn-col {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .psw-row {
        grid-template-columns: 1fr 1fr;
    }
    .psw-row:last-child .psw-group:nth-child(3) {
        display: none;
    }
}

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

/****** page nos véhicules ******/

/* Filtres */
.planetvo-filters {
    background: #F5F5F5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#planetvo-container .planetvo-filters form {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 15px;
}

#planetvo-container .filter-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 15px;
    align-items: flex-end;
}

#planetvo-container .filter-group {
    flex: 1 1 0;
    min-width: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.planetvo-btn.reset {
    padding: 11px;
    font-size: 14px;
    background-color: #10BAAF !important;
}

.planetvo-vehicule-card . .planetvo-btn.reset:hover {
    background-color: #08978e !important;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Double slider prix */
.price-range-slider {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.price-range-slider .slider-track {
    position: absolute;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    pointer-events: none;
    background: #ddd;
}

.card-modele {
    font-weight: 600;
}

.price-range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    border: none !important;
    padding: 0 !important;
    margin: 0;
    height: 4px;
}

.price-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0073aa;
    pointer-events: all;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.price-range-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0073aa;
    pointer-events: all;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    border: none;
}

.planetvo-btn {
    padding: 8px 20px;
    height: fit-content;
    align-self: flex-end;
    background-color: #0EA89E;
    color: white !important;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: none;
    transition: opacity 0.5s ease;
}

.planetvo-vehicule-meta .fas {
    color: #0EA89E;
}

.planetvo-btn.reset {
    display: inline-block;
    background-color: #f0f0f0;
    color: white !important;
}

.planetvo-btn.reset:hover {
    background-color: #e0e0e0;
}

.planetvo-btn:hover {
    background-color: #08726b;
}

/* Liste des véhicules */
.planetvo-vehicules-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.planetvo-recents-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.planetvo-recents-list .planetvo-vehicule-card {
    display: block !important;
}

.planetvo-vehicule-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.planetvo-vehicule-card:hover {
    transform: translateY(-5px);
}

.planetvo-vehicule-card .card-detail-btn {
    display: block;
    position: absolute;
    bottom: 15px;
    left: 15px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.planetvo-vehicule-card:hover .card-detail-btn {
    opacity: 1;
    visibility: visible;
}

.planetvo-vehicule-image {
    height: 200px;
    overflow: hidden;
}

.planetvo-vehicule-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #666;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.planetvo-vehicule-details {
    padding: 15px 15px 55px 15px;
}

.planetvo-vehicule-details h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.planetvo-vehicule-meta {
    color: #666;
    font-size: 0.8em;
    margin-bottom: 10px;
    margin-top: 10px;
    display: flex;
    gap: 20px;
}

.card-sep {
    border: none !important;
    border-top: 1px solid #ebebeb !important;
    background-color: #ebebeb !important;
    margin: 0 0 10px 0;
    height: 1px;
}

.card-title-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.flex-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.planetvo-vehicule-prix {
    font-weight: bold;
    font-size: 1.1em;
    color: #10BAAF;
    flex-shrink: 0;
    white-space: nowrap;
}

.planetvo-error {
    padding: 20px;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
    border-radius: 4px;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    #planetvo-container .filter-row {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        align-items: stretch;
    }

    #planetvo-container .filter-group {
        width: 100%;
    }

    .planetvo-btn {
        width: 100%;
    }

    .planetvo-vehicules-list {
        grid-template-columns: 1fr;
    }
}

/* paggination*/

.planetvo-pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 4px;
    cursor: pointer;
    min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
    background: #212121;
}

.pagination-btn:hover {
    background-color: #212121 !important;
}

.pagination-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.planetvo-vehicule-card {
    margin-bottom: 20px;
    border: 1px solid #eee;
    /* padding: 15px; */
}

/* Masquer tous les véhicules par défaut */
.planetvo-vehicule-card {
    display: none;
}

/* Afficher uniquement les 12 premiers */
.planetvo-vehicule-card:nth-child(-n+12) {
    display: block;
}

/****** page détail véhicule ******/

.vd-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0px;
}

.vd-back {
    display: inline-block;
    margin-bottom: 25px;
    color: #0073aa;
    text-decoration: none;
    font-size: 0.95em;
}

.vd-back:hover {
    text-decoration: underline;
}

/* 2 colonnes : image | infos */
.vd-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: center;
}

.vd-col-image .vd-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.vd-col-image .vd-no-image {
    background: #f5f5f5;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 8px;
}

.vd-col-info {
    background-color: white;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border-radius: 20px;

}

.vd-col-info .vd-marque {
    font-size: 2em;
    font-weight: 500;
    margin: 0 0 5px 0;
    color: #10baaf;
}

.vd-col-info .vd-modele {
    font-size: 1.3em;
    font-weight: 500;
    color: black;
    margin: 0 0 15px 0;
}

.vd-col-info .vd-version {
    font-size: 0.85em;
    color: black;
    font-weight: 400;
}

.vd-col-info .vd-prix {
    font-size: 2em;
    font-weight: 700;
    color: #10baaf;
    margin-bottom: 25px;
}

.vd-spec-icon {
    font-size: 1.3em;
    color: #10baaf;
    margin-bottom: 2px;
}

/* Grille specs 3 colonnes × 2 lignes */
.vd-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.vd-spec-item {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vd-spec-label {
    font-size: 0.78em;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.vd-spec-value {
    font-size: 1em;
    font-weight: 600;
    color: #222;
}

/* Description */
.vd-description {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.vd-description h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.vd-description p {
    line-height: 1.7;
    color: #444;
}


/* Responsive */
@media (max-width: 768px) {
    .vd-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .vd-specs {
        grid-template-columns: repeat(2, 1fr);
    }
}