/* Container carte */
.carte-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 30px auto;
    text-align: center;
}

.carte-container img.carte-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    box-shadow: 16px 16px 24px rgba(212,175,55,0.12);
}

/* Filtre boutons */
.filtres {
    text-align: center;
    margin-bottom: 14px;
}

.filtres button {
    background: #d4af37;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    margin: 0 6px;
    cursor: pointer;
    font-weight: bold;
}

.filtres button.active {
    background: #f5e6b2;
}

/* MARKERS */
.marker-wrapper {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 40;
    cursor: pointer;
}

.marker {
    width: 20px;
    height: 20px;
    background: #d4af37;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

/* INFOBULLE PARCHEMIN */
.infobulle {
    position: absolute;
    left: calc(100% + 12px);
    top: 0;
    width: 260px;
    background: #f8f2e0;
    border: 2px solid #c2a878;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.45);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .18s ease-out, transform .18s ease-out;
    z-index: 200;
    pointer-events: none; /* ✨ INFOS IMPORTANTES : Désactivé quand fermé */
    background-image: url('../images/parchemin_texture.png');
    background-size: cover;
}

.infobulle.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto; /* ✨ Activé uniquement quand ouverte */
}


.infobulle,
.infobulle * {
    color: #3a2810 !important;
    font-family: "Georgia", serif;
}

.infobulle img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 8px;
}

.infobulle .title {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 1.05em;
}

.infobulle .text {
    font-size: 0.92em;
    margin-bottom: 6px;
}

.infobulle .more {
    font-size: 0.85em;
    font-style: italic;
    margin-top: 6px;
}

/* Overlay */
.tooltip-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 150;
}

/* MODALE */
.modal-bg {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
}

.modal-bg.open {
    display: flex;
}

.modal {
    width: 90%;
    max-width: 1200px;
    background: transparent;
}

.modal .modal-close {
    float: right;
    font-size: 20px;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
}

@media (max-width: 768px) {

    .infobulle {
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) translateY(10px) !important;

        top: calc(var(--tap-y) + 16px) !important;
        width: 90vw !important;
        max-width: 360px;
        z-index: 9999 !important;

        right: auto !important;
        bottom: auto !important;
    }

    .infobulle.open {
        transform: translateX(-50%) translateY(0) !important;
    }
}
