/*
 Theme Name: Divi Child
 Theme URI:  https://example.com/
 Description: Thème enfant pour Divi (customisations CSS/JS/PHP).
 Author:      Votre Nom
 Author URI:  https://example.com/
 Template:    Divi
 Version:     1.0.0
 Text Domain: divi-child
 License:     GNU General Public License v2 or later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* =========================================================
   GLOBAL
========================================================= */

/* Smooth scroll */
html{
  scroll-behavior: smooth;
}

/* Compense le header sticky (ancre #decouvrir) */
#decouvrir{
  scroll-margin-top: 90px;
}


/* =========================================================
   BACKGROUND
   - fond global
   - règles spécifiques single-logement
========================================================= */

/* Fond global */
body{
  background: #FFF3F4 !important;
}

/* Single logement : assure le fond sur les wrappers Divi */
body.single-logement #page-container,
body.single-logement #main-content{
  background: #FFF3F4 !important;
}

/* Single logement : sections du Theme Builder transparentes (laisse voir le body) */
body.single-logement .et-l--body .et_pb_section{
  background: transparent !important;
}


/* =========================================================
   STICKY FOOTER (pages courtes) — Divi 5 (#et-boc)
   + Fix scroll vertical (WP admin bar)
   + Fix scroll horizontal (header sticky Divi largeur inline)
========================================================= */

html,
body{
  height: 100%;
}

/* Empêche le scroll horizontal causé par la section sticky (width inline trop grande) */
body{
  overflow-x: hidden;
}

#et-boc .et_pb_section.et_pb_sticky{
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* Layout colonne global */
#page-container{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Wrapper Divi qui contient header + main + footer */
#et-boc{
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Le main prend l'espace et pousse le footer en bas */
#et-main-area{
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#main-content{
  flex: 1 0 auto;
  min-height: 0;
}

/* =========================================
   FIX MENU MOBILE AU-DESSUS DU FOOTER
========================================= */
@media (max-width: 980px){
  .et-l--header{
    position: relative;
    z-index: 999999 !important;
  }

  .et_mobile_menu{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important; /* ou 80px si tu veux sous le header */
    max-height: 100vh !important;
    overflow-y: auto !important;
    z-index: 9999999 !important;
    background: #fff !important;
  }

  .et-l--footer, #main-footer{
    position: relative;
    z-index: 1 !important;
  }
}

/* Footer Theme Builder collé en bas sur pages courtes */
.et-l--footer{
  margin-top: auto !important;
}

/* =========================================
   BREADCRUMB
========================================= */
.lod-breadcrumb {
  color: #6B7280;
  font-size: 13px;
  line-height: 1.4;
}

.lod-breadcrumb a {
  color: #6B7280;
  text-decoration: none;
}

.lod-breadcrumb a:hover {
  color: #0F172A;
}

/* =========================================
   MINI MAP (Leaflet) – Pack Final
========================================= */
.mini-map-wrap{
  position: relative !important;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.10);
}

/* Hauteur de la map */
.mini-map{
  height: 200px;
}

/* Petit voile pour l’effet “maquette” (sans tuer les couleurs) */
.mini-map-wrap::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.12));
  pointer-events:none;
  z-index: 2;
}

/* CTA dans la carte (plus lisible) */
.mini-map-cta{
  position: absolute !important;
  left: 14px;
  top: 14px;
  z-index: 50;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 16px;
  border-radius: 999px;

  background: rgba(255,107,107,.24);
  border: 1px solid rgba(255,107,107,.55);
  color: #ff6b6b;

  font-weight: 700;
  font-size: 14px;
  text-decoration: none;

  margin: 0 !important;
  line-height: 1 !important;

  box-shadow: 0 10px 25px rgba(255,107,107,.18);
}

.mini-map-cta:hover{
  background: rgba(255,107,107,.32);
}

/* S’assurer que le bouton passe au-dessus des calques Leaflet */
.mini-map-wrap .leaflet-pane,
.mini-map-wrap .leaflet-control-container{
  z-index: 1;
}

/* Attribution plus discrète (optionnel) */
.mini-map-wrap .leaflet-control-attribution{
  background: rgba(255,255,255,.65);
  border-radius: 10px;
  padding: 2px 8px;
  margin: 0 10px 10px 0;
}

