/* ==========================================================
   PAGE APPARTEMENTS DISPONIBLES
========================================================== */

.lpl-disponibilites {
  max-width: 1180px;
  margin: 60px auto;
  padding: 0 24px;
}

.lpl-secteur-bloc {
  margin-bottom: 60px;
}

.lpl-secteur-title {
  max-width: 1180px;
  margin: 0 auto 24px;
  font-size: 38px;
  color: #10213f;
  border-bottom: 3px solid #2d6dcc;
  padding-bottom: 12px;
}

/* Bloc immeuble */
.lpl-immeuble-bloc {
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 34px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  overflow: hidden;
}

.lpl-immeuble-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 35px;
}

.lpl-immeuble-hero img {
  width: 100%;
  height: 550px;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.lpl-immeuble-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 40px;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.55),
    rgba(0,0,0,.15),
    rgba(0,0,0,0)
  );
}

.lpl-immeuble-overlay h2 {
  color: #fff;
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
}

.lpl-immeuble-overlay .lpl-immeuble-secteur {
  color: #fff;
  margin-top: 10px;
  font-size: 18px;
  opacity: .9;
}

.lpl-immeuble-link {
  background: #2d67d3;
  color: #fff !important;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: .2s;
  white-space: nowrap;
}

.lpl-immeuble-link:hover {
  background: #1d56c1;
  color: #fff !important;
}

/* Logements */
.lpl-logements-liste {
  display: grid;
  gap: 14px;
  padding: 0 0 10px;
}

.lpl-logement-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  background: #f6f8fb;
  border-radius: 12px;
  border: 1px solid #edf0f5;
  margin-bottom: 14px;
}

.lpl-logement-row h3 {
  font-size: 20px;
  margin: 0 0 8px;
  color: #26364f;
}

.lpl-logement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lpl-logement-meta span {
  background: #fff;
  color: #5d6978;
  padding: 6px 10px;
  border-radius: 30px;
  font-size: 14px;
}

.lpl-logement-prix {
  font-size: 22px;
  font-weight: 700;
  color: #2d6dcc;
  white-space: nowrap;
}

.lpl-appartement-btn {
  background: #2d6dcc;
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s ease;
}

.lpl-appartement-btn:hover {
  background: #174a9c;
}

/* Ancienne grille test — à garder seulement si encore utilisée */
.lpl-appartements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 40px 0;
}

