/* 
 * Styles pour la carte interactive des points d'intérêt
 * Bouinottes - Page Proximité
 */

/* Styles pour le conteneur de la carte interactive */
#map {
    height: 70vh !important;
    min-height: 400px !important;
    max-height: 600px !important;
    width: 100% !important;
    z-index: 1;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

#map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
}

#map-overlay:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

#map-overlay.hidden {
    display: none !important;
}

/* Styles pour les marqueurs personnalisés */
.poi-marker {
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    position: relative;
}

.poi-marker i {
    font-size: 14px;
}

/* Popup LeafletJS personnalisé au style des poi-cards */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: none;
    transition: transform 0.3s ease;
    background-color: white;
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
    width: 320px !important;
    max-width: 100%;
}

/* Structure du contenu de popup en mode carte */
.popup-card {
    display: flex;
    flex-direction: column;
}

.popup-card-header {
    position: relative;
    height: 110px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.popup-card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-card-body {
    padding: 1.5rem;
}

.popup-card .poi-distance i {
    margin-right: 0.5rem;
    color: var(--sage-green);
}

.popup-card .card-title {
    color: #2a5d45;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.popup-card .card-text {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.popup-card .category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.popup-card .category-tag {
    display: inline-flex;
    align-items: center;
    background-color: #f0f7e9;
    color: #4a7c59;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

.popup-card .category-tag i {
    margin-right: 0.25rem;
}

.popup-card .btn {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    margin-top: 0.5rem;
}

.leaflet-popup-tip {
    background-color: white;
}

/* Styles pour les boutons de filtres */
#poiFilter .nav-link {
    border-radius: 20px;
    margin: 0 5px 10px;
    padding: 8px 16px;
    background-color: white;
    color: var(--text-dark);
    border: 1px solid var(--light-beige);
    transition: all 0.3s ease;
}

#poiFilter .nav-link:hover {
    background-color: var(--pale-pink);
    border-color: var(--pale-pink);
    color: var(--dark-green);
}

#poiFilter .nav-link.active {
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#poiFilter .nav-link.all.active {
    background-color: #585858;
}

#poiFilter .nav-link.nature.active {
    background-color: var(--sage-green);
}

#poiFilter .nav-link.gastronomie.active {
    background-color: var(--terracotta);
}

#poiFilter .nav-link.patrimoine.active {
    background-color: var(--blue);
}

/* Style pour les cartes de POI */
.poi-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.poi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.poi-distance {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.poi-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.poi-tag {
    display: inline-block;
    background-color: var(--light-beige);
    color: var(--dark-green);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Styles pour les catégories */
.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--sage-green);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

/* Marker cluster custom style */
.marker-cluster {
    background-color: rgba(135, 169, 107, 0.6);
    border-radius: 50%;
    color: white;
}

.marker-cluster div {
    background-color: rgba(135, 169, 107, 0.8);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    #map {
        height: 400px;
    }

    .leaflet-popup-content {
        width: 240px !important;
    }

    #poiFilter {
        overflow-x: auto;
        flex-wrap: nowrap !important;
        padding-bottom: 10px;
    }
}