/* Pin custom (plus visible) */
.mini-pin span{
  display:block;
  width: 16px;
  height: 16px;
  border-radius: 999px;

  background: #ff6b6b;
  border: 3px solid #ffffff;

  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  position: relative;
}

/* Pointe du pin */
.mini-pin span::after{
  content:"";
  position:absolute;
  left:50%;
  top: 13px;
  transform: translateX(-50%) rotate(45deg);

  width: 10px;
  height: 10px;
  background: #ff6b6b;
  border-radius: 2px;
}

/* =========================================
   PILLS (META)
========================================= */
.lod-pills{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
}

.lod-pill{
  display:inline-flex;
  align-items:center;
  padding:8px 10px;
  border:1px solid #E9EAF0;
  border-radius:12px;
  background: rgba(255, 255, 255, .55);
  color:#6B7280;
  font-size:14px;
  line-height:1;
  font-weight:500;
}

/* Divi injecte parfois des <br> dans le module texte */
.lod-pill br{ display:none !important; }

/* Icône (prend la couleur du texte = currentColor) */
.lod-pill__icon{
  width:16px;
  height:16px;
  display:inline-block;
  margin-right: 6px;
  background-color: currentColor;

  -webkit-mask-repeat:no-repeat;
  -webkit-mask-position:center;
  -webkit-mask-size:contain;

  mask-repeat:no-repeat;
  mask-position:center;
  mask-size:contain;

  opacity:.9;
}

/* Icône “chambres” = home */
.lod-pill__icon[data-ico="room"]{
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 10.5V20a1 1 0 0 0 1 1h4v-6h6v6h4a1 1 0 0 0 1-1v-9.5a1 1 0 0 0-.34-.75l-7-6a1 1 0 0 0-1.32 0l-7 6A1 1 0 0 0 4 10.5Zm8-5.2 6 5.15V19h-2v-6H8v6H6v-8.55l6-5.15Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 10.5V20a1 1 0 0 0 1 1h4v-6h6v6h4a1 1 0 0 0 1-1v-9.5a1 1 0 0 0-.34-.75l-7-6a1 1 0 0 0-1.32 0l-7 6A1 1 0 0 0 4 10.5Zm8-5.2 6 5.15V19h-2v-6H8v6H6v-8.55l6-5.15Z'/%3E%3C/svg%3E");
}

/* Icône “lits” = bed */
.lod-pill__icon[data-ico="bed"]{
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 11V7a2 2 0 0 1 2-2h4a3 3 0 0 1 3 3v3h7a2 2 0 0 1 2 2v5h-2v-2H4v2H2v-7a2 2 0 0 1 2-2Zm2-4v4h5V8a1 1 0 0 0-1-1H6Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 11V7a2 2 0 0 1 2-2h4a3 3 0 0 1 3 3v3h7a2 2 0 0 1 2 2v5h-2v-2H4v2H2v-7a2 2 0 0 1 2-2Zm2-4v4h5V8a1 1 0 0 0-1-1H6Z'/%3E%3C/svg%3E");
}

/* =========================================
   CARDS
========================================= */
.lod-card{
  background: linear-gradient(
    180deg,
    rgba(255, 90, 95, 0.10) 0%,
    rgba(255, 90, 95, 0.06) 100%
  ) !important;

  border: 1px solid rgba(255, 90, 95, 0.18) !important;

  border-radius: 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  overflow: hidden;

  padding: 26px;
}

/* Hero / galerie full-bleed (photo à la une) : pas de padding */
.lod-card--flush{
  padding: 0 !important;
}

.lod-hero{ position:relative; overflow:hidden; }

.lod-photos-more{
  position:absolute;
  right:16px;
  bottom:16px;

  display:inline-flex;
  align-items:center;

  padding:10px 14px;
  border-radius:999px;

  /* ✅ fond plus lisible sur image */
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(8px);

  color:#ff6b6b;
  text-decoration:none;
  font-weight:700;
  font-size:14px;
  line-height:1;

  border: 1.5px solid rgba(255,107,107,.55);

  /* ✅ ombre un peu plus présente */
  box-shadow:
    0 10px 22px rgba(0,0,0,.14),
    0 0 0 1px rgba(255,255,255,.25) inset;

  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.lod-photos-more:hover{
  background: rgba(255,255,255,.86);
  border-color: rgba(255,107,107,.75);
  transform: translateY(-1px);
}

/* Divi : évite que des wrappers internes remettent un fond blanc */
.lod-card,
.lod-card .et_pb_module,
.lod-card .et_pb_text,
.lod-card .et_pb_code,
.lod-card .et_pb_button_module_wrapper,
.lod-card .et_pb_row,
.lod-card .et_pb_column{
  background: transparent !important;
}

/* =========================================
   BUTTONS (custom)
========================================= */
.lod-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lod-btn-primary a,
.lod-btn-secondary a {
  display: block;
  text-align: center;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 600;
  text-decoration: none;
}

/* Primary */
.lod-btn-primary a{
  background: #ff6b6b;
  color: #FFFFFF !important;

  /* shadow plus soft par défaut (évite d’écraser les cards) */
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);

  /* lift */
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  will-change: transform;
}

