/* 
    Created on : 7 mai 2024, 15:27:03
    Author     : Pixad
*/
.mobile #SListBien {
    --hauteur-map: 80vh;
}

.desktop #SListBien {
    --hauteur-map: 60vh;
}

#SListBien {position: relative; top: -25px;}
@media (max-width:500px){
#SListBien {position: relative; top: 0px;}    
}


#SListBien .container {width: 80%;}
@media(max-width:500px){
    #SListBien .container {width: 100%;}
    #SListBien ul#ListeTypeBien {display: flex; flex-direction: row;}
    #SListBien ul#ListeTypeBien li {margin: 0 10px 0 0;}
    #SListBien ul#ListeTypeBien li:last-child {margin: 0 0px 0 0;}
    #SListBien ul#ListeTypeBien li:last-child .control {padding-left:25px;}
}

#SListBien .BlockListeBien #ListeTypeBien {display: flex; gap: 15px; padding: 15px 15px;}
#SListBien .BlockScrollBien {
    width: calc(100vw - 30px);
    margin: 0 0 0 37px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 4rem;
    flex-wrap: nowrap;
    overflow-x: scroll;
    padding-bottom: 30px;
    cursor: grab;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.map-flip-container {
  perspective: 1500px;
  width: 100%;
  height: var(--hauteur-map);
  position: relative;
  padding:25px;
    /* Optimisations mobile */
    /*
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
    */
}



.map-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
    /* Optimisations pour mobile */
    /*
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
    */
}

.map-flip-container.flipped .map-flip-inner {
  transform: rotateY(180deg);
}

/* Faces */
.map-flip-front,
.map-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  top: 0;
  left: 0;
  background: #0a3d3d;
    /* Force l'accélération matérielle */
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}

.map-flip-front {
  z-index: 2;
  transform: rotateY(0deg);
}

.map-flip-front #map {
  width: 100%;
  height: 100%;
}

/* Animation plus fluide sur mobile */
@media (max-width: 768px) {
  .map-flip-inner {
    transition: transform 0.6s ease-in-out;
  }
}
/* Quand on flip, inverser les z-index */
.map-flip-container.flipped .map-flip-front {
  z-index: 1;
}

.map-flip-container.flipped .map-flip-back {
  z-index: 2;
}


/* Back side */
.map-flip-back {
  background: #0a3d3d;
  color: white;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

}

.map-flip-back img {
  width: 100%;
  object-fit: cover;
}

/* Animation slide de gauche vers la droite */
@keyframes slideRight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-15%);
    }
}
    
@media(max-width:500px){
  .map-flip-container {padding: 0px;}
  .map-flip-back picture img {width: 123%; }
  .map-flip-container.flipped .map-flip-back .btn-close {z-index: 1000;}
  .map-flip-container.flipped .map-flip-back picture img.slide-in-right { 
      animation : slideRight 0.3s ease-out forwards;
  }
}




.map-flip-back .btn,
.map-flip-back .btn-close {
  display: inline-block;
  background: #fff;
  color: #0a3d3d;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
  border: none;
  cursor: pointer;
   transition: all 0.5s ease;
 
}
.map-flip-back .btn-close { position: absolute;
    right: -5px;
    bottom: 50%;
}
.map-flip-back .btn-close:hover {color: red;}

.map-flip-back .btn:hover {
     background: #fff;
     border-radius: 8px;
     color: #0a3d3d;
     border-color: #FFF;
     font-weight: bold;
     padding: 10px 30px;
}

