* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-teal: #52D3D8;
    --teal-light: #E0F7F8;
    --teal-dark: #3BA0A4;
    --teal-accent: #6BE4E9;
    --white: #FFFFFF;
    --off-white: #FAFBFC;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-700);
    overflow-x: hidden;
    overflow-y: auto;
}

/* ===== HEADER AVEC FILTRES ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 88px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 32px;
    justify-content: space-between;
}

.logo img {
    height: 24px;
    width: auto;
}

.header-filters {
    display: flex;
    gap: 16px;
    align-items: center;
}

.filter-item {
    position: relative;
}

.filter-dropdown {
    padding: 10px 18px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: white;
    color: var(--gray-700);
    transition: all 0.2s;
    min-width: 160px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.filter-dropdown:hover,
.filter-dropdown:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-1px);
    color: var(--primary-teal);
}

/* Boutons de filtres stylés - ultra légers */
.filter-btn {
    padding: 10px 18px;
    background: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 160px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-1px);
    color: var(--primary-teal);
}

.filter-btn.active {
    box-shadow: 0 4px 12px rgba(82,211,216,0.25);
    color: var(--primary-teal);
}

.filter-btn-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
}

.filter-btn-arrow {
    margin-left: auto;
    font-size: 18px;
    opacity: 0.5;
    transition: transform 0.2s;
}

.filter-btn:hover .filter-btn-arrow {
    opacity: 0.8;
    transform: translateX(2px);
}

.btn-reset {
    width: 44px;
    height: 44px;
    padding: 0;
    background: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 20px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-reset:hover {
    color: var(--error);
    background: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    transform: rotate(180deg) translateY(1px);
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    margin-top: 88px;
    display: flex;
    position: relative;
    min-height: calc(100vh - 88px);
}

/* ===== LISTINGS PANEL ===== */
.listings-panel {
    width: 65%;
    padding: 24px;
    background: var(--gray-50);
}

.results-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-count {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.sort-dropdown {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* ===== BOUTON FILTRES MOBILE ===== */
.mobile-filter-btn {
    display: none; /* Caché par défaut */
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-700);
    flex-shrink: 0;
}

.mobile-filter-btn svg {
    flex-shrink: 0;
}

/* ===== BOUTON TRI MOBILE ===== */
.mobile-sort-btn {
    display: none; /* Caché par défaut */
    width: auto;
    height: auto;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-700);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===== MODALS MOBILE (BOTTOM SHEET) ===== */
.mobile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.mobile-modal.active {
    display: block;
}

.mobile-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.mobile-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.mobile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.mobile-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.mobile-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 20px;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.mobile-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
}

.mobile-filter-group {
    margin-bottom: 24px;
}

.mobile-filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.mobile-filter-select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    font-size: 16px;
    color: var(--gray-900);
    background: white;
}

.mobile-filter-button {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    font-size: 16px;
    color: var(--gray-900);
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.mobile-sort-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-sort-option {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--gray-700);
    transition: all 0.2s;
}

.mobile-sort-option:hover {
    background: var(--gray-50);
}

.mobile-sort-option.active {
    background: var(--teal-light);
    border-color: var(--primary-teal);
    color: var(--primary-teal);
    font-weight: 600;
}

.mobile-sort-check {
    display: none;
    color: var(--primary-teal);
    font-size: 20px;
}

.mobile-sort-option.active .mobile-sort-check {
    display: block;
}

