/**
 * EtudeSol.fr - Carte interactive
 * map_styles.css
 * /assets/css
 * Version 3.0 avec styles avancés
 * @author Philippe MAUXION
 * SPM Conseil
 * Copyright 2025
 * Date de création du fichier : 04/07/2025
 * Date de modification du fichier : 06/07/2025
 */

 * EtudeSol.fr - Carte interactive
 * map_styles.css
 * /assets/css
 * Version 3.0 avec styles avancés
 * @author Philippe MAUXION
 * SPM Conseil
 * Copyright 2025
 * Date de création du fichier : 04/07/2025
 * Date de modification du fichier : 06/07/2025
 */

/* assets/css/map_styles.css */

/* Style pour la popup d'analyse géotechnique */
.solverif-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
    overflow: hidden; /* Pour que le header arrondi fonctionne */
}

.solverif-popup .leaflet-popup-content {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.solverif-popup-header {
    padding: 12px 15px;
    text-align: center;
}

.solverif-popup-content {
    padding: 10px 15px;
}

.solverif-popup-content p {
    margin: 12px 0;
}

.solverif-popup-source {
    font-size: 10px;
    color: #888;
    text-align: center;
    margin-top: 15px !important;
}

/* Style pour le marqueur de clic personnalisé */
.custom-marker {
    background: #dc2626;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #dc2626;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.custom-marker::after {
    content: '🔍';
}

/* Widget Météo pour Carte */
.map-weather-popup {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 350px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    z-index: 1000;
    font-family: var(--font-family);
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

.weather-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #059669 100%);
    color: white;
}

.weather-popup-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.weather-popup-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.weather-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.weather-popup-close svg {
    width: 20px;
    height: 20px;
}

.weather-popup-content {
    padding: 20px;
}

.weather-popup-loading {
    text-align: center;
    padding: 20px;
}

.weather-popup-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #1e40af;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

.weather-popup-loading p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.weather-popup-main {
    margin-bottom: 20px;
}

.weather-popup-location h4 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
}

.weather-popup-location p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.weather-popup-temp {
    margin: 15px 0;
}

.weather-popup-temp .temp-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e40af;
}

.weather-popup-temp .temp-feels {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 4px;
}

.weather-popup-description {
    font-size: 1rem;
    color: #374151;
    text-transform: capitalize;
}

.weather-popup-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.weather-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.detail-value {
    font-size: 1rem;
    color: #1f2937;
    font-weight: 600;
}

.weather-popup-recommendations {
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
}

.weather-popup-recommendations h5 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #1f2937;
    font-weight: 600;
}

.weather-popup-recommendations ul {
    margin: 0;
    padding-left: 20px;
}

.weather-popup-recommendations li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.4;
}

.weather-popup-error {
    text-align: center;
    padding: 20px;
}

.weather-popup-error .weather-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.weather-popup-error svg {
    width: 40px;
    height: 40px;
    color: #ef4444;
}

.weather-popup-error p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.weather-marker {
    background: none;
    border: none;
    font-size: 24px;
    text-align: center;
    line-height: 30px;
}

/* Animation d'entrée */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .map-weather-popup {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .weather-popup-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }
} 