#dbm-carte-distributeurs {
    width: 100%;
    /* Keeps a usable map when height is in vh on short screens */
    min-height: 400px;
    z-index: 1;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Fix Leaflet z-index conflicts with WordPress admin bar */
.admin-bar #dbm-carte-distributeurs .leaflet-top {
    top: 32px;
}

/* Fullscreen button */
#dbm-carte-distributeurs .dbm-fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

/* Fullscreen fallback when the Fullscreen API is missing (iPhone) */
#dbm-carte-distributeurs.dbm-fullscreen {
    /* !important: Leaflet and the shortcode set position/height inline */
    position: fixed !important;
    inset: 0;
    z-index: 100000;
    height: auto !important;
    border: 0;
    border-radius: 0;
}

/* Filter control (top right of the map): count button + category checkboxes */
.dbm-filtres {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.dbm-filtres-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
    color: #1a1a2e;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
}

.dbm-filtres-btn:hover {
    background: #f4f4f4;
}

/* Chevron: points up when the list is open */
.dbm-filtres-btn::after {
    content: "";
    width: 6px;
    height: 6px;
    margin: -3px 2px 0;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.dbm-filtres-btn[aria-expanded="true"]::after {
    margin-top: 3px;
    transform: rotate(-135deg);
}

.dbm-filtres-liste {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

/* display: flex above would otherwise override the hidden attribute */
.dbm-filtres-liste[hidden] {
    display: none;
}

.dbm-filtre {
    position: relative;
    margin: 0;
    cursor: pointer;
}

/* Hidden but still focusable and read by screen readers */
.dbm-filtre input {
    position: absolute;
    opacity: 0;
}

.dbm-filtre-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    color: #1a1a2e;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.dbm-filtre-chip em {
    margin-left: auto;
    color: #777;
    font-size: 12px;
    font-style: normal;
}

.dbm-filtre-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
}

.dbm-filtre input:not(:checked) + .dbm-filtre-chip {
    opacity: 0.5;
    filter: grayscale(1);
}

.dbm-filtre input:focus-visible + .dbm-filtre-chip {
    outline: 2px solid #ec602b;
    outline-offset: 2px;
}

.dbm-carte-compteur strong {
    color: #ec602b;
    font-size: 16px;
}

/* Category pins (divIcon): no default white box */
#dbm-carte-distributeurs .dbm-pin {
    background: none;
    border: 0;
}

#dbm-carte-distributeurs .dbm-pin svg {
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Marker clusters: size comes from iconSize in dbm-map.js */
#dbm-carte-distributeurs .dbm-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ec602b;
    box-shadow: 0 0 0 5px rgba(236, 96, 43, 0.35);
    color: #fff;
    font: 700 13px/1 sans-serif;
}

#dbm-carte-distributeurs .dbm-cluster-large {
    font-size: 15px;
}

/* Popup styling */
#dbm-carte-distributeurs .leaflet-popup-content strong {
    font-size: 14px;
    color: #1a1a2e;
}

#dbm-carte-distributeurs .leaflet-popup-content {
    font-size: 13px;
    line-height: 1.5;
}

/* Admin preview */
.dbm-admin-map-preview #dbm-carte-distributeurs {
    height: 450px;
    margin-top: 15px;
}
