/**
 * Styles pour les popups - Version simplifiée
 */

.popup-content {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 12px;
  min-width: 200px;
  max-width: 280px;
  line-height: 1.4;
}

.popup-content h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}

.popup-content p {
  margin: 0;
  font-size: 12px;
  color: #666;
}

/* Version mobile */
@media (max-width: 480px) {
  .popup-content {
    min-width: 180px;
    max-width: 250px;
    padding: 10px;
  }
}

/* Styles pour les popups de renaturation */

.renaturation-popup {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  max-width: 500px !important;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: none;
}

.renaturation-popup .maplibregl-popup-content {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.renaturation-popup-content {
  padding: 20px;
}

.renaturation-popup-content h3 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.renaturation-popup-content h4 {
  margin: 15px 0 10px 0;
  color: #495057;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.maille-info {
  background: rgba(255, 255, 255, 0.7);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #28a745;
}

.maille-info p {
  margin: 0;
  font-size: 13px;
  color: #495057;
}

.renaturation-scores {
  margin-bottom: 20px;
}

.score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin: 5px 0;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  border-left: 3px solid #dee2e6;
}

.score-label {
  font-size: 13px;
  color: #495057;
  font-weight: 500;
}

.score-value {
  font-weight: 600;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 50px;
  text-align: center;
}

.score-high {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.score-medium {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
  border: 1px solid #ffeaa7;
}

.score-low {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.renaturation-details {
  background: rgba(255, 255, 255, 0.6);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.renaturation-details ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.renaturation-details li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 12px;
  color: #6c757d;
}

.renaturation-details li:last-child {
  border-bottom: none;
}

.renaturation-details li strong {
  color: #495057;
  font-weight: 600;
}

.popup-actions {
  text-align: center;
  margin-top: 15px;
}

.btn-analyze {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.btn-analyze:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.btn-analyze:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Styles pour les popups territoriaux standard */
.territorial-popup {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  max-width: 400px !important;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  border: none;
}

.territorial-popup .maplibregl-popup-content {
  padding: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
}

/* Responsive design pour les popups */
@media (max-width: 768px) {
  .renaturation-popup,
  .territorial-popup {
    max-width: 90vw !important;
  }

  .renaturation-popup-content {
    padding: 15px;
  }

  .score-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .score-value {
    align-self: flex-end;
  }
}

/* Animation d'entrée pour les popups */
.renaturation-popup,
.territorial-popup {
  animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Styles pour les indicateurs de score */
.score-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.score-indicator.high {
  background: #28a745;
}

.score-indicator.medium {
  background: #ffc107;
}

.score-indicator.low {
  background: #dc3545;
}

/* Styles pour les popups de survol des mailles */
.maille-hover-popup {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  max-width: 200px !important;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: none;
}

.maille-hover-popup .maplibregl-popup-content {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e9ecef;
  font-size: 12px;
}

.maille-hover-content {
  text-align: center;
}

.maille-hover-content strong {
  color: #495057;
  font-weight: 600;
}

.maille-hover-content small {
  color: #6c757d;
  font-style: italic;
}

/* Styles pour les popups standards des mailles */
.maille-popup {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  max-width: 300px !important;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  border: none;
}

.maille-popup .maplibregl-popup-content {
  padding: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
}

.maille-popup-content h4 {
  margin: 0 0 12px 0;
  color: #2c3e50;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.maille-popup-content p {
  margin: 8px 0;
  font-size: 13px;
  color: #495057;
}

.maille-popup-content p em {
  color: #6c757d;
  font-style: italic;
  font-size: 12px;
}

.maille-popup-content .btn-analyze {
  margin-top: 12px;
  width: 100%;
}
