/* ==========================================================================
   CARTE PUBLIQUE RESILIANS
   ========================================================================== */

.ra-map-wrapper{
    width:100%;
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    border:1px solid #E5E7EB;
}

#ra-map{
    width:100%;
    height:640px;
    border-radius:22px;
    border:1px solid #E2E8F0;
    box-shadow:0 4px 18px rgba(0,0,0,.05);
}

/* Mobile */

@media(max-width:992px){

    #ra-map{
        height:500px;
    }

}

/* ==========================================================================
   Mode "carte seule" ([resilians_agences_map affichage="carte"])
   L'en-tête, la recherche, les filtres et la liste restent dans le DOM
   (le JS en a besoin pour fonctionner) mais sont masqués visuellement ;
   seule la carte Google reste visible, en pleine largeur.
   ========================================================================== */

.ra-locator--map-only .ra-locator-header,
.ra-locator--map-only .col-lg-7 {
    display: none;
}

.ra-locator--map-only .col-lg-5 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* ==========================================================================
   LOCATOR RESILIANS
   ========================================================================== */

.ra-locator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.ra-locator-header h2{
    color:rgb(225, 77, 34);
    font-weight:700;
    margin-bottom:8px;
    font-size: 34px;
}

.ra-locator-header p{
    color:#64748B;
    margin-bottom: 0;
    font-size: 16.5px;
}

.ra-locator-header p span{
    color: rgb(6, 60, 97);
    font-weight: bold;
    margin-bottom: 0;
    font-size: 16.5px;
}

.ra-locator-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ra-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 20px;
    font-family: 'Aptos', "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.ra-header-btn-primary {
    color: rgb(255, 255, 255);
    background: rgb(6, 60, 97);
    border-radius: 9px;
}

.ra-header-btn-primary:hover {
    background: #e14d22;
}

.ra-header-btn-outline {
    color: rgb(6, 60, 97);
    background: rgb(255, 255, 255);
    border: 1px solid rgb(6, 60, 97);
    border-radius: 9px;
}

.ra-header-btn-outline:hover {
    background: #f9f1ed;
    border-color: #e14d22;
    color: #e14d22;
}

/* ----------------------------------------------------------
   Sidebar des agences
   ---------------------------------------------------------- */

/* Sidebar = même hauteur que la carte */
.ra-sidebar {
    height: 700px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    padding: 18px;
}

/* Liste scrollable : occupe tout l'espace restant sous les filtres,
   quelle que soit leur hauteur (évite tout dépassement du conteneur). */
.ra-agency-list{
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 6px 4px 4px;
    margin: -4px -6px -4px -4px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-content: start;
}

.ra-search {
    position: relative;
}

.ra-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    color: #94A3B8;
    pointer-events: none;
}

.ra-search-icon svg {
    width: 18px;
    height: 18px;
}

.ra-search input{
    border-radius:12px;
    padding:12px 16px 12px 42px;
}

/* ----------------------------------------------------------
   Filtre Entités
   ---------------------------------------------------------- */

.ra-entity-filter-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.ra-entity-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ra-entity-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #E2E8F0;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.ra-entity-pill img {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
}

.ra-entity-pill:hover {
    border-color: #F3DDD4;
    background: #F9F1ED;
    color: #9A3412;
}

.ra-entity-pill.is-active {
    background: #F9F1ED;
    border-color: #F3DDD4;
    color: #9A3412;
}

/* Pastille "Toutes" : pas d'effet au survol, style dédié une fois sélectionnée. */
.ra-entity-pill-all:hover {
    background: #fff;
    border-color: #E2E8F0;
    color: #334155;
}

.ra-entity-pill-all.is-active,
.ra-entity-pill-all.is-active:hover {
    font-family: 'Aptos', "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    font-weight: 700;
    background: rgb(6, 60, 97);
    color: rgb(255, 255, 255);
    border: 1px solid rgb(6, 60, 97);
}

/* ----------------------------------------------------------
   Badge Entité (carte agence + popup)
   ---------------------------------------------------------- */

.ra-entity-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #E8EDF1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #64748B;
}

.ra-entity-badge img {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
}

/* Liste */


