/*
 * IMMGO — Écrans : vitrine publique (barre, bandeau de recherche, cartes des biens, fiche, simulateur de crédit)
 * Auteur : Jacks Ngalangala
 */

/* ─── Page publique : barre du haut, contenu, pied ─── */
.vi-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fond);
}
.vi-barre {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(22, 22, 22, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--nuit-trait);
  color: var(--nuit-texte);
  --texte: var(--nuit-texte);
  --texte-second: var(--nuit-texte-second);
  --surface: var(--nuit-surface);
  --surface-douce: var(--nuit-surface-haute);
  --trait-fort: var(--nuit-trait);
}
.vi-barre-interieur,
.vi-pied-interieur {
  width: 100%;
  max-width: var(--largeur-contenu);
  margin: 0 auto;
  padding: 0 var(--e-6);
}
.vi-barre-interieur {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-4);
}
.vi-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  color: inherit;
  text-decoration: none;
}
.vi-logo-image {
  height: 24px;
  width: auto;
}
.vi-logo-pied {
  height: 20px;
  width: auto;
}
.vi-logo-texte {
  font-weight: var(--graisse-titre);
  letter-spacing: 0.08em;
}
.vi-barre-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--e-2);
}
.vi-barre-actions .btn {
  flex-shrink: 1;
  min-width: 0;
}
.vi-barre .btn-fantome {
  color: var(--nuit-texte);
}
.vi-barre .btn-fantome:hover:not(:disabled) {
  background: var(--nuit-surface-haute);
}
.vi-principal {
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* ─── Bandeau de recherche sombre ─── */
.vi-hero {
  position: relative;
  overflow: hidden;
  padding: var(--e-16) 0 var(--e-12);
  background: radial-gradient(120% 90% at 85% 0%, #2a251b 0%, var(--nuit) 60%);
  color: var(--nuit-texte);
  --texte: var(--nuit-texte);
  --texte-second: var(--nuit-texte-second);
}
.vi-hero-interieur {
  position: relative;
  max-width: var(--largeur-contenu);
  margin: 0 auto;
  padding: 0 var(--e-6);
  display: flex;
  flex-direction: column;
  gap: var(--e-5);
}
.vi-hero-surtitre {
  color: var(--or-sur-nuit);
}
.vi-hero-titre {
  max-width: 720px;
  font-size: 44px;
  line-height: var(--interligne-titre);
  font-weight: var(--graisse-titre);
  letter-spacing: -0.01em;
}
.vi-hero-texte {
  max-width: 600px;
  font-size: var(--taille-grand);
  color: var(--nuit-texte-second);
}
.vi-hero-chiffres {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  color: var(--nuit-texte-second);
}
.vi-hero-chiffres svg {
  width: 20px;
  height: 20px;
  color: var(--or);
}
.vi-recherche {
  display: flex;
  gap: var(--e-3);
  max-width: 760px;
  padding: var(--e-2);
  border-radius: var(--r-grand);
  background: var(--surface);
  box-shadow: var(--ombre-3);
}
.vi-hero .vi-recherche {
  --surface: #ffffff;
  --texte: #1a1a1a;
  --texte-second: #5f5a4f;
  --trait-fort: transparent;
}
.vi-recherche .champ {
  flex: 1;
  min-width: 0;
}
.vi-recherche .champ-boite {
  border-color: transparent;
  box-shadow: none;
}
.vi-filtres {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-3);
}
.vi-filtres .puces {
  flex-wrap: wrap;
  overflow: visible;
}
.vi-hero .puce {
  border-color: var(--nuit-trait);
  background: rgba(255, 255, 255, 0.06);
  color: var(--nuit-texte);
}
.vi-hero .puce[aria-pressed='true'] {
  border-color: var(--or);
  background: var(--or);
  color: var(--texte-sur-or);
}
.vi-hero .vi-filtres .btn-secondaire {
  border-color: var(--nuit-trait);
  background: transparent;
  color: var(--nuit-texte);
}
.vi-bandeau-espace .vi-recherche {
  box-shadow: var(--ombre-1);
  border: 1px solid var(--trait);
}

/* ─── Sections et grille de cartes ─── */
.vi-contenu {
  width: 100%;
  max-width: var(--largeur-contenu);
  margin: 0 auto;
  padding: var(--e-10) var(--e-6) 0;
  display: flex;
  flex-direction: column;
  gap: var(--e-12);
}
.vi-bandeau-espace + .vi-contenu {
  padding: var(--e-6) 0 0;
}
.vi-resultats {
  display: flex;
  flex-direction: column;
  gap: var(--e-12);
}
.vi-section {
  display: flex;
  flex-direction: column;
  gap: var(--e-5);
  scroll-margin-top: 80px;
}
.vi-section-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-3);
}
.vi-section-titre {
  font-size: var(--taille-titre-2, 24px);
  font-weight: var(--graisse-titre);
}
.vi-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: var(--e-6);
}
.vi-carte-cadre {
  position: relative;
  min-width: 0;
}
.vi-carte {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--ombre-1);
  transition:
    transform var(--duree) var(--courbe),
    box-shadow var(--duree) var(--courbe);
}
.vi-carte:hover {
  transform: translateY(-2px);
  box-shadow: var(--ombre-2);
}
.vi-carte:focus-visible {
  outline: none;
  box-shadow: var(--anneau);
}
.vi-carte-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-douce);
}
.vi-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vi-image-vide {
  display: grid;
  place-items: center;
  color: var(--texte-faible);
  background: linear-gradient(135deg, var(--or-pale), var(--surface-douce));
}
.vi-image-vide svg {
  width: 40px;
  height: 40px;
}
.vi-carte-badges {
  position: absolute;
  top: var(--e-3);
  left: var(--e-3);
  right: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-2);
}
.vi-carte-badges .badge {
  box-shadow: var(--ombre-1);
}
.vi-carte-badges-statique {
  position: static;
}
.vi-carte-corps {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
  padding: var(--e-4) var(--e-5) var(--e-5);
}
.vi-carte-prix {
  font-size: 22px;
  font-weight: var(--graisse-titre);
}
.vi-carte-titre {
  font-size: var(--taille-corps);
  font-weight: var(--graisse-forte);
  line-height: 1.35;
}
.vi-carte-lieu {
  display: flex;
  align-items: center;
  gap: var(--e-1);
  color: var(--texte-second);
}
.vi-carte-lieu svg {
  flex: none;
  width: 18px;
  height: 18px;
}
.vi-carte-agence {
  margin-top: auto;
  padding-top: var(--e-3);
  border-top: 1px solid var(--trait);
  font-size: var(--taille-petit);
  color: var(--texte-second);
}
/* ─── Téléphone ─── */
@media (max-width: 599px) {
  .vi-barre-interieur,
  .vi-pied-interieur,
  .vi-hero-interieur {
    padding: 0 var(--e-4);
  }
  .vi-hero {
    padding: var(--e-10) 0 var(--e-8);
  }
  .vi-hero-titre {
    font-size: 30px;
  }
  .vi-hero-texte {
    font-size: var(--taille-corps);
  }
  .vi-recherche {
    flex-direction: column;
  }
  .vi-recherche .btn {
    width: 100%;
  }
  .vi-contenu {
    padding: var(--e-6) var(--e-4) 0;
  }
  .vi-grille {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--e-4);
  }
}
