/* package b-hero: hero committee portraits + scoreboard numbers band */

/* ===== Hero: two columns, headline left, committee portraits right ===== */
.hero-x { position: relative; overflow: clip; }
.hero-x .hero-grid,
.hero-x .hero-grid:has(#compteur[hidden]) {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.hero-x .hero-grid > :first-child { min-width: 0; position: relative; z-index: 2; }
/* The reel must span its whole column (site.js fitReel measures .reel width); never cap it in ch,
   or the fitted size feeds back into a smaller column. */
.hero-x h1.reel-h { max-width: none; width: 100%; }

.hero-side { position: relative; min-width: 0; align-self: stretch; display: flex; align-items: center; min-height: 30rem; }

.portraits { margin: 0; width: 100%; }
.portraits ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.portraits li { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--hb, #16181B); }
.portraits img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%;
  filter: grayscale(1) contrast(1.08) brightness(1.05); mix-blend-mode: luminosity; }
.portraits li::after { content: ''; position: absolute; inset: 0; background: var(--hb, #16181B); opacity: .22; mix-blend-mode: multiply; transition: background-color 420ms cubic-bezier(.45,0,.85,1); pointer-events: none; }
.portraits li { transition: background-color 420ms cubic-bezier(.45,0,.85,1); }
.portraits li > span { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: .3rem .4rem .28rem;
  background: rgba(10,11,12,.72); color: #fff; font: 600 .66rem/1.15 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: .01em; }
.portraits .pf-initials { display: grid; place-items: center; background: color-mix(in srgb, var(--hb, #16181B) 70%, #000); }
.portraits .pf-initials b { font-family: 'IBM Plex Sans Condensed', 'Arial Narrow', Arial, sans-serif; font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 2rem); color: rgba(255,255,255,.85); letter-spacing: .04em; margin-top: -1rem; }
.portraits .pf-cap { background: var(--hon, #fff); }
.portraits .pf-cap::after { display: none; }
.portraits .pf-cap a { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: .7rem;
  color: var(--hb, #16181B); text-decoration: none; font-family: 'IBM Plex Sans Condensed', 'Arial Narrow', Arial, sans-serif; font-weight: 700; font-size: clamp(.78rem, 1.05vw, 1rem); line-height: 1.1; hyphens: auto;
  transition: color 420ms cubic-bezier(.45,0,.85,1); }
.portraits .pf-cap em { font: 600 .7rem/1.2 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif; font-style: normal; text-transform: uppercase; letter-spacing: .06em; }
.portraits .pf-cap a:hover em, .portraits .pf-cap a:focus-visible em { text-decoration: underline; text-underline-offset: 3px; }

/* Counter visible: it takes the top of the column, portraits underneath. */
.hero-side { flex-direction: column; justify-content: center; gap: 1.2rem; min-height: 0; }
.hero-side .counter { position: static; width: 100%; background: #16181B; color: #FFFFFF; border: 2px solid var(--hon, #FFFFFF); }
.hero-side .counter[hidden] { display: none; }
.hero-side .counter .num { font-size: var(--fs-2); }
.hero-x .hero-side .counter .of, .hero-x .hero-side .counter .meta { color: #FFFFFF; opacity: .8; }
.hero-x .hero-side .bar { background: rgba(255, 255, 255, .2); }

/* Tablet and phone: headline first, portraits as a compact strip below the buttons. */
@media (max-width: 56rem) {
  .hero-x .hero-grid,
  .hero-x .hero-grid:has(#compteur[hidden]) { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .hero-side { display: flex; }
  .portraits ul { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
  .portraits li > span { display: none; }
  .portraits .pf-initials b { margin-top: 0; font-size: 1rem; }
  .portraits .pf-cap { grid-column: span 6; aspect-ratio: auto; }
  .portraits .pf-cap a { position: static; flex-direction: row; align-items: baseline; gap: 1rem; padding: .7rem .8rem; }
}

/* ===== Numbers band: scoreboard ===== */
.numbers { padding: 0; }
.numbers .nums { gap: 0; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.15fr); }
.nums > div { padding: 2.8rem clamp(1rem, 1.6vw, 1.4rem) 2.6rem; border-left: 1px solid rgba(255, 255, 255, .55); min-width: 0; }
.nums > div:first-child { border-left: 0; padding-left: 0; }
.nums .fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .55rem; margin: 0; max-width: none; }
.nums .fig b { display: inline-block; font-size: var(--fs-2); line-height: .95; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nums .unit {
  font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif; font-weight: 700;
  font-size: var(--fs-5); text-transform: uppercase; letter-spacing: .08em; line-height: 1.2;
  white-space: nowrap; opacity: .92;
}
.nums > div > span { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid rgba(255, 255, 255, .35); font-size: .95rem; max-width: 17rem; }

@media (max-width: 64rem) {
  .numbers .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .nums > div { padding: 2rem 1.2rem 1.8rem; }
  .nums > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .nums > div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .55); }
}
@media (max-width: 44rem) {
  .nums > div { padding: 1.5rem .9rem 1.4rem; }
  .nums > div:nth-child(odd) { padding-left: 0; }
  .nums > div:nth-child(even) { padding-right: 0; }
  .nums > div > span { font-size: .88rem; margin-top: .6rem; padding-top: .6rem; }
  .nums .fig { flex-direction: column; align-items: flex-start; gap: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .portraits li, .portraits li::after, .portraits .pf-cap a { transition: none; }
}

/* Print: the record sheet is decoration (aria-hidden) — drop it; scoreboard hairlines go black on white paper. */
@media print {
  .hero-x .hero-side .portraits { display: none !important; }
  .hero-x .hero-grid, .hero-x .hero-grid:has(#compteur[hidden]) { grid-template-columns: minmax(0, 1fr); }
  .nums > div, .nums > div:nth-child(n+3), .nums > div > span { border-color: #000 !important; }
  .nums > div { padding-top: 4mm; padding-bottom: 4mm; }
}

/* Hero without a visual: headline takes the full width while the counter is hidden. */
.hero-x .hero-grid:has(#compteur[hidden]) { grid-template-columns: minmax(0, 1fr); }
.hero-x .hero-grid:has(#compteur[hidden]) .hero-side { display: none; }
/* Hero kicker: one phrase on one line where the width allows. */
.hero-x .hero-kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 56rem) { .hero-x .hero-kicker { white-space: normal; } }
