/* =========================================================
   DIMDAM TRAVAUX — PAGE RÉALISATIONS
   Ordre d'affichage : titre → structure des projets →
   gabarits 1 à 7 (ordre de la page) → appel à l'action →
   popups
========================================================= */

/* =========================================================
   TITRE DE PAGE
========================================================= */

.real-page-title {
  padding: calc(var(--header-height) + clamp(2rem, 5vw, 3.5rem)) var(--gutter) 3rem;
  background: var(--white);
  text-align: center;
}

.real-page-title h1 {
  font-size: clamp(2.6rem, 1rem + 8vw, 7rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--purple);
}

.real-page-title h1 span {
  font-style: italic;
  color: var(--orange);
}

.real-page-title p {
  max-width: 650px;
  margin: 1.2rem auto 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
}

/* =========================================================
   STRUCTURE COMMUNE D'UN PROJET
========================================================= */

.real-project {
  position: relative;
  padding: clamp(4.5rem, 3rem + 5vw, 8rem) var(--gutter) clamp(4rem, 3rem + 4vw, 7rem);
  background: var(--cream);
}

.real-container {
  width: min(1250px, 100%);
  margin: 0 auto;
}

/* Filet violet + numéro du projet */
.real-project-separator {
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: calc(var(--gutter) * 1.5);
  height: 5px;
  border-radius: 10px;
  background: var(--purple);
}

.real-project-separator span {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 0.6rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--purple);
}

.real-project-head {
  margin-bottom: 2.5rem;
}

.real-title {
  max-width: 800px;
  margin-top: 0.7rem;
  font-size: clamp(1.7rem, 1rem + 3vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: var(--purple);
}

.real-title span {
  color: var(--orange);
}

.real-description {
  max-width: 720px;
  margin-top: 1rem;
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--muted);
}

.real-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.2rem 0;
}

/* Photos cliquables + étiquette générée en JS */
.real-photo {
  position: relative;
}

.real-photo img {
  cursor: zoom-in;
}

.real-photo-label {
  position: absolute;
  z-index: 5;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 3px;
  background: var(--purple);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

.real-photo-label.after,
.real-lightbox-label.after {
  background: var(--orange);
  color: var(--purple);
}

.real-photo-label.pending,
.real-lightbox-label.pending {
  background: #C6B6E8;
  color: var(--purple);
}

@media (max-width: 600px) {
  .real-project-separator span {
    font-size: 0.54rem;
  }
}

/* =========================================================
   GABARIT 1 — CURSEUR AVANT / APRÈS
   (styles du curseur dans base.css → .ba-slider)
========================================================= */

/* =========================================================
   GABARIT 2 — BANDEAU PANORAMIQUE
========================================================= */

.real-banner {
  position: relative;
  height: clamp(320px, 45vw, 600px);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 25px 55px rgba(43, 19, 64, 0.13);
}

.real-banner > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.real-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43, 19, 64, 0) 35%, rgba(43, 19, 64, 0.8) 100%);
  pointer-events: none;
}

.real-banner-content {
  position: absolute;
  z-index: 2;
  left: clamp(1.2rem, 5vw, 4rem);
  right: calc(130px + 3rem); /* laisse la place à la vignette */
  bottom: clamp(1.2rem, 3vw, 2.5rem);
  pointer-events: none;
}

.real-banner-content .kicker {
  color: var(--cream);
}

.real-banner-title {
  max-width: 800px;
  font-size: clamp(1.4rem, 0.8rem + 3vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: var(--white);
}

.real-banner-title span {
  color: var(--orange);
}

.real-banner-compare {
  position: absolute;
  z-index: 3;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 130px;
  height: 90px;
  padding: 0;
  border: 3px solid var(--white);
  border-radius: 8px;
  overflow: hidden;
  background: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.25s;
}

.real-banner-compare:hover {
  transform: scale(1.06);
}

.real-banner-compare img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.real-banner-compare-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  background: var(--purple);
  color: var(--cream);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.real-banner + .real-description {
  margin-top: 2rem;
}

@media (max-width: 600px) {
  /* Vignette remontée en haut à droite pour libérer le titre */
  .real-banner-compare {
    top: 1rem;
    right: 1rem;
    bottom: auto;
    width: 96px;
    height: 68px;
  }

  .real-banner-content {
    right: clamp(1.2rem, 5vw, 4rem);
  }
}

/* =========================================================
   GABARIT 3 — IMAGE + TEXTE
========================================================= */

.real-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem;
}

.real-feature-image {
  height: 680px;
  border-radius: 10px;
  overflow: hidden;
}

.real-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.real-feature-image:hover img {
  transform: scale(1.025);
}

.real-feature-content {
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 10px;
  background: var(--white);
}

