* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #121214;
}

#map {
    width: 100vw;
    height: 100vh;
}

/* Panneau HUD */
.hud-panel {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    background: rgba(18, 18, 20, 0.94);
    backdrop-filter: blur(8px);
    padding: 14px 18px;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid #2e2e33;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 210px;
}

.hud-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ff3b30;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: #ff3b30;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff3b30;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

.hud-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.12);
    border: 1px solid rgba(255, 59, 48, 0.35);
    padding: 6px 10px;
    border-radius: 6px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 6px #ff3b30;
}

.hud-buttons-row {
    display: flex;
    gap: 6px;
}

.btn-action {
    background: #2a2a2e;
    color: #ddd;
    border: 1px solid #444;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}

.btn-action.btn-sm {
    flex: 1;
    padding: 5px 6px;
    font-size: 11px;
}

.btn-action:hover {
    background: #3a3a40;
    color: #fff;
}

.btn-danger {
    color: #ff6b6b;
    border-color: #5c2020;
}

.btn-danger:hover {
    background: #4a1515;
}

/* Personnalisation sélecteur de calques Leaflet */
.leaflet-control-layers {
    background: rgba(18, 18, 20, 0.94) !important;
    color: #fff !important;
    border: 1px solid #2e2e33 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 170px;
}

.leaflet-control-layers::-webkit-scrollbar {
    width: 6px;
}

.leaflet-control-layers::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.leaflet-control-layers::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.leaflet-control-layers-base label,
.leaflet-control-layers-overlays label {
    font-size: 12px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.leaflet-control-layers-separator {
    border-top: 1px solid #333 !important;
    margin: 8px 0 !important;
}

/* Barre d'action rapide dans le menu des calques */
.layers-quick-actions {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #333;
}

.btn-toggle-all {
    flex: 1;
    background: #2a2a2e;
    color: #ccc;
    border: 1px solid #444;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.btn-toggle-all:hover {
    background: #3e3e46;
    color: #fff;
}

/* Pastille de couleur pour chaque ligne dans la liste des calques */
.legend-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 3px;
    margin-right: 3px;
    vertical-align: middle;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

/* Mode Épuré : Niveaux de gris neutres (100% sans clé API, sans filigrane) */
.tiles-grayscale,
.tiles-grayscale .leaflet-tile {
    filter: grayscale(100%) contrast(110%) brightness(96%) !important;
}
