/* =========================
   HOME PAGE
   ========================= */

/* Structure 3 colonnes */
.page-3cols{
  width: 100%;
  max-width: 1840px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr) 235px;
  gap: 16px;
  padding: 0 16px 36px;
}

.center-col{
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  min-width: 0;
}

.center-col > main{
  width: 100%;
  min-width: 0;
}

/* Sidebars */
.side{
  min-width: 0;
}

.side-card{
  position: sticky;
  top: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.side-hdr{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148,163,184,.18);
}

.side-hdr strong{
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.side-sub{
  display: none;
}

.side-standings{
  padding: 0;
}

.side-row{
  display: grid;
  grid-template-columns: 28px 34px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148,163,184,.12);
  cursor: pointer;
  transition: background .15s ease;
}

.side-row:last-child{
  border-bottom: 0;
}

.side-row:hover{
  background: rgba(15,23,42,.03);
}

.side-row.has-fr{
  background: linear-gradient(
    90deg,
    rgba(0,85,164,.10) 0%,
    rgba(255,255,255,0) 40%,
    rgba(239,65,53,.10) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.05);
}

.side-row.has-fr::before{
  content: none !important;
  display: none !important;
}

.side-rk{
  font-size: 13px;
  font-weight: 900;
  color: #64748b;
  text-align: center;
}

.side-logo{
  width: 30px;
  height: 30px;
  object-fit: contain;
  justify-self: center;
}

.side-name{
  display: none;
}

.side-tri{
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: .04em;
}

.side-wl{
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  white-space: nowrap;
}

.side-pct{
  display: none;
}

/* Scoreboard strip */
.scoreboard-strip{
  margin: 10px 0 12px;
  padding: 12px 14px 14px;
  background: var(--surface);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.scoreboard-strip__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.scoreboard-strip__title{
  font-size: 18px;
  font-weight: 950;
  color: var(--ink);
}

.scoreboard-strip__meta{
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,23,42,.55);
}

.scoreboard-strip__track{
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.scoreboard-strip__track::-webkit-scrollbar{
  height: 8px;
}

.scoreboard-strip__track::-webkit-scrollbar-thumb{
  background: #cbd5e1;
  border-radius: 999px;
}

.sb-mini{
  position: relative;
  overflow: hidden;
  flex: 0 0 190px;
  min-width: 190px;
  padding: 10px 10px 9px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(15,23,42,.06);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.sb-mini:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
  border-color: rgba(37,99,235,.18);
}

.sb-mini.has-fr{
  background: linear-gradient(
    90deg,
    rgba(0,85,164,.08) 0%,
    rgba(255,255,255,1) 38%,
    rgba(239,65,53,.08) 100%
  );
}

.sb-mini__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.sb-mini__status{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
}

.sb-mini__status.pre{ background: #2563eb; }
.sb-mini__status.live{ background: #16a34a; }
.sb-mini__status.final{ background: #dc2626; }

.sb-mini__fr{
  font-size: 15px;
  line-height: 1;
}

.sb-mini__teams{
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sb-mini__row{
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
}

.sb-mini__row img{
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.sb-mini__tri{
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
}

.sb-mini__score{
  font-size: 16px;
  font-weight: 950;
  color: var(--ink);
}

.sb-mini__row.is-loser .sb-mini__tri,
.sb-mini__row.is-loser .sb-mini__score{
  opacity: .62;
}

.sb-mini__footer{
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: rgba(15,23,42,.55);
}

/* Injury ticker */
#injuryTickerWrap{
  width: 100%;
  margin: 8px 0 10px;
}

.injury-pill{
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 10px 16px;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(15,23,42,.25);
  cursor: pointer;
  outline: none;
}

.injury-pill:focus{
  box-shadow:
    0 10px 25px rgba(15,23,42,.25),
    0 0 0 3px rgba(14,165,233,.25);
}

.injury-col{
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.injury-col-label{
  flex: 0 0 auto;
  padding-right: 8px;
  border-right: 1px solid rgba(148,163,184,.5);
}

.injury-label{
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #bfdbfe;
  white-space: nowrap;
}

.injury-col-player{
  flex: 0 0 auto;
  min-width: 48px;
}

.injury-col-text{
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  align-items: flex-start;
}

.injury-player-stack{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.injury-text{
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.injury-chev{
  display: inline-block;
  font-weight: 900;
  opacity: .9;
  transition: transform .18s ease;
}

#injuryTickerWrap.is-open .injury-chev{
  transform: rotate(180deg);
}

#injuryTickerWrap.is-open #injuryPlayerCol,
#injuryTickerWrap.is-open #injuryText{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#injuryTickerWrap:not(.is-open) #injuryPlayerCol,
#injuryTickerWrap:not(.is-open) #injuryText{
  display: block;
}

.inj-avatars{
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.inj-avatars img{
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.25);
  background: rgba(255,255,255,.06);
}

.inj-avatars img.team{
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: contain;
}

.inj-textline{
  font-size: 13px;
  line-height: 1.25;
  color: rgba(255,255,255,.90);
}

.inj-textline strong{
  font-weight: 900;
}

.inj-textline .meta{
  color: rgba(226,232,240,.78);
  font-weight: 800;
}

#injuryTickerWrap.is-open .inj-textline{
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(148,163,184,.14);
}

#injuryTickerWrap.is-open .inj-textline:last-child{
  border-bottom: none;
}

/* Favoris */
#favBox{
  margin-top: 8px;
  margin-bottom: 16px;
  padding: 14px 18px 18px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
}

#favBoxHeader{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#favBoxTitle{
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

#favBoxTitle .emoji{
  font-size: 18px;
}

#favBoxToggle{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: #e5edff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
}

#favBoxToggle:hover{
  background: #dbeafe;
}

