/* Pages internes et archive Actualités — v0.8.3 */
.bb-page-main,
.bb-news-archive {
  min-height: 60vh;
  padding: 54px 0 16px;
  background:
    radial-gradient(circle at 8% 4%, rgba(24, 199, 230, .08), transparent 24%),
    linear-gradient(180deg, #effbfe 0%, #f8fdff 100%);
}
.bb-page-shell {
  width: min(var(--bb-shell), calc(100% - 40px));
  margin-inline: auto;
}
.bb-page-header,
.bb-news-header {
  max-width: 920px;
  margin: 0 0 28px;
}
.bb-page-kicker {
  margin: 0 0 9px;
  color: #009fc4;
  font-size: .69rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.bb-page-header h1,
.bb-news-header h1 {
  margin: 0;
  color: var(--bb-navy-deep);
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  font-weight: 920;
  letter-spacing: -.055em;
  line-height: 1.02;
}
.bb-page-intro,
.bb-news-header > p:last-child {
  max-width: 760px;
  margin: 15px 0 0;
  color: #557383;
  font-size: 1rem;
  line-height: 1.65;
}
.bb-page-card {
  overflow: hidden;
  padding: clamp(22px, 3.5vw, 42px);
  background: #fff;
  border: 1px solid #d1ebf2;
  border-radius: 24px;
  box-shadow: 0 18px 46px rgba(0, 68, 94, .08);
}
.bb-page-content {
  min-width: 0;
  color: #113e53;
  font-size: 1rem;
  line-height: 1.7;
}
.bb-page-content::after { display: table; clear: both; content: ''; }
.bb-page-content > *:first-child { margin-top: 0 !important; }
.bb-page-content > *:last-child { margin-bottom: 0 !important; }
.bb-page-content h2,
.bb-page-content h3,
.bb-page-content h4 {
  color: var(--bb-navy-deep);
  letter-spacing: -.03em;
  line-height: 1.17;
}
.bb-page-content h2 { margin: 1.8em 0 .7em; font-size: clamp(1.55rem, 2.6vw, 2.25rem); }
.bb-page-content h3 { margin: 1.5em 0 .6em; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.bb-page-content p { margin: 0 0 1.15em; }
.bb-page-content a { color: #008cad; }

/* Les médias des pages utilitaires ne doivent jamais redevenir des hero pleine largeur. */
.bb-page-content img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
}
.bb-page-content > figure,
.bb-page-content > .wp-block-image,
.bb-page-content > p:has(> img:only-child) {
  width: min(100%, 860px);
  margin: 26px auto;
  text-align: center;
}
.bb-page-content img[src$=".svg"],
.bb-page-content img[src*="logo" i],
.bb-page-content img[class*="logo" i],
.bb-page-content img[src*="crest" i],
.bb-page-content img[class*="crest" i] {
  width: auto !important;
  max-width: 150px !important;
  max-height: 150px !important;
}
.bb-page-content figure img,
.bb-page-content .wp-block-image img { display: block; margin-inline: auto; }
.bb-page-content figcaption { margin-top: 8px; color: #718995; font-size: .78rem; }

/* Défenses pour widgets de match/effectif et anciens shortcodes. */
.bb-page-main--utility .bb-page-card { padding: clamp(18px, 2.8vw, 34px); }
.bb-page-main--utility .bb-page-content > img:first-child,
.bb-page-main--utility .bb-page-content > figure:first-child,
.bb-page-main--utility .bb-page-content > .wp-block-image:first-child { margin-top: 0; }
.bb-page-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.bb-page-content th,
.bb-page-content td {
  padding: 11px 12px;
  border-bottom: 1px solid #dcedf2;
  text-align: left;
  vertical-align: middle;
}
.bb-page-content th { color: #124359; background: #f0fbfd; font-size: .78rem; text-transform: uppercase; }
.bb-page-content iframe { display: block; width: 100%; max-width: 100%; border: 0; }
.bb-page-content svg { max-width: 100%; max-height: 220px; }

/* Actualités : vignettes compactes, jamais d'image plein écran. */
.bb-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.bb-news-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d1ebf2;
  border-radius: 20px;
  box-shadow: 0 13px 31px rgba(0, 67, 93, .07);
  transition: transform .18s ease, box-shadow .18s ease;
}
.bb-news-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(0, 67, 93, .11); }
.bb-news-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #dff6fa;
}
.bb-news-card__media img,
.bb-news-card__media .bb-media-fallback {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}
.bb-news-card__body { padding: 17px 18px 20px; }
.bb-news-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin: 0 0 10px;
  color: #6a8491;
  font-size: .63rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.bb-news-card__meta span { color: #008fb2; }
.bb-news-card h2 {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.34rem);
  letter-spacing: -.027em;
  line-height: 1.2;
}
.bb-news-card h2 a { color: #06364d; text-decoration: none; }
.bb-news-card h2 a:hover { color: #008eaf; }
.bb-news-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 11px 0 15px;
  color: #617d8b;
  font-size: .86rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.bb-news-card__link { color: #008dab; font-size: .76rem; font-weight: 850; text-decoration: none; }
.bb-news-empty { grid-column: 1 / -1; padding: 36px; background: #fff; border: 1px solid #d1ebf2; border-radius: 18px; }
.bb-news-count { margin-top: 9px !important; color: #008eaf !important; font-size: .78rem !important; font-weight: 850; letter-spacing: .02em; }
.bb-news-pagination { margin-top: 34px; padding-top: 24px; border-top: 1px solid #d7edf3; }
.bb-news-pagination__status { margin: 0 0 12px; color: #6b8491; font-size: .76rem; font-weight: 750; }
.bb-news-pagination .nav-links,
.bb-news-pagination ul.page-numbers { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bb-news-pagination ul.page-numbers li { margin: 0; padding: 0; }
.bb-news-pagination .page-numbers {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #07506a;
  background: #fff;
  border: 1px solid #cde8ef;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}
.bb-news-pagination .page-numbers.current { color: #fff; background: #057f9f; border-color: #057f9f; box-shadow: 0 6px 16px rgba(5, 127, 159, .18); }
.bb-news-pagination a.page-numbers:hover { color: #fff; background: #0795b8; border-color: #0795b8; }

@media (max-width: 980px) {
  .bb-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bb-page-main,
  .bb-news-archive { padding-top: 32px; }
  .bb-page-shell { width: min(100% - 26px, var(--bb-shell)); }
  .bb-page-card { padding: 18px 15px; border-radius: 18px; }
  .bb-news-grid { grid-template-columns: 1fr; gap: 16px; }
  .bb-news-card__body { padding: 15px 15px 18px; }
  .bb-page-content img { max-height: 340px; }
  .bb-page-content img[src$=".svg"],
  .bb-page-content img[src*="logo" i],
  .bb-page-content img[class*="logo" i],
  .bb-page-content img[src*="crest" i],
  .bb-page-content img[class*="crest" i] { max-width: 110px !important; max-height: 110px !important; }
}


/* Ajustements utilitaires complémentaires — v0.8.3 */
.bb-page-main--utility .bb-page-shell {
  width: min(1160px, calc(100% - 40px));
}
.bb-page-main--utility .bb-page-header {
  max-width: 860px;
}
.bb-page-main--utility .bb-page-card {
  max-width: 100%;
  padding: clamp(16px, 2.2vw, 28px);
}
.bb-page-content--calendrier-resultats,
.bb-page-content--effectif {
  font-size: .96rem;
}
.bb-page-content--calendrier-resultats > div,
.bb-page-content--effectif > div,
.bb-page-content--calendrier-resultats .wp-block-group,
.bb-page-content--effectif .wp-block-group,
.bb-page-content--calendrier-resultats .wp-block-columns,
.bb-page-content--effectif .wp-block-columns {
  max-width: 100% !important;
}
.bb-page-content--calendrier-resultats .wp-block-group,
.bb-page-content--effectif .wp-block-group {
  padding: clamp(12px, 1.8vw, 18px) !important;
}
.bb-page-content--calendrier-resultats h2,
.bb-page-content--effectif h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.95rem);
}
.bb-page-content--calendrier-resultats h3,
.bb-page-content--effectif h3 {
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
}
.bb-page-content--calendrier-resultats img {
  max-width: 92px !important;
  max-height: 92px !important;
}
.bb-page-content--calendrier-resultats table img,
.bb-page-content--calendrier-resultats .wp-block-table img {
  max-width: 56px !important;
  max-height: 56px !important;
}
.bb-page-content--effectif table img,
.bb-page-content--effectif .wp-block-table img {
  max-width: 54px !important;
  max-height: 54px !important;
  border-radius: 50%;
  object-fit: cover;
}
.bb-page-content--calendrier-resultats svg,
.bb-page-content--effectif svg {
  max-height: 90px;
}
.bb-page-content--calendrier-resultats [class*="logo" i] img,
.bb-page-content--calendrier-resultats [class*="crest" i] img,
.bb-page-content--calendrier-resultats [class*="team" i] img,
.bb-page-content--calendrier-resultats [class*="club" i] img,
.bb-page-content--effectif [class*="logo" i] img,
.bb-page-content--effectif [class*="crest" i] img,
.bb-page-content--effectif [class*="team" i] img,
.bb-page-content--effectif [class*="club" i] img {
  max-width: 80px !important;
  max-height: 80px !important;
}
.bb-page-content--calendrier-resultats [class*="match" i],
.bb-page-content--calendrier-resultats [class*="fixture" i],
.bb-page-content--calendrier-resultats [class*="result" i],
.bb-page-content--effectif [class*="player" i],
.bb-page-content--effectif [class*="squad" i] {
  min-height: 0 !important;
}
.bb-page-content--calendrier-resultats .wp-block-columns,
.bb-page-content--effectif .wp-block-columns {
  gap: 18px;
}
@media (max-width: 640px) {
  .bb-page-main--utility .bb-page-shell { width: min(100% - 26px, 1160px); }
  .bb-page-content--calendrier-resultats img { max-width: 72px !important; max-height: 72px !important; }
  .bb-page-content--effectif table img,
  .bb-page-content--effectif .wp-block-table img,
  .bb-page-content--calendrier-resultats table img,
  .bb-page-content--calendrier-resultats .wp-block-table img { max-width: 44px !important; max-height: 44px !important; }
}


/* Archive et pages club — finition v0.8.3 */
.bb-news-archive .bb-page-shell {
  width: min(1180px, calc(100% - 40px));
}
.bb-news-archive .bb-news-header {
  margin-bottom: 24px;
}
.bb-news-archive .bb-news-header h1 {
  font-size: clamp(2.25rem, 4vw, 3.55rem);
}
.bb-news-card__media {
  max-height: 220px;
}

/* Calendrier et effectif : densité d'un média sportif, pas d'un hero de landing page. */
.bb-page-main--utility {
  padding-top: 38px;
}
.bb-page-main--utility .bb-page-shell {
  width: min(1040px, calc(100% - 40px));
}
.bb-page-main--utility .bb-page-header {
  margin-bottom: 20px;
}
.bb-page-main--utility .bb-page-header h1 {
  font-size: clamp(2rem, 3.5vw, 3.15rem);
}
.bb-page-main--utility .bb-page-card {
  padding: 20px;
  border-radius: 20px;
}
.bb-page-content--calendrier-resultats,
.bb-page-content--effectif {
  font-size: .91rem;
  line-height: 1.55;
}
.bb-page-content--calendrier-resultats [style*="padding"],
.bb-page-content--effectif [style*="padding"] {
  max-width: 100%;
}
.bb-page-content--calendrier-resultats img {
  max-width: 76px !important;
  max-height: 76px !important;
}
.bb-page-content--calendrier-resultats table img,
.bb-page-content--calendrier-resultats .wp-block-table img {
  max-width: 46px !important;
  max-height: 46px !important;
}
.bb-page-content--effectif img {
  max-height: 240px;
}
.bb-page-content--effectif table img,
.bb-page-content--effectif .wp-block-table img {
  max-width: 48px !important;
  max-height: 48px !important;
}
.bb-page-content--calendrier-resultats [class*="hero" i],
.bb-page-content--calendrier-resultats [class*="header" i],
.bb-page-content--effectif [class*="hero" i],
.bb-page-content--effectif [class*="header" i] {
  min-height: 0 !important;
  padding: 18px 20px !important;
  border-radius: 16px !important;
}
.bb-page-content--calendrier-resultats [class*="match" i],
.bb-page-content--calendrier-resultats [class*="fixture" i],
.bb-page-content--calendrier-resultats [class*="result" i] {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}
.bb-page-content--calendrier-resultats h2,
.bb-page-content--effectif h2 {
  margin-top: 1.35em;
  font-size: clamp(1.28rem, 2vw, 1.72rem);
}
.bb-page-content--calendrier-resultats h3,
.bb-page-content--effectif h3 {
  font-size: clamp(1.02rem, 1.6vw, 1.26rem);
}
@media (max-width: 640px) {
  .bb-news-archive .bb-page-shell,
  .bb-page-main--utility .bb-page-shell { width: min(100% - 26px, 1180px); }
  .bb-page-main--utility { padding-top: 28px; }
  .bb-page-main--utility .bb-page-card { padding: 14px; }
  .bb-page-content--calendrier-resultats img { max-width: 62px !important; max-height: 62px !important; }
  .bb-news-pagination .page-numbers { min-width: 36px; min-height: 36px; padding: 0 10px; }
}
