body {
  margin: 0;
  font-size: 22px;
  text-shadow: 0px 0px 1px #aaa;
  font-family: Helvetica;
  font-family: "Helvetica", "Arial", Sans-Serif;
}

a {
  color: #ffa600;
}
a:visited {
  color: #bb8728;
}

#map {
  width: 100vw;
  height: 100vh;
  background: url("assets/background.jpg") center center no-repeat;
  background-size: cover;
}

#controls {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background: rgba(193, 193, 193, 0.9);
  padding: 8px;
  border-radius: 6px;
  font-size: 16px;
  max-height: 80vh;
}

#toggle-controls {
  width: 100%;
  background: #ddd;
  border: none;
  padding: 6px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 6px;
}

#controls-content {
  opacity: 1;
  overflow: visible;
  max-height: 1000px;
  transition: max-height 0.3s ease, opacity 0.6s ease;
}

#controls-content.collapsed {
  opacity: 0;
  max-height: 0;
  padding: 0;
  overflow: hidden;
}

.control-line {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.control-line:hover {
  background-color: #f0f0f0;
}

.control-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  object-fit: contain;
}

.control-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
}

#controls input[type="checkbox"] {
  margin-right: 6px;
}

#controls label {
  cursor: pointer;
  user-select: none;
}

footer {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px;
  border-radius: 6px;
  font-size: 14px;
}

footer p {
  margin-top: 0;
  margin-bottom: 4px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background: rgba(80, 80, 80, 0.95);
  color: #F7F7F7;
  margin: 5% auto;
  padding: 24px;
  border-radius: 12px;
  width: 60%;
  max-width: 1024px;
  text-align: left;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 16px;
  margin-bottom: 20px;
  align-items: start;
}

.modal-label {
  font-weight: bold;
  color: #a0a0ff;
  text-shadow: 0 0 1px rgba(160, 160, 255, 0.5);
  white-space: nowrap;
}

.modal-value {
  color: #e8e8e8;
  line-height: 1.4;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
}

.modal-text-content {
  color: #e8e8e8;
  font-size: 16px;
  line-height: 1.5;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
}

.zoom-button-container {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.zoom-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.zoom-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.zoom-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.zoom-button svg {
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

/* Amélioration de l'image dans la modal */
.modal-content img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  height: auto;
  cursor: zoom-in;
  margin-bottom: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Fermeture de la modal */
#modal-close {
  float: right;
  font-size: 28px;
  cursor: pointer;
  margin-bottom: 16px;
  color: #ccc;
  transition: color 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

#modal-img.fullscreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 95vw;
  max-height: 95vh;
  z-index: 2000;
  cursor: zoom-out;
  border-radius: 8px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  background: #000;
}

.info-btn {
  display: inline-block;
  margin-left: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #007BFF;
  color: white;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  line-height: 18px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.info-btn:hover {
  background-color: #0056b3;
}

.info-tooltip {
  display: none;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  min-width: 220px;
  z-index: 1001;
  white-space: normal;
  cursor: pointer;
}

.info-tooltip.visible {
  display: block;
}

.zoom-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 8px;
}

.zoom-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.zoom-button:active {
  transform: translateY(0);
}

.zoom-button svg {
  flex-shrink: 0;
}

/* Définit l'animation de pulsation */
@keyframes stable-pulse {
  0% {
    filter: brightness(1) drop-shadow(0 0 0px rgba(255, 255, 0, 0.8));
  }

  50% {
    filter: brightness(1.5) drop-shadow(0 0 8px rgba(255, 255, 0, 0.9));
  }

  100% {
    filter: brightness(1) drop-shadow(0 0 0px rgba(255, 255, 0, 0.8));
  }
}

/* Animation pour donjon bleu */
@keyframes pulse-blue {
  0% {
    filter: brightness(1) drop-shadow(0 0 0px rgba(25, 164, 247, 0.8));
  }

  50% {
    filter: brightness(1.5) drop-shadow(0 0 12px rgba(25, 164, 247, 0.9)) drop-shadow(0 0 20px rgba(0, 150, 255, 0.7));
  }

  100% {
    filter: brightness(1) drop-shadow(0 0 0px rgba(25, 164, 247, 0.8));
  }
}

/* Animation pour donjon violet */
@keyframes pulse-purple {
  0% {
    filter: brightness(1) drop-shadow(0 0 0px rgba(220, 48, 248, 0.8));
  }

  50% {
    filter: brightness(1.5) drop-shadow(0 0 12px rgba(220, 48, 248, 0.9)) drop-shadow(0 0 22px rgba(128, 0, 255, 0.7));
  }

  100% {
    filter: brightness(1) drop-shadow(0 0 0px rgba(220, 48, 248, 0.8));
  }
}

/* Animation pour donjon or */
@keyframes pulse-gold {
  0% {
    filter: brightness(1) drop-shadow(0 0 0px rgba(227, 186, 42, 0.8));
  }

  50% {
    filter: brightness(1.5) drop-shadow(0 0 12px rgba(227, 186, 42, 0.9)) drop-shadow(0 0 22px rgba(255, 200, 0, 0.7));
  }

  100% {
    filter: brightness(1) drop-shadow(0 0 0px rgba(227, 186, 42, 0.8));
  }
}

.icon-pulse-blue {
  animation: pulse-blue 0.5s ease-in-out 8;
}

.icon-pulse-purple {
  animation: pulse-purple 0.5s ease-in-out 8;
}

.icon-pulse-gold {
  animation: pulse-gold 0.5s ease-in-out 8;

}

/* Animation par défaut pour les autres catégories */
.icon-pulse-default {
  animation: stable-pulse 0.5s ease-in-out 8;
}

/*Correction du curseur pour indiquer si c'est cliquable ou non*/
.leaflet-interactive {
  cursor: default;
}

.leaflet-marker-icon.icon-pointer {
  cursor: pointer;
}

.leaflet-marker-icon.icon-default {
  cursor: default;
}