/* Immogena — sapin, blanc d'hiver, brique de Montréal.
   Public : éditorial, sérif en display, la « taille » (4½) comme signature.
   Admin : outil dense, sans-serif, chiffres en mono. */

:root {
  --encre: #22271f;
  --blanc: #fcfcfa;
  --sapin: #2e5339;
  --sapin-fonce: #24422d;
  --brique: #b4472e;
  --pierre: #7c8279;
  --sable: #edebe3;
  --sable-fonce: #dedbd0;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--encre);
  background: var(--blanc);
  line-height: 1.5;
}
a { color: var(--sapin); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; }

/* ---------- primitives partagées ---------- */

.marque {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--encre);
  text-decoration: none;
}
.marque-point { color: var(--brique); }

.bouton {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--sable-fonce);
  border-radius: 6px;
  background: var(--blanc);
  color: var(--encre);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}
.bouton:hover { border-color: var(--pierre); }
.bouton-principal {
  background: var(--sapin);
  border-color: var(--sapin);
  color: #fff;
}
.bouton-principal:hover { background: var(--sapin-fonce); border-color: var(--sapin-fonce); }
.bouton-danger { color: var(--brique); border-color: var(--brique); }
.bouton-danger:hover { background: var(--brique); color: #fff; }
.bouton-large { width: 100%; text-align: center; padding: 0.8rem 1rem; font-size: 1rem; }
.bouton-lien { border: none; background: none; color: var(--brique); cursor: pointer; font-size: 0.8rem; padding: 0.15rem 0; }
.bouton:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--sapin);
  outline-offset: 2px;
}

.champ { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; }
.champ > span { font-weight: 600; font-size: 0.8rem; color: var(--pierre); }
.champ input, .champ select, .champ textarea,
.filtres input, .filtres select, .ligne-form input, .ligne-form select, textarea {
  font: inherit;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--sable-fonce);
  border-radius: 6px;
  background: #fff;
  color: var(--encre);
  max-width: 100%;
}
.champ-large { grid-column: 1 / -1; }
.champ-cases { flex-direction: row; flex-wrap: wrap; gap: 1rem; align-items: center; border: none; padding: 0; margin: 0; }
.champ-cases legend { font-weight: 600; font-size: 0.8rem; color: var(--pierre); padding: 0; margin-bottom: 0.3rem; }
.case { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; cursor: pointer; }
.case input { accent-color: var(--sapin); width: 1rem; height: 1rem; }

