
        body {
            margin: 0;
            padding: 0;
            font-family: 'Cormorant Garamond', serif;
            background-color: #f9f7f3;
        }
        h1 {text-align: center;
            font-family: 'Patrick Hand',
            cursive; color: #5e8c61;
        }
        #map {
            width: 100%;
            height: 70vh;
        }
        #loading-screen {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        #loading-screen img {
            width: 200px;
            height: 200px;
            border-radius: 30px;
        }
        #especes-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            padding: 10px;
            background-color: white;
        }


/* Ajoute ce CSS à ton fichier styles.css ou dans une balise <style> */
.espece-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #5e8c61;
    cursor: pointer;
    position: relative;
    overflow: visible !important; /* Permet aux exposants de dépasser */
    margin: 5px;
}

.espece-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.espece-count {
    position: absolute;
    top: -10px !important; 
    right: -10px !important;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}


/* --- Popup overlay / popup stats (corrections) --- */
#popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 1000;
}
/* Popup principale (overlay custom) */
#popup-stats {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 16px;
    border-radius: 12px;
    z-index: 1001;
    width: 90%;
    max-width: 680px; /* <- réduit la largeur max */
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 26px;
    color: #5e8c61;
    cursor: pointer;
    z-index: 2000;
}


/* Contenu interne: 2 colonnes (gauche photo+iframe / droite texte) */
#popup-content {
    gap: 20px;
    align-items: flex-start;
    overflow-y: auto;
    padding-right: 6px;
}

/* Colonne gauche : image puis iframe dessous */
.popup-left {
    flex: 0 0 240px; /* fixe largeur image + iframe */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* image */
.popup-image {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #5e8c61;
}
/* iframe de même largeur que l'image, sous l'image */
.popup-iframe {
    width: 220px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}
/* Colonne droite texte */
.popup-right {
    flex: 1;
    min-width: 240px;
}

/* badge espece speaking (effet de bordure "on parle") */
.espece-badge.speaking {
    animation: pulseBorder 1s infinite;
    box-shadow: 0 0 12px rgba(94,140,97,0.6);
}
@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(94,140,97,0.8); }
    50% { box-shadow: 0 0 0 10px rgba(94,140,97,0); }
    100% { box-shadow: 0 0 0 0 rgba(94,140,97,0); }
}

#sound-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: white;
  border: 2px solid #333;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  z-index: 1000;
  transition: background-color 0.3s, transform 0.2s;
}

#sound-toggle:hover {
  transform: scale(1.1);
}

#sound-toggle.disabled {
  opacity: 0.5;
  text-decoration: line-through;
}


/* état désactivé (barré en diagonale) */
#sound-toggle.off {
    background: linear-gradient(135deg, rgba(255,255,255,1) 0 49%, rgba(220,220,220,1) 50% 100%);
    color: #999;
    position: fixed;
}

/* assure que le popup leaflet (sur la carte) s'affiche correctement */
.leaflet-container .leaflet-popup-content-wrapper { font-family: 'Cormorant Garamond', serif; }

/* responsive: pour petits écrans on empile */
@media (max-width: 700px) {
    #popup-content { flex-direction: column; align-items: center; }
    .popup-left { flex: none; }
    .popup-right { width: 100%; }
}





