/* Style inspiré du Bon Coin */
body {
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  margin: 0;
  padding: 0;
}

header {
  background-color: #ff6e14;
  color: white;
  padding: 15px 20px;
  font-size: 1.4rem;
  font-weight: bold;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}

/* Grille des cartes sur la page principale */
.listing {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Carte */
.card {
  position: relative;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  transition: 0.2s;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

/* Zone image dans la carte */
.img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Image principale */
.img-wrap img {
  width: 100%;
  height: 25vh;
  object-fit: cover;
  display: block;
}

/* Indicateur (barre blanche + deux points) dans l’image */
.indicator {
  position: absolute;
  bottom: calc(25vh / 8);  /* Positionné à 1/8 de la hauteur de l’image depuis le bas */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 4px 10px;
  display: flex;
  gap: 6px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b5b5b5;
}

/* Nom de l'appartement */
.apt-name {
  padding: 12px;
  font-weight: bold;
  font-size: 1.05rem;
  color: #333;
  margin-top: 6px;
  position: static;
  background: white;
  z-index: 2;
}

/* Page appartement — galerie */
#gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  /*margin-top: 20px;*/
}

#gallery img {
  width: 20vw; /* 25% de la largeur de l’écran */ 
  height: auto;
  object-fit: contain;  
  max-width: 100%;
  border-radius: 8px;
  cursor: pointer;
}

/* Plein écran (lightbox) */
#fullscreen-view {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#fullscreen-img {
  max-width: 90%;
  max-height: 90%;
  cursor: grab;
  transition: transform 0.2s ease;
}

/* Bouton de fermeture */
.close-fullscreen {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 35px;
  cursor: pointer;
  z-index: 2000;
}

/* Boutons next/prev uniquement sur desktop */
@media (min-width: 768px) {
  .nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    z-index: 2000;
    user-select: none;
  }

  .nav-left {
    left: 30px;
  }

  .nav-right {
    right: 30px;
  }
}

/* Sur smartphone, pas d’arrow */
@media (max-width: 767px) {
  .nav-arrow {
    display: none;
  }

  #gallery img {
    width: calc(50% - 10px);
  }
}

/* Bloc Vidéos */
.video-block {
  margin-top: 25px;
  padding: 10px;
}

.video-link {
  display: block;
  font-size: 1rem;
  color: #0066cc;
  text-decoration: underline;
  margin-bottom: 10px;
}
