/* =============================================================================
   Reppop – Activités : styles carte + liste
   ============================================================================= */

/* Variables */
:root {
    --reppop-gap: 1.5rem;
    --reppop-map-h: 520px;
    --reppop-list-w: 50%;
    --reppop-radius: 4px;
    --reppop-color-bg: #f5f5f5;
    --reppop-color-item: #ffffff;
    --reppop-color-hover: #e9f0fb;
    --reppop-color-text: #1a1a1a;
    --reppop-color-muted: #666;
    --reppop-color-tag: #dce7f9;
    --reppop-color-tag-text: #1a3a6b;
    --reppop-border: 1px solid #ddd;
    --reppop-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

/* Wrapper global */
.reppop-activites {
    display: flex;
    flex-direction: column;
    gap: var(--reppop-gap);
    font-family: inherit;
}

/* Filtre types */
.filters-activites {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
}

.filter-label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--reppop-color-text);
    white-space: nowrap;
}

.filter-select {
    padding: .4rem .8rem;
    border: var(--reppop-border);
    border-radius: var(--reppop-radius);
    background: #fff;
    color: var(--reppop-color-text);
    font-size: .875rem;
    cursor: pointer;
    appearance: auto;
}

/* Body carte + liste */
.activites-columns {
    display: flex;
    gap: var(--reppop-gap);
    align-items: flex-start;
}

/* Carte */
.map-wrapper {
    flex: 1 1 0%;
    min-width: 0;
    position: sticky;
    top: 1rem;
}

.map {
    width: 100%;
    height: var(--reppop-map-h);
    border-radius: var(--reppop-radius);
    /* border: var(--reppop-border); */
    /* box-shadow: var(--reppop-shadow); */
    background: var(--reppop-color-bg);
    z-index: 0;
}

/* Liste */
.list-wrapper {
    width: var(--reppop-list-w);
    flex-shrink: 0;
    max-height: var(--reppop-map-h);
    overflow-y: auto;
    border: var(--reppop-border);
    border-radius: var(--reppop-radius);
    /* box-shadow: var(--reppop-shadow); */
    background: #fff;
}

.list-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.item {
    border-bottom: var(--reppop-border);
    transition: background .15s;
}

.item:last-child {
    border-bottom: none;
}

.item--hidden {
    display: none;
}

/* Surbrillance quand marker actif */
.item--highlight {
    background: var(--reppop-color-hover);
}

/* Sélection via lien popup */
.item--selected {
    background: var(--reppop-color-hover);
    /* outline:    2px solid var(--reppop-color-tag-text); */
    /* outline-offset: -2px; */
}

/* Picto ACF (mask-image) */
.reppop-picto {
    display: block;
    width: 36px;
    height: 36px;
    margin-bottom: .5rem;
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
}

.reppop-picto--popup {
    width: 48px;
    height: 48px;
    margin-bottom: .35rem;
}

.field-title {
    display: block;
    font-size: .95rem;
    font-weight: 600;
    color: var(--reppop-color-text);
    margin-bottom: .3rem;
}

.field-types {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-bottom: .3rem;
}

.reppop-tag {
    display: inline-block;
    padding: .15rem .55rem;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 2rem;
    background: var(--reppop-color-tag);
    color: var(--reppop-color-tag-text);
}

.reppop-activites__empty {
    padding: 1.5rem;
    color: var(--reppop-color-muted);
    font-style: italic;
    text-align: center;
}

/* Marker Leaflet avec picto */
.reppop-leaflet-marker {
    overflow: visible !important;
}

/* Popup Leaflet */
.field-ville {
    font-weight: 600;
    color: var(--reppop-color-muted);
    font-size: .8rem;
}

.field-link {
    display: inline-block;
    margin-top: .4rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--reppop-color-tag-text);
    text-decoration: none;
}

.field-link:hover {
    text-decoration: underline;
}

/* Liste : nouveaux éléments */
.field-adresse {
    margin: 0 0 .3rem;
    font-size: .8rem;
    color: var(--reppop-color-muted);
}

.group-content {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .85rem 1rem;
    font-size: .82rem;
    color: var(--reppop-color-text);
}

.group-content>div {
    line-height: 1.5;
}


.reppop-activites__item-dates {
    font-size: .8rem;
    color: var(--reppop-color-muted);
}

.reppop-activites__item-dates strong {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .1rem;
    color: var(--reppop-color-text);
}

.reppop-dates__row {
    margin: 0;
    font-style: italic;
}

.reppop-dates__sep {
    opacity: .7;
}

.reppop-activites .link-download,
.reppop-activites .link-subscribe {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: .4rem;
    padding: .3rem .75rem;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 600;
    color: #F7F7F7;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.reppop-activites .link-download {
    background-color: var(--e-global-color-secondary);
}

.reppop-activites .link-subscribe {
    background-color: var(--e-global-color-primary);
}

.reppop-activites .link-download:hover,
.reppop-activites .link-subscribe:hover {
    color: #F7F7F7;
    background-color: var(--e-global-color-accent);
}

.field-fiche-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.reppop-leaflet-marker {
    background: rgb(255, 255, 255);
    padding: 5px;
    border-radius: 50%;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 10px;
}

.reppop-marker-picto {
    display: block;
    width: 38px;
    height: 38px;
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
}

.reppop-marker-dot {
    display: block;
    position: absolute;
    width: 18px;
    height: 18px;
    transform: translateX(-50%);
    bottom: 0;
    left: 50%;
    border-radius: 50%;
    border: 1px solid #f0f0f0;
}

/* Popup Leaflet */
.reppop-popup {
    max-width: 200px;
    font-size: .875rem;
}

.reppop-popup__dates {
    margin: .35rem 0 0;
    font-size: .75rem;
    color: var(--reppop-color-muted);
    font-style: italic;
}

/* Responsive */
@media (max-width: 900px) {
    .activites-columns {
        flex-direction: column;
    }

    .map-wrapper {
        min-width: 100%;
        position: static;
    }

    .map {
        height: 340px;
    }

    .list-wrapper {
        width: 100%;
        max-height: 400px;
    }
}