#favBox.fav-box-collapsed #favBoxToggle{
  background: #0f172a;
  color: #e5e7eb;
}

#favBoxBody .fav-banner-wrap + .fav-banner-wrap{
  margin-top: 10px;
}

.fav-banner-wrap{
  margin: 0;
}

#favBannerWrap .fav-title,
#favTeamsBannerWrap .fav-title{
  display: block;
  width: 100%;
  margin: 0 auto 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

#favBanner,
#favTeamsBanner{
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 0 4px 6px;
  scrollbar-width: thin;
}

#favBanner::-webkit-scrollbar,
#favTeamsBanner::-webkit-scrollbar{
  height: 8px;
}

#favBanner::-webkit-scrollbar-thumb,
#favTeamsBanner::-webkit-scrollbar-thumb{
  background: #cbd5e1;
  border-radius: 999px;
}

/* Outils home */
.home-tools-card{
  margin: 10px 0 14px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(15,23,42,.06);
}

.home-tools-top{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.date-nav-centered{
  display: flex;
  align-items: center;
  gap: 14px;
}

.date-nav-centered h2,
#dateLabel{
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.fr-filter-compact{
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.nav-arrow{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg,#2563eb,#1d4ed8);
  color: #fff;
  box-shadow: 0 4px 10px rgba(29,78,216,.25);
  transition: all .15s ease;
}

.nav-arrow:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(29,78,216,.35);
}

.nav-arrow:active{
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(29,78,216,.25);
}

.nav-arrow .arrow{
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.cal-toggle-compact{
  margin-top: 8px;
}

.cal-toggle-compact summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cal-toggle-compact .chev{
  font-size: 12px;
  opacity: .6;
}

.cal-toggle-compact .cal{
  margin-top: 8px;
}

.status{
  margin: 10px 0 12px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}

/* Games zone */
#games{
  width: 100%;
  min-width: 0;
}

/* Forme des Français */
#home-forme-fr{
  position: relative;
  overflow: hidden;
  margin: 16px 0;
  background: #fff;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
}

