.page-gestion-colotis {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

.page-gestion-colotis h1 {
  font-size: 1.4rem;
}

#champ-recherche {
  width: 100%;
  max-width: 400px;
  height: 38px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
}

.tableau-scroll {
  overflow-x: auto;
}

#tableau-profils {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#tableau-profils th,
#tableau-profils td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}

#tableau-profils th {
  background: #f4f5f7;
  font-size: 0.85rem;
}

#tableau-profils tbody tr:hover {
  background: #f9fafb;
}

#tableau-profils button {
  padding: 5px 12px;
  border: 1px solid #2563eb;
  background: #fff;
  color: #2563eb;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

#tableau-profils td:last-child {
  white-space: nowrap;
}

#tableau-profils button:hover {
  background: #eef4ff;
}

.badge-statut {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.badge-statut.en_attente { background: #fff3cd; color: #856404; }
.badge-statut.validee { background: #d4edda; color: #1e7e34; }
.badge-statut.refusee { background: #f8d7da; color: #c0392b; }

/* ---------- Modale d'edition ---------- */

.fond-modale {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.fond-modale[hidden] {
  display: none;
}

.modale-edition {
  background: #fff;
  border-radius: 8px;
  padding: 28px;
  max-width: 900px;
  width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
}

.modale-edition h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.modale-edition form {
  display: flex;
  flex-direction: column;
}

.modale-edition label {
  font-size: 0.85rem;
  margin-top: 10px;
  margin-bottom: 4px;
}

.modale-edition input,
.modale-edition select {
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
}

.sous-titre-modale {
  font-weight: bold;
  font-size: 0.9rem;
  margin-top: 18px;
  margin-bottom: 0;
  border-top: 1px solid #eee;
  padding-top: 14px;
}

/* Lignes d'adresse compactes, memes classes que sur inscription.html */
.ligne-adresse {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: flex-end;
}

.champ-inline {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.champ-inline label {
  font-size: 0.78rem;
  color: #555;
  margin-bottom: 4px;
  white-space: nowrap;
}

.champ-inline input,
.champ-inline select {
  padding: 7px 9px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.champ-type-voie   { flex: 2; }
.champ-numero-voie { flex: 1; }
.champ-complement-numero { flex: 1; }
.champ-nom-voie    { flex: 4; }
.champ-code-postal { flex: 0 0 20%; }
.champ-ville       { flex: 1; }

@media (max-width: 700px) {
  .ligne-adresse {
    flex-direction: column;
    align-items: stretch;
  }
  .champ-type-voie, .champ-numero-voie, .champ-complement-numero,
  .champ-nom-voie, .champ-code-postal, .champ-ville {
    flex: none;
  }
}

.aide-statut {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
  margin-bottom: 0;
}

#section-demande {
  border-top: 1px solid #eee;
  margin-top: 20px;
  padding-top: 16px;
}

#details-demande {
  background: #f4f5f7;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

#details-demande .lot-declare {
  margin-bottom: 6px;
}

.boutons-decision {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bouton-valider {
  padding: 9px 14px;
  border-radius: 4px;
  border: 1px solid #1e7e34;
  background: #eafaf0;
  color: #1e7e34;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
}

.bouton-valider:hover {
  background: #d4edda;
}

.bouton-refuser {
  padding: 9px 14px;
  border-radius: 4px;
  border: 1px solid #c0392b;
  background: #fdecea;
  color: #c0392b;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
}

.bouton-refuser:hover {
  background: #f8d7da;
}

#zone-motif-refus {
  margin-top: 12px;
}

#zone-motif-refus textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  margin-top: 4px;
}

#message-decision {
  margin-top: 12px;
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 4px;
}

#message-decision.succes {
  background: #eafaf0;
  color: #1e7e34;
}

#message-decision.erreur-decision {
  background: #fdecea;
  color: #c0392b;
}

.boutons-modale {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.boutons-modale button {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.bouton-principal {
  background: #2563eb;
  color: #fff;
  border: none;
}

.bouton-principal:hover {
  background: #1d4ed8;
}

.bouton-secondaire {
  background: #fff;
  border: 1px solid #ccc;
}

/* ---------- Modale "Ses biens" ---------- */

.modale-biens {
  max-width: 520px;
}

.ligne-bien {
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}

.ligne-bien:hover {
  filter: brightness(0.96);
}

.ligne-bien.contexte {
  color: #777;
  background: #f4f5f7;
}

.ligne-bien.possede {
  background: #eafbf1;
  color: #1e7e34;
  font-weight: bold;
}

.ligne-bien.indentation-1 {
  margin-left: 20px;
}

.ligne-bien.indentation-2 {
  margin-left: 40px;
}

.bloc-bien-groupe {
  margin-bottom: 10px;
}

.ligne-recherche-colotis {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ligne-recherche-colotis #champ-recherche {
  flex: 1;
  min-width: 200px;
}

#btn-copier-emails {
  height: 38px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid #2563eb;
  background: #fff;
  color: #2563eb;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

#btn-copier-emails:hover {
  background: #eef4ff;
}

#message-copie {
  font-size: 0.82rem;
  color: #1e7e34;
}

.compteur-colotis {
  font-size: 0.85rem;
  font-weight: normal;
  color: #666;
}

/* Compte dormant (cree par le webmestre, jamais connecte) */
.badge-dormant {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  background: #e8e0f5;
  color: #5b3a99;
  cursor: help;
}

.btn-supprimer-dormant {
  border-color: #c0392b;
  color: #c0392b;
  background: #fff;
}

.btn-supprimer-dormant:hover {
  background: #fdecea;
}

/* Colotis marque "Administration publique" */
.badge-admin-publique {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  background: #dbeafe;
  color: #1d4e89;
  cursor: help;
}