.mobile-btn-outline,
.mobile-btn-solid {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.mobile-btn-outline {
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.mobile-btn-solid {
    background: var(--primary-teal);
    color: white;
}

/* Pour écrans moyens : 2 colonnes */
@media (max-width: 1400px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-filters {
        gap: 12px;
    }
    
    .filter-dropdown {
        min-width: 120px;
        font-size: 13px;
    }
    
    .filter-slider-inline {
        min-width: 160px;
    }
}

/* Pour petits écrans : 1 colonne */
@media (max-width: 1200px) {
    .listings-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== PROPERTY CARD - STYLE INDEX ===== */
.property-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.property-card:hover {
    box-shadow: 0 12px 24px rgba(82,211,216,0.2);
    transform: translateY(-4px);
}

.property-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

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

.property-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-roi {
    background: var(--success);
}

.badge-golden {
    background: var(--warning);
}

.badge-urgent {
    background: var(--error);
}

.badge-nouveau {
    background: var(--primary-teal);
}

.badge-premium {
    background: #8B5CF6;
}

.property-info {
    padding: 24px;
}

.property-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-description {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
    height: 44.8px; /* 2 lignes : 14px * 1.6 * 2 = 44.8px */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.property-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-teal);
}

.property-price-per-sqm {
    color: var(--gray-500);
    font-size: 14px;
}

/* ===== MAP PANEL ===== */
.map-panel {
    width: 35%;
    height: calc(100vh - 88px);
    position: sticky;
    top: 88px;
}

#map {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Filtre grayscale UNIQUEMENT sur les tiles de la carte (fond), pas sur les markers/popups */
.leaflet-tile-pane {
    filter: grayscale(40%) brightness(1.05) contrast(0.95);
}

/* Contrôles de zoom modernes et flat */
.custom-zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    font-weight: 300;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.zoom-btn:hover {
    background: var(--gray-50);
    color: var(--primary-teal);
}

.zoom-btn:active {
    background: var(--gray-100);
}

.zoom-btn:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 1px;
    background: var(--gray-200);
}

/* Cacher l'attribution Leaflet */
.leaflet-control-attribution,
.leaflet-bottom.leaflet-right {
    display: none !important;
}

/* Animation pulse pour les points colorés */
@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Moteur de recherche sur la carte */
.map-search-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: all 0.3s;
}

.map-search-container:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.map-search-input {
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    background: transparent;
    width: 280px;
    font-family: 'Inter', sans-serif;
}

.map-search-input::placeholder {
    color: var(--gray-400);
}

.map-search-btn {
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    font-size: 20px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.map-search-btn:hover {
    color: var(--primary-teal);
    background: var(--gray-50);
}

/* Custom marker cluster colors */
.marker-cluster-small {
    background-color: rgba(82, 211, 216, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(82, 211, 216, 0.8);
    color: white;
    font-weight: 700;
}

.marker-cluster-medium {
    background-color: rgba(59, 160, 164, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(59, 160, 164, 0.8);
    color: white;
    font-weight: 700;
}

.marker-cluster-large {
    background-color: rgba(16, 185, 129, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(16, 185, 129, 0.8);
    color: white;
    font-weight: 700;
}

/* ===== POPUP CARTE - ULTRA SIMPLE ===== */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    padding: 0 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 220px !important;
}

.leaflet-popup-tip {
    background: white !important;
    box-shadow: 0 3px 14px rgba(0,0,0,0.12) !important;
}

.custom-popup {
    display: flex;
    flex-direction: column;
}

/* Popup carte - Style fiche produit */
.mappopup-card {
    display: flex;
    flex-direction: column;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.mappopup-card:hover {
    transform: translateY(-2px);
}

.mappopup-image-wrapper {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.mappopup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mappopup-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mappopup-badge.mappopup-roi {
    background: var(--success);
    color: white;
}

.mappopup-badge.mappopup-golden {
    background: var(--warning);
    color: white;
}

.mappopup-badge.mappopup-premium {
    background: #8B5CF6;
    color: white;
}

.mappopup-badge.mappopup-promo {
    background: var(--error);
    color: white;
}

.mappopup-badge.mappopup-new {
    background: var(--primary-teal);
    color: white;
}

.mappopup-content {
    padding: 12px;
}

.mappopup-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 6px;
}

.mappopup-description {
    font-size: 11px;
    color: var(--gray-600);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mappopup-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}

.mappopup-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-teal);
}

.mappopup-price-m2 {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 600;
}

/* Marker actif (sélectionné) - fond noir texte blanc */
.custom-marker.marker-active .marker-price-label {
    background: var(--gray-900) !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3) !important;
    transform: scale(1.15);
}

/* ANCIENS STYLES - À SUPPRIMER */
.popup-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.popup-content-mini {
    padding: 12px;
    background: white;
}

.popup-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 10px;
}

