/* --- BASE & TYPOGRAPHIE --- */
body {
    font-family: 'Georgia', serif;
    margin: 0;
    padding: 0;
    background-color: #f8f0e3; /* Papier ancien */
    color: #3e2723;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

p {
    font-size: 1.1em;
}


.ligne-separatrice {
    height: 1px;
    background: linear-gradient(to right, transparent, #8b5a2b, transparent);
    margin-bottom: 5px;
    opacity: 0.4;
}


/* --- BANNIÈRE (IMAGE DU HAUT) --- */
.banniere-seigneurie {
    width: 100%;
    background-color: #5d4037;
    border-bottom: 2px solid #3e2723;
}

.image-banniere {
    width: 100%;
    height: auto;
    display: block;
}



/* --- NAVIGATION (ENTRE LES DEUX IMAGES) --- */
.nav-seigneurie {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    background-color: #fdf5e6;
    border-bottom: 3px double #5d4037;
    position: relative;
    z-index: 100; /* Assure que le menu reste sous les bulles si nécessaire */
}


/* Quand le son joue, la zone devient invisible et incliquable */
.lecture-en-cours {
    opacity: 0 !important;
    pointer-events: none !important; /* Important : permet de cliquer à travers */
    visibility: hidden !important;
}



/* Style de la puce légende */
.puce-legende {
    width: 30px;
    height: 20px;
    border-radius: 20%;
    display: inline-block;
    background-color: rgba(244, 225, 193, 0.85);
}

.puce-legende.rouge {
    border: 2px solid rgba(200, 0, 0, 0.9);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.puce-legende.blanche {
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.btn-nav {
    padding: 8px 20px;
    background-color: #994D00;
    color: #f4e1c1;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    border: 1px solid #3e2723;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.btn-nav:hover {
    background-color: #8d6e63;
    transform: translateY(-2px);
}

.btn-nav.actif {
    background-color: #c80000;
    border-color: #7a0000;
}

/* --- TITRE SOUS LA NAVIGATION --- */
.titre-cote {
    text-align: center;
    padding: 10px 0 20px 0;
}

.titre-cote h4 {
    margin: 0;
    color: #5d4037;
    font-size: 1.2em;
    letter-spacing: 1px;
}

/* --- CONTENEUR DE LA CARTE (LA LIBÉRATION DE L'OVERFLOW) --- */
.map-section {
    padding: 20px;
    background-color: #fdf5e6;
    overflow: visible; /* Permet aux bulles de sortir de la section */
}

.map-container {
    width: 100%;
    overflow-x: auto;    /* Garde le défilement horizontal */
    overflow-y: visible; /* PERMET AUX BULLLES DE SORTIR PAR LE HAUT */
    white-space: nowrap;
    position: relative;
    cursor: grab;
    background-color: #e0d8c0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.map-image-wrapper {
    position: relative;
    display: inline-block;
    height: 600px; 
    width: auto;
    pointer-events: auto !important;
    overflow: visible; /* Important pour les bulles */
}

.seigneurie-map {
    height: 100%;
    width: auto;
    display: block;
    pointer-events: none;
}

/* --- HOTSPOTS (CERCLES) --- */
.hotspots-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hotspot {
    position: absolute;
    width: 12px;
    height: 23px;
    border-radius: 18%;
    cursor: pointer;
    background-color: rgba(244, 225, 193, 0.35);
    transition: transform 0.2s, border-width 0.1s;
    pointer-events: auto;
    z-index: 100;
}



.white-circle {
    border: 2px solid white;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.red-circle {
    border: 2px solid rgba(200, 0, 0, 0.9);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.hotspot:hover {
    z-index: 9999 !important;
}

/* On affiche le numéro quand on survole le hotspot */
.hotspot:hover .apercu-numero {
    display: block;
}

/* --- DESCRIPTIONS (BULLES) --- */

.info-survol, .apercu-numero {
    display: none; /* Caché par défaut */
    position: absolute;
    bottom: 120%; /* Juste au-dessus du cercle */
    left: 50%;
    transform: translateX(-50%);
    background: #5d4037;
    color: #f4e1c1;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none; /* Pour ne pas gêner la souris */
    z-index: 10000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.hotspot-description {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f4e1c1;
    border: 1px solid #5d4037;
    padding: 10px;
    border-radius: 5px;
    width: 220px; /* Taille réduite de moitié */
    white-space: normal;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    pointer-events: auto !important; 
    z-index: 1000;
    
    
    /* CACHÉ PAR DÉFAUT */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    text-align: left;
    color: #3e2723;
    z-index: 9999; /* Par-dessus tout */
}

/* ÉTAT ACTIF (TRÈS IMPORTANT) */
.hotspot-description.active {
    opacity: 1;
    visibility: visible;
}

.hotspot-description h3 {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    border-bottom: 1px solid #5d4037;
    padding-bottom: 3px;
}

.hotspot-description p {
    font-size: 0.75em;
    line-height: 1.3;
    margin: 5px 0;
}

#points-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none !important; /* Laisse passer le clic */
    z-index: 50;
}
/* Cadre de texte plus étroit et polices plus petites */
.pop-up-contenu {
    background-color: #f4e1c1;
    padding: 20px 25px;
    border: 2px solid #5d4037;
    border-radius: 8px;
    width: 90%;
    max-width: 550px; /* Réduit de 800px à 550px */
    max-height: 80vh;
    font-size: 0.85em; /* Police plus petite */
}


/* --- STYLE POUR LES COURTES DESCRIPTIONS AUDIO (CARTEL) --- */
.pop-up-contenu.cartel-audio {
    max-width: 320px; /* La magie opère ici : une fenêtre toute petite ! */
    padding: 30px 20px 20px;
    background-color: #fdf5e6; 
    border: 3px double #8b5a2b; /* Une belle bordure double d'époque */
    border-radius: 6px;
    text-align: center; /* Centre le texte pour un bel effet visuel */
}

/* On ajuste un peu le texte à l'intérieur pour qu'il respire */
.cartel-audio .texte-scrollable p {
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
    color: #3e2723;
}

/* Petite décoration optionnelle : une icône de son au-dessus du titre */
.cartel-audio::before {
    content: "🔊"; /* Tu peux changer par une note de musique 🎵 ou effacer cette section */
    display: block;
    font-size: 1.5em;
    margin-bottom: 5px;
    opacity: 0.7;
}

.texte-scrollable h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #5d4037;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.texte-scrollable p {
    margin-bottom: 10px;
    line-height: 1.4;
}

.texte-scrollable ul {
    margin-top: 5px;
    padding-left: 15px;
    border-left: 1px solid #d2b48c;
}

.texte-scrollable li {
    margin-bottom: 4px;
    list-style: none;
}


/* --- BOUTON DE VISITE --- */
.bouton-visite {
    display: block;
    text-align: center;
    margin-top: 8px;
    padding: 5px;
    background-color: #8d6e63;
    color: #f4e1c1 !important;
    text-decoration: none;
    font-size: 0.7em;
    font-weight: bold;
    border: 1px solid #3e2723;
    border-radius: 4px;
    box-shadow: 1px 1px 0px #3e2723;
}

.bouton-visite:hover {
    background-color: #5d4037;
}

/* --- BARRES DE DÉFILEMENT --- */
.map-container::-webkit-scrollbar {
    height: 12px;
}

.map-container::-webkit-scrollbar-thumb {
    background-color: #8d6e63;
    border-radius: 6px;
}

.map-container::-webkit-scrollbar-track {
    background-color: #f4e1c1;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 20px;
    background-color: #5d4037;
    color: #f4e1c1;
    border-top: 5px double #3e2723;
}


/* --- LA LIGNE BLANCHE (L'attache de la bulle) --- */
.pointe-bulle {
    position: absolute !important;
    top: 100% !important; /* Démarre exactement sous la boîte beige */
    left: 50% !important;
    margin-left: -1.5px !important; /* Centre parfaitement la ligne de 3px */
    
    width: 3px !important; /* L'épaisseur de la belle ligne blanche */
    height: 35px !important; /* La ligne fait 35px pour rejoindre le point */
    
    background-color: #ffffff !important;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important; /* Ombre pour la détacher de la carte */
    
    display: block !important;
    z-index: -1 !important; /* Se glisse sous le papier beige, mais reste visible sur la carte */
}




