
/* Styles spécifiques pour la popup nichoir */
.maplibregl-popup.nichoir-container .maplibregl-popup-content {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    overflow: visible !important;
}

/* Styles pour l'en-tête avec icône d'espèce */
.nichoir-popup .popup-header .header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nichoir-popup .species-icon {
    flex-shrink: 0;
}


/* Styles spécifiques pour les popups de nichoirs */
.nichoir-popup {
    width: 100%;
    min-height: min-content;
    font-family: system-ui, -apple-system, sans-serif;
}

.nichoir-popup .popup-header {
    background-color: var(--species-color, #808080);
    padding: 12px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.nichoir-popup .popup-header h3 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.nichoir-popup .popup-content {
    background: white;
    padding: 12px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    overflow-y: auto;
    max-height: 300px;
}

.nichoir-popup .occupation-history {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    margin-top: 12px;
}

.nichoir-popup .history-code {
    font-family: monospace;
    font-size: 16px;
    letter-spacing: 2px;
    padding: 8px;
    background-color: white;
    border-radius: 4px;
    margin-bottom: 12px;
    cursor: help; /* Change le curseur en loupe */
}

.nichoir-popup .history-code:hover {
    background-color: #fefad4;
}

.nichoir-popup .info-row {
    display: flex;
    margin-bottom: 8px;
    padding: 4px 0;
}

.nichoir-popup .info-row .label {
    flex: 0 0 140px;
    font-weight: 600;
    color: #4a5568;
}

.nichoir-popup .info-row .value {
    flex-grow: 1;
    color: #2d3748;
}

.nichoir-popup .legend-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.nichoir-popup .code-legend-item {
    display: flex;
    align-items: center;
}

.nichoir-popup .code-legend-item .code {
    font-family: monospace;
    font-weight: bold;
    margin-right: 8px;
    min-width: 24px;
}

.nichoir-popup .code-legend-item .description {
    font-size: 12px;
}

/* Styles pour le modal de légende */
.legend-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.legend-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

.legend-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.legend-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* Style du bouton de fermeture défini dans popup.css */

.legend-modal-body {
    padding: 16px;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.code-legend-item {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
}

.code-legend-item .code {
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    color: #2d3748;
    padding: 6px 12px;
    background-color: white;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    margin-right: 12px;
}

.code-legend-item .description {
    font-size: 14px;
    color: #4a5568;
}

.legend-explanation {
    margin-top: 24px;
    padding: 16px;
    background-color: #edf2f7;
    border-radius: 8px;
}

.legend-explanation p {
    margin: 0;
    font-size: 14px;
    color: #2d3748;
    line-height: 1.5;
}

