/* cunse-map.css */
.cunse-map-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.10);
    background: #f3f4f6;
}
.cunse-map-container { width: 100%; }

/* ── Popup Leaflet ── */
.cunse-popup {
    font-family: 'Roboto', Arial, sans-serif;
    min-width: 240px;
    max-width: 280px;
    border-radius: 10px;
    overflow: hidden;
}

/* Header bleu */
.cunse-popup__header {
    background: #1E3A8A;
    padding: 10px 14px;
}

/* Badge type */
.cunse-popup__type {
    display: inline-block;
    color: #93C5FD;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

/* Titre */
.cunse-popup__title {
    font-weight: 600 !important;
    font-size: .88rem !important;
    color: #ffffff !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    display: block !important;
    min-height: 1em !important;
}

/* Corps */
.cunse-popup__body {
    padding: 10px 14px;
}

/* Bloc méta */
.cunse-popup__meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 11px;
}

/* Chaque ligne */
.cunse-popup__row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .8rem;
    color: #374151;
    line-height: 1.4;
}

/* Icônes Tabler */
.cunse-popup__icon {
    font-size: 14px;
    color: #1E3A8A;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

/* Boutons */
.cunse-popup__actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    align-items: center;
}

.cunse-popup__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: .76rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
    cursor: pointer;
}

.cunse-popup__btn--detail {
    flex: 1;
    justify-content: center;
    background: #1E3A8A;
    color: #fff;
    border: none;
}
.cunse-popup__btn--detail:hover { background: #162C6E; color: #fff; }

.cunse-popup__btn--maps {
    background: transparent;
    color: #1E3A8A;
    border: 1px solid #1E3A8A;
}
.cunse-popup__btn--maps:hover { background: #EFF2FB; }

.cunse-popup__btn--inscrire {
    background: #DC2626;
    color: #fff;
    border: none;
}
.cunse-popup__btn--inscrire:hover { background: #B91C1C; color: #fff; }

/* Fix Leaflet popup padding */
.leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.15) !important;
}
.leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}
.leaflet-popup-tip-container {
    margin-top: -1px;
}

/* ── Clusters ── */
.marker-cluster-small,
.marker-cluster-medium { background-color: rgba(30, 58, 138, .2) !important; }
.marker-cluster-small div,
.marker-cluster-medium div {
    background-color: rgba(30, 58, 138, .7) !important;
    color: #fff !important;
    font-weight: 700 !important;
}
.marker-cluster-large { background-color: rgba(220, 38, 38, .2) !important; }
.marker-cluster-large div {
    background-color: rgba(220, 38, 38, .7) !important;
    color: #fff !important;
    font-weight: 700 !important;
}

/* ── Spinner ── */
.cunse-map-loading {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(243,244,246,.9);
    z-index: 1000;
    border-radius: 12px;
    color: #1E3A8A; font-weight: 600;
    gap: 10px;
}
.cunse-map-loading::before {
    content: '';
    width: 20px; height: 20px;
    border: 3px solid #E5E7EB;
    border-top-color: #1E3A8A;
    border-radius: 50%;
    animation: cunse-spin .7s linear infinite;
}
@keyframes cunse-spin { to { transform: rotate(360deg); } }