.popup-btn-info {
    width: 100%;
    padding: 10px;
    background: var(--primary-teal);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.popup-btn-info:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(82, 211, 216, 0.3);
}

/* ===== MODAL FILTRES - STYLE PREMIUM ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 460px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--gray-100);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--gray-400);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.filter-section {
    padding: 32px 28px;
}

/* ===== POPUP PRODUIT - LAYOUT HORIZONTAL MODERNE ===== */
.popupprod-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 15000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    animation: popupprod-fadeIn 0.3s ease;
}

.popupprod-overlay.popupprod-active {
    display: flex;
}

@keyframes popupprod-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popupprod-container {
    background: white;
    border-radius: 20px;
    width: 92%;
    max-width: 1000px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    position: relative;
    animation: popupprod-slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: grid;
    grid-template-columns: 1fr 400px;
}

@keyframes popupprod-slideUp {
    from { 
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popupprod-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--gray-600);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    z-index: 100;
}

.popupprod-close:hover {
    background: var(--error);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* Partie gauche - Fiche produit */
.popupprod-left {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.popupprod-image-wrapper {
    position: relative;
    height: 340px;
    overflow: hidden;
    flex-shrink: 0;
}

.popupprod-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popupprod-badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.popupprod-badge {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

.popupprod-badge.popupprod-roi {
    background: var(--success);
    color: white;
}

.popupprod-badge.popupprod-golden {
    background: var(--warning);
    color: white;
}

.popupprod-badge.popupprod-promo {
    background: var(--error);
    color: white;
}

.popupprod-badge.popupprod-new {
    background: var(--primary-teal);
    color: white;
}

.popupprod-badge.popupprod-premium {
    background: #8B5CF6;
    color: white;
}

/* Carousel dots */
.popupprod-carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.popupprod-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

.popupprod-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.popupprod-dot.popupprod-active {
    background: white;
    width: 28px;
    border-radius: 4px;
}

.popupprod-content {
    padding: 32px 36px;
}

.popupprod-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 14px;
    line-height: 1.2;
}

.popupprod-description {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-100);
}

.popupprod-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popupprod-price-main {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-teal);
    line-height: 1;
}

.popupprod-price-per-m2 {
    font-size: 17px;
    color: var(--gray-600);
    font-weight: 600;
}

