/* =====================================================================
   Layout : map — Carte illustree (monde en pointilles) + grille bureaux
   ===================================================================== */

/* --- Conteneur principal --- */
.map .map__inner {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* --- Sur-titre ---
   .map__inner est en flex column avec un gap de 2.5rem (3rem des 992px) ;
   la marge negative ramene l espace visuel entre le sur-titre et le titre
   a ~1rem, comme sur la maquette. */
.map .map__surtitre {
    font-family: var(--main-font);
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--color-gold);
    text-align: center;
    margin: 0 0 -1.5rem;
}

@media (min-width: 576px) {
    .map .map__surtitre {
        font-size: 14px;
        line-height: 22px;
    }
}

@media (min-width: 992px) {
    .map .map__surtitre {
        margin-bottom: -2rem;
    }
}

/* --- Carte illustree --- */
.map .map__illustrated {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius-card);
    background-color: var(--white);
}

.map .map__illustrated-img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    pointer-events: none;
}

/* --- Marqueur --- */
.map .map__marker {
    position: absolute;
    z-index: 1;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* transform cree un contexte d empilement local par marqueur : sans z-index
   explicite ici, un marqueur inactif plus loin dans le DOM peut passer
   au-dessus de la popup du marqueur actif. */
.map .map__marker.is-active {
    z-index: 2;
}

.map .map__marker-dot-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
}

.map .map__marker-ping {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: rgba(38, 69, 100, 0.5);
    opacity: 0.6;
    animation: kn-map-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.map .map__marker.is-active .map__marker-ping {
    background-color: var(--color-gold);
}

.map .map__marker-dot {
    position: relative;
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-navy);
    transition: var(--transition);
}

.map .map__marker.is-active .map__marker-dot {
    background-color: var(--color-gold);
    box-shadow: 0 0 0 4px rgba(203, 187, 157, 0.3);
}

.map .map__marker:hover .map__marker-dot {
    transform: scale(1.2);
}

@keyframes kn-map-ping {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    75%,
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* --- Popup marqueur --- */
.map .map__popup {
    display: none;
    position: absolute;
    left: 50%;
    top: 0;
    z-index: 10;
    width: 240px;
    transform: translate(-50%, -112%);
    background-color: var(--white);
    border-radius: 10px;
    padding: 0.875rem 1.125rem;
    text-align: left;
    box-shadow: 0 10px 30px -10px rgba(15, 26, 37, 0.25);
}

.map .map__marker.is-active .map__popup {
    display: block;
}

.map .map__popup-name {
    display: block;
    font-family: var(--title-font);
    font-size: 0.75rem;
    font-weight: var(--bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-gold);
    margin: 0 0 0.375rem;
}

.map .map__popup-address {
    display: block;
    font-family: var(--main-font);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--color-navy);
    margin: 0 0 0.25rem;
}

.map .map__popup-phone,
.map .map__popup-email {
    display: block;
    font-family: var(--main-font);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--color-navy);
    text-decoration: none;
    transition: var(--transition);
}

.map .map__popup-phone:hover,
.map .map__popup-email:hover {
    color: var(--color-gold);
}

/* --- Grille bureaux --- */
.map .map__offices {
    background-color: var(--color-navy);
    border-radius: var(--border-radius-card);
    padding: 1.5rem;
}

.map .map__offices-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* --- Carte bureau individuelle --- */
.map .map__office-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.map .map__office-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.map .map__office-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 2px;
}

.map .map__office-name {
    font-family: var(--title-font);
    font-size: 1rem;
    font-weight: var(--semibold);
    color: var(--white);
    margin: 0;
    line-height: 1.3;
}

.map .map__office-address {
    font-family: var(--main-font);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    font-style: normal;
    margin: 0 0 1.25rem;
}

.map .map__office-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-family: var(--main-font);
    font-size: 0.9375rem;
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    margin-top: auto;
    transition: var(--transition);
}

.map .map__office-phone:hover {
    background-color: rgba(255, 255, 255, 0.18);
    color: var(--white);
}

.map .map__office-phone svg {
    flex-shrink: 0;
}

/* =====================================================================
   Responsive
   ===================================================================== */

@media (min-width: 576px) {
    .map .map__offices {
        padding: 2rem;
    }
}

@media (min-width: 768px) {
    .map .map__offices-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .map .map__offices {
        padding: 2.5rem;
    }
}

@media (min-width: 992px) {
    .map .map__offices-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .map .map__inner {
        gap: 3rem;
    }
}

@media (max-width: 575px) {
    .map .map__popup {
        width: 200px;
        padding: 0.75rem 0.875rem;
    }
}
