/**
 * Styles pour la carte interactive Leaflet
 * Markers personnalisés + Popups modernes
 */

/* Marker personnalisé */
.custom-marker {
    background: none;
    border: none;
}

.marker-pin {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 3px solid #E85D04;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 4px 12px rgba(232, 93, 4, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.marker-pin:hover {
    transform: rotate(-45deg) scale(1.15);
    box-shadow: 0 6px 20px rgba(232, 93, 4, 0.5);
    z-index: 1000 !important;
}

.marker-content {
    transform: rotate(45deg);
    font-size: 0.9em;
    font-weight: 600;
}

.marker-rating {
    font-size: 0.75em;
    white-space: nowrap;
}

/* Marker utilisateur */
.user-marker {
    background: none;
    border: none;
}

.user-pin {
    position: relative;
    font-size: 2em;
    filter: drop-shadow(0 4px 8px rgba(10, 147, 150, 0.4));
    animation: bounce 2s ease-in-out infinite;
}

.user-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(10, 147, 150, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Popup personnalisée */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

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

.custom-popup .popup-restaurant {
    width: 280px;
}

.popup-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.popup-title {
    font-size: 1.1em;
    font-weight: 700;
    margin: 12px 12px 8px;
    color: #1A1A1A;
}

.popup-ville,
.popup-rating {
    margin: 4px 12px;
    font-size: 0.9em;
    color: #666;
}

.popup-phone {
    display: block;
    margin: 8px 12px;
    color: #E85D04;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
}

.popup-phone:hover {
    text-decoration: underline;
}

.popup-link {
    display: block;
    margin: 12px;
    text-align: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, #E85D04 0%, #DC2F02 100%);
    color: white;
    text-decoration: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9em;
    transition: transform 0.2s;
}

.popup-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 93, 4, 0.3);
}

.btn-small {
    padding: 8px 16px !important;
    font-size: 0.9em !important;
}

/* Contrôles Leaflet - personnalisés */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 20px !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
}

.leaflet-control-zoom a:hover {
    background: #E85D04 !important;
    color: white !important;
}

/* Attribution */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    font-size: 0.75em !important;
    padding: 4px 8px !important;
    border-radius: 4px;
}

/* Responsive markers */
@media (max-width: 768px) {
    .marker-pin {
        width: 35px;
        height: 35px;
    }

    .marker-content {
        font-size: 0.8em;
    }

    .custom-popup .popup-restaurant {
        width: 240px;
    }

    .popup-image {
        height: 120px;
    }
}

/* Animation d'apparition des markers */
.marker-pin {
    animation: markerAppear 0.3s ease-out;
}

@keyframes markerAppear {
    from {
        opacity: 0;
        transform: rotate(-45deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(-45deg) scale(1);
    }
}

/* Cluster style (si on ajoute le clustering plus tard) */
.marker-cluster {
    background: rgba(232, 93, 4, 0.6);
    border: 3px solid #E85D04;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 40px;
}

.marker-cluster div {
    background: rgba(232, 93, 4, 0.8);
    border-radius: 50%;
    width: 100%;
    height: 100%;
}
