/*
 * ActiveFoot — Lot 11d6
 * Stabilisation réelle du thème clair public.
 * Chargé en dernier pour reprendre les composants publics déjà livrés
 * sans toucher à la logique JS, DB, FinalRanking, admin ou mobile.
 */

html[data-af-theme="light"]{
  --bg:#E7EEF7;
  --s1:#F7FAFE;
  --s2:#EAF1F9;
  --s3:#DCE7F4;
  --bd:#B8C8DB;
  --bd2:#8FA5BF;
  --green:#047A39;
  --gdark:#065F2F;
  --glow:rgba(4,122,57,.14);
  --gold:#9A6508;
  --red:#B4233A;
  --blue:#155FAE;
  --tx:#07111F;
  --tm:#26354A;
  --ts:#5B6B80;
  --fg:#07111F;
}

html[data-af-theme="light"] body{
  background:
    radial-gradient(circle at 18% 0%, rgba(34,197,94,.08), transparent 32rem),
    linear-gradient(180deg,#E8EEF6 0%,#DDE7F3 100%) !important;
  color:var(--tx) !important;
}

html[data-af-theme="light"] .site-main{
  color:var(--tx) !important;
}

/* Header / logo : le logo ne doit jamais disparaître sur fond clair. */
html[data-af-theme="light"] .site-header{
  background:rgba(15,23,42,.94) !important;
  border-bottom:1px solid rgba(34,197,94,.18) !important;
  box-shadow:0 8px 24px rgba(15,23,42,.16) !important;
}
html[data-af-theme="light"] .site-header .logo{
  min-width:44px !important;
  min-height:44px !important;
  padding:2px 6px !important;
  border-radius:999px !important;
  background:#07111F !important;
  border:1px solid rgba(34,197,94,.28) !important;
  color:#E2EAF5 !important;
  overflow:hidden !important;
}
html[data-af-theme="light"] .site-header .logo img{
  height:42px !important;
  width:auto !important;
  max-width:150px !important;
  display:block !important;
  mix-blend-mode:normal !important;
  opacity:1 !important;
  filter:none !important;
}
html[data-af-theme="light"] .site-header :is(.af-social-nav,.social-nav,[class*="social"]){
  color:#E2EAF5 !important;
}

/* Textes globaux publics. */
html[data-af-theme="light"] :is(.page-title,.club-title,h1,h2,h3,h4){
  color:var(--tx) !important;
  opacity:1 !important;
}
html[data-af-theme="light"] :is(.page-title-sub,.page-breadcrumb,.page-breadcrumb a,.club-subtitle,.muted,small){
  color:var(--tm) !important;
  opacity:1 !important;
}
html[data-af-theme="light"] a{color:var(--green) !important;}

/* Navigation tournoi : boutons inactifs lisibles, actifs visibles. */
html[data-af-theme="light"] .af-pubnav{
  background:linear-gradient(135deg,rgba(15,23,42,.96),rgba(7,17,31,.92)) !important;
  border-color:rgba(34,197,94,.30) !important;
  box-shadow:0 16px 42px rgba(15,23,42,.20) !important;
}
html[data-af-theme="light"] .af-pubnav__title{color:#34D399 !important;}
html[data-af-theme="light"] .af-pubnav__hint,
html[data-af-theme="light"] .af-pubnav__shortcut,
html[data-af-theme="light"] .af-pubnav__result-meta,
html[data-af-theme="light"] .af-pubnav__empty{color:#B6C6DA !important;}
html[data-af-theme="light"] .af-pubnav__btn,
html[data-af-theme="light"] .af-pubnav__link,
html[data-af-theme="light"] .af-pubnav__result,
html[data-af-theme="light"] .af-pubnav__classic{
  background:#F7FAFE !important;
  border-color:#B8C8DB !important;
  color:#07111F !important;
  opacity:1 !important;
  text-shadow:none !important;
}
html[data-af-theme="light"] .af-pubnav__btn *,
html[data-af-theme="light"] .af-pubnav__link *,
html[data-af-theme="light"] .af-pubnav__result *{color:inherit !important;opacity:1 !important;}
html[data-af-theme="light"] .af-pubnav__btn:hover,
html[data-af-theme="light"] .af-pubnav__link:hover,
html[data-af-theme="light"] .af-pubnav__result:hover{
  background:#ECFDF3 !important;
  border-color:rgba(4,122,57,.40) !important;
  color:#047A39 !important;
}
html[data-af-theme="light"] .af-pubnav__btn.is-active{
  background:linear-gradient(135deg,#22C55E,#86EFAC) !important;
  border-color:#16A34A !important;
  color:#052E16 !important;
}
html[data-af-theme="light"] .af-pubnav__btn--search{
  background:linear-gradient(135deg,#FACC15,#FEF3C7) !important;
  border-color:#D99E16 !important;
  color:#422006 !important;
}
html[data-af-theme="light"] .af-pubnav__input{
  background:#F7FAFE !important;
  color:#07111F !important;
  border-color:#B8C8DB !important;
}

/* Onglets/filtres historiques qui restent parfois visibles. */
html[data-af-theme="light"] :is(.tt-tabs-wrap,#pub-day-bar){
  background:#F7FAFE !important;
  border-color:#B8C8DB !important;
  box-shadow:0 10px 28px rgba(15,23,42,.07) !important;
}
html[data-af-theme="light"] :is(.tt-tab,#pub-day-bar button,#pub-day-bar .af-date-btn,#pub-day-bar .af-cat-btn,.nav-chip,.cat-chip,.cat-filter-btn,.cb-tab){
  background:#EAF1F9 !important;
  color:#07111F !important;
  border-color:#AFC0D5 !important;
  opacity:1 !important;
  text-shadow:none !important;
}
html[data-af-theme="light"] :is(.tt-tab,#pub-day-bar button,#pub-day-bar .af-date-btn,#pub-day-bar .af-cat-btn,.nav-chip,.cat-chip,.cat-filter-btn,.cb-tab) *{
  color:inherit !important;
  opacity:1 !important;
}
html[data-af-theme="light"] :is(.tt-tab.active,.nav-chip.active,.cat-chip.active,.cat-filter-btn.active,.cb-tab.active),
html[data-af-theme="light"] #pub-day-bar button[style*="22,163,74"],
html[data-af-theme="light"] #pub-day-bar .af-date-btn[style*="22,163,74"],
html[data-af-theme="light"] #pub-day-bar .af-cat-btn[style*="22,163,74"]{
  background:#22C55E !important;
  color:#052E16 !important;
  border-color:#16A34A !important;
}

/* Carte partenaire officielle : fond sombre assumé, texte clair lisible. */
html[data-af-theme="light"] .af-official-partner-card{
  background:linear-gradient(135deg,rgba(15,23,42,.96),rgba(7,26,25,.92)) !important;
  border-color:rgba(34,197,94,.30) !important;
  color:#E2EAF5 !important;
}
html[data-af-theme="light"] .af-official-partner-title{color:#F8FAFC !important;}
html[data-af-theme="light"] .af-official-partner-sub{color:#C7D2E2 !important;}
html[data-af-theme="light"] .af-official-partner-pill{color:#DBEAFE !important;background:rgba(79,168,255,.12) !important;}

/* Compteur tournoi. */
html[data-af-theme="light"] .af-public-countdown__shell{
  background:linear-gradient(135deg,#F7FAFE,#EAF1F9) !important;
  border-color:#B8C8DB !important;
  box-shadow:0 14px 34px rgba(15,23,42,.09) !important;
}
html[data-af-theme="light"] .af-public-countdown__badge{
  background:#DCFCE7 !important;
  border-color:rgba(4,122,57,.26) !important;
}
html[data-af-theme="light"] .af-public-countdown__badge-main,
html[data-af-theme="light"] .af-public-countdown__eyebrow{color:#047A39 !important;}
html[data-af-theme="light"] .af-public-countdown__badge-sub,
html[data-af-theme="light"] .af-public-countdown__date{color:#26354A !important;}
html[data-af-theme="light"] .af-public-countdown__title{color:#07111F !important;}
html[data-af-theme="light"] .af-public-countdown__chip{
  background:#F7FAFE !important;
  border-color:#B8C8DB !important;
  color:#07111F !important;
}
html[data-af-theme="light"] .af-public-countdown__chip strong{color:#07111F !important;}
html[data-af-theme="light"] .af-public-countdown__chip span{color:#26354A !important;}

/* Cartes stats générales / prochain match / planning legacy. */
html[data-af-theme="light"] :is(.stat,.cstat,.fixture-card,.next-match-card,.team-block,.group-card,.time-slot,.table-wrap,.fc,.next-card){
  background:#F7FAFE !important;
  background-image:none !important;
  color:#07111F !important;
  border-color:#B8C8DB !important;
  box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
}
html[data-af-theme="light"] :is(.fixture-meta,.team-block-header,.block-section-title,.group-header,.fc-top,.time-label,th){
  background:#EAF1F9 !important;
  color:#26354A !important;
  border-color:#B8C8DB !important;
}
html[data-af-theme="light"] .fixture-match{background:#F7FAFE !important;color:#07111F !important;}
html[data-af-theme="light"] :is(.fixture-team-name,.fixture-time,.score-val,.team-block-name,.stat-val,.cstat-val){color:#07111F !important;opacity:1 !important;}
html[data-af-theme="light"] :is(.fixture-round,.fixture-venue,.fixture-venue-compact,.score-vs,.score-sep,.stat-lbl,.cstat-lbl){color:#26354A !important;opacity:1 !important;}
html[data-af-theme="light"] :is(.fixture-team.winner .fixture-team-name,.pts,.sr-pts,.next-time-big){color:#047A39 !important;}
html[data-af-theme="light"] .fixture-team.loser .fixture-team-name{color:#5B6B80 !important;}

/* Fiche équipe — correction de la largeur et du titre ancien décalé. */
html[data-af-theme="light"] body.af-team-easy-page .site-main{
  width:min(1180px, calc(100vw - 32px)) !important;
  max-width:1180px !important;
  margin:0 auto !important;
  padding:24px 0 64px !important;
  overflow:visible !important;
}
html[data-af-theme="light"] body.af-team-easy-page .page-team{
  width:100% !important;
  max-width:100% !important;
  overflow:visible !important;
}
html[data-af-theme="light"] body.af-team-easy-page .page-team > .page-hero{
  display:none !important;
}
html[data-af-theme="light"] body.af-team-easy-page #public-content,
html[data-af-theme="light"] body.af-team-easy-page #public-content.af-team-final-host{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 auto !important;
  padding:0 !important;
  overflow:visible !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy{
  width:100% !important;
  max-width:1180px !important;
  margin:0 auto !important;
  overflow:visible !important;
  color:#07111F !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__hero{
  background:linear-gradient(135deg,#DDF4EA 0%,#EEF5FC 42%,#F7FAFE 100%) !important;
  border-color:#A9D7BE !important;
  color:#07111F !important;
  box-shadow:0 14px 34px rgba(15,23,42,.08) !important;
}
html[data-af-theme="light"] body.af-team-easy-page :is(.af-team-easy__title,.af-team-easy__section-title,.af-team-easy__match-title,.af-team-easy__stat-value,.af-team-easy__team,.af-team-easy__score){
  color:#07111F !important;
  opacity:1 !important;
  text-shadow:none !important;
}
html[data-af-theme="light"] body.af-team-easy-page :is(.af-team-easy__subtitle,.af-team-easy__section-sub,.af-team-easy__stat-label,.af-team-easy__stat-note,.af-team-easy__time,.af-team-easy__date-title span,.af-team-easy__table th,.af-team-easy__table td){
  color:#26354A !important;
  opacity:1 !important;
}
html[data-af-theme="light"] body.af-team-easy-page :is(.af-team-easy__kicker,.af-team-easy__team--self,.af-team-easy__date-title strong){
  color:#047A39 !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__stat,
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__section,
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__match,
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__table-wrap,
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__empty{
  background:#F7FAFE !important;
  background-image:none !important;
  color:#07111F !important;
  border-color:#B8C8DB !important;
  box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
  overflow:visible !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__section-head,
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__match-top{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:12px !important;
  flex-wrap:wrap !important;
  min-width:0 !important;
  overflow:visible !important;
  background:transparent !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__pill{
  flex:0 0 auto !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  max-width:none !important;
  white-space:nowrap !important;
  background:#EAF1F9 !important;
  color:#07111F !important;
  border-color:#AFC0D5 !important;
  opacity:1 !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__pill--green{
  background:#DCFCE7 !important;
  color:#166534 !important;
  border-color:rgba(22,101,52,.25) !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__pill--blue{
  background:#DBEAFE !important;
  color:#1D4ED8 !important;
  border-color:rgba(29,78,216,.24) !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__teams{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
  align-items:center !important;
  gap:12px !important;
  width:100% !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__team{
  min-width:0 !important;
  overflow:visible !important;
  text-overflow:clip !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__team--away{text-align:right !important;}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__score{
  flex:0 0 auto !important;
  min-width:64px !important;
  background:#EAF1F9 !important;
  border-color:#B8C8DB !important;
  border-radius:14px !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__date-title{
  background:#E7F6EE !important;
  border-color:#16A34A !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__table{
  background:#F7FAFE !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__table th{
  background:#EAF1F9 !important;
  color:#26354A !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__table td{
  color:#07111F !important;
  border-color:rgba(80,97,118,.18) !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__table .is-team td{
  background:#E7F6EE !important;
  color:#07111F !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__btn,
html[data-af-theme="light"] body.af-team-easy-page .af-team-final__club-btn,
html[data-af-theme="light"] body.af-team-easy-page .af-team-club-meals__club-btn{
  background:#EAF1F9 !important;
  color:#07111F !important;
  border-color:#AFC0D5 !important;
}
html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__btn--primary{
  background:#22C55E !important;
  color:#052E16 !important;
  border-color:#16A34A !important;
}

/* Repas équipe. */
html[data-af-theme="light"] body.af-team-easy-page :is(.af-team-club-meals,.af-team-club-meals__card,.af-team-club-meals__slot,.af-team-club-meals__context){
  background:#F7FAFE !important;
  background-image:none !important;
  color:#07111F !important;
  border-color:#B8C8DB !important;
}
html[data-af-theme="light"] body.af-team-easy-page :is(.af-team-club-meals__title,.af-team-club-meals__time){color:#07111F !important;}
html[data-af-theme="light"] body.af-team-easy-page :is(.af-team-club-meals__meta,.af-team-club-meals__context span){color:#26354A !important;}

/* Finales simplifiées : carte claire lisible. */
html[data-af-theme="light"] .af-finals-simple{color:#07111F !important;}
html[data-af-theme="light"] :is(.af-finals-simple__intro,.af-finals-simple__league,.af-finals-simple__round,.af-finals-simple__match){
  background:#F7FAFE !important;
  background-image:none !important;
  color:#07111F !important;
  border-color:#B8C8DB !important;
  box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
}
html[data-af-theme="light"] :is(.af-finals-simple__title,.af-finals-simple__league-title,.af-finals-simple__round-name,.af-finals-simple__team,.af-finals-simple__score){
  color:#07111F !important;
  opacity:1 !important;
}
html[data-af-theme="light"] :is(.af-finals-simple__hint,.af-finals-simple__league-meta,.af-finals-simple__round-count,.af-finals-simple__match-top,.af-finals-simple__scroll-note){
  color:#26354A !important;
  opacity:1 !important;
}
html[data-af-theme="light"] .af-finals-simple__eyebrow,
html[data-af-theme="light"] .af-finals-simple__team.is-winner{color:#047A39 !important;}
html[data-af-theme="light"] .af-finals-simple__league-head,
html[data-af-theme="light"] .af-finals-simple__round-head,
html[data-af-theme="light"] .af-finals-simple__match-top{
  background:#EAF1F9 !important;
  border-color:#B8C8DB !important;
}
html[data-af-theme="light"] .af-finals-simple__pill,
html[data-af-theme="light"] .af-finals-simple__tab{
  background:#EAF1F9 !important;
  border-color:#AFC0D5 !important;
  color:#07111F !important;
}
html[data-af-theme="light"] .af-finals-simple__tab.is-active{
  background:#22C55E !important;
  color:#052E16 !important;
  border-color:#16A34A !important;
}
html[data-af-theme="light"] .af-finals-simple__score{
  background:#EAF1F9 !important;
  border:1px solid #B8C8DB !important;
}

/* Stats publiques : bloc lecture rapide, recherche, listes. */
html[data-af-theme="light"] :is(#tt-panel-stats,#tt-stats-container,.af-stats-easy-tools,.af-player-stats-pro.afps-public){
  color:#07111F !important;
}
html[data-af-theme="light"] .af-stats-easy-tools,
html[data-af-theme="light"] #tt-stats-container [style*="background:var(--s1)"],
html[data-af-theme="light"] #tt-stats-container [style*="background: var(--s1)"]{
  background:#F7FAFE !important;
  background-image:none !important;
  border-color:#B8C8DB !important;
  color:#07111F !important;
  box-shadow:0 10px 28px rgba(15,23,42,.06) !important;
}
html[data-af-theme="light"] :is(.af-stats-easy-title,.afps-title,.afps-section-title){color:#07111F !important;}
html[data-af-theme="light"] :is(.af-stats-easy-sub,.afps-sub,.afps-meta,.afps-label){color:#26354A !important;opacity:1 !important;}
html[data-af-theme="light"] .af-stats-easy-count{
  background:#DCFCE7 !important;
  color:#047A39 !important;
  border-color:rgba(4,122,57,.28) !important;
}
html[data-af-theme="light"] :is(.af-stats-easy-search,#tt-panel-stats input,#tt-stats-container input){
  background:#F7FAFE !important;
  color:#07111F !important;
  border-color:#AFC0D5 !important;
}
html[data-af-theme="light"] :is(.af-stats-easy-search,#tt-panel-stats input,#tt-stats-container input)::placeholder{
  color:#5B6B80 !important;
  opacity:1 !important;
}
html[data-af-theme="light"] .af-stats-easy-chip{
  background:#EAF1F9 !important;
  color:#07111F !important;
  border-color:#AFC0D5 !important;
}
html[data-af-theme="light"] .af-stats-easy-chip[aria-pressed="true"]{
  background:#22C55E !important;
  color:#052E16 !important;
  border-color:#16A34A !important;
}
html[data-af-theme="light"] #tt-stats-container [style*="color:var(--tm)"],
html[data-af-theme="light"] #tt-stats-container [style*="color: var(--tm)"]{color:#26354A !important;}
html[data-af-theme="light"] #tt-stats-container [style*="color:var(--green)"],
html[data-af-theme="light"] #tt-stats-container [style*="color: var(--green)"]{color:#047A39 !important;}
html[data-af-theme="light"] #tt-stats-container [style*="color:var(--gold)"],
html[data-af-theme="light"] #tt-stats-container [style*="color: var(--gold)"]{color:#9A6508 !important;}

/* Badges génériques. */
html[data-af-theme="light"] :is(.pill,.badge,.cat-badge,.level-badge,.tag,[class*="badge"],[class*="pill"]){
  opacity:1 !important;
  text-shadow:none !important;
}
html[data-af-theme="light"] :is(.pill-green,.club-site-chip){background:#DCFCE7 !important;color:#166534 !important;border-color:rgba(22,101,52,.25) !important;}
html[data-af-theme="light"] :is(.pill-gold,.level-badge){background:#FEF3C7 !important;color:#92400E !important;border-color:rgba(146,64,14,.22) !important;}
html[data-af-theme="light"] :is(.pill-blue,.cat-badge){background:#DBEAFE !important;color:#1D4ED8 !important;border-color:rgba(29,78,216,.24) !important;}

@media(max-width:900px){
  html[data-af-theme="light"] body.af-team-easy-page .site-main{
    width:calc(100vw - 18px) !important;
    max-width:calc(100vw - 18px) !important;
    padding:16px 0 64px !important;
  }
  html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__teams{
    grid-template-columns:1fr !important;
  }
  html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__team--away{text-align:left !important;}
}
@media(max-width:560px){
  html[data-af-theme="light"] body.af-team-easy-page .site-main{
    width:calc(100vw - 14px) !important;
    max-width:calc(100vw - 14px) !important;
  }
  html[data-af-theme="light"] body.af-team-easy-page .af-team-easy__grid{
    grid-template-columns:1fr !important;
  }
  html[data-af-theme="light"] .site-header .logo img{height:34px !important;}
}

@media print{
  html[data-af-theme="light"] body{background:#fff !important;color:#111 !important;}
}