/* Partie droite - Formulaire contact */
.popupprod-right {
    background: var(--primary-teal);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popupprod-contact-title {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.popupprod-contact-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 28px;
    line-height: 1.5;
}

.popupprod-form-group {
    margin-bottom: 14px;
}

.popupprod-input {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    background: white;
    color: var(--gray-700);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.popupprod-input::placeholder {
    color: var(--gray-400);
}

.popupprod-input:focus {
    outline: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.popupprod-submit {
    width: 100%;
    padding: 15px;
    background: white;
    color: var(--primary-teal);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.popupprod-submit:hover {
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.popupprod-submit:active {
    transform: translateY(0);
}

.popupprod-privacy {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
    line-height: 1.4;
    text-align: center;
}

.filter-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.slider-container {
    padding: 0;
}

.slider-values {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 16px;
}

.slider-value-box {
    flex: 1;
    text-align: center;
}

.slider-value-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slider-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-900);
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid var(--gray-200);
    transition: all 0.2s;
}

/* noUiSlider Custom Styles */
.noUi-target {
    background: var(--gray-200);
    border-radius: 8px;
    border: none;
    box-shadow: none;
    height: 8px;
    margin: 24px 0 32px 0;
}

.noUi-connect {
    background: var(--primary-teal);
    box-shadow: none;
}

.noUi-handle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-teal);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 1px 3px rgba(82,211,216,0.3);
    cursor: grab;
    right: -12px;
    top: -8px;
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

.noUi-handle:hover {
    box-shadow: 0 3px 12px rgba(82,211,216,0.4), 0 2px 6px rgba(0,0,0,0.15);
}

.noUi-handle:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.noUi-tooltip {
    display: none;
}

.slider-track-wrapper {
    display: none; /* On n'utilise plus les sliders natifs */
}

.slider-inputs {
    display: none; /* On cache les inputs manuels */
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.btn-full {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-outline {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-outline:hover {
    border-color: var(--gray-300);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-solid {
    background: var(--primary-teal);
    color: white;
    box-shadow: 0 2px 8px rgba(82,211,216,0.25);
}

.btn-solid:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(82,211,216,0.35);
}

.btn-solid:active,
.btn-outline:active {
    transform: translateY(0);
}

/* Pour écrans moyens : 2 colonnes */
@media (max-width: 1400px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header {
        padding: 0 32px;
    }
    
    .listings-panel {
        padding: 24px 32px;
    }
    
    .header-filters {
        gap: 12px;
    }
    
    .filter-dropdown,
    .filter-slider-btn {
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* Pour petits écrans : 1 colonne */
@media (max-width: 1200px) {
    .listings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .header {
        height: auto;
        min-height: 88px;
        padding: 16px 24px;
    }
    
    .header-filters {
        flex-wrap: wrap;
    }
    
    .filter-slider-inline {
        min-width: 180px;
    }
    
    .listings-panel {
        width: 60%;
    }
    
    .map-panel {
        width: 40%;
        height: calc(100vh - 88px);
    }
}

@media (max-width: 768px) {
    /* EMPÊCHER LE SCROLL DU BODY */
    body {
        overflow: hidden;
        height: 100vh;
    }
    
    /* HEADER MOBILE FIXE */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        padding: 12px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 1000;
        gap: 12px;
    }
    
    .logo {
        flex-shrink: 0;
    }
    
    .logo img {
        height: 20px;
        width: auto;
    }
    
    /* Masquer les filtres desktop */
    .header-filters {
        display: none !important;
    }
    
    /* Afficher le bouton filtres mobile */
    .mobile-filter-btn {
        display: flex;
    }
    
    /* MAIN CONTAINER LAYOUT APP */
    .main-container {
        display: flex;
        flex-direction: column;
        height: 100vh;
        padding-top: 60px;
        margin-top: 0;
    }

    /* MAP FIXE - PLUS PETITE */
    .map-panel {
        width: 100%;
        height: 20vh;
        position: relative;
        top: 0;
        flex-shrink: 0;
    }
    
    /* Masquer la recherche sur la map */
    .map-search-container {
        display: none !important;
    }
    
    /* LISTE SCROLLABLE */
    .listings-panel {
        width: 100%;
        flex: 1;
        overflow-y: hidden; /* Pas de scroll sur le panel */
        padding: 0 !important;
        display: flex;
        flex-direction: column;
    }
    
    /* Results header fixe */
    .results-header {
        margin-bottom: 0;
        padding: 4px 16px 2px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--gray-50);
        flex-shrink: 0;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .results-count {
        font-size: 16px;
    }
    
    /* Grid scrollable */
    .listings-grid {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px;
        grid-template-columns: 1fr !important;
        gap: 12px;
        margin-bottom: 0 !important;
        align-content: start; /* Force les éléments en haut */
    }
    
    /* Cartes réduites */
    .property-card {
        border-radius: 12px;
    }
    
    .property-image {
        height: 180px; /* Réduit de 200px à 180px */
    }
    
    /* Masquer le select de tri et afficher le bouton */
    .sort-dropdown {
        display: none !important;
    }
    
    .mobile-sort-btn {
        display: flex;
    }
    
    /* Masquer le footer si présent */
    footer {
        display: none !important;
    }
}

/* ===== MODAL DÉTAIL PRODUIT ===== */
.property-detail-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    border-radius: 20px;
}

.property-detail-container {
    display: flex;
    flex-direction: column;
}

.property-detail-image {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.property-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-detail-badge-container {
    position: absolute;
    top: 24px;
    left: 24px;
}

.property-detail-content {
    padding: 40px;
}

.property-detail-header {
    margin-bottom: 24px;
}

.property-detail-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 16px;
    line-height: 1.3;
}

.property-detail-price-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.detail-price-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-teal);
    letter-spacing: -0.5px;
}

.detail-price-per-sqm {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-500);
}

.property-detail-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: 32px;
}

/* Stats Grid */
.property-detail-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.detail-stat-card {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.detail-stat-card:hover {
    background: var(--teal-light);
    transform: translateY(-2px);
}

.detail-stat-icon {
    font-size: 24px;
    font-weight: 800;
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-teal);
}

.detail-stat-info {
    flex: 1;
}

.detail-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-900);
}

