/**
 * Styles — page boutique avec filtres AJAX
 * Fichier : css/shop-filters.css
 *
 * Source de vérité unique. Aucun <style> ni style="" dans category.php
 * sauf les badges garantie/état en inline (filet de sécurité vs shop-filters.js).
 */

/* ========================================
   CONTENEUR PRINCIPAL
   ======================================== */
.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* ========================================
   SIDEBAR
   ======================================== */
.filters-sidebar {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1f2937;
}

.filter-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-title svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

/* ========================================
   FILTRE IA
   ======================================== */
.ia-search-block {
    background: linear-gradient(135deg, #ede9fe, #f5f3ff);
    border: 1px solid #c4b5fd;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
}

.ia-search-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 10px;
}

.ia-search-label i {
    font-size: 14px;
}

.ia-search-input {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #c4b5fd;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
    box-sizing: border-box;
}

.ia-search-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.ia-search-btn {
    margin-top: 8px;
    width: 100%;
    padding: 9px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}

.ia-search-btn:hover { background: #4f46e5; }
.ia-search-btn:disabled { background: #a5b4fc; cursor: not-allowed; }

.ia-search-result {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    min-height: 16px;
}

/* ========================================
   INPUTS SIDEBAR (recherche / catégorie / localisation)
   ======================================== */
.sidebar-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: box-shadow .15s ease, border-color .15s ease;
}

.sidebar-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

select.sidebar-input {
    cursor: pointer;
}

/* ========================================
   FILTRE PRIX
   ======================================== */
.price-inputs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.price-input {
    flex: 1;
}

.price-input label {
    font-size: 12px;
    color: #6b7280;
    display: block;
    margin-bottom: 6px;
}

.price-input input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: box-shadow .15s ease, border-color .15s ease;
}

.price-input input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Dual-range slider */
.price-range {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    position: relative;
    margin: 18px 0 8px;
}

.price-range-progress {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #4f46e5);
    border-radius: 999px;
    position: absolute;
    left: 0;
    width: 100%;
}

input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    position: absolute;
    top: -5px;
    pointer-events: none;
    height: 16px;
}

