.publimmo-map-container {
    position: relative;
    width: 100%;
    margin-bottom: 2em;
}

.publimmo-map {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Styles des filtres */
.publimmo-map-filters {
    background: white;
    padding: 1.5em;
    margin-bottom: 1em;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #333;
}

.filter-group select,
.filter-group input[type="range"] {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f8f8;
}

#price-value {
    display: block;
    margin-top: 0.5em;
    font-size: 0.9em;
    color: #666;
}

/* Styles des marqueurs améliorés */
.custom-marker-container {
    pointer-events: auto !important;
    z-index: 500 !important;
}

.custom-marker {
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.2s ease !important;
    transform-origin: center center !important;
    will-change: transform !important;
    z-index: 500 !important;
    position: relative !important;
}

.custom-marker:hover {
    transform: scale(1.1) !important;
    z-index: 1000 !important;
}

.custom-marker i {
    color: white !important;
    font-size: 16px !important;
}

/* Assurer que le conteneur div prend toute la taille du marqueur */
.custom-marker > div {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    background-color: inherit !important; /* Hériter la couleur de fond */
}

/* Styles des clusters */
.marker-cluster {
    color: white;
    text-align: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.marker-cluster div {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Styles des popups */
.property-popup {
    width: 300px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.property-popup-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.property-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.property-popup-content {
    padding: 1em;
}

.property-popup h4 {
    margin: 0 0 0.5em 0;
    font-size: 1.2em;
    color: #333;
}

.property-popup-details {
    margin: 1em 0;
}

.property-popup-detail {
    display: flex;
    align-items: center;
    margin-bottom: 0.5em;
    color: #666;
}

.property-popup-detail i {
    margin-right: 0.5em;
    width: 20px;
    color: #3498db;
}

.property-link {
    display: inline-block;
    padding: 0.5em 1em;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.property-link:hover {
    background: #2980b9;
    text-decoration: none;
    color: white;
}

/* Animation des popups */
.leaflet-popup {
    margin-bottom: 20px;
}

.leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.2);
    transform-origin: bottom center;
}

.leaflet-popup-content {
    margin: 0;
    width: 300px !important;
    position: relative;
    z-index: 1;
}

.leaflet-popup-tip-container {
    width: 40px;
    height: 20px;
    position: absolute;
    left: 50%;
    margin-left: -20px;
    overflow: hidden;
    pointer-events: none;
}

.leaflet-popup-tip {
    width: 17px;
    height: 17px;
    padding: 1px;
    margin: -10px auto 0;
    pointer-events: none;
    background: white;
    box-shadow: 0 3px 14px rgba(0,0,0,0.2);
    transform: rotate(45deg);
}

.leaflet-container a.leaflet-popup-close-button {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px;
    border: none;
    text-align: center;
    width: 24px;
    height: 24px;
    font: 16px/14px Tahoma, Verdana, sans-serif;
    color: #757575;
    text-decoration: none;
    background: white;
    border-radius: 0 8px 0 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    z-index: 2;
}

.leaflet-container a.leaflet-popup-close-button:hover {
    color: #333;
    background: #f0f0f0;
}

/* Animation améliorée */
.leaflet-fade-anim .leaflet-popup {
    opacity: 0;
    transition: all 0.2s linear;
}

.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .publimmo-map {
        height: 400px;
    }

    .filter-group {
        min-width: 100%;
    }

    .property-popup {
        width: 250px;
    }

    .property-popup-image {
        height: 150px;
    }
}

/* Masquer l'attribution de Leaflet */
.leaflet-control-attribution {
    display: none !important;
}

/* Styles spécifiques pour les marqueurs en mode "spider" (quand le cluster est éclaté) */
.leaflet-marker-icon.leaflet-marker-draggable {
    cursor: pointer !important;
}

/* S'assurer que les marqueurs dans l'état "spiderfied" sont bien visibles */
.marker-cluster-spiderfied .custom-marker-container {
    pointer-events: auto !important;
    z-index: 600 !important;
}

.marker-cluster-spiderfied .custom-marker {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3) !important;
}

/* S'assurer que les lignes d'araignée (spider legs) sont visibles */
.leaflet-marker-shadow {
    display: none !important;
}

.leaflet-marker-icon.marker-cluster, 
.leaflet-marker-icon.marker-cluster:hover {
    cursor: pointer !important;
} 