/* ===========================
   CONTENU PRINCIPAL
=========================== */
.content_legendes{
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  background: transparent;
}

.fond-legendes {
  background-image: url("../images/fonds/fond_legendes.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #fff;
}

/* =========================
   LÉGENDES FLOTTANTES
========================= */

.floating-legend {
  position: fixed;
  max-width: 280px;
  padding: 1rem 1.2rem;
  background: rgba(10, 10, 15, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 10px;
  font-family: "Georgia", serif;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.25);
  animation: float 6s ease-in-out infinite,
             shimmer 3s ease-in-out infinite;
  z-index: 20;
  opacity: 1;
  transition: opacity 1s ease;
}

.legend-text {
  display: block;
  white-space: pre-line; /* garde les retours à la ligne */
}

.legend-arrow {
  display: block;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.7;
  animation: arrowPulse 1.6s infinite;
}

/* =========================
   OVERLAY PLEIN ÉCRAN
========================= */

.legend-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.92);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.legend-overlay-content {
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  background: rgba(15, 15, 25, 0.95);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 14px;
  padding: 2rem;
  font-family: "Georgia", serif;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #fff;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.35);
}

/* =========================
   ANIMATIONS
========================= */

@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@keyframes shimmer {
  0%   { box-shadow: 0 0 15px rgba(255,215,0,0.2); }
  50%  { box-shadow: 0 0 30px rgba(255,215,0,0.5); }
  100% { box-shadow: 0 0 15px rgba(255,215,0,0.2); }
}

@keyframes arrowPulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}