/*style générale de la carte */


.map-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin: 20px 0;
    min-height: 600px;
    position: relative;
}

/* Loader pour la carte */
.map-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 10px;
}

.map-loader.hidden {
    display: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loader-text {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.map-sidebar {
    width: 350px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 600px;
}

.map-content {
    flex: 1;
    min-height: 600px;
}

#interactive-map {
    height: 600px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Filtres */
.filter-section {
    margin-bottom: 30px;
}

.filter-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 15px;
    transform: scale(1.3);
    accent-color: #333;
}

.filter-checkbox label {
    cursor: pointer;
    font-weight: 500;
    color: #333;
    font-size: 16px;
    flex: 1;
}

.filter-checkbox .marker-preview {
    width: 60px;
    height: 8px;
    border-radius: 4px;
    margin-left: 10px;
    display: block;
}

.reset-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 20px;
}

.reset-button:hover {
    background: #5a6268;
}

/* Liste des locations */
.location-list {
    margin-top: 20px;
}

.location-item {
    display: flex;
    align-items: flex-start;
    padding: 20px 0;
    margin-bottom: 0;
    background: transparent;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.location-item:last-child {
    border-bottom: none;
}

.location-item:hover {
    background: #f8f9fa;
}

.location-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    margin-top: 2px;
    padding: 5px;
}

.location-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.location-info {
    flex: 1;
}

.location-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.location-info p {
    margin: 0 0 4px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.location-info .phone {
    color: #333;
    font-weight: 500;
}

.location-info .website {
    color: #333;
    font-weight: 500;
}

.location-info .distance {
    color: #999;
    font-weight: 500;
    font-size: 13px;
    margin-top: 8px;
}


/* Marqueurs personnalisés */
.custom-div-icon {
    background: transparent !important;
    border: none !important;
}

.custom-marker {
    text-align: center;
    line-height: 1;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.custom-marker img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.custom-marker:hover {
    transform: scale(1.2);
}

/* Popup personnalisée */
.marker-popup {
    text-align: center;
    padding: 15px;
    min-width: 250px;
}

.marker-popup h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.marker-popup p {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 14px;
}

.marker-popup strong {
    color: #333;
}

/* Contrôles de la carte */
.leaflet-control-zoom {
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background-color: #fff !important;
    border: 1px solid #ccc !important;
    color: #333 !important;
    font-weight: bold;
}

.leaflet-control-zoom a:hover {
    background-color: #f5f5f5 !important;
}

/* Contrôle de localisation */
.leaflet-control-locate {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leaflet-control-locate a {
    background-color: #007cba;
    color: white;
    border-radius: 8px;
}

.leaflet-control-locate a:hover {
    background-color: #005a87;
}

/* Responsive */
@media (max-width: 768px) {
    .map-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .map-sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    #interactive-map {
        height: 400px;
    }
    
    .custom-marker {
        font-size: 18px;
        width: 35px;
        height: 35px;
    }
    
    .marker-popup {
        min-width: 200px;
    }
}