.pastille {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--sable);
  color: var(--encre);
}
.pastille-disponible, .pastille-publiee, .pastille-acceptee, .pastille-effectuee { background: #dcebdd; color: var(--sapin-fonce); }
.pastille-loue, .pastille-archivee { background: var(--sable); color: var(--pierre); }
.pastille-en_reno, .pastille-en_analyse, .pastille-en_cours, .pastille-planifiee { background: #f3e8d3; color: #7a5b18; }
.pastille-bloque, .pastille-refusee, .pastille-desiste, .pastille-annulee, .pastille-absent { background: #f4dfd9; color: var(--brique); }
.pastille-rush { background: var(--brique); color: #fff; }
.pastille-en_attente, .pastille-recue, .pastille-brouillon { background: #e3e7f2; color: #3a4a75; }
.pastille-visite_planifiee { background: #dceceb; color: #1f5c56; }
.pastille-admin { background: var(--encre); color: #fff; }

.flash {
  padding: 0.6rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  background: #dcebdd;
  color: var(--sapin-fonce);
  border: 1px solid #c2dcc5;
}
.flash-erreur { background: #f4dfd9; color: var(--brique); border-color: #e4c3b8; }

.vide { color: var(--pierre); font-size: 0.9rem; }
.aide { color: var(--pierre); font-size: 0.8rem; }
.hors-ecran { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- admin ---------- */

body.admin { display: flex; min-height: 100vh; background: #f6f5f0; }

.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--encre);
  color: var(--blanc);
  display: flex;
  flex-direction: column;
  padding: 1.2rem 0.9rem;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .marque { color: var(--blanc); }
.sidebar nav { display: flex; flex-direction: column; gap: 0.15rem; }
.sidebar nav a {
  color: #c9cec6;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.92rem;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar nav a.actif { background: var(--sapin); color: #fff; }
.sidebar-pied { margin-top: auto; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.82rem; }
.sidebar-pied a { color: #c9cec6; }
.sidebar-pied .utilisateur { color: #fff; font-weight: 600; }

.contenu { flex: 1; padding: 1.5rem 2rem 4rem; max-width: 1200px; min-width: 0; }

.entete-page {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.entete-page h1 { margin: 0; font-size: 1.5rem; }
.sous-titre { color: var(--pierre); margin: 0.2rem 0 0; font-size: 0.9rem; }
.taille-titre { color: var(--brique); font-family: var(--serif); }
.groupe-boutons { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.groupe-boutons form { display: inline; }

.panneau-todo { border-left: 4px solid var(--sapin); }
.liste-todo { list-style: none; margin: 0; padding: 0; }
.liste-todo li + li { border-top: 1px solid var(--sable); }
.liste-todo a {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.55rem 0.3rem;
  text-decoration: none;
  color: var(--encre);
  border-radius: 6px;
}
.liste-todo a:hover { background: #f6f5f0; }
.liste-todo strong { font-family: var(--mono); font-size: 1.3rem; min-width: 2rem; text-align: right; }
.liste-todo .fleche { margin-left: auto; color: var(--pierre); }
.tout-a-jour { color: var(--sapin-fonce); font-size: 1rem; margin: 0.3rem 0; }

.recherche-sidebar input {
  width: 100%;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
}
.recherche-sidebar input::placeholder { color: #9aa096; }
.nav-titre {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #7c8279;
  padding: 0.9rem 0.7rem 0.25rem;
}
.bouton-action { white-space: nowrap; }

.colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; align-items: start; }

.panneau {
  background: #fff;
  border: 1px solid var(--sable-fonce);
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}
.panneau h2 { margin: 0 0 0.8rem; font-size: 1.05rem; }
.panneau h3 { font-size: 0.95rem; margin: 1.2rem 0 0.5rem; }
.panneau-message { border-left: 4px solid var(--sapin); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--pierre); padding: 0.4rem 0.6rem; }
td { padding: 0.5rem 0.6rem; border-top: 1px solid var(--sable); vertical-align: top; }
.tableau-liste { background: #fff; border: 1px solid var(--sable-fonce); border-radius: 10px; overflow: hidden; display: table; }
.tableau-liste tbody tr:hover { background: #f6f5f0; }
.cellule-nombre, .cellule-date { font-family: var(--mono); font-size: 0.82rem; white-space: nowrap; }
.cellule-taille { font-family: var(--serif); font-size: 1rem; }
.compte { color: var(--pierre); font-size: 0.85rem; }

.filtres { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.8rem; }
.filtres input[type="search"] { min-width: 220px; }

.grille-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.8rem; margin-bottom: 0.8rem; }
.grille-metrique { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.actions-form { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.ligne-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

.galerie-admin { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.galerie-admin figure { margin: 0; width: 140px; }
.galerie-admin img { width: 140px; height: 100px; object-fit: cover; border-radius: 6px; }

.pipeline { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.etape {
  background: #fff;
  border: 1px solid var(--sable-fonce);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  color: var(--encre);
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}
.etape strong { font-family: var(--mono); }
.etape span { font-size: 0.8rem; color: var(--pierre); }
.etape:hover, .etape.actif { border-color: var(--sapin); }
.etape.actif { background: var(--sapin); }
.etape.actif span, .etape.actif strong { color: #fff; }

.onglets { display: flex; gap: 0.3rem; }
.onglets a { padding: 0.35rem 0.9rem; border-radius: 6px; text-decoration: none; color: var(--pierre); font-size: 0.9rem; }
.onglets a.actif { background: var(--encre); color: #fff; }

.carte-affichage, .carte-candidature { border: 1px solid var(--sable); border-radius: 8px; padding: 0.9rem; margin-bottom: 0.8rem; }
.carte-affichage header, .carte-candidature header { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.6rem; }
.carte-candidature input[type="text"], .carte-candidature textarea { width: 100%; margin: 0.4rem 0; }
.liste-documents { list-style: none; padding: 0; margin: 0.4rem 0; display: grid; gap: 0.25rem; }
.ligne-visite { padding: 0.35rem 0; border-bottom: 1px solid var(--sable); }
.visite-par { color: var(--pierre); font-size: 0.85rem; }
.ligne-form-verticale { flex-direction: column; align-items: stretch; gap: 0.3rem; }

.bloc-acces {
  background: #f3efdf;
  border: 1px solid #e2dbc0;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  max-width: 380px;
}
.bloc-acces p { margin: 0.1rem 0; white-space: pre-line; }
.bloc-acces span {
  display: inline-block;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7a5b18;
  margin-right: 0.4rem;
  min-width: 4.5rem;
}
.bloc-acces-vide { background: none; border: none; color: var(--pierre); padding: 0.2rem 0; }
.cellule-acces { min-width: 220px; }

.cellule-documents { min-width: 180px; }
.document-bail { display: flex; align-items: center; gap: 0.2rem; }
.document-bail a { font-size: 0.85rem; text-decoration: none; }
.document-bail a:hover { text-decoration: underline; }
.document-bail form { display: inline; }
.bouton-mini { font-size: 0.8rem; padding: 0.25rem 0.6rem; cursor: pointer; display: inline-block; margin-top: 0.2rem; }

.carte-utilisateur.inactif { opacity: 0.6; }
.editeur-ligne summary { cursor: pointer; color: var(--sapin); font-size: 0.85rem; }
.editeur-ligne form { margin-top: 0.8rem; min-width: 300px; }
.lien-public { font-size: 0.9rem; }
.lien-public code { background: var(--sable); padding: 0.2rem 0.5rem; border-radius: 4px; font-family: var(--mono); font-size: 0.85rem; }

.connexion-page { display: grid; place-items: center; background: var(--encre); }
.connexion-boite {
  background: var(--blanc);
  border-radius: 12px;
  padding: 2.2rem;
  width: min(380px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.connexion-boite h1 { font-size: 1.1rem; margin: 0; color: var(--pierre); font-weight: 500; }
.connexion-boite form { display: flex; flex-direction: column; gap: 0.9rem; }

/* ---------- public ---------- */

body.public { background: var(--blanc); }
body.public main { max-width: 1060px; margin: 0 auto; padding: 0 1.2rem 3rem; }

.entete-site {
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.entete-site .devise { color: var(--pierre); font-size: 0.9rem; }

.heros { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--sable-fonce); margin-bottom: 2rem; }
.heros h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 3.1rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
}
.heros p { max-width: 46ch; color: var(--pierre); font-size: 1.05rem; margin: 0; }

.section-annonces { margin-top: 2.5rem; }
.section-annonces h2 { font-family: var(--serif); font-size: 1.4rem; }
.grille-annonces { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.3rem; }

.carte-annonce { text-decoration: none; color: var(--encre); }
.carte-photo { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sable); }
.carte-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.carte-annonce:hover .carte-photo img { transform: scale(1.03); }
.badge-taille {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--blanc);
  color: var(--encre);
  font-family: var(--serif);
  font-size: 1.05rem;
  padding: 0.1rem 0.6rem;
  border-radius: 6px;
}
.carte-monogramme, .galerie-monogramme {
  display: grid;
  place-items: center;
  background: var(--sapin);
}
.carte-monogramme span, .galerie-monogramme span {
  font-family: var(--serif);
  font-size: 4rem;
  color: var(--blanc);
}
.carte-texte { padding: 0.7rem 0.2rem 0; }
.carte-prix { font-family: var(--mono); font-weight: 600; margin: 0; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.carte-prix small { color: var(--pierre); font-family: var(--sans); font-weight: 400; }
.carte-texte h3 { margin: 0.15rem 0; font-size: 1rem; font-weight: 600; }
.carte-details { margin: 0; color: var(--pierre); font-size: 0.85rem; }

.bandeau-loue {
  background: var(--brique);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  margin: 1.2rem 0;
}
.annonce-louee .annonce-corps { opacity: 0.75; }

.annonce-entete { padding: 1.6rem 0 1.2rem; }
.annonce-titre { display: flex; gap: 1.2rem; align-items: center; }
.grande-taille {
  font-family: var(--serif);
  font-size: 3.2rem;
  color: var(--blanc);
  background: var(--sapin);
  border-radius: 12px;
  min-width: 5.2rem;
  height: 5.2rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.annonce-titre h1 { font-family: var(--serif); font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 0; letter-spacing: -0.01em; }

.annonce-corps { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
@media (max-width: 800px) { .annonce-corps { grid-template-columns: 1fr; } }

.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; }
.galerie a { border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; }
.galerie .galerie-principale { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.galerie img { width: 100%; height: 100%; object-fit: cover; }
.galerie-monogramme { border-radius: 10px; aspect-ratio: 16 / 9; }

.visionneuse {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(24, 27, 22, 0.92);
}
.visionneuse.ouverte { display: flex; }
body.visionneuse-active { overflow: hidden; }
.visionneuse figure {
  margin: 0;
  max-width: calc(100vw - 7rem);
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.visionneuse img {
  max-width: 100%;
  max-height: calc(100vh - 5rem);
  width: auto;
  height: auto;
  border-radius: 4px;
}
.visionneuse-compteur {
  margin-top: 0.6rem;
  color: rgba(252, 252, 250, 0.75);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.visionneuse button {
  position: absolute;
  border: 0;
  background: none;
  color: rgba(252, 252, 250, 0.85);
  font-family: var(--serif);
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem 0.8rem;
}
.visionneuse button:hover, .visionneuse button:focus-visible { color: #fff; }
.visionneuse-fermer { top: 0.6rem; right: 0.8rem; font-size: 2.2rem; }
.visionneuse-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  padding: 1.2rem 0.8rem;
}
.visionneuse-prec { left: 0.4rem; }
.visionneuse-suiv { right: 0.4rem; }
@media (max-width: 700px) {
  .visionneuse figure { max-width: 100vw; padding: 0 0.5rem; }
  .visionneuse img { max-height: calc(100vh - 7rem); }
  .visionneuse-nav { font-size: 2.4rem; padding: 1rem 0.6rem; }
}

.annonce-description { margin-top: 1.6rem; max-width: 62ch; }
.annonce-description p { white-space: pre-line; }

.annonce-emplacement { margin-top: 1.6rem; }
.annonce-emplacement h2 { font-family: var(--serif); }
#carte-annonce {
  height: 340px;
  border-radius: 10px;
  border: 1px solid var(--sable-fonce);
  background: var(--sable); /* visible tant que les tuiles chargent (ou sans JS) */
}
@media (max-width: 700px) {
  #carte-annonce { height: 260px; }
}

/* badges des points d'intérêt sur la carte (divIcon Leaflet) */
.poi-marqueur {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--sapin);
  font-size: 13px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.poi-metro, .legende-carte .lettre-metro {
  background: #1a6fbf;
  border-color: #14589a;
  color: #fff;
  font-weight: 700;
  font-family: var(--sans);
  font-size: 15px;
}
.poi-rem {
  background: #6ea644;
  border-color: #578536;
  color: #fff;
  font-weight: 700;
  font-family: var(--sans);
  font-size: 14px;
}
.legende-carte { margin-top: 0.4rem; }
.legende-carte .lettre-metro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  font-size: 0.75rem;
}

.annonce-fiche {
  background: #fff;
  border: 1px solid var(--sable-fonce);
  border-radius: 12px;
  padding: 1.3rem;
  position: sticky;
  top: 1rem;
}
.fiche-prix { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; margin: 0 0 0.8rem; }
.fiche-prix small { font-family: var(--sans); font-size: 0.85rem; color: var(--pierre); font-weight: 400; }
.annonce-fiche dl { margin: 0 0 1rem; display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; font-size: 0.92rem; }
.annonce-fiche dt { color: var(--pierre); }
.annonce-fiche dd { margin: 0; }
.liste-inclusions { margin: 0; padding-left: 1.1rem; }
.fiche-note { color: var(--pierre); font-size: 0.8rem; text-align: center; margin: 0.6rem 0 0; }

.formulaire-candidature {
  margin-top: 2.5rem;
  background: var(--sable);
  border-radius: 12px;
  padding: 1.8rem;
  max-width: 720px;
}
.formulaire-candidature h2 { font-family: var(--serif); margin-top: 0; }
.formulaire-candidature fieldset { border: none; padding: 0; margin: 0 0 1.2rem; }
.formulaire-candidature legend { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.6rem; padding: 0; }
.formulaire-candidature .bouton-large { margin-top: 0.5rem; }

.page-merci { text-align: center; padding: 3.5rem 0 2rem; }
.page-merci .grande-taille { margin: 0 auto 1.2rem; }
.page-merci h1 { font-family: var(--serif); }
.page-merci p { color: var(--pierre); max-width: 44ch; margin: 0 auto 1.5rem; }

.pied-site {
  max-width: 1060px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem;
  border-top: 1px solid var(--sable-fonce);
  color: var(--pierre);
  font-size: 0.85rem;
}

/* ---------- responsive & divers ---------- */

@media (max-width: 720px) {
  body.admin { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-pied { margin-top: 0; flex-direction: row; align-items: center; gap: 0.8rem; }
  .contenu { padding: 1rem; }
  .tableau-liste { display: block; overflow-x: auto; }
  .annonce-titre { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .carte-photo img { transition: none; }
}

/* ---------- avis aux locataires en place (préavis de visite 24 h) ---------- */

.pastille-a_envoyer { background: #f3e8d3; color: #7a5b18; }
.cellule-avis { min-width: 230px; }
.avis-locataire { font-size: 0.88rem; }
.avis-locataire p { margin: 0.15rem 0; }
.avis-locataire .groupe-boutons { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.25rem; }

/* champs locataire de la section Occupation : membres de la grille, masquables */
.champs-locataire { display: contents; }
.champs-locataire[hidden] { display: none; }

/* ---------- zone de dépôt de photos (glisser-déposer) ---------- */

.zone-depot {
  border: 2px dashed var(--sable-fonce);
  border-radius: 10px;
  padding: 1.2rem;
  background: #fafaf6;
  margin-bottom: 0.8rem;
}
.zone-depot-js { cursor: pointer; }
.zone-depot-js input[type="file"] { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.zone-depot-active { border-color: var(--sapin); background: #eef4ef; }
.zone-depot-texte { margin: 0; font-size: 0.9rem; }
.zone-depot-texte .aide { display: block; margin-top: 0.15rem; }
.zone-depot-compte { margin: 0.6rem 0 0; font-size: 0.85rem; font-weight: 600; color: var(--sapin-fonce); }
.apercus-photos { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.apercus-photos:not(:empty) { margin-top: 0.8rem; }
.apercu-photo { position: relative; margin: 0; width: 140px; }
.apercu-photo img { width: 140px; height: 100px; object-fit: cover; border-radius: 6px; }
.apercu-photo-nom {
  display: grid;
  place-items: center;
  width: 140px;
  height: 100px;
  border-radius: 6px;
  background: var(--sable);
  font-size: 0.72rem;
  padding: 0.4rem;
  overflow: hidden;
  word-break: break-all;
}
.apercu-retirer {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.4rem;
  height: 1.4rem;
  border: none;
  border-radius: 99px;
  background: rgba(34, 39, 31, 0.75);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}
.apercu-retirer:hover { background: var(--brique); }

/* ---------- photos IA (maquette Nettoyage IA) ---------- */

.entete-panneau { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.entete-panneau h2 { margin-bottom: 0.8rem; }
.galerie-admin a { position: relative; display: block; }
.pastille-ia {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  background: var(--encre);
  color: #fff;
}

/* ---------- choix des photos d'une annonce ---------- */

.choix-photos { margin-bottom: 0.8rem; }
.choix-photos h3 { margin-bottom: 0.2rem; }
.galerie-choix {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0.6rem 0 0;
  padding: 0;
}
.photo-choix {
  position: relative;
  width: 156px;
  padding: 4px;
  border: 2px dashed var(--sable-fonce);
  border-radius: 8px;
  background: #fff;
  cursor: grab;
}
.photo-choix img { width: 100%; height: 100px; object-fit: cover; border-radius: 5px; filter: grayscale(0.9); opacity: 0.5; }
.photo-choix.incluse { border-style: solid; }
.photo-choix.incluse img { filter: none; opacity: 1; }
.photo-choix.photo-avant { border-color: var(--sapin); }
.photo-choix.photo-avant::before {
  content: "En avant";
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: var(--sapin);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}
.photo-choix.en-traine { opacity: 0.35; }
.photo-choix .pastille-ia { top: 8px; left: 8px; }
.photo-choix-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.5rem;
  margin-top: 0.3rem;
  font-size: 0.78rem;
}
.photo-choix-actions .case { font-size: 0.78rem; gap: 0.25rem; }
.photo-choix-actions .case input { width: 0.85rem; height: 0.85rem; }
.poignees { margin-left: auto; display: inline-flex; gap: 0.2rem; }
.deplacer {
  border: 1px solid var(--sable-fonce);
  background: #fff;
  border-radius: 4px;
  padding: 0 0.4rem;
  cursor: pointer;
  line-height: 1.3;
}
.deplacer:hover { border-color: var(--sapin); color: var(--sapin); }

.ligne-ia { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin: 0.3rem 0 0.8rem; }

/* ---------- autocomplete (suggestions sous un champ) ---------- */

.autocomplete-boite { position: relative; }
.autocomplete-liste {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: min(260px, 90vw);
  width: max-content;
  max-width: 340px;
  max-height: 340px;
  overflow-y: auto;
  margin: 0.2rem 0 0;
  padding: 0.25rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--sable-fonce);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(34, 39, 31, 0.14);
  color: var(--encre);
}
.autocomplete-option {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.autocomplete-option .detail { display: block; color: var(--pierre); font-size: 0.78rem; }
.autocomplete-option:hover, .autocomplete-option[aria-selected="true"] { background: var(--sable); }
.autocomplete-groupe {
  padding: 0.45rem 0.6rem 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--pierre);
}

/* ---------- statistiques d'usage ---------- */

.cellule-element { font-family: var(--mono); font-size: 0.78rem; word-break: break-word; }

/* ---------- recherche publique ---------- */

.nav-site { margin-left: auto; display: flex; gap: 1.1rem; }
.nav-site a { text-decoration: none; color: var(--encre); font-size: 0.92rem; }
.nav-site a:hover { color: var(--sapin); text-decoration: underline; }

.recherche-logements {
  display: flex;
  gap: 0.7rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}
.recherche-logements .champ-recherche { flex: 1 1 220px; }
.recherche-logements .champ-recherche input { width: 100%; }
.recherche-logements .bouton { padding: 0.52rem 1.3rem; }

/* ---------- grande carte de l'accueil ---------- */

.section-carte { margin-top: 2.5rem; scroll-margin-top: 1rem; }
.section-carte h2 { font-family: var(--serif); font-size: 1.4rem; }
#carte-accueil {
  height: 480px;
  border-radius: 10px;
  border: 1px solid var(--sable-fonce);
  background: var(--sable); /* visible tant que les tuiles chargent (ou sans JS) */
}
@media (max-width: 700px) {
  #carte-accueil { height: 340px; }
}
.popup-logements { display: grid; gap: 0.4rem; min-width: 190px; }
.popup-logement {
  display: block;
  text-decoration: none;
  color: var(--encre);
  line-height: 1.35;
}
.popup-logement:hover strong { text-decoration: underline; }
.popup-taille { font-family: var(--serif); font-size: 1.05rem; color: var(--sapin); font-weight: 700; }
.popup-prix { display: block; font-family: var(--mono); font-size: 0.82rem; color: var(--pierre); }

/* ---------- page Propriétaires ---------- */

.page-proprietaires .heros p { max-width: 52ch; }
.heros-actions { margin-top: 1.3rem; }
.proprietaires-etapes { margin-top: 0.5rem; }
.proprietaires-etapes h2, .page-proprietaires .apropos-valeurs h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
}
.etapes-gestion {
  list-style: none;
  counter-reset: etape;
  margin: 1.2rem 0 2.2rem;
  padding: 0;
  display: grid;
  gap: 1.1rem;
  max-width: 680px;
}
.etapes-gestion li { counter-increment: etape; display: flex; gap: 1rem; align-items: flex-start; }
.etapes-gestion li::before {
  content: counter(etape);
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--blanc);
  background: var(--sapin);
  border-radius: 10px;
  min-width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.etapes-gestion h3 { margin: 0.15rem 0 0.15rem; font-size: 1rem; }
.etapes-gestion p { margin: 0; color: var(--pierre); font-size: 0.95rem; max-width: 56ch; }

/* ---------- page À propos ---------- */

.page-apropos .heros p { max-width: 52ch; }
.apropos-histoire { max-width: 62ch; }
.apropos-histoire h2, .apropos-valeurs h2, .apropos-joindre h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
}

.apropos-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.3rem;
  margin: 2.2rem 0;
}
.apropos-photos figure { margin: 0; }
.apropos-photos img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--sable-fonce);
}
.apropos-photos figcaption { color: var(--pierre); font-size: 0.85rem; margin-top: 0.4rem; }

.grille-valeurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.3rem; }
.grille-valeurs h3 { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 0.3rem; }
.grille-valeurs p { margin: 0; color: var(--pierre); font-size: 0.95rem; }

.bande-proprietaires {
  background: var(--sapin);
  color: #fff;
  border-radius: 12px;
  padding: 2rem 1.8rem;
  margin: 2.5rem 0;
  scroll-margin-top: 1rem;
}
.bande-proprietaires h2 { font-family: var(--serif); margin-top: 0; }
.bande-proprietaires ul { padding-left: 1.2rem; }
.bande-proprietaires li { margin: 0.25rem 0; }
.bande-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0; }
.bouton-blanc { background: var(--blanc); border-color: var(--blanc); color: var(--sapin-fonce); font-weight: 600; }
.bouton-blanc:hover { background: var(--sable); border-color: var(--sable); }

.apropos-joindre { scroll-margin-top: 1rem; }
.apropos-joindre dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.2rem;
  max-width: 480px;
}
.apropos-joindre dt { color: var(--pierre); }
.apropos-joindre dd { margin: 0; }

.pied-site p { margin: 0.25rem 0; }
