html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
    background: linear-gradient(135deg, #E8F5E9 0%, #A5D6A7 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background-attachment: fixed;
}

.map-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.map-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(67,160,71,0.10);
    overflow: hidden;
    border: none;
}

.header {
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
    color: white;
}

.header h1 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: 1px;
}

.filters-section {
    padding: 25px;
    background: #f8f9fa;
    border-bottom: 3px solid #e5e5e5;
}

.filters-form {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.filter-input {
    padding: 12px 15px;
    border: 3px solid #e5e5e5;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-input:focus {
    outline: none;
    border-color: #43A047;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.10);
}

.filter-btn {
    background: linear-gradient(135deg, #43A047, #66BB6A);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.13);
    min-width: 100px;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.18);
}

.map-section {
    padding: 0;
    height: 600px;
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
    border-radius: 0 0 20px 20px;
}

.stats-bar {
    padding: 15px 25px;
    background: #E8F5E9;
    color: #43A047;
    font-weight: bold;
    text-align: center;
    border-top: 3px solid #66BB6A;
}

/* Style pour les popups Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
}

.popup-title {
    font-weight: bold;
    color: #43A047;
    font-size: 1rem;
    margin-bottom: 5px;
}

.popup-detail {
    margin: 3px 0;
    color: #555;
}

.popup-power {
    font-weight: bold;
    color: #43A047;
    font-size: 1rem;
    margin-top: 8px;
}

/* Styles pour les clusters de stations */
.station-cluster {
    background-color: rgba(67, 160, 71, 0.7);
    border: 2px solid #43A047;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 5px rgba(0,0,0,0.15);
    transition: all 0.2s ease-in-out;
}

.station-cluster:hover {
    transform: scale(1.1);
    cursor: pointer;
}

.station-cluster span {
    font-size: 14px;
}

.station-cluster-small {
    width: 35px !important;
    height: 35px !important;
}

.station-cluster-medium {
    width: 45px !important;
    height: 45px !important;
}

.station-cluster-large {
    width: 55px !important;
    height: 55px !important;
}

.station-cluster-large span {
    font-size: 16px;
}

/* Styles pour l'indicateur de chargement moderne */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(67, 160, 71, 0.95), rgba(102, 187, 106, 0.95));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
}

.loading-container {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    animation-delay: 0.2s;
    border-top-color: rgba(255, 255, 255, 0.8);
}

.spinner-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    animation-delay: 0.4s;
    border-top-color: rgba(255, 255, 255, 0.6);
}

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

.loading-text h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-text p {
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.loading-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
    width: 0%;
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .map-container {
        padding: 8px 4px 24px 4px;
        max-width: 100%;
        margin-top: 20px;
    }
    .header h1 {
        font-size: 1.3rem;
    }
    .filters-form {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .filter-input {
        min-width: 0;
        font-size: 1rem;
    }
    .filter-btn {
        width: 100%;
        min-width: unset;
    }
    .map-section {
        height: 420px;
    }
}

@media (max-width: 600px) {
    .map-container {
        padding: 0 2px 18px 2px;
        margin-top: 20px;
    }
    .header {
        padding: 10px 4px 8px 4px;
    }
    .header h1 {
        font-size: 1.1rem;
    }
    .filters-section {
        padding: 10px 2px;
    }
    .map-card {
        border-radius: 10px;
    }
    .map-section {
        height: 350px;
    }
    #map {
        border-radius: 0 0 10px 10px;
        overflow-x: hidden;
    }
}

@media (max-width: 400px) {
    .header h1 {
        font-size: 0.95rem;
    }
    .filter-input {
        font-size: 0.95rem;
    }
    .filter-btn {
        font-size: 0.95rem;
    }
}