/* CTA Buttons */
.property-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 32px;
}

.btn-detail-primary,
.btn-detail-secondary {
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-detail-primary {
    background: var(--primary-teal);
    color: white;
}

.btn-detail-primary:hover {
    background: var(--teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(82, 211, 216, 0.3);
}

.btn-detail-secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-detail-secondary:hover {
    background: var(--gray-50);
    border-color: var(--primary-teal);
    color: var(--primary-teal);
    transform: translateY(-2px);
}

/* Extra Info */
.property-detail-extra {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.extra-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.extra-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.extra-info-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
}

.extra-info-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
}

/* Responsive */
@media (max-width: 768px) {
    .property-detail-modal {
        max-width: 95vw;
        max-height: 95vh;
    }

    .property-detail-image {
        height: 250px;
    }

    .property-detail-content {
        padding: 24px;
    }

    .property-detail-title {
        font-size: 22px;
    }

    .detail-price-value {
        font-size: 26px;
    }

    .property-detail-stats {
        grid-template-columns: 1fr;
    }

    .property-detail-actions {
        grid-template-columns: 1fr;
    }
}

/* ===== RESPONSIVE MOBILE - VERSION QUI DÉCHIRE ===== */

@media (max-width: 768px) {
    /* Header mobile compact */
    .header {
        height: auto;
        min-height: 60px;
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    .logo img {
        height: 20px;
    }
    
    .header-filters {
        width: 100%;
        margin-top: 12px;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .header-filters::-webkit-scrollbar {
        display: none;
    }
    
    .filter-dropdown,
    .filter-btn {
        min-width: 120px;
        font-size: 12px;
        padding: 8px 12px;
        white-space: nowrap;
    }
    
    .btn-reset {
        width: 36px;
        height: 36px;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    /* Layout mobile : MAP EN HAUT, LISTE EN BAS */
    .main-container {
        flex-direction: column;
    }
    
    .map-panel {
        position: relative;
        width: 100% !important;
        height: 34vh !important;
        top: 0 !important;
        order: 1;
    }
    
    .listings-panel {
        width: 100% !important;
        padding: 0 !important;
        order: 2;
        background: white;
    }
    
    /* Grille → LISTE verticale sur mobile */
    .listings-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        margin-bottom: 0 !important;
        align-content: start; /* Force les éléments en haut */
    }
    
    /* Cartes produits optimisées mobile */
    .property-card {
        display: flex;
        flex-direction: row;
        height: 140px;
        border-radius: 12px;
    }
    
    .property-image {
        width: 40%;
        height: 100%;
        border-radius: 12px 0 0 12px;
        flex-shrink: 0;
    }
    
    .property-badge {
        top: 8px;
        right: auto;
        left: 8px;
        font-size: 10px;
        padding: 4px 8px;
        text-transform: uppercase;
    }
    
    .property-info {
        width: 60%;
        padding: 12px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .property-title {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 4px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .property-description {
        font-size: 11px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 8px;
    }
    
    .property-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding-top: 8px;
        margin-top: auto;
    }
    
    .property-price {
        font-size: 16px;
    }
    
    .property-price-per-m2 {
        font-size: 11px;
    }
    
    /* Header résultats mobile */
    .results-count {
        font-size: 14px;
    }
    
    .sort-dropdown {
        width: 100%;
    }
    
    /* Modals filtres mobile */
    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 80vh;
    }
    
    .filter-section {
        padding: 24px 20px;
    }
    
    /* POPUP PRODUIT FULLSCREEN MOBILE */
    .popupprod-overlay.popupprod-active {
        align-items: flex-end;
    }
    
    .popupprod-container {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 95vh !important;
        border-radius: 20px 20px 0 0 !important;
        grid-template-columns: 1fr !important;
        animation: popupprod-slideUpMobile 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    @keyframes popupprod-slideUpMobile {
        from { 
            opacity: 0;
            transform: translateY(100%);
        }
        to { 
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .popupprod-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    /* Popup gauche : scroll */
    .popupprod-left {
        max-height: none;
    }
    
    .popupprod-image-wrapper {
        height: 280px;
    }
    
    .popupprod-content {
        padding: 20px;
    }
    
    .popupprod-title {
        font-size: 20px;
    }
    
    .popupprod-description {
        font-size: 14px;
    }
    
    .popupprod-price-section {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .popupprod-price-main {
        font-size: 24px;
    }
    
    .popupprod-price-per-m2 {
        font-size: 14px;
    }
    
    /* Popup droite : formulaire */
    .popupprod-right {
        padding: 24px 20px 32px;
    }
    
    .popupprod-contact-title {
        font-size: 18px;
    }
    
    .popupprod-contact-subtitle {
        font-size: 13px;
    }
    
    .popupprod-input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    /* Masquer Prénom et Email sur mobile */
    .popupprod-form-group:nth-child(2),
    .popupprod-form-group:nth-child(4) {
        display: none;
    }
    
    .popupprod-submit {
        padding: 14px;
        font-size: 15px;
    }
    
    /* Popups carte mobile */
    .leaflet-popup-content {
        width: 220px !important;
    }
    
    .mappopup-image-wrapper {
        height: 120px;
    }
    
    .mappopup-title {
        font-size: 12px;
    }
    
    .mappopup-description {
        font-size: 10px;
    }
    
    .mappopup-price {
        font-size: 14px;
    }
    
    .mappopup-price-m2 {
        font-size: 10px;
    }
    
    /* Markers carte mobile */
    .custom-marker {
        transform: scale(0.9);
    }
    
    /* Carousel dots mobile */
    .popupprod-carousel-dots {
        bottom: 10px;
    }
    
    .popupprod-dot {
        width: 6px;
        height: 6px;
    }
    
    .popupprod-dot.popupprod-active {
        width: 20px;
    }
}

/* Masquer l'image de la popup sur petits écrans en hauteur */
@media (max-width: 768px) and (max-height: 700px) {
    .popupprod-image-wrapper {
        display: none;
    }
}

/* Mobile très petit (iPhone SE, etc) */
@media (max-width: 375px) {
    .header {
        padding: 10px 12px;
    }
    
    .filter-dropdown,
    .filter-btn {
        min-width: 110px;
        font-size: 11px;
        padding: 7px 10px;
    }
    
    .listings-panel {
        padding: 12px;
    }
    
    .property-card {
        height: 130px;
    }
    
    .property-title {
        font-size: 13px;
    }
    
    .property-description {
        font-size: 10px;
    }
    
    .property-price {
        font-size: 14px;
    }
    
    .popupprod-image-wrapper {
        height: 240px;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .map-panel {
        height: 100vh !important;
    }
    
    .main-container {
        flex-direction: row;
    }
    
    .map-panel {
        width: 50% !important;
    }
    
    .listings-panel {
        width: 50% !important;
        height: 100vh;
        overflow-y: auto;
    }
}

}
/* ===== LOADING SPINNER ===== */
.loading-animation {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--teal-light);
    border-top-color: var(--primary-teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-600);
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}
/* =============================================
   TAMPON VENDU - Overlay sur les photos
   ============================================= */

.property-image {
    position: relative;
    overflow: hidden;
}

.sold-stamp {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2;
    pointer-events: none;
}

.sold-stamp-text {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff;
    border: 4px solid #ffffff;
    padding: 8px 24px;
    transform: rotate(-18deg);
    opacity: 0.92;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    white-space: nowrap;
}

/* Tampon plus petit sur les cartes de la map popup */
.mappopup-image-wrapper .sold-stamp .sold-stamp-text {
    font-size: 16px;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-width: 3px;
}

/* Tampon sur la popup produit (détail) */
.popupprod-image-container .sold-stamp .sold-stamp-text {
    font-size: 32px;
    letter-spacing: 5px;
    padding: 10px 32px;
}

/* Griser légèrement la carte du bien vendu */
.property-card.is-sold {
    opacity: 0.85;
}

.property-card.is-sold .property-info {
    position: relative;
}