/* ============================================================
   OsezLouer — feuille de styles responsive des NOUVELLES fonctions
   (etats des lieux, evaluation locataire, paiements/quittances).
   A inclure dans index.html / OsezLouer.html APRES style.css :
     <link rel="stylesheet" href="css/ozl.features.responsive.css">
   Palette alignee sur style_responsive_grid.css (#2B2B2B / #F7F7F7).
   ============================================================ */

:root {
  --ozl-accent: #2f6df6;
  --ozl-ink: #2b2b2b;
  --ozl-muted: #6b7785;
  --ozl-line: #e5e5e5;
  --ozl-bg: #f7f7f7;
  --ozl-ok: #1f9d55;
  --ozl-warn: #d9822b;
  --ozl-danger: #e02424;
  --ozl-radius: 8px;
}

/* Conteneur generique de fiche responsive */
.ozl-card {
  background: #fff;
  border: 1px solid var(--ozl-line);
  border-radius: var(--ozl-radius);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

/* ---------- Badges de statut de paiement ---------------------- */
.ozl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.ozl-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.ozl-badge.attendu { color: var(--ozl-muted);  background: #eef1f4; }
.ozl-badge.recu    { color: var(--ozl-ok);     background: #e6f5ec; }
.ozl-badge.partiel { color: var(--ozl-warn);   background: #fbf0e3; }
.ozl-badge.retard  { color: var(--ozl-warn);   background: #fbf0e3; }
.ozl-badge.impaye  { color: var(--ozl-danger); background: #fbe7e7; }

/* ---------- Liste des paiements / quittances ------------------ */
.ozl-paie-list { display: flex; flex-direction: column; gap: 10px; }
.ozl-paie-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--ozl-line);
  border-radius: var(--ozl-radius);
}
.ozl-paie-row .periode { font-weight: 600; color: var(--ozl-ink); }
.ozl-paie-row .montant { font-variant-numeric: tabular-nums; font-weight: 700; }

@media (max-width: 560px) {
  .ozl-paie-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "periode montant" "badge badge";
  }
  .ozl-paie-row .periode { grid-area: periode; }
  .ozl-paie-row .montant { grid-area: montant; }
  .ozl-paie-row .ozl-badge { grid-area: badge; justify-self: start; }
}

/* ---------- Grille etat des lieux ----------------------------- */
.ozl-edl-grid { display: flex; flex-direction: column; gap: 18px; }
.ozl-edl-piece {
  border: 1px solid var(--ozl-line);
  border-radius: var(--ozl-radius);
  overflow: hidden;
}
.ozl-edl-piece > h4 {
  margin: 0;
  padding: 12px 16px;
  background: var(--ozl-bg);
  font-size: 15px;
  color: var(--ozl-ink);
  border-bottom: 1px solid var(--ozl-line);
}
.ozl-edl-elem {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.ozl-edl-elem:last-child { border-bottom: none; }
.ozl-edl-elem select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  font-size: 14px;
}
@media (max-width: 480px) {
  .ozl-edl-elem { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Carte d'evaluation locataire ---------------------- */
.ozl-score {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.ozl-score-ring {
  --val: 0;            /* 0..100, fixe en ligne par le code */
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(var(--ozl-accent) calc(var(--val) * 1%), #e8edf3 0);
}
.ozl-score-ring > span {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--ozl-ink);
}
.ozl-score-detail { flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; }
.ozl-score-bar { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: 10px; }
.ozl-score-bar .lbl { font-size: 13px; color: var(--ozl-muted); }
.ozl-score-bar .track { height: 8px; border-radius: 999px; background: #e8edf3; overflow: hidden; }
.ozl-score-bar .fill { height: 100%; background: var(--ozl-accent); border-radius: 999px; }
.ozl-score-bar .pct { font-size: 13px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 480px) {
  .ozl-score { gap: 14px; }
  .ozl-score-bar { grid-template-columns: 96px 1fr 36px; }
}

/* ---------- Utilitaires responsives generiques ---------------- */
.ozl-row { display: flex; gap: 16px; flex-wrap: wrap; }
.ozl-col { flex: 1 1 280px; min-width: 0; }
.ozl-hide-sm { }
@media (max-width: 600px) {
  .ozl-hide-sm { display: none !important; }
  .ozl-card { padding: 14px; }
}

/* ---------- Carte Google Maps (vue bien + vue ensemble) ------- */
.ozl-map {
  width: 100%;
  height: 320px;
  border-radius: var(--ozl-radius-sm, 8px);
  overflow: hidden;
  background: #e9eef2;
  border: 1px solid var(--ozl-line, #e5e5e5);
}
.ozl-map-lg { height: 70vh; min-height: 380px; }   /* vue d'ensemble */

.ozl-map-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--ozl-muted, #6b7280);
  font-size: 14px;
  text-align: center;
  padding: 16px;
}

/* Info-bulle (contenu injecte dans google.maps.InfoWindow) */
.ozl-map-iw { font-size: 13px; line-height: 1.45; min-width: 160px; }
.ozl-map-iw strong { font-size: 14px; }
.ozl-iw-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: var(--ozl-primary, #10b981);
  text-decoration: none;
}
.ozl-iw-link:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .ozl-map { height: 240px; }
  .ozl-map-lg { height: 60vh; min-height: 300px; }
}
