/**
 * OOI Platform V1 — Cartographie Identité
 */

.ooi-identity-map {
    width: 100%;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--ooi-border);
    border-radius: var(--ooi-radius-lg);
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(128, 197, 207, .11),
            transparent 34%
        ),
        var(--ooi-surface);
    box-shadow: var(--ooi-shadow-md);
}

.ooi-identity-map__header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 26px;
}

.ooi-identity-map__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--ooi-primary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ooi-identity-map__title {
    margin: 0;
    color: var(--ooi-text);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 900;
    line-height: 1.05;
}

.ooi-identity-map__description {
    max-width: 700px;
    margin: 12px 0 0;
    color: var(--ooi-text-light);
    line-height: 1.6;
}

.ooi-identity-map__count {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: var(--ooi-radius-xl);
    background: rgba(114, 112, 172, .10);
    color: var(--ooi-primary);
    font-size: 11px;
    font-weight: 900;
}

.ooi-identity-map__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--ooi-border);
    border-radius: var(--ooi-radius-md);
    background: rgba(255, 255, 255, .72);
}

.ooi-identity-map__filters label {
    display: flex;
    min-width: 180px;
    flex: 1 1 180px;
    flex-direction: column;
    gap: 6px;
}

.ooi-identity-map__filters label > span {
    color: var(--ooi-text-light);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.ooi-identity-map__filters select {
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--ooi-border);
    border-radius: var(--ooi-radius-sm);
    background: #ffffff;
    color: var(--ooi-text);
}

.ooi-identity-map__reset {
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid rgba(114, 112, 172, .25);
    border-radius: var(--ooi-radius-xl);
    background: rgba(114, 112, 172, .07);
    color: var(--ooi-primary);
    font-weight: 850;
    cursor: pointer;
}

.ooi-identity-map__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 16px;
    margin-bottom: 18px;
}

.ooi-identity-map__legend-item {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: var(--ooi-text-light);
    font-size: 11px;
    font-weight: 700;
}

.ooi-identity-map__legend-marker,
.ooi-identity-map__result-marker {
    display: inline-flex;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    background: var(--ooi-primary);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
}

.ooi-identity-map__legend-marker--circle,
.ooi-identity-map__result-marker--circle {
    border-radius: 50%;
}

.ooi-identity-map__legend-marker--square,
.ooi-identity-map__result-marker--square {
    border-radius: 9px;
}

.ooi-identity-map__legend-marker--diamond,
.ooi-identity-map__result-marker--diamond {
    border-radius: 7px;
    transform: rotate(45deg);
}

.ooi-identity-map__legend-marker--diamond,
.ooi-identity-map__result-marker--diamond {
    line-height: 1;
}

.ooi-identity-map__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ooi-border);
    border-radius: var(--ooi-radius-lg);
    background: #ffffff;
}

.ooi-identity-map__canvas {
    width: 100%;
    min-height: 420px;
    background: #edf2f5;
}

.ooi-identity-map__results {
    display: flex;
    min-width: 0;
    max-height: 620px;
    flex-direction: column;
    border-left: 1px solid var(--ooi-border);
    background: rgba(248, 250, 252, .92);
}

.ooi-identity-map__results-heading {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--ooi-border);
    color: var(--ooi-text);
}

.ooi-identity-map__results-heading span {
    display: inline-flex;
    min-width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(114, 112, 172, .12);
    color: var(--ooi-primary);
    font-size: 11px;
    font-weight: 900;
}

.ooi-identity-map__results-list {
    overflow: auto;
    padding: 8px;
}

.ooi-identity-map__result {
    display: flex;
    gap: 11px;
    align-items: center;
    width: 100%;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--ooi-border);
    background: transparent;
    color: var(--ooi-text);
    text-align: left;
    cursor: pointer;
}

.ooi-identity-map__result:hover,
.ooi-identity-map__result:focus-visible {
    border-radius: var(--ooi-radius-sm);
    background: rgba(114, 112, 172, .07);
}

.ooi-identity-map__result > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.ooi-identity-map__result strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ooi-identity-map__result small {
    color: var(--ooi-text-light);
    line-height: 1.4;
}

.ooi-identity-map__no-results {
    padding: 18px;
    color: var(--ooi-text-light);
    text-align: center;
}

.ooi-identity-map__error {
    display: flex;
    height: 100%;
    min-height: 420px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    color: var(--ooi-text-light);
    text-align: center;
}

.ooi-identity-map__error strong {
    color: var(--ooi-text);
}

.ooi-identity-map--empty {
    padding: 28px;
    border: 1px dashed rgba(114, 112, 172, .30);
    border-radius: var(--ooi-radius-lg);
    background: rgba(114, 112, 172, .05);
    text-align: center;
}


/* Popup Google */

.ooi-map-popup {
    width: min(290px, 70vw);
    padding: 4px;
    color: #071426;
}

.ooi-map-popup__header {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
}

.ooi-map-popup__visual {
    display: flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 15px;
    background: #071426;
}

.ooi-map-popup__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ooi-map-popup__fallback {
    color: #ffffff;
    font-weight: 900;
}

.ooi-map-popup__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
}

.ooi-map-popup__type,
.ooi-map-popup__profession {
    display: inline-flex;
    padding: 3px 6px;
    border-radius: 99px;
    background: rgba(114, 112, 172, .10);
    color: #7270AC;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
}

.ooi-map-popup__name {
    display: block;
    font-size: 16px;
    line-height: 1.2;
}

.ooi-map-popup__address {
    margin: 12px 0 0;
    color: #5f6e84;
    font-size: 12px;
    line-height: 1.45;
}

.ooi-map-popup__representatives {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid rgba(7, 20, 38, .10);
    font-size: 11px;
}

.ooi-map-popup__representatives span {
    color: #7a8799;
}

.ooi-map-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

.ooi-map-popup__phone,
.ooi-map-popup__button {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
}

.ooi-map-popup__phone {
    border: 1px solid rgba(114, 112, 172, .24);
    color: #7270AC;
}

.ooi-map-popup__button {
    background: #7270AC;
    color: #ffffff;
}


@media screen and (max-width: 1050px) {

    .ooi-identity-map__layout {
        grid-template-columns: 1fr;
    }

    .ooi-identity-map__results {
        max-height: 300px;
        border-top: 1px solid var(--ooi-border);
        border-left: 0;
    }
}

@media screen and (max-width: 560px) {

    .ooi-identity-map {
        padding: 22px 14px;
    }

    .ooi-identity-map__header {
        flex-direction: column;
    }

    .ooi-identity-map__filters {
        flex-direction: column;
        align-items: stretch;
    }

    .ooi-identity-map__filters label {
        min-width: 0;
        flex-basis: auto;
    }

    .ooi-identity-map__canvas {
        min-height: 440px;
    }
}