.fiche-page {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
  padding: 42px 0 90px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: #155fa3;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.back-link:hover {
  opacity: 0.78;
}

.fiche-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: 18px 36px;
  align-items: center;
  padding: 38px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 20%, rgba(53, 162, 220, 0.18), transparent 34%),
    linear-gradient(135deg, #f3f9fd, #ffffff);
  box-shadow: 0 18px 44px rgba(8, 41, 70, 0.10);
}

.fiche-heading-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 0 0 16px;
}

.fiche-nouveaute .fiche-heading-row {
  position: absolute;
  top: 38px;
  left: 38px;
  z-index: 4;
  width: auto;
  max-width: calc(100% - 76px);
  margin: 0;
}

.fiche-nouveaute .fiche-hero-text {
  padding-top: 48px;
}

.fiche-label {
  display: inline-flex;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: #155fa3;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.fiche-label[hidden] {
  display: none !important;
}

.fiche-status-label {
  order: -1;
  background: #16a34a;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.20);
}

.fiche-status-label.is-quote {
  background: #facc15;
  color: #3b2f00;
  box-shadow: 0 8px 18px rgba(250, 204, 21, 0.28);
}

.fiche-status-label.is-sold {
  background: #e9168c;
  box-shadow: 0 8px 18px rgba(233, 22, 140, 0.22);
}

.fiche-hero-text h1 {
  margin: 0 0 14px;
  font-size: 56px;
  line-height: 1;
  letter-spacing: 0;
  color: #155fa3;
  text-wrap: balance;
}

.fiche-hero-text p {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: #27445c;
}

.fiche-gallery {
  min-width: 0;
  width: 100%;
  max-width: 520px;
  justify-self: center;
}

.fiche-main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(8, 41, 70, 0.16);
  transition: opacity 300ms ease, transform 300ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

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

.fiche-main-image.is-changing {
  opacity: 0.34;
  transform: scale(0.992);
}

@media (prefers-reduced-motion: reduce) {
  .fiche-main-image {
    transition: none;
  }
}

.fiche-thumbnail-carousel {
  --thumbnail-size: clamp(82px, 8vw, 96px);
  position: relative;
  margin-top: 16px;
}

.fiche-thumbnail-frame {
  position: absolute;
  top: calc(14px + (var(--thumbnail-size) / 2));
  left: 50%;
  z-index: 3;
  width: var(--thumbnail-size);
  height: var(--thumbnail-size);
  border: 0;
  border-radius: 12px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 3px #155fa3,
    0 0 0 7px rgba(255, 255, 255, 0.92),
    0 12px 26px rgba(21, 95, 163, 0.22);
}

.fiche-thumbnails {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px max(12px, calc(50% - (var(--thumbnail-size) / 2))) 16px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-padding-inline: max(12px, calc(50% - (var(--thumbnail-size) / 2)));
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(21, 95, 163, 0.42) transparent;
  scrollbar-width: thin;
  cursor: grab;
  user-select: none;
}

.fiche-thumbnails.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.fiche-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.fiche-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.fiche-thumbnails::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(21, 95, 163, 0.34);
}

.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;
}

.thumbnail-button {
  flex: 0 0 var(--thumbnail-size);
  width: var(--thumbnail-size);
  padding: 0;
  border: 0;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #eaf2f8;
  cursor: pointer;
  opacity: 0.66;
  scroll-snap-align: center;
  transform: scale(0.90);
  transform-origin: center;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
  user-select: none;
  -webkit-user-drag: none;
  appearance: none;
  -webkit-appearance: none;
}

.fiche-thumbnails.is-dragging .thumbnail-button {
  cursor: grabbing;
}

.thumbnail-button.is-active {
  opacity: 1;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(8, 41, 70, 0.14);
  transform: scale(1);
}

.thumbnail-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #ffffff;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.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;
}

.fiche-section {
  margin: 54px auto 0;
}

