/* CBHB public member-card charter: shared layout, active-theme colors. */
.public-profile-card,
.coach-group .coach-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  min-width: 0;
  padding: 0 !important;
  overflow: hidden !important;
  color: #fff !important;
  background: linear-gradient(155deg, var(--cbhb-dark, #082218), var(--cbhb-bg2, #173d2f)) !important;
  border: 1px solid var(--cbhb-accent-soft-border, rgba(114,255,0,.45)) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.20) !important;
}
:is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead],[data-public-bureau]) > .public-profile-card img,
.public-profile-card > img,
.coach-group .coach-card > img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 220px !important;
  min-height: 0 !important;
  flex: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center 25% !important;
  background: linear-gradient(135deg, var(--cbhb-bg1, #0f5137), var(--cbhb-bg2, #173d2f)) !important;
  border: 0 !important;
  border-radius: 0 !important;
}
.public-profile-photo-placeholder {
  display: grid;
  width: 100%;
  height: 220px;
  place-items: center;
  color: var(--cbhb-accent, #72ff00);
  background: radial-gradient(circle at 50% 42%, var(--cbhb-bg2, #173d2f), var(--cbhb-dark, #082218));
}
.public-profile-photo-placeholder::before {
  content: 'CBHB';
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .08em;
}
.public-profile-card > div,
.coach-group .coach-card .public-profile-card-content {
  min-width: 0;
  padding: 12px 14px 15px !important;
  color: #fff !important;
  background: linear-gradient(155deg, var(--cbhb-dark, #082218), var(--cbhb-bg2, #173d2f)) !important;
}
.public-profile-card h3,
.coach-group .coach-card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .35em;
  margin: 0 0 8px !important;
  padding: 0 0 8px !important;
  color: #fff !important;
  border-bottom: 1px solid rgba(255,255,255,.58) !important;
  font-size: 18px !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
  text-transform: uppercase;
}
.public-profile-card .person-first-name,
.coach-group .coach-card .person-first-name { color: #fff !important; }
.public-profile-card .person-last-name,
.coach-group .coach-card .person-last-name {
  color: var(--cbhb-accent, #72ff00) !important;
  font-style: italic;
  font-weight: 900;
}
.public-profile-card > div > strong,
.coach-group .coach-card .public-profile-card-role {
  display: block;
  margin: 0;
  color: #fff !important;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
}
.public-profile-card p,
.coach-group .coach-card p {
  margin: 8px 0 0 !important;
  color: rgba(255,255,255,.9) !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
@media (max-width: 560px) {
  .public-profile-card > img, .coach-group .coach-card > img, .public-profile-photo-placeholder { height: 190px !important; }
  .public-profile-card h3, .coach-group .coach-card h3 { font-size: 16px !important; }
}

/* Global coaches use the same portrait card grid as team rosters. */
.coach-group .coach-people.public-profile-card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 220px)); align-items: stretch; gap: 16px; }
.coach-group .coach-card { width: 100%; max-width: 220px; min-height: 320px; padding: 0 !important; gap: 0; align-items: stretch; }
.coach-group .coach-card img { height: 220px !important; object-fit: cover; }
.coach-group .coach-card img.public-profile-illustration { object-fit: contain; padding: 8px; }
.coach-group .coach-card .public-profile-card-content { width: 100%; flex: 1; padding: 12px; }
/* Match the approved member-card name band on all public rosters. */
.coach-group .coach-card .person-name-line { background: transparent !important; border: 0 !important; border-radius: 0 !important; border-bottom: 1px solid rgba(255,255,255,.62) !important; padding: 0 0 8px !important; }
.coach-group .coach-card .person-first-name { color: #fff !important; }
.coach-group .coach-card .public-profile-card-role { color: var(--cbhb-accent, #ff7900) !important; }
.bureau-org > article { display: flex !important; flex-direction: column; align-items: stretch; overflow: hidden; background: var(--cbhb-dark, #321408) !important; border-color: var(--cbhb-accent-soft-border, #ffd0b2) !important; }
.bureau-org > article > img { width: 100% !important; height: 220px !important; object-fit: cover !important; }
.bureau-org > article > div { padding: 12px !important; border-top: 0 !important; color: #fff !important; }
.bureau-org .bureau-person-name { margin: 0 0 8px !important; padding: 0 0 8px !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; border-bottom: 1px solid rgba(255,255,255,.62) !important; color: #fff !important; }
.bureau-org .bureau-person-name span { color: #fff !important; }
.bureau-org .bureau-person-name strong { color: var(--cbhb-accent, #ff7900) !important; font-style: italic; text-transform: uppercase; }
.bureau-org .bureau-function { margin: 8px 0 0 !important; color: var(--cbhb-accent, #ff7900) !important; font-size: 15px !important; line-height: 1.45; }
/* Shared name and role accents across member, coach, referee, and bureau cards. */
.public-profile-card .person-first-name { color: #fff !important; }
.public-profile-card .person-last-name { color: var(--cbhb-accent, #ff7900) !important; font-style: italic !important; }
.public-profile-card > div > strong { color: var(--cbhb-accent, #ff7900) !important; }
/* Higher-specificity roster override follows the live roster's injected rules. */
html body .public-profile-card h3.person-name-line > span.person-first-name { color: #fff !important; }
html body .public-profile-card h3.person-name-line > strong.person-last-name { color: var(--cbhb-accent, #ff7900) !important; font-style: italic !important; }
html body section .public-profile-card > div > h3 > span { color: #fff !important; }
html body section .public-profile-card > div > h3 > strong { color: var(--cbhb-accent, #ff7900) !important; font-style: italic !important; }

/* Align Bureau portraits and text panel with the shared profile card proportions. */
html body .bureau-profile { background: linear-gradient(155deg, var(--cbhb-theme-dark, #110803), var(--cbhb-theme-end, #8d3a09)) !important; border-radius: 18px !important; }
html body .bureau-profile > img { height: 220px !important; }
html body .bureau-profile .bureau-profile-body { background: linear-gradient(155deg, var(--cbhb-theme-dark, #110803), var(--cbhb-theme-end, #8d3a09)) !important; color: #fff !important; border-top: 0 !important; }
html body .bureau-profile .bureau-person-name { color: #fff !important; }
html body .bureau-profile .bureau-person-name strong { color: var(--cbhb-accent, #ff7900) !important; font-style: italic !important; }
html body .bureau-profile .bureau-function { color: var(--cbhb-accent, #ff7900) !important; }


/* Unified public roster card charter: names on two lines, white names, stacked positions. */
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]),
html body .public-profile-card-grid {
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr)) !important;
  gap:22px !important;
  justify-content:stretch !important;
  align-items:stretch !important;
}
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card,
html body .public-profile-card-grid > article.public-profile-card,
html body #bureau-organigramme > article.bureau-profile {
  display:flex !important;
  flex-direction:column !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  min-height:430px !important;
  height:100% !important;
  align-items:stretch !important;
  padding:0 !important;
  gap:0 !important;
  overflow:hidden !important;
  border:1px solid var(--cbhb-border,#ffd2b3) !important;
  border-radius:20px !important;
  background:linear-gradient(155deg,var(--cbhb-theme-dark,#110803),var(--cbhb-theme-end,#8d3a09)) !important;
  box-shadow:0 12px 28px rgba(0,0,0,.16) !important;
}
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card > img,
html body .public-profile-card-grid > article.public-profile-card > img,
html body #bureau-organigramme > article.bureau-profile > img {
  display:block !important;
  width:100% !important;
  max-width:none !important;
  height:276px !important;
  min-height:276px !important;
  flex:none !important;
  margin:0 !important;
  border-radius:0 !important;
  object-fit:contain !important;
  object-position:center !important;
  background:linear-gradient(135deg,var(--cbhb-theme-dark,#241006),var(--cbhb-theme-end,#8d3a09)) !important;
}
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card > div,
html body .public-profile-card-grid > article.public-profile-card > .public-profile-card-content,
html body #bureau-organigramme > article.bureau-profile > .bureau-profile-body {
  display:block !important;
  flex:1 0 auto !important;
  min-width:0 !important;
  min-height:154px !important;
  width:auto !important;
  padding:14px 16px 18px !important;
  border:0 !important;
  border-top:3px solid var(--cbhb-accent) !important;
  border-radius:0 !important;
  color:#fff !important;
  background:linear-gradient(155deg,var(--cbhb-theme-dark,#110803),var(--cbhb-theme-end,#8d3a09)) !important;
}
html body .public-profile-card h3,
html body .bureau-profile .bureau-person-name {
  display:block !important;
  margin:0 0 10px !important;
  padding:0 0 8px !important;
  border:0 !important;
  border-bottom:1px solid rgba(255,255,255,.55) !important;
  color:#fff !important;
  font-size:1.2rem !important;
  font-weight:800 !important;
  line-height:1.15 !important;
  text-transform:uppercase !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}
html body .public-profile-card .person-first-name,
html body .public-profile-card .person-last-name,
html body .bureau-profile .bureau-person-name span,
html body .bureau-profile .bureau-person-name strong {
  display:block !important;
  color:#fff !important;
  font-style:normal !important;
  text-transform:uppercase !important;
}
html body .public-profile-card > div > strong,
html body .public-profile-card .public-profile-card-role,
html body .bureau-profile .bureau-function {
  display:block !important;
  margin:0 !important;
  color:var(--cbhb-accent,#ff7900) !important;
  font-size:1rem !important;
  font-weight:700 !important;
  line-height:1.3 !important;
  white-space:pre-line !important;
  overflow-wrap:anywhere !important;
}
html body .bureau-profile .bureau-profile-body { border-top:3px solid var(--cbhb-accent) !important; }
html body #bureau-organigramme {
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr)) !important;
  gap:22px !important;
  align-items:stretch !important;
}


/* Equal-height public cards after stacked positions */
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]),
html body .public-profile-card-grid,
html body #bureau-organigramme { grid-auto-rows:auto !important; align-items:start !important; }
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card,
html body .public-profile-card-grid > article.public-profile-card,
html body #bureau-organigramme > article.bureau-profile { height:auto !important; min-height:0 !important; }
/* Card palette follows the active site theme. */ html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card, html body .public-profile-card-grid > article.public-profile-card, html body #bureau-organigramme > article.bureau-profile { background:linear-gradient(155deg,var(--cbhb-dark,#082218),var(--cbhb-bg2,#173d2f)) !important; border-color:var(--cbhb-accent-soft-border,#72ff00) !important; } html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card > img, html body .public-profile-card-grid > article.public-profile-card > img, html body #bureau-organigramme > article.bureau-profile > img { background:linear-gradient(135deg,var(--cbhb-bg1,#0f5137),var(--cbhb-bg2,#173d2f)) !important; } html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card > div, html body .public-profile-card-grid > article.public-profile-card > .public-profile-card-content, html body #bureau-organigramme > article.bureau-profile > .bureau-profile-body { background:linear-gradient(155deg,var(--cbhb-dark,#082218),var(--cbhb-bg2,#173d2f)) !important; border-top-color:var(--cbhb-accent,#72ff00) !important; } 
html[data-theme] body .public-profile-card .person-last-name, html[data-theme] body .public-profile-card > div > strong, html[data-theme] body .public-profile-card .public-profile-card-role, html[data-theme] body .bureau-profile .bureau-person-name strong, html[data-theme] body .bureau-profile .bureau-function { color:#fff !important; }
html[data-theme] body .public-profile-card.public-profile-card strong:not(.person-last-name) { color:#fff !important; }
html[data-theme] body .public-profile-card .person-last-name, html[data-theme] body .coach-group .coach-card .person-last-name, html[data-theme] body .bureau-profile .bureau-person-name strong, html[data-theme] body .bureau-org .bureau-person-name strong { color:var(--cbhb-accent,#72ff00) !important; font-style:italic !important; }
html body .public-profile-card.public-profile-card .person-last-name, html body .coach-group .coach-card.coach-card .person-last-name, html body .bureau-profile.bureau-profile .bureau-person-name strong, html body .bureau-org.bureau-org .bureau-person-name strong { color:var(--cbhb-accent,#72ff00) !important; font-style:italic !important; }

/* CBHB: genuine member portraits fill the image area; default artwork stays contained. */
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card > img:not(.public-profile-illustration):not(.cbhb-default-illustration),
html body .public-profile-card-grid > article.public-profile-card > img:not(.public-profile-illustration):not(.cbhb-default-illustration),
html body #bureau-organigramme > article.bureau-profile > img.cbhb-real-portrait {
  object-fit:cover !important;
  object-position:center 30% !important;
}
html body #bureau-organigramme > article.bureau-profile > img.cbhb-default-illustration {
  object-fit:contain !important;
  object-position:center !important;
}

/* CBHB_CARTES_SOURCE_UNIFIEE_20261104_V2 : image entiere, hauteur selon contenu. */
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) {grid-auto-rows:auto!important;align-items:start!important;}
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card {height:auto!important;min-height:0!important;align-self:start!important;}
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card > img {height:276px!important;min-height:0!important;flex:0 0 276px!important;object-position:center center!important;}
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card > img[src*="portraits-officiels/"] {object-fit:contain!important;}
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card > img:not([src*="portraits-officiels/"]) {object-fit:cover!important;object-position:center 30%!important;}
html body :is([data-cbhb-roster],[data-cbhb-coaches],[data-referees],[data-referee-lead]) > article.public-profile-card > div {flex:0 0 auto!important;min-height:0!important;height:auto!important;}


/* CBHB_EQUIPE_PORTRAIT_OFFICIEL_V4 : portrait entier, identique a la source de la page club. */
html body [data-cbhb-coaches] > article.public-profile-card > img[src*="/assets/portraits-officiels/entraineur-"] {object-fit:contain!important;object-position:center center!important;}
html body [data-cbhb-coaches] > article.public-profile-card {height:auto!important;min-height:0!important;}
html body [data-cbhb-coaches] {grid-auto-rows:auto!important;align-items:start!important;}
