/**
 * Naturabox — carte prestation (gabarit rdprestation prestationList/_partials/prestation-item-content.tpl).
 * Listes région / recherche, partenaires à proximité, prestations d'un coffret. Défilement : prestation-card.js.
 */
.prestation {
  margin-bottom: 1.75rem;
}

.nb-pcard {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--nb-ink);
}

/* ---------- Photo ---------- */
.nb-pcard__media {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--nb-soft);
  aspect-ratio: 4 / 3;
  isolation: isolate;
}

.nb-pcard__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.nb-pcard__track::-webkit-scrollbar {
  display: none;
}

.nb-pcard__slide {
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden; /* zoom au survol contenu dans la photo : sinon le bord de la photo suivante apparaît à droite */
  scroll-snap-align: start;
}

.nb-pcard__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

@media (hover: hover) {
  .nb-pcard:hover .nb-pcard__slide img {
    transform: scale(1.03);
  }
}

/* type (haut gauche) et prix du coffret (haut droite) : le bas reste aux points, même sur une carte étroite */
.nb-pcard__badge,
.nb-pcard__price {
  position: absolute;
  z-index: 2;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.2;
  pointer-events: none;
}

.nb-pcard__badge {
  top: .65rem;
  left: .65rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem .25rem .3rem;
  font-size: .8125rem;
  color: var(--nb-ink);
  background: rgba(255, 255, 255, .92);
}

.nb-pcard__badge img {
  width: 26px;
  height: 26px;
  padding: 2px;
  border-radius: 50%;
  background: #eef5f0;
}

.nb-pcard__price {
  top: .65rem;
  right: .65rem;
  color: #fff;
  background: var(--nb-green);
}

/* flèches : au survol (souris) ; toujours masquées au doigt, on glisse */
.nb-pcard__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--nb-ink);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .2s ease, background-color .2s ease;
  cursor: pointer;
}

.nb-pcard__nav .material-icons {
  font-size: 22px;
}

.nb-pcard__nav--prev {
  left: .5rem;
}

.nb-pcard__nav--next {
  right: .5rem;
}

.nb-pcard__nav:hover {
  background: #fff;
}

.nb-pcard__nav:focus-visible {
  opacity: 1;
  outline: 2px solid var(--nb-primary);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .nb-pcard__media:hover .nb-pcard__nav {
    opacity: 1;
  }
}

/* points : pastille translucide centrée en bas, point actif allongé */
.nb-pcard__dots {
  position: absolute;
  bottom: .7rem;
  left: 50%;
  z-index: 2;
  display: flex;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  transform: translateX(-50%);
  pointer-events: none;
}

.nb-pcard__dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  transition: width .25s ease, background-color .25s ease;
}

.nb-pcard__dots span.is-active {
  width: 16px;
  background: #fff;
}

/* ---------- Texte ---------- */
.nb-pcard__body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .2rem;
  padding: .65rem .15rem 0;
}

.nb-pcard__title {
  display: -webkit-box;
  margin: 0 !important; /* marge des h3 de la fiche prestation (legacy.css) neutralisée */
  overflow: hidden;
  font-family: var(--nb-font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.nb-pcard__title a {
  color: var(--nb-ink);
  text-decoration: none;
}

/* toute la zone texte mène à la prestation */
.nb-pcard__title a::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
}

.nb-pcard:hover .nb-pcard__title a {
  color: var(--nb-green);
}

.nb-pcard__title a:focus-visible {
  outline: 2px solid var(--nb-primary);
  outline-offset: 2px;
}

.nb-pcard__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .75rem;
  margin: 0;
  font-size: .8125rem;
  line-height: 1.3;
  color: var(--nb-muted);
}

.nb-pcard__meta span {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.nb-pcard__meta .material-icons {
  font-size: 16px;
  color: var(--nb-primary);
}

@media (max-width: 575.98px) {
  .nb-pcard__badge,
  .nb-pcard__price {
    top: .45rem;
    padding: .2rem .45rem;
    font-size: .6875rem;
  }

  .nb-pcard__badge {
    left: .45rem;
  }

  .nb-pcard__badge {
    padding: .2rem .5rem .2rem .2rem;
  }

  .nb-pcard__badge img {
    width: 20px;
    height: 20px;
    padding: 1px;
  }

  .nb-pcard__price {
    right: .45rem;
  }

  .nb-pcard__title {
    font-size: .9375rem;
  }

  .nb-pcard__meta {
    font-size: .75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nb-pcard__slide img,
  .nb-pcard__dots span {
    transition: none;
  }
}

/* « Voir sur la carte » (pages avec la carte des prestations seulement) */
.nb-pcard__locate {
  display: none;
}

html.nb-has-map .nb-pcard__locate {
  position: relative;
  z-index: 1; /* au-dessus du lien étiré du titre (même z-index, placé après lui), sous les barres collantes */
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: .3rem;
  margin-top: .45rem;
  padding: .3rem .7rem;
  border: 1px solid var(--nb-line);
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--nb-green-dark);
  background: #fff;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

html.nb-has-map .nb-pcard__locate:hover {
  border-color: var(--nb-primary);
  background: #eef5f0;
}

html.nb-has-map .nb-pcard__locate .material-icons {
  font-size: 17px;
  color: var(--nb-primary);
}

/* fiche d'une prestation sur la carte (Leaflet) : compacte, photo recadrée — une bulle plus haute que la carte mobile
   la faisait défiler et le repère, sorti de la vue, refermait la bulle */
#map-prestations .leaflet-popup-content-wrapper {
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 14px 34px -14px rgba(25, 45, 23, .45);
}

#map-prestations .leaflet-popup-content {
  width: 230px !important;
  margin: 0;
}

#map-prestations .content_iw .a-img {
  display: block;
}

#map-prestations .content_iw img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

#map-prestations .content_iw_text {
  padding: .6rem .8rem .75rem;
  font-size: .75rem;
  line-height: 1.45;
  color: var(--nb-muted);
}

#map-prestations .content_iw_text .prestation-link {
  display: block;
  margin-bottom: .2rem;
  font-size: .875rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--nb-title);
  text-decoration: none;
}

#map-prestations .leaflet-popup-close-button {
  top: 6px !important;
  right: 6px !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50%;
  font-size: 18px !important;
  line-height: 22px !important;
  color: var(--nb-ink) !important;
  background: rgba(255, 255, 255, .9);
}

#map-prestations .content_iw_text .prestation-link + br {
  display: none;
}