input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
    height: 6px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--range-thumb-bg, #6366f1);
    border: 3px solid var(--range-thumb-border, #fff);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform .15s ease, box-shadow .15s ease;
    margin-top: -7px;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

input[type="range"]::-moz-range-track {
    background: transparent;
    height: 6px;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--range-thumb-bg, #6366f1);
    border: 3px solid var(--range-thumb-border, #fff);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform .15s ease, box-shadow .15s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

/* ========================================
   CHECKBOXES / RADIOS
   ======================================== */
.filter-option {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    transition: transform .12s ease;
}

.filter-option:hover {
    transform: translateX(2px);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #6366f1;
}

.filter-option label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.filter-count {
    font-size: 12px;
    color: #9ca3af;
}

/* ========================================
   BOUTONS D'ACTION (sidebar)
   ======================================== */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.btn-apply {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, transform .06s ease, box-shadow .2s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.btn-apply:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn-apply:active {
    transform: scale(0.99);
}

.btn-reset {
    padding: 12px 16px;
    background: #f9fafb;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.btn-reset:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* ========================================
   BADGES FILTRES ACTIFS
   ======================================== */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 16px;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #ede9fe;
    color: #4f46e5;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    animation: badgeIn .2s ease-out;
}

@keyframes badgeIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

.filter-badge button {
    background: none;
    border: none;
    color: #4f46e5;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: color .15s ease, transform .15s ease;
}

.filter-badge button:hover {
    color: #4338ca;
    transform: rotate(90deg);
}

/* ========================================
   ZONE DE RÉSULTATS
   ======================================== */
.results-container {
    min-height: 600px;
}

.results-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 18px;
}

.results-count {
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
}

.results-count strong {
    color: #111827;
}

/* ========================================
   TRI RAPIDE (3 boutons en haut)
   ======================================== */
.sort-buttons-top {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.sort-btn-top {
    padding: 10px 18px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.sort-btn-top:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #374151;
}

.sort-btn-top.active {
    background: #ede9fe;
    border-color: #6366f1;
    color: #4f46e5;
}

/* ========================================
   VUE MODE (grille / liste)
   ======================================== */
.view-mode {
    display: flex;
    gap: 8px;
}

.view-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.view-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.view-btn.active {
    background: #ede9fe;
    border-color: #6366f1;
    color: #4f46e5;
}

/* ========================================
   GRILLE DE PRODUITS
   ======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 34px;
    align-items: start;
}

/* ========================================
   CARDS PRODUITS
   ======================================== */
.product-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #eef2f7;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform .12s ease, box-shadow .2s ease;
    animation: cardIn .35s ease-out;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

/* Lien dans la carte — remplace le style="" inline */
.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Image : zoom au hover */
.product-card .product-image {
    position: relative;
    overflow: hidden;
}

.product-card .product-image img {
    transition: transform .3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* — Mode GRILLE (vertical) — */
.products-grid:not(.is-list) .product-card {
    display: flex;
    flex-direction: column;
}

.products-grid:not(.is-list) .product-card .product-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f3f4f6;
    overflow: hidden;
}

.products-grid:not(.is-list) .product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.products-grid:not(.is-list) .product-card .product-content {
    padding: 14px 16px 16px;
}

/* — Mode LISTE (horizontal) — */
.products-grid.is-list {
    grid-template-columns: 1fr;
}

.products-grid.is-list .product-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 190px;
}

.products-grid.is-list .product-card .product-image {
    position: relative;
    width: 100%;
    height: 190px;
    background: #f3f4f6;
    overflow: hidden;
}

.products-grid.is-list .product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.products-grid.is-list .product-card .product-content {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

/* — Textes carte — */
.product-title {
    font-size: 15px;
    font-weight: 900;
    color: #111827;
    line-height: 1.25;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-location {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* — Footer carte — */
.product-footer {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.product-price {
    font-size: 18px;
    font-weight: 900;
    color: #4f46e5;
}

.product-date {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

/* ========================================
   BADGES SUR LES CARTES
   ======================================== */
.badge-etat {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.badge-neuf {
    background: rgba(99, 102, 241, 0.13);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.badge-occasion {
    background: rgba(234, 179, 8, 0.13);
    color: #a16207;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-garantie {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .4px;
    background: #059669;
    color: #fff;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ========================================
   ÉTAT VIDE + ERREURS AJAX
   ======================================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: #d1d5db;
}

.empty-state h3 {
    font-size: 20px;
    color: #374151;
    margin-bottom: 8px;
}

.empty-state p {
    color: #6b7280;
    font-size: 15px;
}

.ajax-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}

.ajax-error.soft  { color: #6b7280; }
.ajax-error.error { color: #ef4444; }

/* ========================================
   AUTOCOMPLETION LOCALISATION
   ======================================== */
.location-results-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.loc-suggestion,
.location-suggestion {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s ease;
}

.loc-suggestion:last-child,
.location-suggestion:last-child {
    border-bottom: none;
}

.loc-suggestion:hover,
.location-suggestion:hover {
    background: #ede9fe;
}

.loc-suggestion strong {
    color: #111827;
}

.loc-suggestion .loc-meta {
    color: #9ca3af;
    font-size: 12px;
    margin-left: 8px;
    font-weight: 400;
}

.loc-suggestion-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.loc-suggestion-icon { font-size: 18px; }
.loc-suggestion-text { flex: 1; }
.loc-suggestion-name { font-weight: 600; color: #1f2937; margin-bottom: 2px; }
.loc-suggestion-sub  { font-size: 12px; color: #6b7280; }

/* ========================================
   PAGINATION
   ======================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 34px 0;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #374151;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .1s ease;
    font-weight: 800;
    text-decoration: none;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    background: #f9fafb;
    border-color: #6366f1;
    color: #4f46e5;
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

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

.pagination-dots {
    padding: 0 8px;
    color: #9ca3af;
}

/* ========================================
   SKELETON LOADING
   ======================================== */
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #eef2f7;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.skeleton-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

.skeleton-body {
    padding: 14px 16px 16px;
}

.skeleton-line {
    height: 13px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    margin-bottom: 10px;
}

.skeleton-line.short { width: 55%; }
.skeleton-line.price { width: 35%; height: 18px; margin-bottom: 0; }

/* ========================================
   LOADING OVERLAY (conservé pour compat)
   ======================================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
    animation: overlayIn .2s ease-in;
}

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

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   ANIMATIONS SUPPLÉMENTAIRES
   ======================================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

.loading .product-card {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ========================================
   NAV BADGE MESSAGES
   ======================================== */
.nav-msg-link {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-msg-count {
    position: absolute;
    top: -2px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 950px) {
    .results-header {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sort-buttons-top {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .products-grid.is-list .product-card {
        grid-template-columns: 220px 1fr;
    }

    .products-grid.is-list .product-card .product-image {
        height: 170px;
    }
}

@media (max-width: 768px) {
    .shop-container {
        padding: 15px;
    }

    .filters-sidebar {
        padding: 20px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .filter-actions {
        flex-direction: column;
    }

    .btn-reset {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .products-grid:not(.is-list) .product-card .product-image {
        height: 140px;
    }

    .products-grid:not(.is-list) .product-card .product-content {
        padding: 8px 10px 10px;
    }

    .products-grid:not(.is-list) .product-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .products-grid:not(.is-list) .product-price {
        font-size: 15px;
    }

    .products-grid:not(.is-list) .product-location,
    .products-grid:not(.is-list) .product-date {
        font-size: 11px;
    }

    .sort-buttons-top {
        flex-direction: column;
    }

    .sort-btn-top {
        text-align: center;
    }

    .price-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .products-grid.is-list .product-card {
        grid-template-columns: 1fr;
    }

    .products-grid.is-list .product-card .product-image {
        height: 210px;
    }

    .pagination-container {
        gap: 4px;
        flex-wrap: wrap;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* ========================================
   CUSTOM SELECT (catégorie)
   ======================================== */
.cselect-wrap {
    position: relative;
}

.cselect-trigger {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color .15s, box-shadow .15s;
    color: #374151;
    user-select: none;
    box-sizing: border-box;
}

.cselect-trigger:hover,
.cselect-open .cselect-trigger {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.cselect-trigger-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #374151;
}

.cselect-trigger-text.placeholder {
    color: #9ca3af;
}

.cselect-trigger-arrow {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #9ca3af;
    transition: transform .2s, color .15s;
    margin-left: 8px;
}

.cselect-open .cselect-trigger-arrow {
    transform: rotate(180deg);
    color: #6366f1;
}

.cselect-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    z-index: 200;
    overflow: hidden;
}

.cselect-open .cselect-dropdown {
    display: block;
    animation: dropIn .15s ease-out;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cselect-search {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.cselect-search input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.cselect-search input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.cselect-options {
    max-height: 200px;
    overflow-y: auto;
}

.cselect-option {
    padding: 9px 14px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: background .1s;
}

.cselect-option:hover {
    background: #ede9fe;
    color: #4f46e5;
}

.cselect-option.selected {
    background: #ede9fe;
    color: #4f46e5;
    font-weight: 700;
}

.cselect-option.cselect-hidden {
    display: none;
}

/* ========================================
   VUE LISTE (horizontal) — layout amélioré
   ======================================== */

/* Override: on passe en flex plutôt que grid pour plus de flexibilité */
.products-grid.is-list .product-card {
    display: flex;
    flex-direction: row;
    min-height: 170px;
}

.products-grid.is-list .product-card a {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.products-grid.is-list .product-card .product-image {
    flex-shrink: 0;
    width: 210px;
    height: auto;
    min-height: 170px;
    background: #f3f4f6;
    overflow: hidden;
    position: relative;
}

.products-grid.is-list .product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.products-grid.is-list .product-card .product-content {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    min-width: 0;
}

.products-grid.is-list .product-title {
    font-size: 15px;
    font-weight: 900;
    -webkit-line-clamp: 2;
    margin-bottom: 6px;
}

.products-grid.is-list .product-location {
    font-size: 13px;
    color: #6b7280;
}

.products-grid.is-list .product-footer {
    margin-top: 0;
    align-items: flex-end;
}

.products-grid.is-list .product-price {
    font-size: 22px;
    font-weight: 900;
    color: #4f46e5;
}

.products-grid.is-list .product-date {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 2px;
}

/* ========================================
   NETTOYAGE : badge parasite dans le footer
   ======================================== */

body > footer.footer.section.section-sm > div > div > div.col-lg-3.col-md-7.offset-md-1.offset-lg-0 > div:nth-child(1) > span{
   display: none ;
}

/* ========================================
   DARK MODE
   ======================================== */
body[data-theme="dark"] .filters-sidebar {
    background: #1e293b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
body[data-theme="dark"] .sidebar-title { color: #f1f5f9; }
body[data-theme="dark"] .filter-section { border-color: #334155; }
body[data-theme="dark"] .filter-title { color: #e2e8f0; }

body[data-theme="dark"] .ia-search-block {
    background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(99,102,241,.08));
    border-color: rgba(99,102,241,.3);
}
body[data-theme="dark"] .ia-search-input {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}
body[data-theme="dark"] .ia-search-result { color: #94a3b8; }

body[data-theme="dark"] .sidebar-input {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}
body[data-theme="dark"] .sidebar-input::placeholder { color: #64748b; }

body[data-theme="dark"] .price-input label { color: #94a3b8; }
body[data-theme="dark"] .price-input input {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}

body[data-theme="dark"] .filter-label { color: #cbd5e1; }
body[data-theme="dark"] .filter-checkbox + .filter-label::before {
    background: #0f172a;
    border-color: #475569;
}

body[data-theme="dark"] .results-header {
    background: #1e293b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
body[data-theme="dark"] .results-count { color: #94a3b8; }
body[data-theme="dark"] .results-count strong { color: #f1f5f9; }

body[data-theme="dark"] .sort-btn-top {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
body[data-theme="dark"] .sort-btn-top:hover {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}
body[data-theme="dark"] .sort-btn-top.active {
    background: rgba(99,102,241,.15);
    border-color: #6366f1;
    color: #a5b4fc;
}

body[data-theme="dark"] .view-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
body[data-theme="dark"] .view-btn:hover {
    background: #334155;
    border-color: #475569;
}
body[data-theme="dark"] .view-btn.active {
    background: rgba(99,102,241,.15);
    border-color: #6366f1;
    color: #a5b4fc;
}

body[data-theme="dark"] .product-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
body[data-theme="dark"] .product-card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
body[data-theme="dark"] .products-grid:not(.is-list) .product-card .product-image,
body[data-theme="dark"] .products-grid.is-list .product-card .product-image {
    background: #0f172a;
}
body[data-theme="dark"] .product-title { color: #f1f5f9; }
body[data-theme="dark"] .product-location { color: #94a3b8; }
body[data-theme="dark"] .product-price { color: #a5b4fc; }
body[data-theme="dark"] .product-date { color: #64748b; }

/* Price range slider dark */
body[data-theme="dark"] .price-range {
    background: #334155;
    --range-thumb-bg: #a5b4fc;
    --range-thumb-border: #0f172a;
}
body[data-theme="dark"] .price-range-progress {
    background: linear-gradient(90deg, #818cf8, #a78bfa);
}
body[data-theme="dark"] .price-input input {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}
body[data-theme="dark"] .price-input input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}
body[data-theme="dark"] .price-label {
    color: #94a3b8;
}

body[data-theme="dark"] .badge-neuf {
    background: rgba(99,102,241,.2);
    color: #a5b4fc;
    border-color: rgba(99,102,241,.35);
}
body[data-theme="dark"] .badge-occasion {
    background: rgba(234,179,8,.15);
    color: #fbbf24;
    border-color: rgba(234,179,8,.3);
}

body[data-theme="dark"] .empty-state h3 { color: #f1f5f9; }
body[data-theme="dark"] .empty-state p { color: #94a3b8; }

body[data-theme="dark"] .pagination-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
body[data-theme="dark"] .pagination-btn:hover {
    background: #334155;
    color: #f1f5f9;
}
body[data-theme="dark"] .pagination-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: #fff;
}

body[data-theme="dark"] .skeleton-card {
    background: #1e293b;
    border-color: #334155;
}
body[data-theme="dark"] .skeleton-img,
body[data-theme="dark"] .skeleton-line {
    background: linear-gradient(90deg, #334155 25%, #3e4f65 50%, #334155 75%);
    background-size: 200% 100%;
}

body[data-theme="dark"] .location-results-dropdown {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
body[data-theme="dark"] .location-result-item { color: #e2e8f0; }
body[data-theme="dark"] .location-result-item:hover { background: #334155; }
body[data-theme="dark"] .loc-suggestion,
body[data-theme="dark"] .location-suggestion { color: #e2e8f0; border-bottom-color: #334155; }
body[data-theme="dark"] .loc-suggestion:hover,
body[data-theme="dark"] .location-suggestion:hover { background: #334155; }
body[data-theme="dark"] .loc-suggestion strong { color: #f1f5f9; }
body[data-theme="dark"] .loc-suggestion .loc-meta { color: #94a3b8; }
body[data-theme="dark"] .loc-suggestion-name { color: #f1f5f9; }
body[data-theme="dark"] .loc-suggestion-sub { color: #94a3b8; }

body[data-theme="dark"] .cselect-trigger {
    background: #0f172a !important;
    border-color: #475569 !important;
}
body[data-theme="dark"] .cselect-trigger-text {
    color: #f1f5f9 !important;
}
body[data-theme="dark"] .cselect-trigger-text.placeholder {
    color: #94a3b8 !important;
}
body[data-theme="dark"] .cselect-dropdown {
    background: #1e293b !important;
    border-color: #475569 !important;
}
body[data-theme="dark"] .cselect-search input {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}
body[data-theme="dark"] .cselect-search {
    border-bottom-color: #334155;
}
body[data-theme="dark"] .cselect-option { color: #e2e8f0; }
body[data-theme="dark"] .cselect-option:hover { background: #334155; color: #a5b4fc; }
body[data-theme="dark"] .cselect-option.selected { background: rgba(99,102,241,.2); color: #a5b4fc; }

/* ========================================
   SEO HEADER (H1 pleine largeur)
   ======================================== */
.seo-header {
    margin-top: 100px;
    margin-bottom: 24px;
}

.seo-header h1 {
    font-size: 26px;
    font-weight: 900;
    color: #111827;
    line-height: 1.3;
    margin: 0;
}

/* ========================================
   SEO BOTTOM (H2 + paragraphe long)
   ======================================== */
.seo-bottom {
    background: #fff;
    border-radius: 14px;
    padding: 32px 36px;
    margin-top: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.seo-bottom h2 {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 16px;
}

.seo-bottom p {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
    margin: 0;
}

.seo-bottom a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

.seo-bottom a:hover {
    text-decoration: underline;
}

/* ========================================
   SEO — RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .seo-header h1 {
        font-size: 22px;
    }

    .seo-bottom {
        padding: 24px 20px;
        margin-top: 28px;
    }

    .seo-bottom h2 {
        font-size: 18px;
    }

    .seo-bottom p {
        font-size: 14px;
    }
}

/* ========================================
   SEO — DARK MODE
   ======================================== */
body[data-theme="dark"] .seo-header h1 {
    color: #f1f5f9;
}

body[data-theme="dark"] .seo-bottom {
    background: #1e293b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .seo-bottom h2 {
    color: #f1f5f9;
}

body[data-theme="dark"] .seo-bottom p {
    color: #94a3b8;
}

body[data-theme="dark"] .seo-bottom a {
    color: #a5b4fc;
}
