/* ============================================
   DIACITÉ — Cartographie Module
   ============================================ */

/* ---- Map Container ---- */
.nxv-carto-map {
    height: 500px;
    border-radius: var(--nxv-radius);
    border: 1px solid var(--nxv-border);
    z-index: 1;
    margin-bottom: 24px;
    overflow: hidden;
}

/* ---- Filter Pills ---- */
.nxv-carto-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.nxv-carto-filters .nxv-pill {
    position: relative;
    padding-left: 32px;
}
.nxv-carto-filters .nxv-pill::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--nxv-muted);
}
.nxv-carto-filters .nxv-pill[data-category="tous"]::before {
    background: linear-gradient(135deg, var(--dc-primary, #e27d60), var(--dc-primary, #e27d60), var(--dc-secondary, #003366), #566573);
}
.nxv-carto-filters .nxv-pill[data-category="danger"]::before {
    background: var(--dc-primary, #e27d60);
}
.nxv-carto-filters .nxv-pill[data-category="amelioration"]::before {
    background: var(--dc-primary, #e27d60);
}
.nxv-carto-filters .nxv-pill[data-category="point_interet"]::before {
    background: var(--dc-secondary, #003366);
}
.nxv-carto-filters .nxv-pill[data-category="travaux"]::before {
    background: #566573;
}
.nxv-carto-filters .nxv-pill.active {
    background: var(--nxv-blue);
    color: white;
    border-color: var(--nxv-blue);
}

/* ---- Legend ---- */
.nxv-carto-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    background: white;
    border-radius: var(--nxv-radius-sm);
    border: 1px solid var(--nxv-border);
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--nxv-muted);
}
.nxv-carto-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nxv-carto-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.nxv-carto-legend-dot.danger { background: var(--dc-primary, #e27d60); }
.nxv-carto-legend-dot.amelioration { background: var(--dc-primary, #e27d60); }
.nxv-carto-legend-dot.point_interet { background: var(--dc-secondary, #003366); }
.nxv-carto-legend-dot.travaux { background: #566573; }

/* ---- Floating Add Button ---- */
.nxv-carto-add-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--nxv-blue);
    color: white;
    border: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.4);
    transition: var(--nxv-transition);
}
.nxv-carto-add-btn:hover {
    background: var(--nxv-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.5);
}
.nxv-carto-add-btn svg {
    width: 18px;
    height: 18px;
}

/* ---- Category Badges ---- */
.nxv-carto-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}
.nxv-carto-badge.danger { background: #f0ebe8; color: #DC2626; }
.nxv-carto-badge.amelioration { background: #f0ebe8; color: var(--dc-primary, #e27d60); }
.nxv-carto-badge.point_interet { background: #EFF6FF; color: var(--dc-secondary, #003366); }
.nxv-carto-badge.travaux { background: #F5F3FF; color: var(--dc-secondary, #003366); }

/* ---- Popup Styles ---- */
.nxv-carto-popup {
    min-width: 200px;
}
.nxv-carto-popup h4 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--nxv-text);
}
.nxv-carto-popup p {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--nxv-muted);
    line-height: 1.5;
}
.nxv-carto-popup .nxv-carto-popup-date {
    font-size: 11px;
    color: #9CA3AF;
}

/* ---- Map Click Hint ---- */
.nxv-carto-map-hint {
    background: #f0ebe8;
    border: 1px solid #FDBA74;
    border-radius: var(--nxv-radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    color: #C2410C;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 8px;
}
.nxv-carto-map-hint.visible {
    display: flex;
}

/* ---- Gestionnaire Table Category Filter ---- */
.nxv-carto-table-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.nxv-carto-table-filter label {
    font-size: 14px;
    font-weight: 600;
    color: var(--nxv-text);
}
.nxv-carto-table-filter select {
    padding: 8px 14px;
    border: 2px solid var(--nxv-border);
    border-radius: var(--nxv-radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: var(--nxv-transition);
}
.nxv-carto-table-filter select:focus {
    outline: none;
    border-color: var(--nxv-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* ---- Gestionnaire Stats (category colored) ---- */
.nxv-stat-card.nxv-stat-danger .nxv-stat-number { color: var(--dc-primary, #e27d60); }
.nxv-stat-card.nxv-stat-amelioration .nxv-stat-number { color: var(--dc-primary, #e27d60); }
.nxv-stat-card.nxv-stat-interet .nxv-stat-number { color: var(--dc-secondary, #003366); }
.nxv-stat-card.nxv-stat-travaux .nxv-stat-number { color: #566573; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .nxv-carto-map {
        height: 350px;
    }
    .nxv-carto-add-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 18px;
        font-size: 13px;
    }
    .nxv-carto-legend {
        gap: 10px;
        font-size: 12px;
    }
    .nxv-carto-filters .nxv-pill {
        padding-left: 28px;
        font-size: 12px;
    }
}
