/* Bloc Carte du monde — Leaflet EPSG4326 */

.carte-monde {
    width: 100%;
}

.carte-monde__inner {
    width: 100%;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

/* Ratio 2:1 — même zoom qu’en 4:1, bandes blanches en haut/bas pour la hauteur */
.carte-monde__aspect {
    position: relative;
    width: 100%;
    padding-bottom: 50%;
    height: 0;
    background-color: #fff;
    overflow: hidden;
}

.carte-monde__leaflet {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.carte-monde__leaflet.leaflet-container {
    background: #fff;
    font-family: inherit;
    padding: 0;
}

.carte-monde__leaflet .leaflet-control-container {
    display: none;
}

.carte-monde__leaflet .leaflet-pane,
.carte-monde__leaflet .leaflet-tile-pane,
.carte-monde__leaflet .leaflet-overlay-pane {
    z-index: 1;
}

.carte-monde__leaflet--error {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

.carte-monde__leaflet--error::before {
    content: "Impossible de charger la carte.";
}

.carte-monde-pin {
    background: transparent;
    border: none;
    cursor: pointer;
}

.carte-monde-popup {
    position: absolute;
    z-index: 1000;
    width: max-content;
    max-width: min(320px, calc(100% - 16px));
    pointer-events: none;
}

.carte-monde-popup[hidden] {
    display: none;
}

.carte-monde-popup__box {
    position: relative;
    width: 280px;
    max-width: 100%;
    padding: 18px 40px 16px 18px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
}

/* Bulle au-dessus du marqueur — pointe vers le bas */
.carte-monde-popup__box--above::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    transform: translateX(-50%);
    border-width: 9px 9px 0 9px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.08));
}

/* Bulle en dessous du marqueur — pointe vers le haut */
.carte-monde-popup__box--below::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -9px;
    transform: translateX(-50%);
    border-width: 0 9px 9px 9px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
    filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.08));
}

.carte-monde-popup__close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    padding: 4px 8px;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
}

.carte-monde-popup__close:hover {
    color: #212529;
}

.carte-monde-popup__title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    line-height: 1.25;
}

.carte-monde-popup__title[hidden] {
    display: none;
}

.carte-monde-popup__content {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #666;
}

.carte-monde-popup__content[hidden] {
    display: none;
}

.carte-monde-popup__content p {
    margin: 0 0 6px;
}

.carte-monde-popup__content p:last-child {
    margin-bottom: 0;
}

.carte-monde-popup__contact-wrap {
    margin: 0;
}

.carte-monde-popup__contact-wrap[hidden] {
    display: none;
}

.carte-monde-popup__contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #a32523;
    text-decoration: none;
}

.carte-monde-popup__contact:hover {
    color: #7a1c1a;
    text-decoration: underline;
}

.carte-monde-popup__contact .fa-envelope {
    font-size: 18px;
}

.carte-monde-pin span {
    display: block;
    width: 22px;
    height: 30px;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.carte-monde-pin:hover span,
.carte-monde-pin:focus-visible span {
    opacity: 0.55;
}

.carte-monde-pin--red span {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 30'%3E%3Cpath fill='%23a32523' d='M11 0C4.9 0 0 4.9 0 11c0 7.7 11 19 11 19s11-11.3 11-19C22 4.9 17.1 0 11 0z'/%3E%3Ccircle cx='11' cy='10' r='3.5' fill='%23fff' fill-opacity='0.85'/%3E%3C/svg%3E");
}

.carte-monde-pin--blue span {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 30'%3E%3Cpath fill='%231A4FBB' d='M11 0C4.9 0 0 4.9 0 11c0 7.7 11 19 11 19s11-11.3 11-19C22 4.9 17.1 0 11 0z'/%3E%3Ccircle cx='11' cy='10' r='3.5' fill='%23fff' fill-opacity='0.85'/%3E%3C/svg%3E");
}

@media screen and (max-width: 767px) {
    .carte-monde-pin span {
        width: 18px;
        height: 24px;
    }
}
