/* -------------------------------------------------------------------------
   Finder — mini-section de recherche d'agence
--------------------------------------------------------------------------- */
.babychoumap-finder {
    --bcm-orange: #E46A00;
    --bcm-orange-rgb: 228, 106, 0;
    --bcm-orange-hover: #C95D00;
    --bcm-orange-cta-from: #E46A00;
    --bcm-orange-cta-to: #C95D00;
    --bcm-yellow: #F9B200;
    --bcm-blue: #5cbce4;
    --bcm-blue-text: #186B8A;
    --bcm-ink: #17212b;
    --bcm-soft: #fff8f3;
    --bcm-font-title: "Bricolage Grotesque", system-ui, sans-serif;
    --bcm-font-body: Roboto, system-ui, sans-serif;
    --bcm-title-size: 35px;
    --bcm-title-weight: 800;
    --bcm-title-line-height: 40.25px;
    --bcm-title-color: rgb(35, 85, 102);
    position: relative;
    display: block;
    width: 100%;
    margin: 1.5rem 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--bcm-ink);
    font-family: var(--bcm-font-body);
    overflow: visible;
}

.babychoumap-finder:focus-within {
    z-index: 50;
}

.babychoumap-finder__body {
    min-width: 0;
    display: grid;
    gap: 0.85rem;
}

.babychoumap-finder__title {
    margin: 0 !important;
    font-family: var(--bcm-font-title) !important;
    font-size: var(--bcm-title-size) !important;
    font-weight: var(--bcm-title-weight) !important;
    line-height: var(--bcm-title-line-height) !important;
    color: var(--bcm-title-color) !important;
}

.babychoumap-finder__form {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: start;
    width: 100%;
    margin: 0 !important;
}

.babychoumap-finder__search-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
}

.babychoumap-finder__input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 52px !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 0.75rem 1.25rem;
    border: 1px solid #dde3e8 !important;
    border-radius: 50px !important;
    background: #fff;
    color: var(--bcm-ink);
    font-size: 1rem;
    box-shadow: 0 8px 24px rgba(23, 33, 43, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Chrome/Safari appliquent une apparence native aux <input type="search">
   qui ignore le border-radius tant que -webkit-appearance n'est pas neutralisé. */
.babychoumap-finder__input::-webkit-search-decoration,
.babychoumap-finder__input::-webkit-search-cancel-button,
.babychoumap-finder__input::-webkit-search-results-button,
.babychoumap-finder__input::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.babychoumap-finder__input:focus {
    outline: none;
    border-color: var(--bcm-blue) !important;
    box-shadow:
        0 0 0 3px rgba(92, 188, 228, 0.35),
        0 8px 24px rgba(23, 33, 43, 0.08);
}

.babychoumap-finder__input::placeholder {
    font-style: italic;
}

.babychoumap-finder__error {
    margin: 0;
    padding: 0 1.25rem;
    color: #b42318;
    font-size: 0.875rem;
    line-height: 1.35;
}

.babychoumap-finder__error[hidden] {
    display: none !important;
}

.babychoumap-finder__input[aria-invalid="true"] {
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.28);
}

.babychoumap-finder__suggestions {
    position: absolute;
    z-index: 40;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    overflow: hidden;
    width: 100%;
    border: 1px solid #e4eaef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(23, 33, 43, .16);
}

.babychoumap-finder__suggestions[hidden] {
    display: none !important;
}

.babychoumap-finder__suggestions-status.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.babychoumap-finder__suggestion {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    align-self: stretch !important;
    gap: 3px;
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    min-height: 44px;
    margin: 0 !important;
    padding: 11px 18px !important;
    border: 0 !important;
    border-bottom: 1px solid #f0f3f6 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: var(--bcm-ink) !important;
    font-family: var(--bcm-font-body);
    text-align: left !important;
    cursor: pointer;
}

.babychoumap-finder__suggestion > * {
    text-align: left !important;
    pointer-events: none;
}

.babychoumap-finder__suggestion:last-child {
    border-bottom: 0 !important;
}

.babychoumap-finder__suggestion strong {
    display: block;
    width: 100%;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.babychoumap-finder__suggestion span {
    display: block;
    width: 100%;
    color: #97a3ad;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
}

.babychoumap-finder__suggestion:hover,
.babychoumap-finder__suggestion:focus-visible,
.babychoumap-finder__suggestion.is-active,
.babychoumap-finder__suggestion[aria-selected="true"] {
    background: #f2fbff !important;
    outline: none;
}

.babychoumap-finder__suggestion:hover strong,
.babychoumap-finder__suggestion:focus-visible strong,
.babychoumap-finder__suggestion.is-active strong,
.babychoumap-finder__suggestion[aria-selected="true"] strong {
    color: var(--bcm-blue-text);
}

.babychoumap-finder__suggestion--empty {
    margin: 0 !important;
    cursor: default !important;
    pointer-events: none !important;
    color: #687785 !important;
    font-size: 13px !important;
    font-style: italic !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

.babychoumap-finder__suggestion--empty:hover,
.babychoumap-finder__suggestion--empty:focus-visible {
    background: #fff !important;
}

.babychoumap-finder__submit {
    box-sizing: border-box;
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem;
    height: 52px !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 0 1.6rem;
    border: 0 !important;
    border-radius: 50px !important;
    background: linear-gradient(135deg, var(--bcm-orange-cta-from), var(--bcm-orange-cta-to));
    color: #fff !important;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    box-shadow: 0 8px 18px rgba(var(--bcm-orange-rgb), 0.28);
    -webkit-appearance: none;
    appearance: none;
}

.babychoumap-finder__submit > span {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.babychoumap-finder__submit-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-2px) rotate(-15deg);
}

.babychoumap-finder__submit:hover,
.babychoumap-finder__submit:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.babychoumap-finder__submit.is-loading,
.babychoumap-finder__submit:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none;
}

