/* ========================================
   BLOC IMPLANTATION
   ======================================== */

.blocImplantation {
    background-color: #FFFFFF;
    padding: 20px 0;
}

.leaflet-control-attribution{
    display: none;
}

/* Header avec titres */
.blocImplantation__header {
    padding-bottom: 40px;
}

.blocImplantation__titles {
    text-align: center;
}

.blocImplantation__title {
    font-family: 'Momo Trust Display', sans-serif;
    font-size: 40px;
    line-height: 50px;
    color: #5CBE95;
    margin: 0 0 10px 0;
    font-weight: 400;
}

.blocImplantation__subtitle {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 25px;
    line-height: 33px;
    color: #00283F;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 2.5px;
    margin: 0;
}

/* Contenu principal */
.blocImplantation__content {
    padding: 0;
    position: relative;
    z-index: 11;
}

/* Carte Leaflet */
.blocImplantation__map {
    width: 100%;
    height: 407px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background-color: #D9D9D9;
}

.blocImplantation__map .leaflet-container {
    height: 100%;
    width: 100%;
    border-radius: 20px;
}

/* Liste des agences */
.blocImplantation__agencies {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Carte agence */
.blocImplantation__agency {
    background-color: #00283F;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.blocImplantation__agency-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* Repositionner le header en absolute quand la carte est dépliée */
.blocImplantation__agency.is-active .blocImplantation__agency-header {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 0;
    z-index: 10;
    cursor: default;
}

.blocImplantation__agency-name {
    font-family: 'Momo Trust Display', sans-serif;
    font-size: 25px!important;
    line-height: 50px;
    font-style: normal!important;
    color: #5CBE95;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0;
}

/* Masquer le titre du header quand déplié */
.blocImplantation__agency.is-active .blocImplantation__agency-name--header {
    display: none;
}

/* Titre dans le contenu (visible quand déplié) */
.blocImplantation__agency-name--content {
    display: none;
}

.blocImplantation__agency.is-active .blocImplantation__agency-name--content {
    display: block;
    margin-bottom: 15px;
}

.blocImplantation__agency-toggle {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 22px;
    height: 22px;
    position: relative;
    flex-shrink: 0;
}

.blocImplantation__agency-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    position: relative;
}

.blocImplantation__agency-icon-plus,
.blocImplantation__agency-icon-minus {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    filter: invert(1) contrast(2);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blocImplantation__agency-icon-plus {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.blocImplantation__agency-icon-minus {
    opacity: 0;
    transform: scale(0.8) rotate(-90deg);
}

/* Animation de l'icône quand l'accordéon est ouvert */
.blocImplantation__agency-toggle[aria-expanded="true"] .blocImplantation__agency-icon-plus {
    opacity: 0;
    transform: scale(0.8) rotate(90deg);
}

.blocImplantation__agency-toggle[aria-expanded="true"] .blocImplantation__agency-icon-minus {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Contenu agence */
.blocImplantation__agency-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blocImplantation__agency.is-active .blocImplantation__agency-content {
    max-height: 2000px;
    opacity: 1;
    padding: 0;
}

.blocImplantation__agency-body {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.blocImplantation__agency-image {
    width: 191px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #D9D9D9;
}

.blocImplantation__agency-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blocImplantation__agency-details {
    flex: 1;
    min-width: 0;
    padding: 20px;
    align-content: center;
}

.blocImplantation__agency-info {
    color: #FFFFFF;
}

.blocImplantation__agency-phone {
    font-family: 'Momo Trust Display', sans-serif;
    font-size: 21px;
    line-height: 23px;
    color: #FCC100;
    margin: 0 0 5px 0;
}

.blocImplantation__agency-phone a {
    color: inherit!important;
    text-decoration: none!important;
    font-weight: 600;
}

.blocImplantation__agency-phone a:hover {
    text-decoration: underline;
}

.blocImplantation__agency-address {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 16px;
    line-height: 20px;
    color: #FFFFFF;
    margin: 0;
}

.blocImplantation__agency-address p {
    margin: 0 0 5px 0;
}

.blocImplantation__agency-hours {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 16px;
    line-height: 20px;
    color: #FFFFFF;
    margin: 0;
}

/* Actions (boutons) */
.blocImplantation__agency-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 991px) {
    .blocImplantation__title {
        font-size: 32px;
        line-height: 40px;
    }
    
    .blocImplantation__subtitle {
        font-size: 20px;
        line-height: 28px;
        letter-spacing: 2px;
    }
    
    .blocImplantation__map {
        height: 300px;
        margin-bottom: 25px;
    }
    
    .blocImplantation__agency-name {
        font-size: 24px;
        line-height: 32px;
    }
    
    .blocImplantation__agency-image {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 767px) {
    .blocImplantation {
        padding: 30px 0;
    }
    
    .blocImplantation__header {
        padding-bottom: 30px;
    }
    
    .blocImplantation__title {
        font-size: 24px !important;
        line-height: 30px !important;
        text-align: left;
    }
    
    .blocImplantation__subtitle {
        font-size: 18px;
        line-height: 24px;
        letter-spacing: 1.5px;
    }
    
    .blocImplantation__map {
        height: 250px;
    }
    
    .blocImplantation__agency-name {
        font-size: 18px!important;
        line-height: 28px;
    }
    
    .blocImplantation__agency-phone {
        font-size: 18px;
        line-height: 20px;
    }
    
    .blocImplantation__agency-address,
    .blocImplantation__agency-hours {
        font-size: 14px;
        line-height: 18px;
    }
}

@media (max-width: 575px) {
    .blocImplantation__agency-image {
        display: none;
    }
}
