/* =========================================================================
   Ajustements responsive côté utilisateur — chargé après style.css.
   Objectif : aucune barre de défilement horizontale et une mise en page
   lisible du mobile au grand écran, sans toucher au thème de base.
   ========================================================================= */

/* ---- Filets de sécurité globaux ------------------------------------------ */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
  border: 0;
}

/* Toute table éventuelle défile dans son propre conteneur */
.table-responsive-auto,
main table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Empêche un mot/URL trop long de forcer la largeur */
p,
h1, h2, h3, h4, h5, h6,
.title-single,
.title-d,
.description,
.breadcrumb-item {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Les conteneurs ne débordent jamais */
.container,
.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

/* ---- Hero / carrousel d'accueil ---------------------------------------- */
.intro .carousel-item-a {
  height: 70vh;
  min-height: 360px;
}

/* Titre du hero : la feuille de base saute à 3.5–4rem entre 576 et 991px,
   ce qui déborde sur tablette. On borne la taille sur cette plage. */
@media (max-width: 991px) {
  .intro .intro-title {
    font-size: 2rem !important;
    line-height: 1.3;
    padding: 0.4rem 0.6rem;
  }
  .intro .intro-subtitle {
    font-size: 1.1rem;
  }
}

@media (max-width: 575px) {
  .intro .carousel-item-a {
    height: 78vh;
    min-height: 320px;
  }
  .intro .intro-title {
    font-size: 1.5rem !important;
  }
  .intro .intro-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ---- Fiche propriété / parcelle / hôtel -------------------------------- */
/* Le gabarit forçait 75 % de large même sur mobile. */
.property-single .container-fluid.w-75,
.property-single .w-75 {
  width: 100% !important;
}

@media (max-width: 991px) {
  .property-single .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Images de la galerie : plein cadre, hauteur maîtrisée */
.gallery-property .carousel-item-b {
  height: auto;
}

.gallery-property .carousel-item-b img {
  width: 100%;
  height: 56vh;
  min-height: 220px;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

@media (max-width: 767px) {
  .gallery-property .carousel-item-b img {
    height: 42vh;
    min-height: 200px;
  }
}

/* Boutons latéraux (Partager / Voir le numéro) : espace au-dessus quand la
   colonne passe sous le contenu principal. */
@media (max-width: 1199px) {
  .property-single .col-xl-3 {
    margin-top: 1.5rem;
  }
}

/* Colonne de contenu de la fiche maison : pleine largeur sous 992px
   (le gabarit la laissait à 7/12 sur tablette, d'où une bande vide). */
@media (max-width: 991px) {
  .property-single .col-md-7.col-lg-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Bloc "démarcheur" : les paires libellé/valeur restent lisibles */
@media (max-width: 400px) {
  .summary-list .list li.d-flex,
  .property-agent .list-unstyled li.d-flex {
    flex-direction: column;
  }
}

/* ---- Grille des cartes d'annonces ------------------------------------- */
@media (max-width: 575px) {
  .property-grid .card-footer-title {
    font-size: 0.85rem;
  }
  .favori-btn {
    width: 34px;
    height: 34px;
    top: 6px;
    right: 6px;
  }
  .favori-btn i {
    font-size: 16px;
  }
}

/* ---- Titres de section ---------------------------------------------------- */
@media (max-width: 767px) {
  .intro-single .title-single-box .title-single {
    font-size: 1.6rem;
  }
  .intro-single {
    padding-top: 6rem;
  }
  .section-t8 {
    padding-top: 2rem;
  }
  .title-a,
  .title-d {
    font-size: 1.3rem;
  }
}

/* ---- Barre de navigation --------------------------------------------------- */
/* Le menu déroulant sous le hamburger : liste défilable, pas de débordement */
@media (max-width: 991px) {
  .navbar-default .navbar-collapse {
    max-height: 80vh;
    overflow-y: auto;
    padding-bottom: 0.75rem;
  }
  .navbar-default .dropdown .dropdown-menu {
    position: static !important;
    float: none;
    box-shadow: none;
    padding-left: 1rem;
  }
  .navbar-default .navbar-nav {
    padding-top: 0.5rem;
  }
}

/* ---- Formulaires / recherche ------------------------------------------- */
.form-control,
.custom-select,
.form-control-a {
  max-width: 100%;
}

.box-collapse {
  max-width: 100%;
}

@media (max-width: 575px) {
  .box-collapse {
    width: 100%;
    padding: 1.25rem 1rem;
  }
  .box-collapse-wrap {
    padding: 1rem;
  }
}

/* ---- Cartes texte (à propos, devenir démarcheur, favoris vide) --------- */
@media (max-width: 575px) {
  .card-box-a.card-shadow[style],
  .section-about .p-md-5 {
    padding: 1.25rem !important;
  }
}

/* ---- Pagination ------------------------------------------------------------ */
.pagination,
.pagination-a .pagination {
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- Modales (compte requis / partage) -------------------------------- */
@media (max-width: 575px) {
  .modal-dialog {
    margin: 0.5rem;
  }
  .partage-reseaux {
    flex-direction: column;
  }
  .partage-reseaux a {
    min-width: 0;
  }
}

/* ---- Pied de page ---------------------------------------------------------- */
@media (max-width: 767px) {
  .section-footer .item-list-a,
  .section-footer [class*="col-"] {
    margin-bottom: 1.25rem;
  }
}

/* ---- FAQ / accordéon --------------------------------------------------- */
.card-header a,
#accordion .card-header {
  white-space: normal;
  word-break: break-word;
}
