/* CBHB — charte nominative publique commune, unique point de réglage.
   Les anciens fichiers restent en place, mais ces règles prévalent sur les cartes publiques. */
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-club-coaches],[data-referees],[data-referee-lead],#bureau-organigramme) {
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))!important;
  grid-auto-rows:auto!important;gap:22px!important;align-items:start!important;
  justify-content:stretch!important;min-width:0!important;
}
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-club-coaches],[data-referees],[data-referee-lead],#bureau-organigramme) > article.cbhb-person-card {
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  gap:0!important;padding:0!important;margin:0!important;box-sizing:border-box!important;
  width:100%!important;max-width:none!important;min-width:0!important;
  height:auto!important;min-height:0!important;overflow:hidden!important;
  border-radius:20px!important;
  border:1px solid var(--cbhb-accent-soft-border,var(--cbhb-accent,#72ff00))!important;
  background:linear-gradient(155deg,var(--cbhb-dark,#082218),var(--cbhb-bg2,#173d2f))!important;
  box-shadow:0 12px 28px rgba(0,0,0,.16)!important;
}
html body article.cbhb-person-card > img.cbhb-card-visual {
  display:block!important;box-sizing:border-box!important;
  width:100%!important;max-width:none!important;height:auto!important;
  aspect-ratio:4 / 5!important;min-height:0!important;flex:0 0 auto!important;
  margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
  background:linear-gradient(135deg,var(--cbhb-bg1,#0f5137),var(--cbhb-bg2,#173d2f))!important;
}
html body article.cbhb-person-card > img.cbhb-default-illustration {
  object-fit:contain!important;object-position:center center!important;
  padding:10px!important;
}
html body article.cbhb-person-card > img.cbhb-real-portrait {
  object-fit:contain!important;object-position:center center!important;
}
html body article.cbhb-person-card > .public-profile-card-content {
  display:block!important;flex:0 0 auto!important;box-sizing:border-box!important;
  width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;
  margin:0!important;padding:14px 16px 18px!important;
  border:0!important;border-top:3px solid var(--cbhb-accent,#72ff00)!important;
  border-radius:0!important;
  background:linear-gradient(155deg,var(--cbhb-dark,#082218),var(--cbhb-bg2,#173d2f))!important;
  color:#fff!important;
}
html body article.cbhb-person-card .person-name-line {
  display:block!important;box-sizing:border-box!important;
  width:100%!important;max-width:100%!important;
  margin:0 0 10px!important;padding:0 0 8px!important;
  border:0!important;border-bottom:1px solid rgba(255,255,255,.55)!important;
  border-radius:0!important;box-shadow:none!important;background:transparent!important;
  font-size:1.2rem!important;font-weight:800!important;line-height:1.2!important;
  text-transform:none!important;white-space:normal!important;overflow:visible!important;
}
html body article.cbhb-person-card .person-name-line > .person-first-name,
html body article.cbhb-person-card .person-name-line > .person-last-name {
  display:block!important;white-space:normal!important;overflow-wrap:anywhere!important;
  line-height:1.2!important;
}
html body article.cbhb-person-card .person-first-name {color:#fff!important;font-style:normal!important;}
html body article.cbhb-person-card .person-last-name {color:var(--cbhb-accent,#72ff00)!important;font-style:italic!important;font-weight:900!important;}
html body article.cbhb-person-card :is(.cbhb-coach-teams,.cbhb-player-positions) {
  list-style:none!important;margin:0!important;padding:0!important;
  color:#fff!important;font-size:15px!important;font-weight:700!important;line-height:1.4!important;
}
html body article.cbhb-person-card :is(.cbhb-coach-teams,.cbhb-player-positions) li {margin:0 0 4px!important;padding:0!important;overflow-wrap:anywhere!important;}
html body article.cbhb-person-card :is(.cbhb-referee-level,.bureau-function) {
  margin:4px 0!important;color:#fff!important;font-size:15px!important;font-weight:700!important;
  line-height:1.4!important;overflow-wrap:anywhere!important;
}
html body article.cbhb-person-card .cbhb-card-contact {display:block!important;margin-top:8px!important;color:#fff!important;overflow-wrap:anywhere!important;}
@media(max-width:700px) {
  html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-club-coaches],[data-referees],[data-referee-lead],#bureau-organigramme) {
    grid-template-columns:minmax(0,1fr)!important;gap:16px!important;
  }
  html body article.cbhb-person-card .person-name-line {font-size:1.15rem!important;}
}

/* CBHB V5 — uniquement les cartes du bureau : même hauteur, quel que soit le nombre de fonctions. */
html body #bureau-organigramme {
  grid-auto-rows: minmax(0, 1fr) !important;
  align-items: stretch !important;
}
html body #bureau-organigramme > article.cbhb-person-card {
  height: 100% !important;
  align-self: stretch !important;
}
html body #bureau-organigramme > article.cbhb-person-card > .public-profile-card-content {
  flex: 1 1 auto !important;
}
