@import url("./fiche-nouveaute.css");

/* FICHE OPPORTUNITÉ */

.fiche-opportunite .fiche-hero {
  background:
    radial-gradient(circle at 82% 18%, rgba(53, 162, 220, 0.18), transparent 34%),
    linear-gradient(135deg, #f3f9fd, #ffffff);
}

.fiche-opportunite .fiche-gallery {
  background: transparent;
}

.fiche-opportunite .fiche-main-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 18px;
  background: transparent;
  box-shadow: 0 14px 34px rgba(8, 41, 70, 0.16);
}

.fiche-opportunite .fiche-main-image.is-tall-format {
  width: auto;
  max-width: 100%;
  max-height: min(420px, 68vh);
  margin-inline: auto;
}

.fiche-opportunite .fiche-main-image.is-clickable {
  cursor: zoom-in;
}

.fiche-opportunite .fiche-exceptional-parcel-label {
  gap: 7px;
  padding: 8px 14px 8px 9px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%);
  color: #3b2500;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.30);
}

.fiche-opportunite .fiche-exceptional-parcel-label::before {
  content: "★";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  color: #d97706;
  font-size: 12px;
  line-height: 1;
}

.no-scroll {
  overflow: hidden;
}

.gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 22, 38, 0.86);
}

.gallery-viewer[hidden] {
  display: none !important;
}

.gallery-viewer-image {
  display: block;
  max-width: min(100%, 1180px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.gallery-viewer-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100000;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #155fa3;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.gallery-viewer-nav {
  position: fixed;
  top: 50%;
  z-index: 100000;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #155fa3;
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.gallery-viewer-prev {
  left: 18px;
}

.gallery-viewer-next {
  right: 18px;
}

/* Mode "image seule" (utilisé pour le plan / l'emplacement) :
   on masque les flèches puisqu'il n'y a rien à parcourir. */
.gallery-viewer.is-single .gallery-viewer-nav {
  display: none;
}

.parcel-map.is-clickable,
.fiche-opportunite .technical-image.is-clickable {
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.parcel-map.is-clickable:hover,
.fiche-opportunite .technical-image.is-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(8, 41, 70, 0.14);
}

.parcel-map.is-clickable:focus-visible,
.fiche-opportunite .technical-image.is-clickable:focus-visible {
  outline: 3px solid #2dc6ff;
  outline-offset: 4px;
}


.fiche-opportunite .thumbnail-button {
  aspect-ratio: 1 / 1;
  background: #eaf2f8;
  box-shadow: 0 8px 18px rgba(8, 41, 70, 0.10);
}

.fiche-opportunite .thumbnail-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #eaf2f8;
}

.price-box {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  margin: 4px 0 18px;
  padding: 11px 16px 12px;
  border: 1px solid rgba(21, 95, 163, 0.16);
  border-left: 5px solid #155fa3;
  border-radius: 14px;
  background: linear-gradient(135deg, #f4f9fd 0%, #ffffff 100%);
  color: #102a43;
  text-align: left;
  box-shadow: 0 10px 22px rgba(8, 41, 70, 0.08);
}

.price-box.has-discount {
  border-color: rgba(213, 37, 133, 0.2);
  border-left-color: #d52585;
  background: linear-gradient(135deg, #fff2f8 0%, #ffffff 100%);
}

.price-box[hidden] {
  display: none !important;
}

.price-box span {
  color: #155fa3;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.price-box strong {
  color: #102a43;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.price-box strong.is-crossed-price {
  color: rgba(16, 42, 67, 0.55);
  font-size: 20px;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.price-discount-offer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid rgba(213, 37, 133, 0.18);
  border-radius: 10px;
  background: rgba(255, 240, 248, 0.96);
}

.price-discount-label {
  color: #d52585 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  text-transform: uppercase;
}

.price-discount-price {
  color: #b7196d !important;
  font-size: 28px !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

.price-discount-until {
  color: #783253 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  text-transform: none !important;
}

.main-image-wrapper {
  position: relative;
  width: 100%;
}

.sold-banner {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #e9168c;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  box-shadow: 0 8px 18px rgba(233, 22, 140, 0.28);
  pointer-events: none;
}

.sold-banner[hidden] {
  display: none !important;
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.equipment-item {
  color: #102a43;
}

.parcel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.parcel-heading h2 {
  margin-bottom: 12px;
}

.parcel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 54px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #155fa3;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(21, 95, 163, 0.24);
  white-space: nowrap;
}

.parcel-map {
  margin-top: 0;
  background: transparent !important;
  box-shadow: none;
}

.technical-image {
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: none;
}

@media (max-width: 900px) {
  .equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .price-box {
    width: fit-content;
    max-width: 100%;
  }

  .fiche-opportunite .fiche-main-image {
    border-radius: 14px;
  }

  .equipment-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .equipment-item {
    padding: 14px;
    border-radius: 13px;
  }

  .parcel-heading {
    flex-direction: column;
    gap: 12px;
  }

  .parcel-badge {
    width: 100%;
  }

  .sold-banner {
    top: 12px;
    left: 12px;
    padding: 7px 11px;
    font-size: 10px;
  }

  .gallery-viewer {
    padding: 12px;
  }

  .gallery-viewer-image {
    max-height: 84vh;
    border-radius: 10px;
  }

  .gallery-viewer-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .gallery-viewer-nav {
    width: 40px;
    height: 40px;
    font-size: 34px;
  }

  .gallery-viewer-prev {
    left: 10px;
  }

  .gallery-viewer-next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .price-box strong {
    font-size: 26px;
  }
}
