/*
 * IMMGO — Écrans alignés sur le cahier Vol. 2, sections 01 à 06 : tableau de bord du gestionnaire (demandes
 * ouvertes), fiches de lot, de site, de bail et de mandat (cartes « locataire », documents, statistiques), vue
 * d'ensemble locative, loyers du mois, carte des sites (liste à gauche), profil (carte d'identité)
 * Auteur : Jacks Ngalangala
 */

/* ─── Grilles ─── */
.fa-grille-deux {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--e-6);
  align-items: start;
}
.fa-grille-large {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--e-6);
  align-items: start;
}
@media (max-width: 1023px) {
  .fa-grille-deux,
  .fa-grille-large {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ─── Demandes ouvertes (écran 19) : bandeau teinté par urgence ─── */
.fa-demandes {
  display: flex;
  flex-direction: column;
  gap: var(--e-3);
}
.fa-demande {
  --fa-teinte: var(--info);
  --fa-fond: var(--info-pale);
  display: flex;
  gap: var(--e-3);
  align-items: flex-start;
  width: 100%;
  padding: var(--e-3) var(--e-4);
  border: 0;
  border-left: 4px solid var(--fa-teinte);
  border-radius: var(--r-petit);
  background: var(--fa-fond);
  color: var(--texte);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fa-demande[data-ton='danger'] {
  --fa-teinte: var(--danger);
  --fa-fond: var(--danger-pale);
}
.fa-demande[data-ton='attention'] {
  --fa-teinte: var(--attention);
  --fa-fond: var(--attention-pale);
}
.fa-demande:hover {
  filter: brightness(0.98);
}
.fa-demande:focus-visible {
  outline: none;
  box-shadow: var(--anneau);
}
.fa-demande-icone {
  display: inline-flex;
  color: var(--fa-teinte);
  padding-top: 2px;
}
.fa-demande-texte {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fa-demande-titre {
  font-weight: 600;
}
.fa-demande-detail {
  font-size: var(--taille-petit);
  color: var(--texte-second);
}

/* ─── Locataire actuel (écrans 20 et 27) ─── */
.fa-carte-locataire {
  display: flex;
  flex-direction: column;
  gap: var(--e-4);
}
.fa-identite {
  display: flex;
  align-items: center;
  gap: var(--e-4);
}
.fa-identite .avatar {
  width: 52px;
  height: 52px;
  flex: none;
  font-size: var(--taille-corps);
}
.fa-identite-nom {
  font-size: var(--taille-grand);
  font-weight: 600;
}

/* ─── Loyers du mois (écran 28) ─── */
.fa-etat-loyer {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  white-space: nowrap;
}
.fa-totaux {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
  padding: var(--e-4) var(--e-6);
  border-top: 1px solid var(--trait);
  background: var(--surface-douce);
}
.fa-total {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-2) var(--e-6);
  align-items: baseline;
}
.fa-total-libelle {
  font-weight: 600;
  margin-right: auto;
}

/* ─── Carte des sites (écran 17) : la liste à gauche, le schéma à droite ─── */
@media (min-width: 1024px) {
  .fa-carte-page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}

/* ─── Profil (écran 13) : carte d'identité centrée ─── */
@media (min-width: 1024px) {
  .fa-grille-profil {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}
.fa-profil {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--e-2);
  text-align: center;
}
.fa-profil-menu {
  position: absolute;
  top: 0;
  right: 0;
}
.fa-profil-visuel {
  margin-bottom: var(--e-2);
}
.fa-profil-visuel .avatar,
.fa-profil-photo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  font-size: var(--taille-titre-2);
  object-fit: cover;
}
.fa-profil-nom {
  font-size: var(--taille-grand);
  font-weight: 700;
}
.fa-profil .bouton {
  margin-top: var(--e-3);
}

/* ─── Fiche d'un mandat (écran 22) : bandeau de photos du bien ─── */
.fa-photos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--e-2);
  margin-bottom: var(--e-4);
}
.fa-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-petit);
  background: var(--surface-douce);
}
@media (max-width: 599px) {
  .fa-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ─── Signatures d'un contrat de vente (écran 24) ─── */
.fa-demande[data-ton='succes'] {
  --fa-teinte: var(--succes);
  --fa-fond: var(--succes-pale);
}
.fa-signature {
  align-items: center;
  cursor: default;
}
.fa-signature:hover {
  filter: none;
}
.fa-signature-etat {
  margin-left: auto;
  font-size: var(--taille-petit);
  font-weight: 600;
  color: var(--fa-teinte);
  white-space: nowrap;
}

/* ─── Pipeline (écran 21) : prix du bien sur la carte ─── */
.pi-carte-prix {
  font-weight: 700;
  color: var(--or-texte);
}

/* ─── Invitation (écran 12) : bandeaux sur la carte sombre ─── */
.fa-invitation {
  display: flex;
  gap: var(--e-2);
  align-items: flex-start;
  padding: var(--e-3) var(--e-4);
  border-radius: var(--r-petit);
  background: rgba(46, 125, 79, 0.18);
  color: var(--nuit-texte);
  font-size: var(--taille-petit);
}
.fa-invitation .icone {
  flex: none;
  color: var(--succes-pale);
}
.fa-invitation-info {
  background: var(--nuit-surface-haute);
}
.fa-invitation-info .icone {
  color: var(--or);
}

/* ─── Chiffres clés : un grand montant ne déborde jamais de sa tuile ─── */
.fa-tuiles .tuile-valeur {
  overflow-wrap: anywhere;
}
@media (max-width: 599px) {
  .fa-tuiles .tuile-valeur {
    font-size: var(--taille-titre-3);
  }
}
.fa-pied-carte {
  display: flex;
  justify-content: center;
  padding: var(--e-2) var(--e-4);
}

/* ─── Authentification (écrans 11 et 12) : nom de l'étape au-dessus de la barre ─── */
.auth-progression-cadre {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
}
.auth-etape-nom {
  font-size: var(--taille-legende);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nuit-texte-second);
}

/* Tuiles Particulier / Entreprise : icône dans un carré doré, repère rond à droite (coché quand choisi). */
.fa-types-compte .choix-tuile {
  position: relative;
  gap: var(--e-4);
  padding: var(--e-4) var(--e-12) var(--e-4) var(--e-4);
  min-height: 84px;
}
.fa-types-compte .choix-tuile > svg {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: var(--r-moyen);
  background: var(--or-pale);
  color: var(--or-texte);
}
.fa-types-compte .choix-tuile .choix-texte > span:first-child {
  font-size: var(--taille-grand);
  font-weight: 600;
}
.fa-types-compte .choix-tuile::after {
  content: '';
  position: absolute;
  right: var(--e-4);
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border: 2px solid var(--trait-fort);
  border-radius: 50%;
}
.fa-types-compte .choix-tuile[aria-checked='true']::after {
  border-color: var(--or);
  background: radial-gradient(circle, var(--or) 0 5px, transparent 6px);
}
.auth .fa-types-compte .choix-tuile > svg {
  background: rgba(187, 164, 96, 0.16);
  color: var(--or);
}
.auth .fa-types-compte .choix-tuile::after {
  border-color: var(--nuit-trait);
}
.auth .fa-types-compte .choix-tuile[aria-checked='true']::after {
  border-color: var(--or);
}
