/* ==========================================================
   Espace membres (v12.0.0) — feuille de style du back-office.
   Signature volontairement DISTINCTE du site public (CDC §5) :
   aucun visuel festif, palette neutre anthracite / blanc cassé,
   un seul accent vert foncé désaturé, sans-serif lisible,
   bandeau fin permanent « Espace membres — usage interne »,
   navigation latérale, tableaux denses, contrastes AA, focus
   visible. Optimisé ordinateur de bureau, utilisable tablette.
   ========================================================== */

:root {
  --bo-fond: #f4f3ef;
  --bo-anthracite: #26292d;
  --bo-anthracite-2: #33373c;
  --bo-texte: #1d1f22;
  --bo-bord: #d8d5cc;
  --bo-accent: #2e5941;       /* vert foncé désaturé */
  --bo-accent-fonce: #234633;
  --bo-danger: #8f2d3c;
  --bo-attente: #8a6d1f;
  --bo-ok: #2e5941;
  --bo-carte: #ffffff;
}

* { box-sizing: border-box; }

body.membres {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bo-fond);
  color: var(--bo-texte);
  font-size: 15px;
  line-height: 1.45;
}

/* Bandeau fin permanent */
.bo-bandeau {
  background: var(--bo-anthracite);
  color: #ffffff;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.bo-layout { display: flex; align-items: flex-start; min-height: calc(100vh - 2rem); }

/* Navigation latérale */
.bo-nav {
  width: 232px;
  flex-shrink: 0;
  background: var(--bo-anthracite);
  color: #d8d5cc;
  min-height: calc(100vh - 2rem);
  padding: 1rem 0;
  position: sticky;
  top: 2rem;
}
.bo-nav__compte {
  margin: 0;
  padding: 0 1.2rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  border-bottom: 1px solid var(--bo-anthracite-2);
}
.bo-nav__role { font-weight: 400; font-size: 0.75rem; color: #b9b5aa; }
.bo-nav ul { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.bo-nav a {
  display: block;
  color: #e8e6e0;
  text-decoration: none;
  padding: 0.55rem 1.2rem;
  font-size: 0.92rem;
}
.bo-nav a:hover { background: var(--bo-anthracite-2); color: #ffffff; }
.bo-nav a.actif { background: var(--bo-accent); color: #ffffff; }

/* Contenu */
.bo-contenu { flex: 1; padding: 1.5rem 2rem 3rem; max-width: 1180px; min-width: 0; }
.bo-contenu h1 { font-size: 1.35rem; margin: 0 0 1rem; }
.bo-contenu h2 { font-size: 1.1rem; margin: 1.6rem 0 0.6rem; }
.bo-contenu h3 { font-size: 1rem; margin: 1.2rem 0 0.5rem; }

/* Écran de connexion */
.membres--connexion { display: block; }
.bo-connexion { display: flex; justify-content: center; padding: 4rem 1rem; }
.bo-carte {
  background: var(--bo-carte);
  border: 1px solid var(--bo-bord);
  border-radius: 6px;
  padding: 1.6rem 1.8rem;
  width: 100%;
  max-width: 400px;
}
.bo-carte h1 { font-size: 1.2rem; margin: 0 0 0.3rem; }
.bo-connexion__sous-titre { font-size: 0.85rem; color: #5a5d61; margin: 0 0 1rem; }
.bo-connexion__oubli { margin: 1rem 0 0; font-size: 0.85rem; }
.bo-connexion__abandon { display: block; text-align: center; text-decoration: none; }

/* Formulaires */
.bo-form label, .bo-carte label { display: block; font-size: 0.82rem; font-weight: 600; margin: 0.7rem 0 0.25rem; }
.bo-form input[type="text"], .bo-form input[type="email"], .bo-form input[type="password"],
.bo-form input[type="date"], .bo-form input[type="number"], .bo-form select, .bo-form textarea,
.bo-carte input[type="email"], .bo-carte input[type="password"],
.bo-form-inline input[type="text"] {
  width: 100%;
  max-width: 540px;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--bo-bord);
  border-radius: 4px;
  font: inherit;
  background: #ffffff;
  color: var(--bo-texte);
}
.bo-form textarea { resize: vertical; }
.bo-check { font-weight: 400 !important; font-size: 0.88rem !important; }
.bo-check--inline { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 400; font-size: 0.85rem; }
.bo-form__aide { font-size: 0.8rem; color: #5a5d61; }
.bo-filtre { margin: 0 0 1rem; font-size: 0.88rem; }
.bo-filtre label { font-weight: 600; margin-right: 0.4rem; }
.bo-filtre select, .bo-filtre input { padding: 0.35rem 0.5rem; border: 1px solid var(--bo-bord); border-radius: 4px; font: inherit; background: #fff; }
.bo-filtre--ligne { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.bo-filtre--ligne label { margin: 0; }

/* Boutons */
.bo-btn {
  background: var(--bo-accent);
  color: #ffffff;
  border: 0;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  margin-top: 0.8rem;
}
.bo-btn:hover { background: var(--bo-accent-fonce); }
.bo-btn--secondaire { background: #ffffff; color: var(--bo-texte); border: 1px solid var(--bo-bord); }
.bo-btn--secondaire:hover { background: #eceae4; }
.bo-btn--danger { background: var(--bo-danger); }
.bo-btn--danger:hover { background: #732430; }
.bo-btn--petit { padding: 0.2rem 0.55rem; font-size: 0.8rem; margin-top: 0; }
.bo-actions { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1rem 0; }
.bo-form-inline { display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.bo-form-inline input[type="text"] { max-width: 260px; width: auto; }

/* Focus visible (accessibilité) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--bo-accent);
  outline-offset: 1px;
}

/* Messages flash */
.bo-flash { border-radius: 4px; padding: 0.55rem 0.8rem; font-size: 0.88rem; max-width: 60rem; }
.bo-flash--ok { background: #e3efe7; border: 1px solid var(--bo-ok); color: #1e3d2c; }
.bo-flash--erreur { background: #f7e6e8; border: 1px solid var(--bo-danger); color: #5c1c26; }
.bo-flash--info { background: #e8eaee; border: 1px solid #9aa0a8; color: #33373c; }

/* Tableaux denses */
.bo-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; background: var(--bo-carte); margin: 0.6rem 0 1.2rem; }
.bo-table th, .bo-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--bo-bord); text-align: left; vertical-align: top; }
.bo-table thead th { background: #eceae4; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: #45484d; }
.bo-table tbody tr:hover { background: #faf9f5; }
.bo-ligne-moi { background: #eef3ef; }

/* Badges */
.bo-badge { display: inline-block; padding: 0.12rem 0.5rem; border-radius: 3px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.bo-badge--nouvelle, .bo-badge--a_moderer, .bo-badge--attente { background: #f3ecd7; color: #6b5310; }
.bo-badge--en_cours { background: #e2e8f0; color: #2c3e57; }
.bo-badge--retenue, .bo-badge--accepte, .bo-badge--ok { background: #e3efe7; color: #1e3d2c; }
.bo-badge--ecartee, .bo-badge--rejete, .bo-badge--danger { background: #f7e6e8; color: #5c1c26; }
.bo-badge--expire { background: #eceae4; color: #5a5d61; }
.bo-badge--info { background: #e8eaee; color: #33373c; }
.bo-badge--couple { background: #e9e2f2; color: #4a3566; }
.bo-badge--etat-active { background: #e3efe7; color: #1e3d2c; }
.bo-badge--etat-pourvue { background: #e2e8f0; color: #2c3e57; }
.bo-badge--etat-cloturee { background: #eceae4; color: #5a5d61; }

/* Cartes stats (accueil) */
.bo-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 0.5rem; }
.bo-carte-stat {
  display: block;
  background: var(--bo-carte);
  border: 1px solid var(--bo-bord);
  border-left: 4px solid var(--bo-accent);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: var(--bo-texte);
}
.bo-carte-stat:hover { background: #faf9f5; }
.bo-carte-stat__n { display: block; font-size: 1.8rem; font-weight: 700; }
.bo-carte-stat__l { display: block; font-weight: 600; font-size: 0.9rem; }
.bo-carte-stat__d { display: block; font-size: 0.78rem; color: #5a5d61; margin-top: 0.3rem; }

/* Lien secondaire à côté d'un titre de section */
.bo-lien { font-size: 0.8rem; font-weight: 400; margin-left: 0.8rem; }

/* Fiches de détail */
.bo-fiche {
  background: var(--bo-carte);
  border: 1px solid var(--bo-bord);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-top: 1.4rem;
}
.bo-fiche summary { cursor: pointer; font-weight: 600; }
.bo-def { display: grid; grid-template-columns: 140px 1fr; gap: 0.3rem 1rem; margin: 0.6rem 0; }
.bo-def dt { font-weight: 600; font-size: 0.85rem; color: #45484d; }
.bo-def dd { margin: 0; }
.bo-temoignage {
  border-left: 3px solid var(--bo-bord);
  margin: 0.8rem 0;
  padding: 0.4rem 0 0.4rem 1rem;
  color: #33373c;
  white-space: pre-wrap;
}

/* Tablette : la navigation latérale devient une barre horizontale */
@media (max-width: 900px) {
  .bo-layout { flex-direction: column; }
  .bo-nav {
    width: 100%;
    min-height: 0;
    position: static;
    padding: 0.4rem 0;
  }
  .bo-nav__compte { border-bottom: 0; padding-bottom: 0.3rem; }
  .bo-nav ul { display: flex; flex-wrap: wrap; }
  .bo-nav a { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
  .bo-contenu { padding: 1rem; }
  .bo-def { grid-template-columns: 1fr; }
  .bo-table { font-size: 0.8rem; }
  .bo-table th, .bo-table td { padding: 0.35rem 0.4rem; }
}