.lod-btn-primary a:hover{
  background: #ff5252;

  /* petit lift */
  transform: translateY(-1px);

  /* shadow un peu plus présente au hover */
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.16);
}

.lod-btn-primary a:active{
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
}

/* Secondary */
.lod-btn-secondary a {
  background: rgba(255, 90, 95, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.72) !important;
}

/* Icône enveloppe */
.lod-btn-secondary a::before {
  content: "✉";
  display: inline-block;
  margin-right: 10px;
  opacity: 0.75;
}

/* Séparateur dans la card réservation */
.lod-sep {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.10);
}

/* =========================================
   PRICE (dans card réservation)
========================================= */
.lod-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px 0;
}

.lod-price-val {
  font-size: 30px;
  font-weight: 700;
  color: #FF5A5F;
  line-height: 1;
}

.lod-price-unit {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  opacity: 0.70;
}

/* =========================================
   HOST BLOCK (dans card réservation)
========================================= */
.lod-host {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
}

.lod-host-avatar {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.75);
  font-weight: 800;
  text-transform: uppercase;
  overflow: hidden;
}

.lod-host-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lod-host-meta { min-width: 0; }

.lod-host-name {
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 2px 0;
}

.lod-host-line {
  margin: 0;
  color: #6B7280;
  font-size: 14px;
  line-height: 1.5;
}

.lod-host a {
  color: #6B7280 !important;
  text-decoration: none !important;
}

.lod-host a:hover {
  color: #0F172A !important;
}

/* =========================================
   GALLERY HERO (photo_une)
========================================= */
.lod-hero img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  border-radius: 18px;
}

@media (max-width: 980px) {
  .lod-hero img { height: 260px; }
}

/* =========================================
   THUMBNAILS GRID (galerie)
========================================= */
.lod-thumbs {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  grid-auto-flow: row !important;
  gap: 12px !important;
  width: 100% !important;
}

.lod-thumbs img {
  width: 100% !important;
  height: 120px !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  border-radius: 16px !important;
}

@media (max-width: 980px) {
  .lod-thumbs { grid-template-columns: 1fr 1fr !important; }
  .lod-thumbs img { height: 96px !important; }
}

/* =========================================
   TYPO HELPERS
========================================= */
.lod-h2 {
  font-size: 24px;
  color: #0F172A;
  margin: 0 0 10px 0;
}

.lod-muted { color: #6B7280; }

.lod-h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 8px 0;
}

/* =========================================
   CALENDAR (dans une lod-card)
========================================= */
.lod-cal{ width:100%; }

.lod-cal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.lod-cal-title{
  font-weight:800;
  color:#0F172A;
}

.lod-cal-nav{
  width:34px;
  height:34px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#0F172A;
  background: rgba(15,23,42,.03);
  border: 1px solid rgba(15,23,42,.08);
  cursor:pointer;
}

.lod-cal-grid{
  display:grid;
  grid-template-columns:repeat(7, minmax(0,1fr));
  gap:8px;
}

.lod-cal-cell{
  border-radius:12px;
  border:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.55);
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.lod-cal-cell--head{
  min-height:32px;
  font-size:12px;
  font-weight:700;
  color:#6B7280;
  border:none;
  background: transparent;
}

.lod-cal-cell--empty{
  border:none;
  background: transparent;
}

.lod-cal-day{
  font-size:14px;
  font-weight:700;
  color:#0F172A;
  opacity:.85;
}

/* réservé */
.lod-cal-cell.is-booked{
  background: rgba(255,90,95,.12);
  border-color: rgba(255,90,95,.22);
}

/* chiffre barré quand réservé */
.lod-cal-cell.is-booked .lod-cal-day{
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(255, 90, 95, .55);
}