#home-forme-fr::before{
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(700px 220px at 12% -10%, rgba(29,78,216,.18), transparent 60%),
    radial-gradient(650px 220px at 88% -10%, rgba(239,65,53,.10), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

#home-forme-fr::after{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1d4ed8, #ffffff, #ef4135);
  opacity: .9;
  z-index: 0;
}

#home-forme-fr > *{
  position: relative;
  z-index: 1;
}

.bbd-card__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.bbd-card__head--toggle{
  cursor: pointer;
  transition: background .2s ease;
}

.bbd-card__head--toggle:hover{
  background: rgba(15,23,42,.04);
}

#home-forme-fr .bbd-card__head{
  border-bottom: 1px solid rgba(15,23,42,.06);
  background: linear-gradient(180deg, rgba(15,23,42,.03), rgba(255,255,255,0));
}

.bbd-card__title{
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  color: var(--ink);
}

.bbd-card__meta{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,23,42,.55);
}

.bbd-card__body{
  padding: 18px 22px 22px;
  transition: max-height .35s ease, opacity .25s ease;
}

.bbd-card--collapsed .bbd-card__body{
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.bbd-card--collapsed .toggle-icon{
  transform: rotate(-90deg);
}

.toggle-icon{
  font-size: 14px;
  transition: transform .25s ease;
}

.forme-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e5edff;
  border: 1px solid rgba(29,78,216,.18);
  box-shadow: 0 6px 16px rgba(29,78,216,.10);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}

.forme-link:hover{
  background: #dbeafe;
  transform: translateY(-1px);
}

.forme-sep{
  opacity: .35;
  font-weight: 900;
}

.forme-wrap{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.forme-grid-3{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.forme-card-pro{
  width: 100%;
  min-height: 190px;
  padding: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}

.forme-pro-h{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.forme-pro-left{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.forme-ava{
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  background: #f1f5f9;
}

.forme-ava img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forme-ident{
  min-width: 0;
}

.forme-name{
  font-size: 14px;
  font-weight: 950;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forme-sub{
  font-size: 12px;
  font-weight: 700;
  color: rgba(15,23,42,.65);
}

.forme-pro-right{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.forme-teamlogo{
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.12));
}

.forme-wl{
  padding: 4px 8px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  background: rgba(15,23,42,.04);
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,23,42,.75);
}

.forme-stats-pro{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-box{
  padding: 12px 10px 10px;
  text-align: center;
  background: rgba(15,23,42,.04);
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 14px;
}

.stat-val{
  font-size: 20px;
  font-weight: 950;
  line-height: 1.1;
  color: var(--ink);
}

.stat-lab{
  margin-top: 2px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  color: rgba(15,23,42,.55);
}

.stat-delta{
  margin-top: 6px;
  font-size: 11px;
  font-weight: 900;
  opacity: .92;
}

.stat-delta.up{ color: #16a34a; }
.stat-delta.down{ color: #dc2626; }
.stat-delta.neutral{ color: rgba(15,23,42,.45); }

.forme-foot-pro{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
}

.badge{
  padding: 4px 8px;
  border: 1px solid rgba(29,78,216,.18);
  border-radius: 999px;
  background: rgba(29,78,216,.10);
  color: #1d4ed8;
  font-weight: 900;
}

.badge-muted{
  background: rgba(15,23,42,.04);
  border-color: rgba(15,23,42,.08);
  color: rgba(15,23,42,.55);
}

.badge-ghost{
  background: transparent;
  border-color: rgba(15,23,42,.10);
  color: rgba(15,23,42,.65);
}

.sep{
  opacity: .35;
  font-weight: 900;
}

.forme-explain{
  width: 100%;
  max-width: none;
  margin-top: 16px;
  padding: 10px 12px;
  background: rgba(15,23,42,.02);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
}

.forme-explain summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(29,78,216,.14);
  border-radius: 14px;
  background: rgba(29,78,216,.08);
  font-weight: 950;
  cursor: pointer;
}

.forme-explain summary::-webkit-details-marker{
  display: none;
}

.forme-explain-hint{
  white-space: nowrap;
  padding: 4px 8px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,23,42,.55);
}

.forme-explain-inner{
  margin-top: 10px;
  padding: 4px 4px 2px;
  color: rgba(15,23,42,.80);
  line-height: 1.45;
}

.explain-lead{
  margin: 0 0 10px;
  font-weight: 750;
}

.explain-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.explain-card{
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.07);
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
}

.explain-title{
  margin-bottom: 6px;
  font-weight: 950;
  color: var(--ink);
}

.explain-line{
  font-weight: 800;
  color: rgba(15,23,42,.82);
}

.explain-sub{
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(15,23,42,.55);
}

.explain-formula{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(15,23,42,.03);
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 14px;
}

.explain-pill{
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(29,78,216,.16);
  border-radius: 999px;
  background: rgba(29,78,216,.10);
  color: #1d4ed8;
  font-weight: 950;
}

.explain-math{
  font-size: 12px;
  font-weight: 850;
  color: rgba(15,23,42,.70);
}

/* Onboarding modal */
.bbd-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.bbd-modal.is-open{
  display: block;
}

.bbd-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.72);
  backdrop-filter: blur(6px);
}

.bbd-modal__dialog{
  position: relative;
  width: min(980px, calc(100% - 28px));
  margin: 6vh auto;
  overflow: hidden;
  background: rgba(15,23,42,.94);
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}

.bbd-modal__close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 900;
}