.lpl-appartement-card {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.lpl-appartement-image img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.lpl-appartement-content {
  padding: 24px;
}

.lpl-appartement-prix {
  color: #2d6dcc;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.lpl-appartement-card h3 {
  font-size: 21px;
  line-height: 1.3;
  margin-bottom: 16px;
}

.lpl-appartement-infos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.lpl-appartement-infos span {
  background: #f3f6fb;
  padding: 6px 10px;
  border-radius: 30px;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 980px) {
  .lpl-appartements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .lpl-logement-row {
    grid-template-columns: 1fr;
  }

  .lpl-logement-prix {
    margin-top: 8px;
  }
}

@media (max-width: 767px) {
  .lpl-immeuble-hero img {
    height: 240px;
  }

  .lpl-immeuble-overlay {
    padding: 20px;
    align-items: flex-end;
    flex-direction: column;
    justify-content: flex-end;
  }

  .lpl-immeuble-overlay > div {
    width: 100%;
  }

  .lpl-immeuble-overlay h2 {
    font-size: 28px;
    line-height: 1.1;
    margin-bottom: 8px;
  }

  .lpl-immeuble-overlay .lpl-immeuble-secteur {
    font-size: 15px;
    margin-bottom: 15px;
  }

  .lpl-immeuble-overlay .lpl-immeuble-link {
    align-self: flex-start;
    padding: 10px 18px;
    font-size: 14px;
  }

  .lpl-logement-prix {
    font-size: 28px;
  }

  .lpl-appartement-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .lpl-appartements-grid {
    grid-template-columns: 1fr;
  }
}



.lpl-app-card-premium-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.lpl-app-card-premium-request {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 999px;
  background: #1f5fbf;
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
}

.lpl-app-card-premium-request:hover {
  background: #12376f;
}

.lpl-single-appartement {
  background: #f5f7fb;
  padding: 70px 0;
}

.lpl-appartement-hero-inner {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 30px;
  width: 90%;
  max-width: 1320px;
  margin: 0 auto;
}

.lpl-appartement-main,
.lpl-appartement-summary {
  background: #fff;
  border-radius: 28px;
  padding: 50px;
  box-shadow: 0 24px 70px rgba(13, 27, 53, .10);
}

.lpl-appartement-main h1 {
  color: #0d1b35;
  font-size: clamp(38px, 4vw, 62px);
  line-height: 1.05;
  font-weight: 900;
}

.lpl-appartement-location {
  color: #5f6b7a;
  font-size: 18px;
  margin-bottom: 26px;
}

.lpl-appartement-price {
  color: #1f5fbf;
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 30px;
}

.lpl-appartement-price span {
  color: #5f6b7a;
  font-size: 16px;
}

.lpl-appartement-summary {
  display: grid;
  gap: 18px;
}

.lpl-appartement-summary div {
  padding-bottom: 18px;
  border-bottom: 1px solid #e5eaf3;
}

.lpl-appartement-summary span {
  display: block;
  color: #5f6b7a;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.lpl-appartement-summary strong {
  display: block;
  color: #0d1b35;
  font-size: 22px;
  margin-top: 4px;
}

@media (max-width: 980px) {
  .lpl-appartement-hero-inner {
    grid-template-columns: 1fr;
  }

  .lpl-appartement-main,
  .lpl-appartement-summary {
    padding: 32px;
  }
}


.lpl-immeuble-hero,
.lpl-immeuble-overlay {
  position: relative;
}

.lpl-immeuble-overlay {
  pointer-events: none;
}

.lpl-immeuble-link {
  pointer-events: auto;
  position: relative;
  z-index: 20;
}

.lpl-appartement-content-wrap {
  width: 90%;
  max-width: 1320px;
  margin: 34px auto 0;
}

.lpl-appartement-gallery-wrap {
  background: #fff;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(13, 27, 53, .08);
  margin-bottom: 34px;
}

.lpl-appartement-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.lpl-appartement-description,
.lpl-appartement-contact-card {
  background: #fff;
  border-radius: 28px;
  padding: 42px;
  box-shadow: 0 18px 50px rgba(13, 27, 53, .08);
}

.lpl-appartement-description h2,
.lpl-appartement-contact-card h3 {
  color: #0d1b35;
  margin-bottom: 18px;
}

.lpl-appartement-description p,
.lpl-appartement-description li,
.lpl-appartement-contact-card p {
  color: #4d5b6f;
  font-size: 16px;
  line-height: 1.75;
}

.lpl-appartement-description ul {
  padding-left: 22px;
  margin-bottom: 24px;
}

.lpl-single-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1f5fbf;
  color: #fff !important;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(31, 95, 191, .22);
}

.lpl-single-btn:hover {
  background: #12376f;
  color: #fff !important;
}

.lpl-single-btn-full {
  width: 100%;
  text-align: center;
}