.ra-agency-card {
    padding: 14px;
    border-width: 4px 1px 1px;
    border-style: solid;
    border-color: #DFE5EB #E9EDF1 #E9EDF1;
    border-radius: 14px;
    background: #FFFFFF;
    cursor: pointer;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ra-agency-card:hover {
    transform: translateY(-3px);
}

.ra-agency-card.active{
    background: #FFFFFF;
    border-color: #E14D22 #F3DDD4 #F3DDD4;
    color: inherit;
}


.ra-city{
    font-size:13px;
    color:#0F766E;
    font-weight:600;
}

.ra-address{
    margin:0;
    font-size:13px;
    line-height:1.4;
    color:#64748B;
}

/* ----------------------------------------------------------
   Bloc agence
   ---------------------------------------------------------- */

.ra-card-location {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.ra-card-content {
    min-width: 0;
}

.ra-card-header h4{
    margin: 0px 0px 4px;
    font-family: 'Aptos', "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: rgb(6, 60, 97);
}

.ra-card-distance {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: rgb(225, 77, 34);
}

.ra-card-distance[hidden] {
    display: none;
}

.ra-city {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
}

.ra-address {
    margin: 5px 0 0;
    font-size: 14px;
    line-height: 1.4;
    color: #64748B;
}

.ra-contact-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 6px 0 0;
    font-size: 14.5px;
    color: #334155;
    margin-bottom: 3px;
}

.ra-contact-icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: #2F6B8A;
}

.ra-contact-line strong {
    font-weight: 700;
    color: rgb(6, 60, 97);
}

.ra-contact-line a {
    color: #2F6B8A;
    text-decoration: underline;
    font-weight: bold;
}

.ra-contact-line a:hover {
    color: #24566F;
}

/* ----------------------------------------------------------
   Services
   ---------------------------------------------------------- */

.ra-services {
    margin-top: 5px;
    padding-top: 8px;
    border-top: 1px solid #E8EDF1;
}

.ra-services-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 5px;
}

.ra-services-title {
    font-size: 12px;
    font-weight: 700;
    color: #2F6B8A;
}

.ra-services-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ra-services-list li {
    position: relative;
    padding-left: 12px;
    margin-bottom: 3px;
    font-size: 12.5px;
    line-height: 1.35;
    color: #64748B;
}

.ra-services-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 6px;
    height: 6px;
    background: #E67E22;
}

.ra-route-btn.ra-card-route-btn {
    display: block;
    box-sizing: border-box;
    margin-top: 10px;
    text-align: center;
}


/* ----------------------------------------------------------
   Agence sélectionnée
   ---------------------------------------------------------- */

.ra-service-badge{
    background:#E8F7F3;
    color:#007A64;
    border-radius:999px;
    padding:4px 8px;
    font-size:11px;
    font-weight:600;
    line-height:1;
}

/* Carte */

#ra-map{
    height:700px;
    width:100%;
    border-radius:22px;
    overflow:hidden;
    border:1px solid #E2E8F0;
    box-shadow:0 4px 18px rgba(0,0,0,.05);
}

@media(max-width:992px){

    .ra-sidebar{
        height:auto;
    }

    #ra-map{
        height:500px;
    }

}


/* ==========================================================================
   POPUP AGENCE
   ========================================================================== */

.ra-popup{
    min-width:240px;
    padding:4px;
}

/* On masque la croix native de Google Maps : on affiche la nôtre,
   alignée avec la ligne "entité" (voir .ra-popup-close ci-dessous). */
.gm-ui-hover-effect {
    display: none !important;
}

.ra-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #E8EDF1;
}

.ra-popup-header .ra-entity-badge {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.ra-popup-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    padding: 0;
    color: #64748B;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.ra-popup-close:hover {
    color: #1E293B;
}

.ra-popup h4{
    margin: 0px 0px 4px;
    font-family: 'Aptos', "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: rgb(6, 60, 97);
}

.ra-popup p{
    margin-bottom:8px;
    color:#475569;
    font-size:14px;
}

.ra-popup .ra-contact-line{
    margin: 6px 0 0;
    color: #334155;
}

.ra-route-btn{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    padding: 7px 13px;
    font-family: 'Aptos', "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    color: rgb(255, 255, 255);
    background: rgb(6, 60, 97);
    text-decoration: none;
    white-space: nowrap;
}

.ra-route-btn:hover{
    background:#e14d22 ;
}
.ra-route-btn:focus-visible{
    border: none;
    outline: none;
}

.ra-results-count {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    text-align: right;
}

.ra-popup-section {
    margin-top: 12px;
}

.ra-popup-section strong {
    display: block;
    margin-bottom: 5px;
    color: #2F6B8A;
    font-size: 13px;
}

.ra-popup-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ra-popup-section li {
    position: relative;
    padding-left: 12px;
    margin-bottom: 3px;
    font-size: 12px;
    line-height: 1.35;
    color: #64748B;
}

.ra-popup-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #E67E22;
    font-weight: 700;
}