.lod-cal-legend{
  margin-top:12px;
  font-size:13px;
  color:#6B7280;
  display:flex;
  align-items:center;
  gap:8px;
}

.lod-cal-dot{
  width:12px;
  height:12px;
  border-radius:999px;
  background: rgba(255,90,95,.12);
  border:1px solid rgba(255,90,95,.22);
  display:inline-block;
}

.lod-cal-note{
  margin:10px 0 0;
  font-size:13px;
  color:#6B7280;
}

/* =========================================
   EQUIPEMENTS
========================================= */
.lod-eq-grid{
  display:grid;
  gap:10px;
  margin-top: 10px;
}

.lod-eq-cols-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.lod-eq-cols-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.lod-eq-cols-4{ grid-template-columns: repeat(4, minmax(0,1fr)); }

@media (max-width: 980px){
  .lod-eq-cols-3,
  .lod-eq-cols-4{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 980px){
  .lod-eq-item{
    padding: 10px 12px;     /* plus compact */
    border-radius: 14px;
    min-height: 56px;       /* aligne visuellement les cartes */
    align-items: center;
  }

  .lod-eq-txt{
    font-size: 13px;
    line-height: 1.15;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;  /* max 2 lignes */
    overflow: hidden;
  }
}

@media (max-width: 480px){
  .lod-eq-grid{
    grid-template-columns: 1fr !important;
  }
  .lod-eq-txt{
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
  }
}

.lod-eq-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(15,23,42,.08);
}

.lod-eq-ico{
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,90,95,.10);
  border: 1px solid rgba(255,90,95,.18);
  font-size: 14px;
  flex: 0 0 auto;
}

.lod-eq-txt{
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  opacity: .85;
}



/* =========================================
   ARCHIVES LOGEMENTS – Cards (grid 3 + image proche bord + body paddé + align clean)
========================================= */

/* Force le container shortcode à bien prendre la largeur dans Divi */
.et_pb_code_inner .lod-archive-grid,
.et_pb_text_inner .lod-archive-grid{
  width: 100%;
}

/* GRID : 3 colonnes desktop */
.lod-archive-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Tablette : 2 colonnes */
@media (max-width: 1200px){
  .lod-archive-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile : 1 colonne */
@media (max-width: 980px){
  .lod-archive-grid{
    grid-template-columns: 1fr;
  }
}

/* Card archive : padding léger pour coller l’image aux bords */
.lod-card--archive{
  padding: 10px;         /* léger, image proche du bord */
  border-radius: 22px;
}

/* Wrapper image : radius + clip */
.lod-archive-media{
  display: block;
  border-radius: 18px;
  overflow: hidden;       /* important pour clip l’image */
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(15,23,42,.08);
}

/* Image (dominante) */
.lod-archive-img{
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

/* Placeholder si pas d’image */
.lod-archive-img--empty{
  height: 230px;
}

/* Body : padding + spacing + alignement “même gouttière” */
.lod-archive-body{
  padding: 12px 12px 12px;   /* même padding gauche/droite */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Neutralise marges héritées (Divi/typo) qui décalent visuellement */
.lod-archive-body > *{
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Titre moins “lourd” */
.lod-archive-title{
  margin: 0 !important;
  font-size: 16px;
  font-weight: 650;       /* moins gras */
  color: #0F172A;
  letter-spacing: -0.2px;
}

.lod-archive-title a{
  color: inherit;
  text-decoration: none;
}

.lod-archive-title a:hover{
  text-decoration: underline;
}

/* Pills : compact + sans padding/marge parasite */
.lod-archive-pills{
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
}

/* Prix plus mis en avant */
.lod-archive-price{
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 !important;
}

.lod-archive-price-prefix,
.lod-archive-price-suffix{
  color: #6B7280;
  font-size: 13px;
  opacity: .85;
}

.lod-archive-price-val{
  color: #FF5A5F;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.2px;
}

/* CTA plein largeur + align propre */
.lod-archive-cta{
  margin: 0 !important;
  padding: 0 !important;
}

.lod-archive-cta a{
  width: 100%;
  display: block;
  padding: 14px 16px;
  border-radius: 18px;
}

.lod-card--archive .lod-archive-body{
  padding: 12px 12px 12px;
}

.lod-card--archive .lod-archive-body > :not(.lod-archive-cta){
  padding-left: 4px;
}