/* HAMS maj33 — HAMIDOUSIF Immobilier : recherche, fiches, favoris, visites (s'appuie sur css/hams-site.css) */
.im-hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 0% 0%, #2f3f8f 0%, var(--hs-night) 62%); color: #fff; padding: 64px 0 120px; }
.im-hero::after { content: ""; position: absolute; right: -140px; top: -120px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(234, 90, 42, .35), transparent 65%); pointer-events: none; }
.im-hero .hs-container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.im-hero h1 { font-family: var(--hs-display); font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.07; letter-spacing: -.02em; margin: 14px 0 16px; color: #fff; }
.im-hero h1 em { font-style: normal; background: linear-gradient(90deg, #ffb07a, var(--hs-amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.im-hero p.hs-chapo { color: #ccd3ee; max-width: 52ch; }
.im-hero-mosaique { position: relative; height: 430px; }
.im-hero-mosaique .im-tuile { position: absolute; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); background: #20295e; }
.im-hero-mosaique .im-tuile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 6s ease; }
.im-hero-mosaique .im-tuile:hover img { transform: scale(1.06); }
.im-hero-mosaique .t1 { left: 0; top: 30px; width: 58%; height: 330px; }
.im-hero-mosaique .t2 { right: 0; top: 0; width: 38%; height: 200px; }
.im-hero-mosaique .t3 { right: 4%; bottom: 0; width: 46%; height: 200px; }
.im-hero-mosaique .im-flottant { position: absolute; left: 34%; bottom: 8px; background: #fff; color: var(--hs-ink); border-radius: 16px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--hs-shadow-lg); animation: imFlotte 5s ease-in-out infinite; }
.im-hero-mosaique .im-flottant b { display: block; font-family: var(--hs-display); }
.im-hero-mosaique .im-flottant small { color: var(--hs-muted); }
@keyframes imFlotte { 50% { transform: translateY(-8px); } }

/* Barre de recherche (accueil) */
.im-recherche { position: relative; z-index: 3; margin-top: -78px; }
.im-recherche-boite { background: #fff; border-radius: 22px; box-shadow: var(--hs-shadow-lg); padding: 10px; border: 1px solid var(--hs-line); }
.im-onglets { display: flex; gap: 6px; padding: 6px 6px 10px; }
.im-onglets button { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font-weight: 700; color: var(--hs-muted); cursor: pointer; }
.im-onglets button.actif { background: var(--hs-tint); color: var(--hs-navy); }
.im-champs { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr auto; gap: 8px; }
.im-champ { border: 1.5px solid var(--hs-line); border-radius: 14px; padding: 8px 14px; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.im-champ:focus-within { border-color: var(--hs-navy); box-shadow: 0 0 0 4px rgba(38, 51, 113, .08); }
.im-champ label { font-size: .72rem; font-weight: 700; color: var(--hs-muted); text-transform: uppercase; letter-spacing: .05em; }
.im-champ input, .im-champ select { border: 0; outline: 0; padding: 2px 0; font: inherit; font-weight: 600; color: var(--hs-ink); background: transparent; min-width: 0; }
.im-champs .hs-btn { border-radius: 14px; padding: 0 26px; }

/* Cartes de biens */
.im-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.im-carte { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hs-line); border-radius: 20px; overflow: hidden; color: var(--hs-ink); text-decoration: none; transition: transform .25s, box-shadow .25s, border-color .25s; }
.im-carte:hover { transform: translateY(-6px); box-shadow: var(--hs-shadow-lg); border-color: transparent; color: var(--hs-ink); }
.im-carte-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e9ecf6; }
.im-carte-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.im-carte:hover .im-carte-photo img { transform: scale(1.07); }
.im-carte-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(to top, rgba(10, 14, 40, .72), transparent); }
.im-badges { position: absolute; top: 12px; left: 12px; right: 60px; display: flex; gap: 6px; z-index: 2; flex-wrap: wrap; }
.im-badge { background: #fff; color: var(--hs-navy); font-size: .74rem; font-weight: 800; padding: 5px 10px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.im-badge.vente { background: var(--hs-orange-strong); color: #fff; }
.im-badge.coeur { background: var(--hs-amber); color: var(--hs-night); }
.im-badge.reserve { background: #131a42; color: #fff; }
.im-prix-photo { position: absolute; left: 14px; bottom: 12px; z-index: 2; color: #fff; font-family: var(--hs-display); font-weight: 800; font-size: 1.15rem; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.im-prix-photo small { font-weight: 600; font-size: .78rem; opacity: .9; }
.im-nb-photos { position: absolute; right: 12px; bottom: 12px; z-index: 2; color: #fff; font-size: .78rem; font-weight: 700; background: rgba(0, 0, 0, .35); padding: 3px 9px; border-radius: 999px; }
.im-coeur { position: absolute; top: 10px; right: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: var(--hs-navy); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); transition: transform .15s, color .15s; }
.im-coeur:hover { transform: scale(1.1); }
.im-coeur.actif { color: #e11d48; }
.im-coeur.actif i::before { font-weight: 900; }
.im-coeur.pop { animation: imPop .35s ease; }
@keyframes imPop { 50% { transform: scale(1.35); } }
.im-carte-corps { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.im-carte-corps h3 { font-family: var(--hs-display); font-size: 1.02rem; line-height: 1.3; margin: 0; color: var(--hs-night); }
.im-lieu { color: var(--hs-muted); font-size: .85rem; }
.im-specs { display: flex; gap: 14px; flex-wrap: wrap; color: var(--hs-ink); font-size: .85rem; font-weight: 600; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--hs-line); }
.im-specs i { color: var(--hs-navy); opacity: .75; margin-right: 4px; }

/* Page des propriétés */
.im-entete { background: linear-gradient(135deg, var(--hs-navy) 0%, var(--hs-night) 100%); color: #fff; padding: 38px 0 86px; }
.im-entete h1 { font-family: var(--hs-display); color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 8px 0 6px; }
.im-entete p { color: #c9cfea; margin: 0; }
.im-filtres { position: sticky; top: calc(var(--hs-header-h) + 8px); z-index: 20; margin-top: -60px; background: #fff; border: 1px solid var(--hs-line); border-radius: 20px; box-shadow: var(--hs-shadow); padding: 12px; }
.im-filtres form { display: grid; grid-template-columns: auto 1.4fr 1fr 1fr 1fr auto; gap: 8px; align-items: stretch; }
.im-segment { display: flex; background: var(--hs-bg); border-radius: 14px; padding: 4px; }
.im-segment label { margin: 0; }
.im-segment input { display: none; }
.im-segment span { display: block; padding: 10px 14px; border-radius: 11px; font-weight: 700; font-size: .88rem; color: var(--hs-muted); cursor: pointer; white-space: nowrap; }
.im-segment input:checked + span { background: #fff; color: var(--hs-navy); box-shadow: 0 2px 8px rgba(19, 26, 66, .1); }
.im-plus { display: none; grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: 8px; }
.im-filtres.ouvert .im-plus { display: grid; }
.im-btn-carre { border: 1.5px solid var(--hs-line); background: #fff; border-radius: 14px; padding: 0 14px; font-weight: 700; color: var(--hs-navy); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.im-btn-carre .im-pastille { background: var(--hs-orange); color: #fff; border-radius: 999px; font-size: .7rem; padding: 1px 7px; }
.im-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 18px; }
.im-barre h2 { font-family: var(--hs-display); font-size: 1.15rem; margin: 0; color: var(--hs-night); }
.im-barre .im-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.im-barre select { border: 1.5px solid var(--hs-line); border-radius: 12px; padding: 9px 12px; font-weight: 600; background: #fff; }
.im-vue { display: inline-flex; background: var(--hs-bg); border-radius: 12px; padding: 3px; }
.im-vue button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; color: var(--hs-muted); cursor: pointer; font-weight: 700; }
.im-vue button.actif { background: #fff; color: var(--hs-navy); box-shadow: 0 2px 6px rgba(19, 26, 66, .1); }
.im-puces { display: flex; gap: 8px; flex-wrap: wrap; }
.im-puce { background: var(--hs-tint); color: var(--hs-navy); border-radius: 999px; padding: 6px 12px; font-size: .82rem; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; border: 0; }
.im-chargement { opacity: .45; pointer-events: none; transition: opacity .2s; }
.im-squelette { border-radius: 20px; background: linear-gradient(90deg, #eef0f7 25%, #f7f8fc 50%, #eef0f7 75%); background-size: 200% 100%; animation: imSq 1.2s infinite; height: 330px; }
@keyframes imSq { to { background-position: -200% 0; } }
.im-carte-map { height: 560px; border-radius: 20px; overflow: hidden; border: 1px solid var(--hs-line); }
.im-vide { text-align: center; padding: 50px 20px; background: #fff; border: 1px dashed var(--hs-line); border-radius: 20px; }
.im-vide i { font-size: 2.4rem; color: var(--hs-navy); opacity: .5; }
.im-alerte-banniere { margin-top: 30px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(120deg, var(--hs-orange-soft), #fff); border: 1px solid #fbd5c0; border-radius: 20px; padding: 22px 26px; }
.im-alerte-banniere h3 { font-family: var(--hs-display); margin: 0 0 4px; font-size: 1.1rem; color: var(--hs-night); }
.im-alerte-banniere p { margin: 0; color: var(--hs-muted); }

/* Fiche d'un bien */
.im-galerie { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 210px 210px; gap: 10px; border-radius: 22px; overflow: hidden; }
.im-galerie a { position: relative; display: block; overflow: hidden; background: #e9ecf6; }
.im-galerie a:first-child { grid-row: 1 / 3; }
.im-galerie img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.im-galerie a:hover img { transform: scale(1.05); }
.im-galerie .im-voir-tout { position: absolute; right: 14px; bottom: 14px; background: #fff; color: var(--hs-night); font-weight: 800; border-radius: 12px; padding: 8px 14px; font-size: .88rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.im-galerie.g3 { grid-template-columns: 2fr 1fr; }
.im-fil { margin-bottom: 14px; font-size: .88rem; color: var(--hs-muted); }
.im-fil a { color: var(--hs-navy); font-weight: 600; text-decoration: none; }
.im-galerie.g1 { grid-template-columns: 1fr; grid-template-rows: 420px; }
.im-galerie.g2 { grid-template-columns: 1fr 1fr; grid-template-rows: 420px; }
.im-galerie.g2 a:first-child, .im-galerie.g1 a:first-child { grid-row: auto; }
.im-fiche { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 34px; margin-top: 28px; align-items: start; }
.im-fiche h1 { font-family: var(--hs-display); font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--hs-night); margin: 8px 0; line-height: 1.15; }
.im-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 22px 0; }
.im-point { background: var(--hs-bg); border-radius: 16px; padding: 14px; }
.im-point i { color: var(--hs-navy); font-size: 1.1rem; }
.im-point b { display: block; font-family: var(--hs-display); font-size: 1.15rem; color: var(--hs-night); margin-top: 6px; }
.im-point span { color: var(--hs-muted); font-size: .8rem; }
.im-bloc { background: #fff; border: 1px solid var(--hs-line); border-radius: 20px; padding: 24px; margin-bottom: 20px; }
.im-bloc h2 { font-family: var(--hs-display); font-size: 1.15rem; margin: 0 0 14px; color: var(--hs-night); }
.im-description { color: #374151; line-height: 1.75; white-space: pre-line; }
.im-description.replie { max-height: 190px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.im-atouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; list-style: none; padding: 0; margin: 0; }
.im-atouts li { display: flex; gap: 10px; align-items: center; color: var(--hs-ink); }
.im-atouts li i { width: 30px; height: 30px; border-radius: 9px; background: var(--hs-tint); color: var(--hs-navy); display: grid; place-items: center; font-size: .85rem; }
.im-map { height: 300px; border-radius: 16px; overflow: hidden; }
.im-cote { position: sticky; top: calc(var(--hs-header-h) + 16px); }
.im-boite-visite { background: #fff; border: 1px solid var(--hs-line); border-radius: 22px; box-shadow: var(--hs-shadow); overflow: hidden; }
.im-boite-visite .im-tete-prix { background: linear-gradient(135deg, var(--hs-navy), var(--hs-night)); color: #fff; padding: 20px 22px; }
.im-boite-visite .im-tete-prix b { font-family: var(--hs-display); font-size: 1.7rem; display: block; }
.im-boite-visite .im-tete-prix small { color: #c9cfea; }
.im-boite-visite form { padding: 20px 22px 22px; display: grid; gap: 12px; }
.im-boite-visite .hs-ligne { grid-template-columns: 1fr 1fr; }
.im-creneaux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.im-creneaux input { display: none; }
.im-creneaux span { display: block; text-align: center; border: 1.5px solid var(--hs-line); border-radius: 12px; padding: 8px 4px; font-size: .78rem; font-weight: 700; color: var(--hs-muted); cursor: pointer; }
.im-creneaux input:checked + span { border-color: var(--hs-navy); color: var(--hs-navy); background: var(--hs-tint); }
.im-note-frais { font-size: .8rem; color: var(--hs-muted); background: var(--hs-bg); border-radius: 12px; padding: 10px 12px; }
.im-agent { display: flex; gap: 12px; align-items: center; padding: 16px 22px; border-top: 1px solid var(--hs-line); }
.im-agent .hs-avatar { width: 50px; height: 50px; }
.im-partage { display: flex; gap: 8px; flex-wrap: wrap; }
.im-partage a, .im-partage button { border: 1.5px solid var(--hs-line); background: #fff; border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: .85rem; color: var(--hs-navy); cursor: pointer; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.im-partage .wa { color: #128c7e; }
.im-barre-mobile { display: none; }

/* Visionneuse photos */
.im-visionneuse { position: fixed; inset: 0; z-index: 3000; background: rgba(6, 9, 28, .94); display: none; flex-direction: column; }
.im-visionneuse.ouverte { display: flex; }
.im-visionneuse .swiper { flex: 1; width: 100%; }
.im-visionneuse .swiper-slide { display: flex; align-items: center; justify-content: center; }
.im-visionneuse .swiper-slide img { max-width: 94vw; max-height: 82vh; object-fit: contain; border-radius: 8px; }
.im-visionneuse .im-fermer { position: absolute; top: 16px; right: 18px; z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.2rem; cursor: pointer; }
.im-visionneuse .im-compteur { position: absolute; top: 24px; left: 24px; z-index: 5; color: #fff; font-weight: 700; }
.im-visionneuse .swiper-button-next, .im-visionneuse .swiper-button-prev { color: #fff; }

/* Fenêtre (visite, alerte) */
.im-modal { position: fixed; inset: 0; z-index: 2500; background: rgba(12, 16, 44, .55); display: none; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(3px); }
.im-modal.ouverte { display: flex; animation: imFondu .2s ease; }
.im-modal-boite { background: #fff; border-radius: 24px; max-width: 470px; width: 100%; padding: 28px; box-shadow: var(--hs-shadow-lg); position: relative; animation: imMonte .25s ease; max-height: 92vh; overflow: auto; }
.im-modal-boite h3 { font-family: var(--hs-display); color: var(--hs-night); margin: 0 0 8px; }
.im-modal-boite .im-x { position: absolute; top: 12px; right: 12px; border: 0; background: var(--hs-bg); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.im-modal-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 14px; }
.im-djomy { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0; color: var(--hs-muted); font-size: .82rem; }
.im-djomy span { border: 1px solid var(--hs-line); border-radius: 8px; padding: 3px 8px; font-weight: 700; color: var(--hs-ink); }
@keyframes imFondu { from { opacity: 0; } }
@keyframes imMonte { from { transform: translateY(20px); opacity: 0; } }

/* Accueil : quartiers, carrousel, étapes */
.im-quartiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.im-quartier { position: relative; border-radius: 20px; padding: 22px; color: #fff; text-decoration: none; overflow: hidden; min-height: 132px; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .2s; }
.im-quartier:hover { transform: translateY(-4px); color: #fff; }
.im-quartier b { font-family: var(--hs-display); font-size: 1.15rem; }
.im-quartier small { opacity: .9; }
.im-quartier i { position: absolute; right: 16px; top: 16px; font-size: 1.4rem; opacity: .4; }
.im-carrousel { padding-bottom: 46px !important; }
.im-carrousel .swiper-slide { height: auto; }
.im-carrousel .swiper-slide .im-carte { height: 100%; }
.im-carrousel .swiper-pagination-bullet-active { background: var(--hs-orange); }
.im-etapes-frais { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: e; }
.im-etape { background: #fff; border: 1px solid var(--hs-line); border-radius: 20px; padding: 22px; position: relative; }
.im-etape::before { counter-increment: e; content: counter(e); position: absolute; top: -14px; left: 22px; width: 30px; height: 30px; border-radius: 50%; background: var(--hs-orange); color: #fff; display: grid; place-items: center; font-weight: 800; }
.im-etape h3 { font-family: var(--hs-display); font-size: 1rem; margin: 8px 0 4px; color: var(--hs-night); }
.im-etape p { margin: 0; color: var(--hs-muted); font-size: .9rem; }

/* Paiement */
.im-statut-paiement { text-align: center; padding: 40px 26px; }
.im-statut-paiement .im-modal-ico { margin: 0 auto 16px; }
.im-recap { display: grid; gap: 8px; text-align: left; background: var(--hs-bg); border-radius: 16px; padding: 16px; margin: 18px 0; }
.im-recap div { display: flex; justify-content: space-between; gap: 12px; }
.im-recap span { color: var(--hs-muted); }
.im-attente-anim { width: 54px; height: 54px; border-radius: 50%; border: 5px solid var(--hs-tint); border-top-color: var(--hs-orange); animation: imTourne 1s linear infinite; margin: 0 auto 16px; }
@keyframes imTourne { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .im-hero .hs-container { grid-template-columns: 1fr; }
  .im-hero-mosaique { display: none; }
  .im-champs { grid-template-columns: 1fr 1fr; }
  .im-champs .hs-btn { grid-column: 1 / -1; padding: 13px; }
  .im-filtres form { grid-template-columns: 1fr 1fr; }
  .im-filtres form > .im-segment { grid-column: 1 / -1; }
  .im-fiche { grid-template-columns: 1fr; }
  .im-cote { position: static; }
  .im-quartiers { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .im-hero { padding: 40px 0 110px; }
  .im-filtres { position: static; }
  .im-plus { grid-template-columns: 1fr 1fr; }
  .im-galerie, .im-galerie.g2, .im-galerie.g3 { grid-template-columns: 1fr; grid-template-rows: 280px; }
  .im-galerie a:not(:first-child) { display: none; }
  .im-galerie a:first-child { grid-row: auto; }
  .im-etapes-frais { grid-template-columns: 1fr; gap: 24px; }
  .im-barre-mobile { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: #fff; border-top: 1px solid var(--hs-line); padding: 10px 16px; gap: 12px; align-items: center; justify-content: space-between; box-shadow: 0 -10px 30px rgba(19, 26, 66, .1); }
  .im-barre-mobile b { font-family: var(--hs-display); color: var(--hs-night); }
  body.im-fiche-page { padding-bottom: 72px; }
  body.im-fiche-page .chatbot-widget, body.im-fiche-page .social-menu { bottom: 86px !important; }
  .im-carte-map { height: 420px; }
}
@media (prefers-reduced-motion: reduce) { .im-carte, .im-carte-photo img, .im-hero-mosaique .im-flottant { transition: none; animation: none; } }