.babychoumap-finder__hint {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    align-items: baseline;
    color: #5b6b79;
    font-size: 0.95rem;
    font-style: italic;
}

.babychoumap-finder__all-link {
    color: var(--bcm-orange) !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.babychoumap-finder__all-link:hover,
.babychoumap-finder__all-link:focus-visible {
    color: var(--bcm-orange-hover) !important;
}

.babychoumap-finder__all-link--muted {
    color: #9aa8b5 !important;
    text-decoration: none;
    cursor: default;
}

.babychoumap-finder__modal:not([open]) {
    display: none !important;
}

.babychoumap-finder__modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 1rem;
    border: 0;
    background: transparent;
    color: inherit;
}

.babychoumap-finder__modal::backdrop {
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(2px);
}

.babychoumap-finder__modal-panel {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    max-height: min(92vh, 860px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    animation: babychoumap-finder-in 0.28s ease;
}

@keyframes babychoumap-finder-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.babychoumap-finder__modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
    padding: 0.95rem 1.15rem;
    border-bottom: 1px solid #e8edf2;
    background: linear-gradient(145deg, #fff 30%, #fffaf5 100%);
}

.babychoumap-finder__modal-header h3 {
    margin: 0 !important;
    font-family: var(--bcm-font-title) !important;
    font-size: var(--bcm-title-size) !important;
    font-weight: var(--bcm-title-weight) !important;
    line-height: var(--bcm-title-line-height) !important;
    color: var(--bcm-title-color) !important;
}

.babychoumap-finder__modal-close {
    box-sizing: border-box;
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    aspect-ratio: 1 / 1;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(var(--bcm-orange-rgb), 0.2) !important;
    border-radius: 50% !important;
    background: #fff5ee;
    color: var(--bcm-orange);
    line-height: 0;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(var(--bcm-orange-rgb), 0.12);
    -webkit-appearance: none;
    appearance: none;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.babychoumap-finder__modal-close::before,
.babychoumap-finder__modal-close::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    display: block !important;
    width: 20px !important;
    height: 2.25px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px;
    background: currentColor !important;
    pointer-events: none;
    transform-origin: center;
}

.babychoumap-finder__modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.babychoumap-finder__modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.babychoumap-finder__modal-close:hover,
.babychoumap-finder__modal-close:focus-visible {
    background: var(--bcm-orange);
    border-color: var(--bcm-orange) !important;
    color: #fff;
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(var(--bcm-orange-rgb), 0.3);
}

.babychoumap-finder__modal-close:focus-visible {
    outline: 3px solid rgba(92, 188, 228, 0.35);
    outline-offset: 3px;
}

.babychoumap-finder__modal-close:active {
    transform: scale(0.94);
}

.babychoumap-finder .babychoumap-locator--finder {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(min(92vh, 860px) - 64px);
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.babychoumap-finder .babychoumap-locator--finder .babychoumap-locator__header h2 {
    font-size: var(--bcm-title-size) !important;
    line-height: var(--bcm-title-line-height) !important;
}

.babychoumap-finder .babychoumap-locator__view-tabs {
    background: var(--bcm-soft);
    border-bottom-color: #eef1f4;
}

.babychoumap-finder .babychoumap-locator__view-tab {
    border: 1px solid transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--bcm-title-color) !important;
}

.babychoumap-finder .babychoumap-locator__view-tab:hover {
    border-color: rgba(92, 188, 228, .45) !important;
    background: #fff !important;
    color: var(--bcm-blue-text) !important;
}

.babychoumap-finder .babychoumap-locator__view-tab.is-active,
.babychoumap-finder .babychoumap-locator__view-tab.is-active:hover {
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--bcm-orange-cta-from), var(--bcm-orange-cta-to)) !important;
    box-shadow: 0 8px 18px rgba(var(--bcm-orange-rgb), .22) !important;
    color: #fff !important;
}

html.babychoumap-finder-modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .babychoumap-finder {
        padding: 0;
        text-align: left;
    }

    .babychoumap-finder__title {
        font-size: 25px !important;
        line-height: 35px !important;
    }

    .babychoumap-finder__form {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .babychoumap-finder__submit {
        width: auto;
        padding-inline: 1rem;
    }

    .babychoumap-finder__modal {
        padding: 0;
        place-items: stretch;
    }

    .babychoumap-finder__modal-panel {
        width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .babychoumap-finder .babychoumap-locator--finder {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .babychoumap-finder__modal-panel,
    .babychoumap-finder__submit,
    .babychoumap-finder__modal-close {
        animation: none !important;
        transition: none !important;
    }

    .babychoumap-finder__modal-close:hover,
    .babychoumap-finder__modal-close:focus-visible,
    .babychoumap-finder__modal-close:active {
        transform: none !important;
    }
}
