* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}



/* --- HEADER FLOTTANT --- */
header {
    font-size: 20px;
    position: absolute;
    width: 250px;
    top: 20px;
    right: 20px ;
    z-index: 100;
    text-align: center;
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #fc4c02;
    margin-bottom: 3px;
    letter-spacing: -0.5px;
}

header p {
    font-size: 12px;
    font-weight: 400;
}



/* --- CONTROLS (FLOTTANT) --- */
#controls {
    position: absolute;
    top: 110px;
    right:20px;
    width: 250px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(10px);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0px;
    border-radius: 12px;
    padding: 15px 20px;
}

.button {
    border:none;
    color: white;
    background: linear-gradient(135deg, #fc4c02 0%, #ff6b35 100%);
    transition: all 0.3s ease;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3 ease;
    box-shadow: 0 2px 10px rgba(252, 76, 2, 0.3);
    width: 100%;
    margin: 5px;
}


.button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(252, 76, 2, 0.4);
}

.button.active {
    background: linear-gradient(135deg, #fc4c02 0%, #ff6b35 100%) !important;
    box-shadow: 0 2px 10px rgba(252, 76, 2, 0.3) !important;
}

.button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.button.secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.button.secondary:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}




/* --- STATUS --- */
#status {
    font-size: 12px;
    color: #555;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.05);
}

#status.error {
    color: #d32f2f;
    background: rgba(255, 205, 210, 0.8);
    font-weight: 600;
}



/* --- MAP --- */

#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}



/* --- PANNEL --- */
#staspanel {
    position: absolute;
    z-index: 100;
    width: 250px;
    right: 20px;
    top:200px;
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-height: calc(100vh - 60px);
    overflow: auto;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- STATS PANEL --- */
#stats-panel {
    position: absolute;
    z-index: 1000;
    width: 250px;
    left: 20px;
    top: 20px;
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#stats h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #fc4c02;
    border-bottom: 2px solid #fc4c02;
    padding-bottom: 8px;
}

#stats h4 {
    margin: 12px 0 6px 0;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-item span {
    color: #333;
}

.stat-item strong {
    color: #fc4c02;
    font-weight: 600;
}

#stats hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 12px 0;
}

#stats p {
    color: #666;
    font-size: 12px;
    text-align: center;
    padding: 15px 0;
}

/* Scrollbar pour stats */
#stats-panel::-webkit-scrollbar {
    width: 6px;
}

#stats-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

#stats-panel::-webkit-scrollbar-thumb {
    background: #fc4c02;
    border-radius: 10px;
}

/* --- CONTRÔLES LEAFLET --- */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.30) !important;
    backdrop-filter: blur(10px);
    color: #fc4c02 !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 20px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(252, 76, 2, 0.9) !important;
    color: white !important;
    transform: scale(1.05);
}

.leaflet-control-zoom a:first-child {
    border-radius: 8px 8px 0 0 !important;
}

.leaflet-control-zoom a:last-child {
    border-radius: 0 0 8px 8px !important;
}

/* --- LÉGENDE --- */
#legend {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

#legend h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #fc4c02;
    text-transform: uppercase;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
}

.legend-color {
    width: 20px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-label {
    color: #333;
    font-size: 12px;
}