@media (max-width: 1000px) {
  .real-feature {
    grid-template-columns: 1fr;
  }

  .real-feature-image {
    height: clamp(360px, 90vw, 560px);
  }
}

/* =========================================================
   GABARITS 4 & 6 — PHOTOS CÔTE À CÔTE (duo / trio)
========================================================= */

.real-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.real-trio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.real-duo-item {
  height: clamp(260px, 42vw, 600px);
  border-radius: 10px;
  overflow: hidden;
}

.real-duo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

  .real-trio .real-duo-item:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .real-duo,
  .real-trio {
    grid-template-columns: 1fr;
  }

  .real-duo-item {
    height: clamp(260px, 90vw, 440px);
  }
}

/* =========================================================
   GABARIT 5 — GALERIE MULTI-PHOTOS
========================================================= */

.real-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

.real-gallery-item {
  height: clamp(220px, 25vw, 320px);
  border-radius: 10px;
  overflow: hidden;
}

.real-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.real-gallery-item:hover img {
  transform: scale(1.04);
}

/* =========================================================
   GABARIT 7 — MOSAÏQUE (1 grande + 4 petites)
========================================================= */

.real-mosaic {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1rem;
}

.real-mosaic-main {
  height: 620px;
  border-radius: 10px;
  overflow: hidden;
}

.real-mosaic-main img,
.real-mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.real-mosaic-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.real-mosaic-item {
  min-height: 180px;
  border-radius: 10px;
  overflow: hidden;
}

.real-mosaic-item img {
  transition: transform 0.5s;
}

.real-mosaic-item:hover img {
  transform: scale(1.04);
}

@media (max-width: 1000px) {
  .real-mosaic {
    grid-template-columns: 1fr;
  }

  .real-mosaic-main {
    height: clamp(300px, 60vw, 500px);
  }

  .real-mosaic-item {
    height: clamp(160px, 30vw, 300px);
  }
}

@media (max-width: 600px) {
  .real-mosaic-side {
    gap: 0.6rem;
  }
}

/* Lien vers la page du service concerné */
.real-link {
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
}

.real-link:hover {
  text-decoration: underline;
}

/* =========================================================
   APPEL À L'ACTION
========================================================= */

.real-cta {
  padding: clamp(5rem, 3rem + 6vw, 9rem) var(--gutter);
  border-top: 5px solid var(--purple);
  background: var(--cream);
  text-align: center;
}

.real-cta h2 {
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(2rem, 1rem + 4vw, 5rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--purple);
}

.real-cta h2 span {
  color: var(--orange);
}

.real-cta p:not(.kicker) {
  max-width: 600px;
  margin: 1.5rem auto 2rem;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--muted);
}

/* =========================================================
   POPUPS : LIGHTBOX PHOTO + COMPARAISON
========================================================= */

.real-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(0.8rem, 3vw, 3rem);
  background: rgba(20, 12, 25, 0.93);
  cursor: pointer;
}

.real-lightbox.active {
  display: flex;
}

.real-lightbox-box {
  max-width: 94vw;
  max-height: 90vh;
  max-height: 90dvh;
  padding: 4px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.real-lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream);
}

.real-lightbox-image {
  max-width: calc(94vw - 8px);
  max-height: calc(80vh - 65px);
  max-height: calc(80dvh - 65px);
  object-fit: contain;
  background: #111;
}

.real-lightbox-info {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--cream);
}

.real-lightbox-title {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--purple);
}

.real-lightbox-label {
  flex-shrink: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 3px;
  background: var(--purple);
  color: var(--cream);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.real-lightbox-close {
  position: fixed;
  z-index: 2002;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(43, 19, 64, 0.75);
  color: rgba(255, 255, 255, 0.9);
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.real-lightbox-close:hover {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--purple);
}

/* Popup comparaison : le curseur occupe toute la largeur de la boîte */
.real-lightbox-compare-box {
  width: min(900px, 94vw);
}

.real-lightbox-compare-box .real-lightbox-content {
  align-items: stretch;
}

.real-compare-slider {
  --ba-height: clamp(260px, 55vh, 520px);
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 600px) {
  .real-lightbox-box {
    max-width: 96vw;
    padding: 3px;
    border-radius: 11px;
  }

  .real-lightbox-content {
    border-radius: 8px;
  }

  .real-lightbox-image {
    max-width: calc(96vw - 6px);
  }

  .real-lightbox-info {
    padding: 0.65rem 0.7rem;
  }

  .real-lightbox-title {
    font-size: 0.65rem;
  }

  .real-lightbox-label {
    font-size: 0.52rem;
  }

  .real-lightbox-close {
    top: 8px;
    right: 8px;
  }
}
