/* ================================
   FRONTEND — carte interactive
   ================================ */
.pde-carte-wrapper {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.pde-carte-wrapper .pde-carte {
  margin: 0;
  max-width: none;
}

.pde-carte {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: 1009.6727 / 665.96301; /* ratio du SVG MapSVG */
  font-family: inherit;
}

.pde-carte__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pde-carte__map svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Couleurs continents — ajustez selon votre charte */
.pde-carte__map svg path,
.pde-carte__map svg .continent {
  fill: #e9e4da;
  stroke: #ffffff;
  stroke-width: 0.4;
  transition: fill .3s ease;
}

.pde-carte__missing {
  padding: 40px;
  text-align: center;
  background: #fff8dc;
  border: 1px dashed #c0a030;
  color: #555;
}

/* Pins */
.pde-carte__pins {
  position: absolute;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.pde-carte__pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  outline: none;
  z-index: 1;
}

/* Pin ouvert / survolé : passe au-dessus des autres pins */
.pde-carte__pin:hover,
.pde-carte__pin:focus,
.pde-carte__pin.is-open {
  z-index: 30;
}

.pde-carte__pin-dot {
  display: block;
  width: 14px;
  height: 14px;
  background: #d4773a;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(212, 119, 58, 0.55);
  animation: pde-pulse 2s infinite;
  position: relative;
  z-index: 1;
}

.pde-carte__pin:hover .pde-carte__pin-dot,
.pde-carte__pin:focus .pde-carte__pin-dot,
.pde-carte__pin.is-open .pde-carte__pin-dot {
  background: #b85f24;
  transform: scale(1.15);
}

/* Pin "?" — couleur distincte pour les inviter à personnaliser */
.pde-carte__pin--question .pde-carte__pin-dot {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  background: #2e5f3c;
  box-shadow: 0 0 0 0 rgba(46, 95, 60, 0.55);
  animation: pde-pulse-question 2s infinite;
}

.pde-carte__pin--question:hover .pde-carte__pin-dot,
.pde-carte__pin--question:focus .pde-carte__pin-dot,
.pde-carte__pin--question.is-open .pde-carte__pin-dot {
  background: #234a2e;
}

@keyframes pde-pulse-question {
  0%   { box-shadow: 0 0 0 0 rgba(46, 95, 60, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(46, 95, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 95, 60, 0); }
}

@keyframes pde-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(212, 119, 58, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(212, 119, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 119, 58, 0); }
}

/* ================================
   Tooltip — s'ouvre à droite du pin
   (ou à gauche si pin en partie droite de la carte)
   ================================ */
.pde-carte__tooltip {
  position: absolute;
  top: 50%;
  left: calc(100% + 18px);
  transform: translateY(-50%);
  width: 540px;
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  z-index: 20;
}

/* Flèche pointant vers le pin (à gauche de la tooltip) */
.pde-carte__tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: #fff;
}

.pde-carte__pin:hover .pde-carte__tooltip,
.pde-carte__pin:focus .pde-carte__tooltip,
.pde-carte__pin.is-open .pde-carte__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(4px);
}

/* Flip à gauche : pin en partie droite de la carte */
.pde-carte__pin--flip-left .pde-carte__tooltip {
  left: auto;
  right: calc(100% + 18px);
}
.pde-carte__pin--flip-left .pde-carte__tooltip::after {
  right: auto;
  left: 100%;
  border-right-color: transparent;
  border-left-color: #fff;
}
.pde-carte__pin--flip-left:hover .pde-carte__tooltip,
.pde-carte__pin--flip-left:focus .pde-carte__tooltip,
.pde-carte__pin--flip-left.is-open .pde-carte__tooltip {
  transform: translateY(-50%) translateX(-4px);
}

.pde-carte__tooltip img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin-bottom: 14px;
}

.pde-carte__tooltip-body strong {
  display: block;
  font-size: 19px;
  margin-bottom: 6px;
  color: #222;
  line-height: 1.3;
}

.pde-carte__tooltip-body p {
  font-size: 14.5px;
  color: #555;
  margin: 0;
  line-height: 1.55;
}

.pde-carte__tagline {
  display: block;
  font-size: 13px;
  color: #8a8a8a;
  font-style: italic;
  margin: 0 0 10px;
  line-height: 1.4;
}

.pde-carte__desc {
  margin-bottom: 12px !important;
  white-space: pre-line;
}

.pde-carte__saisons {
  list-style: none;
  padding: 0;
  margin: 10px 0 8px;
}

.pde-carte__saisons li {
  font-size: 13px;
  color: #3d3d3d;
  padding-left: 22px;
  position: relative;
  margin-bottom: 5px;
  line-height: 1.45;
}

.pde-carte__saisons li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 12px;
  height: 12px;
  background: #6da55c;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #6da55c;
}

.pde-carte__localisation {
  font-size: 13px !important;
  color: #3d3d3d !important;
  padding-left: 22px;
  position: relative;
  margin: 8px 0 0 !important;
  line-height: 1.45 !important;
}

.pde-carte__localisation::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 16px;
  background-color: #d4773a;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 110-5 2.5 2.5 0 010 5z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 110-5 2.5 2.5 0 010 5z'/></svg>") center/contain no-repeat;
}

/* Tooltip compact pour les pins "?" */
.pde-carte__tooltip--question {
  width: 260px;
  padding: 14px 16px;
}
.pde-carte__tooltip--question .pde-carte__tooltip-body strong {
  font-size: 16px;
  margin-bottom: 6px;
  color: #2e5f3c;
}
.pde-carte__tooltip--question .pde-carte__tooltip-body p {
  font-size: 13.5px;
}
.pde-carte__tooltip--question a {
  color: #2e5f3c;
  font-weight: 600;
  text-decoration: underline;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 1100px) {
  .pde-carte__tooltip {
    width: 380px;
    padding: 16px;
  }
  .pde-carte__tooltip img {
    height: 160px;
  }
  .pde-carte__tooltip-body strong { font-size: 17px; }
  .pde-carte__tooltip-body p { font-size: 13.5px; }
}

@media (max-width: 600px) {
  /* Sur mobile : la tooltip latérale déborde toujours.
     On la remet au-dessus du pin, centrée, plus étroite. */
  .pde-carte__tooltip,
  .pde-carte__pin--flip-left .pde-carte__tooltip {
    top: auto;
    bottom: calc(100% + 14px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 250px;
    max-height: 70vh;
  }
  .pde-carte__tooltip::after,
  .pde-carte__pin--flip-left .pde-carte__tooltip::after {
    top: 100%;
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #fff;
    border-right-color: transparent;
    border-left-color: transparent;
  }
  .pde-carte__pin:hover .pde-carte__tooltip,
  .pde-carte__pin:focus .pde-carte__tooltip,
  .pde-carte__pin.is-open .pde-carte__tooltip,
  .pde-carte__pin--flip-left:hover .pde-carte__tooltip,
  .pde-carte__pin--flip-left:focus .pde-carte__tooltip,
  .pde-carte__pin--flip-left.is-open .pde-carte__tooltip {
    transform: translateX(-50%) translateY(-4px);
  }
  .pde-carte__tooltip img {
    height: 110px;
  }
  .pde-carte__tooltip-body strong { font-size: 15px; }
  .pde-carte__tooltip-body p { font-size: 13px; }
}