.card-content .house-heading__pictures {
    overflow: hidden; border-radius: 0px; position: relative; margin: 0 0 0rem;background-color: #003c3c; min-height: 100%; width:100%; max-height:calc(var(--hauteur-map) - 5vh);}
.card-content {position: relative; width:100%; height: 100%;}   
.card-content .gallery__images:not(.grid) {aspect-ratio:0;}
.card-content .gallery__images:not(.grid) > * {width: 100%!important;}
.card-content .HeaderInfo {
        display:flex; flex-direction:row; align-items: flex-end; flex: 1; justify-content: space-between; background-color: transparent; border: 0px solid #FFF; border-radius: 15px;
    width: 100%;
    position: absolute;
    bottom: -5px;
    padding: 30px;
    background: radial-gradient(ellipse at left bottom, rgb(19 30 41 / 90%) 15%, transparent 70%);;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    
    
    }
    .card-content .HeaderInfo h1 {
        color: #FFFF;
        font-weight: 900;
        text-transform: uppercase;
        line-height: .85;
        letter-spacing: 0.2rem;
        font-size: 50px;
        margin-left: 30px;
    }
    .card-content .HeaderInfo span.subtitle {margin-left: 30px; color: #c9a377; font-weight: 400; font-size: 13px; display: flex; justify-content: flex-start; align-items: flex-start; gap: 10px; flex-wrap: nowrap; }
    
    .card-content .HeaderInfo .tsk-header-info {display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 10px; width: 80%; }
    .card-content .HeaderInfo .tsk-header-info .btn-fav {top: 0px; left: 46px;}
    .card-content .HeaderInfo .tsk-header-info .IconDescription {margin: 15px 0 0 0; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: center; gap: 10px; color: #CCC; width:100%;}
    .card-content .HeaderInfo .tsk-header-info .IconDescription div  { border-right: 0px; min-width: 7vw; width:auto; }
    .card-content .HeaderInfo .tsk-header-info .IconDescription i  { color: #f8f8f8; opacity:0.5; }
    .card-content .HeaderInfo .tsk-header-info .IconDescription span  { color: #fff; font-weight: normal; }
    
    
    @media(max-width:500px){
        .card-content .HeaderInfo {padding:15px; flex-direction: column;}
        .card-content .HeaderInfo {padding:15px; flex-direction: column;}
        .card-content .HeaderInfo .tsk-header-info {width: 100%;}
        .card-content .HeaderInfo .tsk-header-resa  {width: 100%;}
        .card-content .HeaderInfo .tsk-header-resa .btnResaBien a {width: 100%;}
        .card-content .HeaderInfo .tsk-header-info .IconDescription {flex-wrap: wrap;}
        .card-content .HeaderInfo .tsk-header-info .IconDescription div {min-width: 35vw;}
        .map-flip-back .btn-close { position: absolute; right: -5px;  bottom: 80%;}
    }
    
/* MAP -> Mapbox intégration */
.mapbox {
    position: relative;
    width: 100%;
    top: 0;
    bottom: 0;
    overflow: hidden;
}
.map__canvas {
    width: 100%;
    height: 100%;
}



.mapboxgl-map {
    overflow: hidden;
    position: relative;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.map__canvas * {
    box-sizing: content-box;
}
.map__canvas .alert .alert-arrow.bottom:after {
    border-top-color: #5798d4;
}
.map__canvas .alert .alert-arrow.bottom:after {
    border-top-color: #3c3c3c;
    border-bottom-color: transparent;
}
.map__canvas .alert .alert-arrow.bottom:after, .map__canvas .alert .alert-arrow.bottom:before {
    top: 100%;
    bottom: auto;
}
.map__canvas .alert .alert-arrow.bottom:before {
    border-top-color: hsla(0,0%,100%,.24);
    border-bottom-color: transparent;
}

.alert .alert-arrow:after {
    border-color: rgba(136,183,213,0);
    border-width: 7px;
    margin-left: -7px;
}

.mapboxgl-popup {max-width: 350px!important;  outline: none; border: none;}
.mapboxgl-popup-content {
    font-size:13px;
    background: #fff;
    border-radius: 50%!important; height: 80px; width: 80px;
    /* box-shadow: 0 1px 2px rgba(0, 0, 0, .1); */
    box-shadow: none;
    padding: 0px!important;
    pointer-events: auto;
    position: relative;
    border:0px!important;
    outline: none;
    border: none;
    overflow: hidden;
}


.tsk_marker_popup { width: 300px; max-height: 380px; height: auto; border:0px;outline: none!important;}
.tsk_marker_popup .badgeLCDV {display: none;}
.tsk_marker_popup .house-card__body {padding: 10px; border: 0px!important; outline: none!important;}
.tsk_marker_popup .house-card__body a.btn-action {width: calc(100% - 30px);}
.tsk_marker_popup .house-card__icone {display: flex; flex-direction: column; flex-wrap: wrap; font-size:12px; padding: 0px;}
.tsk_marker_popup .house-card__icone .col-md-6 {display: flex; flex-direction: column; flex-wrap: nowrap; padding: 0px 15px; width: calc(100% - 30px);}
.tsk_marker_popup .house-card__icone .col-md-6 ul {display: flex; flex-direction: row; flex-wrap: nowrap; padding: 0px; }
.tsk_marker_popup .house-card__icone .col-md-6 ul li {width: 50%;}
.tsk_marker_popup .house-card__icone .col-md-6 ul li .fa-2x {font-size: 1.1em; color:#093b3c;}
.tsk_marker_popup .house-card__slider-wrapper {max-height:190px; min-height: 150px; }
.tsk_marker_popup h2 {font-size:20px; margin-top: 10px;}
.tsk_marker_popup .house-card__location {color:#585858; font-size:10px;}
.tsk_marker_popup .mapboxgl-popup-close-button {display: none!important;}

.tsk_marker_popup img {height: 80px;}
.tsk_marker_popup a.btn-action {color: #FFF; font-size: 12px; padding: 4px 8px; width: calc(100% - 15px);}
.tsk_marker_popup a { color:#222; border:0px!important; text-decoration: none;outline: none!important;}
.tsk_marker_popup a:hover { color:#222;}
.mapboxgl-popup-close-button {
    cursor: pointer;
    position: absolute;
    right: -12.5px;
    top: -12.5px;
    height: 25px;
    width: 25px;
    background-color: #222!important;
    color:#FFF;
    border-radius: 50%;
    border: 0px;
}

.tsk_custom-marker {
      width: 40px;
      height: 40px;
      background-image: url("./assets/img/map_marker.png"); /* Remplacez l'URL par l'URL de votre image de marqueur personnalisé */
      background-size: cover;
    }
    
    
    #SListBien {display: flex; justify-content: flex-start; flex:1; flex-wrap: wrap;}
    #SListBien .BlockListeBien {width: 100vw; display: flex; flex-direction: column; flex-wrap: wrap; gap: 15px;}
    #SListBien .BlockListeBien .ListeBien .ItemBien {width: 300px!important; height: 200px!important;}
    
   
    
    #SListBien .BlockListeBien .ListeTypeBien {display: flex; flex-direction: row; justify-content: center; align-items: center;}
    #SListBien .BlockListeBien .ListeBien {display: flex; flex-direction: row; flex-wrap: wrap; gap: 15px;}
    
     @media(max-width:500px){
        #SListBien {display: flex; flex-direction: column;}
        #SListBien .mapbox {width: 100vw;height: 100vh; position: relative;}
        #SListBien .BlockListeBien {width: 100vw;}
        #SListBien .BlockListeBien .ListeBien .ItemBien {width: 100%;}
    }