.lpl-single-eyebrow {
  color: #1f5fbf;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

@media (max-width: 980px) {
  .lpl-appartement-body-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {

    .lpl-single-appartement {
        padding: 25px 0 !important;
    }

    .lpl-appartement-hero-inner,
    .lpl-appartement-content,
    .lpl-appartement-gallery,
    .lpl-appartement-details {
        width: calc(100% - 36px) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .lpl-appartement-main,
    .lpl-appartement-summary,
    .lpl-appartement-description,
    .lpl-appartement-gallery {
        padding: 24px !important;
        border-radius: 22px;
    }
}

/* ==========================================
   FICHE APPARTEMENT — CORRECTION MOBILE
========================================== */

@media only screen and (max-width: 767px) {

  /* Rangée Divi qui contient le shortcode */
  body.single-appartement .et-l--body .et_pb_row,
  body.single-appartement .et_builder_inner_content > .et_pb_section > .et_pb_row {
    width: 100% !important;
    max-width: none !important;
  }

  /* Fond général de la fiche */
  body.single-appartement .lpl-single-appartement {
    padding: 24px 0 45px !important;
  }

  /* Conteneurs principaux : environ 18 px de marge */
  body.single-appartement .lpl-appartement-hero-inner,
  body.single-appartement .lpl-appartement-content-wrap {
    width: calc(100% - 36px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Cartes blanches */
  body.single-appartement .lpl-appartement-main,
  body.single-appartement .lpl-appartement-summary,
  body.single-appartement .lpl-appartement-gallery-wrap,
  body.single-appartement .lpl-appartement-description,
  body.single-appartement .lpl-appartement-contact-card {
    padding: 24px !important;
    border-radius: 22px !important;
  }

  /* Éviter une marge supplémentaire dans la galerie */
  body.single-appartement .ls-custom-gallery {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ==========================================================
   PAGE APPARTEMENTS DISPONIBLES — LARGEUR MOBILE
========================================================== */

@media only screen and (max-width: 767px) {

  /* La rangée Divi ne doit pas réduire une première fois le contenu */
  body .lpl-disponibilites-row {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Environ 18 px de marge réelle de chaque côté */
  body .lpl-disponibilites-row .lpl-disponibilites {
    width: calc(100% - 36px) !important;
    max-width: none !important;
    margin: 30px auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Le bloc du secteur prend toute la largeur disponible */
  body .lpl-disponibilites-row .lpl-secteur-bloc,
  body .lpl-disponibilites-row .lpl-immeuble-bloc {
    width: 100% !important;
    max-width: none !important;
  }

  body .lpl-disponibilites-row .lpl-immeuble-bloc {
    padding: 16px !important;
    border-radius: 18px !important;
  }

  /* Titre du secteur */
  body .lpl-disponibilites-row .lpl-secteur-title {
    width: 100% !important;
    max-width: none !important;
    font-size: 34px !important;
    line-height: 1.15 !important;
    margin-bottom: 22px !important;
  }
}

/* ==========================================
   Carte contact - fiche appartement
========================================== */

.lpl-appartement-contact-card .lpl-single-btn {
  margin-top: 8px !important;
  margin-bottom: 24px !important;
}

.lpl-appartement-contact-card .lpl-contact-mini-info {
  padding-top: 12px;
  border-top: 1px solid #e7ebf2;
  margin-top: 12px;
}

.lpl-appartement-contact-card .lpl-contact-mini-info:first-of-type {
  margin-top: 0;
}

.lpl-appartement-contact-card .lpl-contact-mini-info span {
  display: block;
  color: #7b8798;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 3px;
}

.lpl-appartement-contact-card .lpl-contact-mini-info strong {
  display: block;
  color: #0d1b35;
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 767px) {
  .lpl-appartement-contact-card .lpl-single-btn {
    margin-bottom: 26px !important;
  }

  .lpl-appartement-contact-card {
    padding: 24px !important;
  }
}

/* ==========================================================
   GALERIE — FICHE APPARTEMENT
========================================================== */

.lpl-appartement-gallery-wrap .ls-custom-gallery {
  width: 100%;
  margin: 0;
}

.lpl-appartement-gallery-wrap .ls-main-photo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #e9eef6;
}

.lpl-appartement-gallery-wrap .ls-main-gallery-image {
  display: block;
  width: 100%;
  height: 600px;
  object-fit: cover;
  object-position: center;
}

/* Flèches de navigation */

.lpl-appartement-gallery-wrap .ls-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(13, 27, 53, 0.72);
  color: #ffffff;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.lpl-appartement-gallery-wrap .ls-gallery-nav:hover {
  background: rgba(13, 27, 53, 0.92);
}

.lpl-appartement-gallery-wrap .ls-prev {
  left: 20px;
}

.lpl-appartement-gallery-wrap .ls-next {
  right: 20px;
}

/* Compteur */

.lpl-appartement-gallery-wrap .ls-gallery-count {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(13, 27, 53, 0.75);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

/* Miniatures */

.lpl-appartement-gallery-wrap .ls-gallery-thumbs {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px;
  margin-top: 12px;
}

.lpl-appartement-gallery-wrap .ls-gallery-thumbs img {
  display: block;
  width: 100% !important;
  height: 95px !important;
  margin: 0 !important;
  object-fit: cover;
  border: 3px solid transparent;
  border-radius: 10px;
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.lpl-appartement-gallery-wrap .ls-gallery-thumbs img:hover,
.lpl-appartement-gallery-wrap .ls-gallery-thumbs img.is-active {
  opacity: 1;
  border-color: #1f5fbf;
}

/* Tablette */

@media (max-width: 980px) {
  .lpl-appartement-gallery-wrap .ls-main-gallery-image {
    height: 450px;
  }

  .lpl-appartement-gallery-wrap .ls-gallery-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Mobile */

@media (max-width: 767px) {
  .lpl-appartement-gallery-wrap {
    padding: 14px !important;
  }

  .lpl-appartement-gallery-wrap .ls-main-gallery-image {
    height: 300px;
  }

  .lpl-appartement-gallery-wrap .ls-gallery-nav {
    width: 42px;
    height: 42px;
    font-size: 30px;
  }

  .lpl-appartement-gallery-wrap .ls-prev {
    left: 10px;
  }

  .lpl-appartement-gallery-wrap .ls-next {
    right: 10px;
  }

  .lpl-appartement-gallery-wrap .ls-gallery-count {
    right: 10px;
    bottom: 10px;
  }

  .lpl-appartement-gallery-wrap .ls-gallery-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  .lpl-appartement-gallery-wrap .ls-gallery-thumbs img {
    height: 72px !important;
    border-radius: 7px;
  }
}