.bbd-modal__content{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.bbd-modal__left{
  padding: 22px 22px 18px;
  color: #e5e7eb;
}

.bbd-modal__badge{
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(29,78,216,.35);
  border-radius: 999px;
  background: rgba(29,78,216,.18);
  font-weight: 900;
}

.bbd-modal__title{
  margin: 6px 0 10px;
  font-size: 28px;
  font-weight: 950;
}

.bbd-modal__text{
  margin: 0 0 12px;
  color: rgba(255,255,255,.78);
  line-height: 1.45;
}

.bbd-modal__bullets{
  margin: 0 0 16px;
  padding-left: 18px;
  color: rgba(255,255,255,.85);
  line-height: 1.6;
  font-weight: 700;
}

.bbd-modal__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.bbd-modal__small{
  font-size: 12px;
  color: rgba(255,255,255,.55);
}

.bbd-modal__right{
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border-left: 1px solid rgba(148,163,184,.16);
}

.bbd-shots__tabs{
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.bbd-tab{
  flex: 1;
  padding: 10px;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 12px;
  background: rgba(2,6,23,.45);
  color: rgba(255,255,255,.86);
  font-weight: 900;
}

.bbd-tab.is-active{
  background: rgba(29,78,216,.22);
  border-color: rgba(29,78,216,.45);
}

.bbd-shot{
  overflow: hidden;
  background: rgba(2,6,23,.55);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}

.bbd-shot img{
  width: 100%;
  height: auto;
  display: block;
}

.bbd-shot__hint{
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.58);
}

/* Responsive */
@media (max-width: 1250px){
  .page-3cols{
    display: block;
    max-width: 1268px;
    padding: 0 14px 30px;
  }

  .side{
    display: none;
  }

  .center-col{
    max-width: 100%;
  }
}

@media (max-width: 980px){
  .forme-grid-3,
  .explain-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px){
  .bbd-modal__content{
    grid-template-columns: 1fr;
  }

  .bbd-modal__right{
    border-left: 0;
    border-top: 1px solid rgba(148,163,184,.16);
  }

  .bbd-modal__dialog{
    margin: 3vh auto;
  }
}

@media (max-width: 760px){
  .sb-mini{
    flex: 0 0 168px;
    min-width: 168px;
  }
}

@media (max-width: 700px){
  #favBoxHeader{
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px){
  .injury-pill{
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .injury-col-label{
    padding-right: 0;
    border-right: 0;
  }
}

@media (max-width: 520px){
  .home-tools-top{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    min-height: auto;
  }

  .fr-filter-compact{
    position: static;
    right: auto;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .date-nav-centered{
    width: 100%;
    justify-content: center;
    gap: 10px;
  }

  .date-nav-centered h2,
  #dateLabel{
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
  }

  .nav-arrow{
    width: 34px;
    height: 34px;
  }

  .nav-arrow .arrow{
    font-size: 18px;
  }
}

/* =========================================
   MATCH CARDS + BOXSCORES — single source of truth
   ========================================= */

.card{
  border-radius: 24px;
  border: 1px solid rgba(15,23,42,.08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 14px 34px rgba(15,23,42,.08);
  overflow: hidden;
}

.card-main{
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(460px, 1.2fr) minmax(220px, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 164px;
  padding: 22px 28px;
}

.card .team{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.card .team .teamlink{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card .team .logo{
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(15,23,42,.14));
}

.card .tri{
  margin-top: 0;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
  color: #0f172a;
}

.card .wl{
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
}

.card .center{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.card .center.center--matchcard{
  gap: 12px;
  max-width: 420px;
  margin: auto;
}

.card .score{
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.02em;
  color: #0f172a;
}

.card .status-chip{
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.16);
}

.card .status{
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  color: #64748b;
}

.card .broadcast{
  min-height: 18px;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.card .bcast-logo{
  height: 16px;
  max-width: 84px;
}

.card-fr-teaser{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,85,164,.08) 0%, rgba(255,255,255,.92) 45%, rgba(239,65,53,.08) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.card-fr-teaser__label{
  font-size: 12px;
  font-weight: 950;
  color: #0f172a;
  white-space: nowrap;
}

.card-fr-teaser__list{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-fr-teaser__name,
.card-fr-teaser__more{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(148,163,184,.25);
  font-size: 12px;
  font-weight: 900;
  color: #1e293b;
}

.card-fr-teaser__tri{
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #64748b;
}

.card .expand-btn{
  width: 36px;
  height: 36px;
  margin-top: 2px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.34);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 8px 18px rgba(15,23,42,.10);
  transition: transform .16s ease, box-shadow .16s ease;
}

.card .expand-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15,23,42,.13);
}

.card.open .expand-btn{
  transform: rotate(180deg);
}

.side-flag{
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  opacity: .95;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,85,164,1) 0%,
    rgba(0,85,164,.9) 20%,
    rgba(255,255,255,1) 55%,
    rgba(239,65,53,.9) 85%,
    rgba(239,65,53,1) 100%
  );
  z-index: 2;
}

.side-flag.left{
  left: 0;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.side-flag.right{
  right: 0;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.card-details{
  display: none;
  margin-top: 0;
  padding: 0 22px 22px;
}

.card.open .card-details{
  display: block;
}

.stack-boxscores{
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.detail-box{
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 20px;
  padding: 14px 14px 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
  min-width: 0;
}

.detail-title{
  margin: 0 0 12px;
  padding: 0 2px;
  font-size: 19px;
  font-weight: 950;
  line-height: 1.2;
  color: #0f172a;
  text-align: left;
}

.table-wrap{
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(226,232,240,.96);
  box-shadow: 0 6px 20px rgba(15,23,42,.05);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.stack-boxscores .detail-box table.bx{
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 14px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stack-boxscores .detail-box table.bx th,
.stack-boxscores .detail-box table.bx td{
  padding: 12px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}

.stack-boxscores .detail-box table.bx th{
  background: #f8fafc;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #475569;
}

.stack-boxscores .detail-box table.bx td{
  color: #0f172a;
  font-weight: 700;
}

.stack-boxscores .detail-box table.bx th:first-child,
.stack-boxscores .detail-box table.bx td:first-child{
  width: 250px;
  min-width: 250px;
  text-align: left;
}

.stack-boxscores .detail-box table.bx th:not(:first-child),
.stack-boxscores .detail-box table.bx td:not(:first-child){
  width: 74px;
}

.stack-boxscores .detail-box table.bx tbody tr:hover{
  background: rgba(15,23,42,.025);
}

.stack-boxscores .detail-box table.bx tbody tr.row-fr{
  background: linear-gradient(
    90deg,
    rgba(0,85,164,.14) 0%,
    rgba(0,85,164,.20) 12%,
    rgba(0,85,164,.20) 12%,
    rgba(255,255,255,.96) 42%,
    rgba(239,65,53,.16) 82%,
    rgba(239,65,53,.11) 100%
  );
}

.stack-boxscores .detail-box table.bx tbody tr.row-dnp td{
  color: #64748b;
}

.stack-boxscores .detail-box table.bx tbody tr:last-child td{
  border-bottom: 0;
}

.winner{
  font-weight: 800;
}

@media (min-width: 1500px){
  .card-main{
    grid-template-columns: minmax(250px, 1fr) minmax(540px, 1.25fr) minmax(250px, 1fr);
    min-height: 174px;
    padding: 24px 32px;
  }

  .card .team .logo{
    width: 98px;
    height: 98px;
  }

  .card .score{
    font-size: 24px;
  }
}

@media (max-width: 1180px){
  .card-main{
    grid-template-columns: minmax(170px, 1fr) minmax(320px, 1.05fr) minmax(170px, 1fr);
    gap: 14px;
    min-height: 146px;
    padding: 18px 18px;
  }

  .card .team .logo{
    width: 76px;
    height: 76px;
  }

  .card .tri{
    font-size: 16px;
  }

  .card-details,
  .card.fr-night .card-details{
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 16px;
  }
}

@media (max-width: 760px){
  .card{
    border-radius: 18px;
  }

  .card-main{
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
    padding: 14px 14px 12px;
  }

  .card .team .logo{
    width: 64px;
    height: 64px;
  }

  .card .tri{
    font-size: 16px;
  }

  .card .score{
    font-size: 18px;
  }

  .card .status{
    font-size: 12px;
  }

  .card-fr-teaser{
    gap: 8px;
    padding: 7px 10px;
  }

  .card-details,
  .card.fr-night .card-details{
    padding: 0 12px 12px;
  }

  .detail-box{
    border-radius: 16px;
    padding: 12px 10px 8px;
  }

  .detail-title,
  .stack-boxscores .fr-summary h4{
    font-size: 16px;
    margin-bottom: 10px;
  }

  .stack-boxscores{
    gap: 14px;
  }

  .stack-boxscores .detail-box table.bx{
    min-width: 980px;
    font-size: 13px;
  }

  .stack-boxscores .detail-box table.bx th,
  .stack-boxscores .detail-box table.bx td{
    padding: 10px 10px;
  }

  .stack-boxscores .detail-box table.bx th:first-child,
  .stack-boxscores .detail-box table.bx td:first-child{
    width: 220px;
    min-width: 220px;
  }
}

/* =========================================
   RECAP FR
   ========================================= */

.card.fr-night{
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
  overflow: hidden;
  margin: 14px 0;
  padding: 0;
}

.card.fr-night::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(90deg, rgba(0,85,164,.55) 0%, rgba(255,255,255,.2) 50%, rgba(239,65,53,.55) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.card.fr-night .card-main{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 20px 20px 12px;
}

.card.fr-night .center{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  text-align: center;
}

.card.fr-night .score{
  font-size: 18px;
  font-weight: 950;
  line-height: 1.2;
  margin: 0;
}

.card.fr-night .status-chip.pre{
  min-height: 28px;
  padding: 0 12px;
  background: rgba(15,23,42,.05);
  color: #0f172a;
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: none;
  letter-spacing: .03em;
}

.card.fr-night .card-details{
  display: none;
  padding: 0 18px 18px;
}

.card.fr-night.open .card-details{
  display: block;
}

.card.fr-night .detail-box{
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}
.card.fr-night .table-wrap{
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.fr-night-table{
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
}

.fr-night-table th,
.fr-night-table td{
  padding: 10px 8px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
  text-align: center;
}

.fr-night-table th{
  font-size: 12px;
  font-weight: 900;
  color: #334155;
  white-space: nowrap;
}

.fr-night-table td.player-cell{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  min-width: 220px;
  padding-right: 42px !important;
  overflow: visible;
}

.fr-night-table td.player-cell .pname{
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.fr-night-table .hs-wrap{
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.fr-night-table .hs-bg{
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #f1f5f9;
}

.fr-night-table .hs-img{
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 999px;
}

.fr-night-table .match-cell{
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  justify-content: center;
}

.fr-night-table .match-res{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  flex: 0 0 12px;
}

.fr-night-table .res-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.fr-night-table .res-dot.win{ background: #16a34a; }
.fr-night-table .res-dot.loss{ background: #dc2626; }

.fr-night-table .match-tris{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fr-night-table .mtri{
  font-size: 13px;
  font-weight: 700;
}

.fr-night-table .mtri-win{ font-weight: 900; }
.fr-night-table .mtri-loss{ opacity: .55; }
.fr-night-table .vs{ font-size: 10px; opacity: .45; }
.fr-night-table .score-cell{ white-space: nowrap; font-variant-numeric: tabular-nums; }
.fr-night-table td.pts{ font-weight: 900; }

.fr-night-table tr.row-fr{
  background: linear-gradient(
    90deg,
    rgba(0,85,164,.10) 0%,
    rgba(255,255,255,0) 40%,
    rgba(239,65,53,.10) 100%
  );
}

.fr-night-table td.player-cell.player-cell--with-card{
  padding-right: 34px !important;
}

.bbd-card-mini-btn{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 2px solid #ef4135;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.bbd-card-mini-btn__icon{
  width: 12px;
  height: 12px;
  fill: #2563eb;
}

.bbd-card-btn--inline{
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  padding: 0;
  background: #2563eb;
  color: #fff;
  opacity: .92;
  transition: .15s;
  z-index: 20;
  pointer-events: auto;
}

.bbd-card-btn--inline:hover{
  background: #1d4ed8;
  opacity: 1;
}

.bbd-card-btn--inline:disabled{
  opacity: .7;
  cursor: wait;
}

.fr-night-table th:last-child,
.fr-night-table td:last-child{
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding-left: 4px !important;
  padding-right: 4px !important;
  text-align: center;
}

.fr-night-table tr,
.fr-night-table td{
  position: relative;
}

/* ===== Fix mini récap FR dans une boxscore ===== */

.stack-boxscores .fr-summary{
  min-width: 0;
}

.stack-boxscores .fr-summary .table-wrap{
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.stack-boxscores .fr-summary .table-wrap table.bx{
  width: max-content;
  min-width: 760px;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  white-space: nowrap;
}

.stack-boxscores .fr-summary .table-wrap table.bx th,
.stack-boxscores .fr-summary .table-wrap table.bx td{
  white-space: nowrap;
}

.stack-boxscores .fr-summary .table-wrap table.bx th:first-child,
.stack-boxscores .fr-summary .table-wrap table.bx td:first-child{
  width: 220px;
  min-width: 220px;
  text-align: left;
}

.stack-boxscores .fr-summary .table-wrap table.bx th:not(:first-child),
.stack-boxscores .fr-summary .table-wrap table.bx td:not(:first-child){
  width: 72px;
  min-width: 72px;
}
@media (max-width: 760px){
  .card.fr-night .card-main{
    padding: 16px 14px 8px;
  }

  .card.fr-night .card-details{
    padding: 0 12px 12px;
  }

  .card.fr-night .score{
    font-size: 16px;
  }

  .card.fr-night .detail-box{
    padding: 0;
  }

  .fr-night-table{
    min-width: 1040px;
  }

  .fr-night-table th,
  .fr-night-table td{
    padding: 10px 10px;
  }
}
@media (max-width: 760px){
  .stack-boxscores .fr-summary .table-wrap table.bx{
    min-width: 720px;
    font-size: 13px;
  }

  .stack-boxscores .fr-summary .table-wrap table.bx th,
  .stack-boxscores .fr-summary .table-wrap table.bx td{
    padding: 10px 10px;
  }
}