/**
 * Carte des acteurs ADSB — styles.
 * Charte : --adsb-primary #004D1B, --adsb-accent #77C043.
 */

.adsb-carte {
    --adsb-primary: #004D1B;
    --adsb-accent: #77C043;
    --adsb-bg-soft: #f4f7f4;
    --adsb-border: #d8e0d8;
    --adsb-text-muted: #5a6a5a;

    font-family: inherit;
    color: #1e2a1e;
    max-width: 1280px;
    margin: 0 auto;
}

.adsb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.adsb-carte__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    background: var(--adsb-bg-soft);
    border: 1px solid var(--adsb-border);
    border-radius: 8px;
    margin-bottom: 16px;
}

.adsb-carte__field {
    flex: 1 1 200px;
    min-width: 200px;
}

.adsb-carte__search-input,
.adsb-carte__select {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    color: #1e2a1e;
    background: #fff;
    border: 1px solid var(--adsb-border);
    border-radius: 6px;
    box-sizing: border-box;
}

.adsb-carte__search-input:focus,
.adsb-carte__select:focus {
    outline: 2px solid var(--adsb-accent);
    outline-offset: 1px;
}

.adsb-carte__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.adsb-carte__count {
    margin: 0;
    font-weight: 600;
    color: var(--adsb-primary);
}

.adsb-carte__count-number {
    color: var(--adsb-primary);
}

.adsb-carte__toggle {
    display: flex;
    gap: 4px;
    background: var(--adsb-bg-soft);
    border: 1px solid var(--adsb-border);
    border-radius: 6px;
    padding: 4px;
}

.adsb-carte__toggle-btn {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--adsb-text-muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.adsb-carte__toggle-btn:hover {
    color: var(--adsb-primary);
    background-color: #EAF4DC;
}

.adsb-carte__toggle-btn.is-active {
    color: #fff;
    background: var(--adsb-primary);
}

.adsb-carte__views {
    position: relative;
}

.adsb-carte__view {
    display: none;
}

.adsb-carte__view.is-active {
    display: block;
}

.adsb-carte__map {
    height: 520px;
    width: 100%;
    border: 1px solid var(--adsb-border);
    border-radius: 8px;
    z-index: 1;
}

.adsb-carte__view--list.is-active {
    /* border: 1px solid var(--adsb-border); */
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}

.adsb-carte__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.adsb-carte__item {
    border: 1px solid var(--adsb-border);
    border-radius: 8px;
    padding: 20px 6px;
    background: var(--adsb-bg-soft);
    overflow: hidden;
    text-align: center;
}

.adsb-carte__item-photo {
    display: block;
    width: 100%;
    aspect-ratio: 275 / 330;
    object-fit: cover;
    border: none;
    background: var(--adsb-bg-soft);
    margin: 0 0 12px;
}

.adsb-carte__item-title {
    margin: 0 12px 8px;
    padding: 0 8px;
    text-align: left;
}

.adsb-carte__item-line {
    margin: 4px 16px;
    font-size: 14px;
    color: #333;
    text-align: left;
}

.adsb-carte__item-line strong{
    font-weight: 600;
}

.adsb-carte__item-line a{
    color: var(--adsb-accent);
    text-decoration: underline;
}

.adsb-carte__item-themes {
    list-style: none;
    margin: 10px 0 0 17px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.adsb-carte__item-themes li {
    background: var(--adsb-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}

.adsb-carte__empty {
    padding: 24px;
    text-align: center;
    color: var(--adsb-text-muted);
    list-style: none;
}

.adsb-carte__popup h3 {
    margin: 0 0 8px;
    color: var(--adsb-primary);
    font-size: 16px;
}

.adsb-carte__popup p {
    margin: 4px 0;
    font-size: 13px;
    line-height: 1.4;
}

.adsb-carte__popup a {
    color: var(--adsb-primary);
}

.adsb-carte__reveal {
    background: none;
    border: none;
    border-bottom: 1px dotted var(--adsb-primary);
    padding: 0;
    color: var(--adsb-primary);
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}

.adsb-carte__reveal:hover,
.adsb-carte__reveal:focus {
    color: var(--adsb-accent);
    background-color: transparent;
    border-color: var(--adsb-accent);
}

.leaflet-popup-content {
    min-width: 220px;
}