.fiche-section h2 {
  margin: 0 0 24px;
  color: #155fa3;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-intro,
.fiche-section p {
  max-width: 780px;
  margin: 0 0 24px;
  color: #27445c;
  font-size: 17px;
  line-height: 1.7;
}

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

.info-card {
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(21, 95, 163, 0.14);
  box-shadow: 0 10px 26px rgba(8, 41, 70, 0.07);
}

.info-card h3 {
  margin: 0 0 16px;
  color: #155fa3;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.8fr) minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px solid rgba(21, 95, 163, 0.10);
}

.info-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.info-row dt {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #66798d;
  font-size: 12px;
  font-weight: 800;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(45, 198, 255, 0.18), rgba(21, 95, 163, 0.10));
  color: #155fa3;
  box-shadow: inset 0 0 0 1px rgba(45, 198, 255, 0.22);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.info-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.info-row:hover .info-icon {
  background: linear-gradient(135deg, #155fa3, #2dc6ff);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(45, 198, 255, 0.32);
}

.info-label {
  display: inline-block;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.info-row dd {
  margin: 0;
  color: #102a43;
  font-size: 15px;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

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

.error-section {
  max-width: 720px;
  margin: 80px auto;
  text-align: center;
}

.error-section h1 {
  margin: 0 0 18px;
  color: #155fa3;
  font-size: 48px;
  line-height: 1.05;
}

.error-section p {
  margin: 0 auto 24px;
  color: #27445c;
  font-size: 17px;
  line-height: 1.7;
}

.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  background: #155fa3;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(21, 95, 163, 0.24);
}

.fiche-appointment-section {
  margin: 80px auto 0;
  padding: 54px 16px 18px;
  text-align: center;
}

.fiche-appointment-section h2 {
  margin: 0 0 16px;
  color: #155fa3;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .fiche-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .fiche-main-image {
    height: 340px;
  }

  .fiche-hero-text h1 {
    font-size: 44px;
  }

  .fiche-section h2 {
    font-size: 36px;
  }

  .fiche-appointment-section h2 {
    font-size: 30px;
  }

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .fiche-page {
    width: min(100% - 32px, 1120px);
    padding: 28px 0 62px;
  }

  .fiche-hero {
    gap: 22px;
    padding: 18px;
    border-radius: 18px;
  }

  .fiche-nouveaute .fiche-heading-row {
    top: 18px;
    left: 18px;
    max-width: calc(100% - 36px);
  }

  .fiche-nouveaute .fiche-hero-text {
    padding-top: 46px;
  }

  .fiche-hero-text h1 {
    font-size: 34px;
  }

  .fiche-main-image {
    height: 280px;
    max-height: none;
    border-radius: 14px;
    object-fit: cover;
  }

  .fiche-hero-text p {
    font-size: 15px;
    line-height: 1.6;
  }

  .fiche-thumbnail-carousel {
    --thumbnail-size: clamp(74px, 22vw, 84px);
    margin-top: 12px;
  }

  .fiche-thumbnail-frame {
    top: calc(12px + (var(--thumbnail-size) / 2));
    width: var(--thumbnail-size);
    height: var(--thumbnail-size);
    border-radius: 12px;
    box-shadow:
      0 0 0 2px #155fa3,
      0 0 0 5px rgba(255, 255, 255, 0.92),
      0 10px 20px rgba(21, 95, 163, 0.20);
  }

  .fiche-thumbnails {
    gap: 10px;
    padding: 12px max(10px, calc(50% - (var(--thumbnail-size) / 2))) 14px;
    scroll-padding-inline: max(10px, calc(50% - (var(--thumbnail-size) / 2)));
    scrollbar-width: none;
  }

  .fiche-thumbnails::-webkit-scrollbar {
    display: none;
  }

  .thumbnail-button {
    flex-basis: var(--thumbnail-size);
  }

  .thumbnail-button.is-active {
    box-shadow: 0 8px 18px rgba(8, 41, 70, 0.12);
  }

  .thumbnail-button img {
    height: 100%;
  }

  .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;
  }

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

  .info-card {
    padding: 14px;
  }

  .info-card h3 {
    margin-bottom: 12px;
    font-size: 17px;
  }

  .info-row {
    grid-template-columns: minmax(82px, 0.75fr) minmax(0, 1fr);
  }

  .info-row dd {
    font-size: 14px;
  }

  .fiche-section h2 {
    font-size: 30px;
  }

  .fiche-appointment-section {
    margin-top: 58px;
    padding: 38px 0 10px;
  }

  .fiche-appointment-section h2 {
    font-size: 27px;
  }

  .section-intro,
  .fiche-section p {
    font-size: 15px;
    line-height: 1.65;
  }
}

@media (max-width: 480px) {
  .fiche-page {
    width: min(100% - 24px, 1120px);
  }

  .fiche-hero {
    padding: 14px;
  }

  .fiche-nouveaute .fiche-heading-row {
    top: 14px;
    left: 14px;
    max-width: calc(100% - 28px);
  }

  .fiche-main-image {
    height: 240px;
  }

  .fiche-thumbnail-carousel {
    --thumbnail-size: 78px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-card {
    padding: 12px;
    border-radius: 13px;
  }

  .price-box strong {
    font-size: 26px;
  }

  .fiche-appointment-section h2 {
    font-size: 25px;
  }
}

/* --- Plan du Modèle / Emplacement ------------------------------------- */
.fiche-nouveaute .technical-image,
.fiche-modele .technical-image {
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: none;
}

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

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

/* Image cliquable (Plan du Modèle / Emplacement) — comportement partagé */
.parcel-map.is-clickable,
.technical-image.is-clickable {
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.parcel-map.is-clickable:hover,
.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,
.technical-image.is-clickable:focus-visible {
  outline: 3px solid #2dc6ff;
  outline-offset: 4px;
}
