/**
 * Styles personnalisés pour les cartes Leaflet - Galas de Boxe
 * 
 * @package GalasDeBoxe
 * @since 1.0.0
 */

/* Conteneur de carte personnalisé */
.gala-map-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.gala-map-container .leaflet-container {
    border-radius: 8px;
}

/* Popups personnalisées */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 15px 20px;
    line-height: 1.4;
    font-size: 14px;
}

.gala-popup {
    min-width: 250px;
}

.gala-popup h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.gala-popup h4 a {
    text-decoration: none;
    color: #0073aa;
    font-weight: bold;
}

.gala-popup h4 a:hover {
    color: #005a87;
}

.gala-popup p {
    margin: 5px 0;
    color: #666;
}

.gala-popup strong {
    color: #333;
}

.gala-popup a {
    color: #0073aa;
    text-decoration: none;
}

.gala-popup a:hover {
    text-decoration: underline;
}

/* Marqueurs personnalisés */
.gala-marker {
    background: #0073aa;
    border: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.gala-marker:hover {
    background: #005a87;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* Contrôles de carte */
.leaflet-control-container {
    font-family: inherit;
}

.leaflet-control-zoom a {
    background: white;
    border-radius: 4px;
    color: #333;
    font-weight: bold;
}

.leaflet-control-zoom a:hover {
    background: #f0f0f0;
    color: #0073aa;
}

/* Contrôles personnalisés */
.gala-map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 10px;
}

.gala-map-control-btn {
    display: block;
    width: 100%;
    margin: 5px 0;
    padding: 8px 12px;
    border: none;
    background: #0073aa;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.gala-map-control-btn:hover {
    background: #005a87;
}

.gala-map-control-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Légende de carte */
.gala-map-legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 15px;
    font-size: 12px;
}

.gala-map-legend h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.gala-legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.gala-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.gala-legend-color.current {
    background: #0073aa;
}

.gala-legend-color.upcoming {
    background: #46b450;
}

.gala-legend-color.past {
    background: #dc3232;
}

/* Clustering */
.marker-cluster-small {
    background-color: rgba(0, 115, 170, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(0, 115, 170, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(0, 115, 170, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(0, 115, 170, 0.8);
}

.marker-cluster-large {
    background-color: rgba(0, 115, 170, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(0, 115, 170, 0.8);
}

.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    color: white;
    font-weight: bold;
    line-height: 30px;
}

/* Mode plein écran */
.gala-map-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
}

.gala-map-fullscreen .leaflet-container {
    border-radius: 0 !important;
}

.gala-fullscreen-btn {
    position: absolute;
    top: 80px;
    right: 10px;
    z-index: 1000;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.gala-fullscreen-btn:hover {
    background: #f0f0f0;
}

/* Loader de carte */
.gala-map-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 8px;
}

.gala-map-loader .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: gala-spin 1s linear infinite;
}

@keyframes gala-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Attribution personnalisée */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    font-size: 11px;
}

.leaflet-control-attribution a {
    color: #0073aa;
}

/* Styles responsive */
@media (max-width: 768px) {
    .gala-map-controls {
        position: static;
        margin: 10px 0;
        text-align: center;
    }
    
    .gala-map-control-btn {
        display: inline-block;
        width: auto;
        margin: 5px;
    }
    
    .gala-map-legend {
        position: static;
        margin: 10px 0;
        text-align: center;
    }
    
    .gala-popup {
        min-width: 200px;
    }
    
    .leaflet-popup-content {
        margin: 10px 15px;
    }
}

@media (max-width: 480px) {
    .gala-map-container {
        margin: 10px -15px;
        border-radius: 0;
    }
    
    .gala-map-container .leaflet-container {
        border-radius: 0;
    }
    
    .gala-popup {
        min-width: 180px;
    }
    
    .gala-popup h4 {
        font-size: 14px;
    }
    
    .gala-popup p {
        font-size: 12px;
    }
}

/* Animations */
.gala-marker-bounce {
    animation: gala-bounce 0.6s ease-in-out;
}

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

.gala-popup-fade-in {
    animation: gala-fadeIn 0.3s ease-in-out;
}

@keyframes gala-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .gala-map-controls,
    .gala-map-legend,
    .gala-fullscreen-btn {
        background: #333;
        color: white;
    }
    
    .gala-map-control-btn {
        background: #555;
        color: white;
    }
    
    .gala-map-control-btn:hover {
        background: #666;
    }
    
    .leaflet-control-attribution {
        background: rgba(51, 51, 51, 0.9);
        color: white;
    }
    
    .leaflet-control-zoom a {
        background: #333;
        color: white;
    }
    
    .leaflet-control-zoom a:hover {
        background: #555;
    }
}

/* Styles pour l'intégration Elementor */
.elementor-widget-gala-map .gala-map-container {
    margin: 0;
}

.elementor-widget-gala-map .gala-map-controls {
    top: 20px;
    right: 20px;
}

/* Accessibilité */
.gala-map-container:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.gala-map-control-btn:focus,
.gala-fullscreen-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .gala-map-controls,
    .gala-fullscreen-btn {
        display: none;
    }
    
    .leaflet-control-container {
        display: none;
    }
    
    .gala-map-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
} 