/* Overrides bleus par-dessus loyers-explorer.css */
.explorer-legend-label,
.sidebar-title,
.loyers-chart-title { color: #7dd3fc !important; }
.delinquance-place-name {
    color: #7dd3fc;
    font-weight: 700;
}
.filter-chip:hover,
.explorer-actions .btn-action:hover { border-color: #38bdf8 !important; color: #fff !important; }
.filter-chip.is-active {
    background: rgba(14, 165, 233, 0.22) !important;
    border-color: #38bdf8 !important;
    color: #fff !important;
}
.map-search-float .commune-search-input:focus { border-color: #38bdf8 !important; }
.legend-gradient {
    background: linear-gradient(90deg, #bfdbfe, #7dd3fc, #38bdf8, #0ea5e9, #0284c7, #1e3a8a) !important;
}
.map-loading i { color: #38bdf8 !important; }
.sidebar-tab.is-active { color: #7dd3fc !important; border-bottom-color: #38bdf8 !important; }
.rank-list-light .rank-val { color: #7dd3fc !important; }
#delinquance-sidebar .sidebar-kpi span {
    word-break: break-word;
}
.rank-list-light li.is-current-place {
    background: rgba(14, 165, 233, 0.16);
    border-radius: 6px;
    padding-left: 8px;
    padding-right: 8px;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.45);
}
.sidebar-note strong,
.sidebar-price { color: #7dd3fc; }
.sidebar-tab.is-active { border-bottom-color: #38bdf8; }
.explorer-filters-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 280px;
    align-items: center;
}
.explorer-filters-selects label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.explorer-filters-selects select {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid #334155;
    color: #e2e8f0;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    max-width: min(100%, 280px);
}
.explorer-filters-selects select:focus {
    outline: none;
    border-color: #38bdf8;
}
@media (min-width: 960px) {
    .explorer-map-block {
        flex: 0 0 auto !important;
        height: min(52vh, 520px) !important;
        min-height: 420px !important;
    }
    .accueil-tool-seo-article .loyers-stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    /* PC : Zone + Classement côte à côte, sans onglets */
    #delinquance-sidebar .sidebar-tabs {
        display: none !important;
    }
    #delinquance-sidebar .sidebar-scroll {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 28px;
        align-items: start;
        max-height: none;
        overflow: visible;
    }
    #delinquance-sidebar .sidebar-panel {
        display: block !important;
        min-width: 0;
    }
    #delinquance-sidebar .sidebar-panel[hidden] {
        display: block !important;
    }
    #delinquance-sidebar #delinquance-panel-rank {
        border-left: 1px solid #334155;
        padding-left: 20px;
    }
}
#delinquance-map { width: 100%; height: 100%; background: #0b0f19; }
.delinquance-map-hint {
    position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
    margin: 0; padding: 24px; box-sizing: border-box; background: rgba(11, 15, 25, 0.48);
    color: rgba(255,255,255,0.95); text-align: center; pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.delinquance-map-hint__text { margin: 0; max-width: 22em; font-size: 14px; line-height: 1.55; font-weight: 500; }
.delinquance-map-hint.is-hidden { opacity: 0; visibility: hidden; }
.delinquance-popup { padding: 12px 14px; font-size: 13px; min-width: 200px; }
.delinquance-popup .popup-header { margin-bottom: 8px; }
.delinquance-popup h3 { margin: 0 0 2px; font-size: 15px; font-weight: 700; color: #f8fafc; line-height: 1.25; }
.delinquance-popup .popup-location { margin: 0; font-size: 11px; color: #64748b; }
.delinquance-popup .popup-rate { margin: 6px 0 2px; font-size: 22px; font-weight: 800; line-height: 1.1; }
.delinquance-popup .popup-unit { font-size: 11px; font-weight: 500; color: #94a3b8; }
.delinquance-popup .popup-indicator { margin: 0 0 4px; font-size: 11px; color: #94a3b8; line-height: 1.4; }
.delinquance-popup .popup-meta { margin: 0 0 8px; font-size: 11px; color: #64748b; }
.popup-detail-btn {
    display: flex; align-items: center; gap: 6px;
    width: 100%; margin-top: 10px;
    padding: 8px 12px;
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid #0284c7;
    border-radius: 8px;
    color: #7dd3fc;
    font-size: 12px; font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left;
    box-sizing: border-box;
}
.popup-detail-btn:hover { background: rgba(14, 165, 233, 0.32); color: #bae6fd; }
.popup-detail-btn i { margin-left: auto; font-size: 11px; }
/* Style MapLibre popup pour la délinquance */
.delinquance-popup-wrap .maplibregl-popup-content {
    background: rgba(15, 23, 42, 0.97) !important;
    border: 1px solid #1e3a5f !important;
    border-radius: 10px !important;
    padding: 0 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.55) !important;
    color: #e2e8f0;
}
.delinquance-popup-wrap .maplibregl-popup-tip {
    border-top-color: rgba(15, 23, 42, 0.97) !important;
    border-bottom-color: rgba(15, 23, 42, 0.97) !important;
}
.delinquance-popup-wrap .maplibregl-popup-close-button {
    color: #64748b !important;
    font-size: 18px !important;
    top: 4px !important; right: 8px !important;
    background: transparent !important;
    border: none !important;
    line-height: 1 !important;
    padding: 0 !important;
}
.dept-name-label {
    color: rgba(248, 250, 252, 0.92);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
    max-width: 68px;
    text-shadow: 0 0 6px rgba(11, 15, 25, 0.98), 0 0 2px rgba(11, 15, 25, 0.98);
    pointer-events: none;
    opacity: 0.92;
}
@keyframes zoneFlashBlue {
    0%, 100% {
        box-shadow: none;
        background-color: rgba(17, 24, 39, 0.75);
    }
    50% {
        background-color: rgba(14, 165, 233, 0.22);
        box-shadow: inset 0 0 0 2px #38bdf8, 0 0 0 1px rgba(56, 189, 248, 0.45);
    }
}
#delinquance-sidebar.is-zone-flash {
    animation: zoneFlashBlue 1.5s ease-in-out 1;
}
@media (prefers-reduced-motion: reduce) {
    #delinquance-sidebar.is-zone-flash {
        animation: none;
        background-color: rgba(14, 165, 233, 0.18);
        box-shadow: inset 0 0 0 2px #38bdf8;
    }
}
@media (max-width: 959px) {
    .map-search-float {
        right: auto !important;
        width: calc(100% - 72px);
        max-width: 220px;
    }
    .map-search-float .commune-search-input {
        padding: 6px 8px 6px 30px;
        font-size: 12px;
    }
}
html.is-ios .map-search-float .commune-search-input {
    font-size: 16px !important;
    padding: 8px 10px 8px 34px;
}
.badge-ndiff {
    display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
    background: rgba(139, 115, 85, 0.35); color: #e7e5e4; border: 1px solid #8b7355;
}
.badge-diff {
    display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
    background: rgba(14, 165, 233, 0.2); color: #7dd3fc; border: 1px solid #0284c7;
}
