/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial Rounded MT Bold', sans-serif;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

/*---------------------------------------Header bar------------------------------------------------ */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 10px 20px;
  flex-shrink: 0;
}

.logo {
  width: 35%;
}

.home-icon {
  height: 20px;
  color: #001F54;
}

/*---------------------------------------Carte------------------------------------------------ */
#map_section {
  flex: 1 1 auto;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  border: none;
}

.leaflet-marker-icon.pulse {
  position: relative;
  width: 20px !important;
  height: 20px !important;
  background: transparent;
  border-radius: 50%;
  transform: translate(-10px, -10px);
}

/* Cercle pulsant */
.leaflet-marker-icon.pulse::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: rgba(0, 149, 255, 0.4);
  border: 2px solid #0095ff;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: pulse-animation 2s infinite;
}

/* Petit point au centre */
.leaflet-marker-icon.pulse::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #0095ff;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

@keyframes pulse-animation {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}


@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-6px);
  }
  50% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-3px);
  }
}


.leaflet-marker-icon.bouncing-archi-poi::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: url('images/poi_bleu.png') no-repeat center center;
  background-size: contain;
  animation: bounce 1.5s ease-in-out infinite;
}

.leaflet-marker-icon.bouncing-hist-poi::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: url('images/poi_rouge.png') no-repeat center center;
  background-size: contain;
  animation: bounce 1.5s ease-in-out infinite;
}

/*---------------------------------------Popup fixe en bas-----------------------------------------*/
.popup {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.35);
  border-radius: 12px 12px 0 0;
  z-index: 10;
}

.popup-hidden {
  display: none;
}

.popup-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 500px;
  width: 100%;
}

.popup-text p {
  font-size: 14px;
  color: #333;
}

.title2 {
  color: #002a6c;
  font-weight: bold;
  font-size: 16px;
  margin: 0;
  word-break: break-word;
  white-space: normal;
  padding-bottom: 4px;
}

.popup-image {
  width: 100%;
  border-radius: 5px;
  margin: 20px 0px;
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.35);
}

.popup-button {
  display: inline-block;
  text-align: center;
  background-color: #007bff;
  color: #fff;
  padding: 10px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  width: 100%;
}

.popup-button:hover {
  background-color: #0056b3;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  color: #666;
  z-index: 100;
}

.popup-close:hover {
  color: #000;
}

/* ---------------------------------------Autres styles inchangés---------------------------------- */
.container {
  text-align: center;
  padding: 20px;
}

.fort-image {
  width: 100%;
  max-width: 240px;
  border-radius: 5px;
  margin: 20px 0;
  height: 200px;
  box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.35);
}

.title {
  font-size: 24px;
  color: #002a6c;
  margin-bottom: 10px;
  padding: 10px;
}

.subtitle {
  font-size: 14px;
  color: #333;
  margin-bottom: 30px;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 250px;
  margin: 0 auto;
}

.btn {
  display: block;
  padding: 15px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  border-radius: 5px;
  font-size: 18px;
}

.btn.blue {
  background-color: #007bff;
}

.btn.red {
  background-color: #e63946;
}

.map-placeholder {
  width: 100%;
  height: 100vh;
  background-color: #d6e0d5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-content {
  padding: 20px;
}

.hist::before {
  content: "";
  position: absolute;
  top: 7%;
  right: 20%;
  width: 100%;
  height: 100%;
  background-image: url('images/icone_fort_rouge.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 200%;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.archi::before {
  content: "";
  position: absolute;
  top: 7%;
  right: 20%;
  width: 100%;
  height: 100%;
  background-image: url('images/icone_fort_bleu_clair.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 200%;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.back-link {
  display: inline-block;
  font-size: 12px;
  text-decoration: none;
  color: #001F54;
  font-weight: bold;
}

.video {
  width: 100%;
  height: 30vh;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  margin: 20px 0px;
  object-fit: cover;
}

.quote,
.quote-archi {
  background-color: #f9f9f9;
  border-left: 5px solid #007bff;
  padding: 10px;
  border-radius: 8px;
  font-style: italic;
  margin: 20px 0px;
  box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.35);
  font-size: 14px;
}

.text {
  font-size: 14px;
  margin: 20px 0px;
}

.did-you-know {
  background-color: #fff8dc;
  border: 3px solid #ffe08a;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.35);
}

.did-you-know h2 {
  margin-top: 0;
  color: #001F54;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
}

.did-you-know img {
  width: 8%;
}

.leaflet-control-custom {
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
  border-radius: 4px;
  margin-bottom: 6px;
  position: relative;
  transition: box-shadow 0.3s ease;
}

.tracking-active {
  box-shadow: 0 0 0 3px rgba(0, 255, 100, 0.4), 0 0 10px rgba(0, 255, 100, 0.6);
  animation: pulse 1.5s infinite;
  border-radius: 6px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 3px rgba(0, 255, 100, 0.4), 0 0 10px rgba(0, 255, 100, 0.6);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(0, 255, 100, 0.2), 0 0 4px rgba(0, 255, 100, 0.3);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(0, 255, 100, 0.4), 0 0 10px rgba(0, 255, 100, 0.6);
  }
}
