/* fix-pack.css : correctifs du theme clair (data-theme="paper") + quelques bugs communs.
   Les couches recentes (design-plus, nuit-plus, theme-v2) fixent des couleurs
   pensees pour le theme sombre. Ce fichier ne touche que le theme clair. */

html[data-theme="paper"]{
  --pf-text:#0C1712; --pf-soft:#2C3B33; --pf-muted:#5F6E66;
  --pf-green:#0B6B3D; --pf-gold:#7A5A0E; --pf-red:#B3261E;
  --pf-line:rgba(12,23,18,.12);
  --gold:#8A6410;
}

/* 1. Barre du haut : une seule ligne, comme en sombre */
html[data-theme="paper"]:not([data-ui="simple"]) #gameScreen .topbar{
  display:flex!important; align-items:center; min-height:72px!important; height:auto;
  padding-block:0!important;
}
html[data-theme="paper"]:not([data-ui="simple"]) #gameScreen .top-actions{
  flex-wrap:nowrap!important; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; margin-left:auto;
}

/* 2. Bandeau d'actualites */
html[data-theme="paper"]:not([data-ui="simple"]) .ticker{
  background:#FFFFFF!important; border-bottom:1px solid var(--pf-line)!important;
  box-shadow:0 6px 16px -14px rgba(12,23,18,.5)!important;
}
html[data-theme="paper"] .ticker-item{color:var(--pf-soft); border-right-color:rgba(12,23,18,.08)}
html[data-theme="paper"] .ticker-item b{color:var(--pf-text)}
html[data-theme="paper"] .ticker-item i{
  background:rgba(183,134,30,.14)!important; color:var(--pf-gold)!important;
  border-color:rgba(183,134,30,.42)!important;
}
html[data-theme="paper"] .ticker-item.alert i{
  background:rgba(179,38,30,.10)!important; color:var(--pf-red)!important; border-color:rgba(179,38,30,.36)!important;
}
html[data-theme="paper"] .ticker-item.good i,
html[data-theme="paper"] .ticker-item.win i{
  background:rgba(14,122,71,.10)!important; color:var(--pf-green)!important; border-color:rgba(14,122,71,.36)!important;
}

/* 3. Barre laterale */
html[data-theme="paper"] .sidebar-social-x{
  color:var(--pf-muted)!important; background:rgba(12,23,18,.03)!important;
}
html[data-theme="paper"] .sidebar-social-x span{color:inherit!important}

/* 4. Accueil : bandeau du club (fond sombre aux couleurs du club, texte clair) */
html[data-theme="paper"] .np-dash-id h2{color:#fff!important}
html[data-theme="paper"] .np-dash-id p{color:rgba(240,244,242,.92)!important}
html[data-theme="paper"] .np-dash-id small{color:rgba(236,241,238,.72)!important}
html[data-theme="paper"] .np-dash-meta>span{color:rgba(236,241,238,.8)!important}
html[data-theme="paper"] .np-dash-meta>span b{color:#F2C14E!important}
html[data-theme="paper"] .np-dash-more i{color:var(--pf-gold)}
html[data-theme="paper"] .np-kpi:first-child strong{
  background:none; -webkit-background-clip:border-box; background-clip:border-box;
  color:var(--pf-text); -webkit-text-fill-color:currentColor;
}
html[data-theme="paper"] .np-card,
html[data-theme="paper"] .np-kpi,
html[data-theme="paper"] .es-card{border-color:var(--pf-line)}
html[data-theme="paper"] .streak-chip{color:var(--pf-text)}
html[data-theme="paper"] .coin-chip{color:var(--pf-gold)}

/* 5. Prochain match, joueur de la semaine */
html[data-theme="paper"] .nm-gauge-top b{color:var(--pf-text)}
html[data-theme="paper"] .nm-ticket-out{color:var(--pf-muted)}
html[data-theme="paper"] .nm-ticket-head span{color:var(--pf-gold)}
html[data-theme="paper"] .nm-ticket input[type=range]{accent-color:#0E7A47}
html[data-theme="paper"] .motw-last,
html[data-theme="paper"] .motw-last b{color:var(--pf-muted)}
html[data-theme="paper"] .motw-last b{color:var(--pf-soft)}

/* 6. Couleurs de statut trop pales sur fond blanc */
html[data-theme="paper"] .train-gain,
html[data-theme="paper"] .train-kpis b.positive,
html[data-theme="paper"] .role-row>b.positive,
html[data-theme="paper"] .es-need.lvl0 .es-need-h em{color:var(--pf-green)}
html[data-theme="paper"] .train-kpis b.negative,
html[data-theme="paper"] .role-row>b.negative,
html[data-theme="paper"] .es-need.lvl2 .es-need-h em{color:var(--pf-red)}
html[data-theme="paper"] .es-need.lvl1 .es-need-h em,
html[data-theme="paper"] .sp-slot h4{color:var(--pf-gold)}
html[data-theme="paper"] .es-need{background:rgba(12,23,18,.025); border-color:var(--pf-line)}
html[data-theme="paper"] .es-need.lvl2{border-color:rgba(179,38,30,.4); background:rgba(179,38,30,.05)}
html[data-theme="paper"] .es-need.lvl1{border-color:rgba(183,134,30,.45); background:rgba(183,134,30,.07)}

/* 7. Bandeaux sombres (pelouse, fiche joueur) : texte clair */
html[data-theme] body .matchday-hero h2{color:#fff!important}
html[data-theme] .matchday-hero p{color:rgba(255,255,255,.88)!important}
html[data-theme] .matchday-hero .eyebrow,
html[data-theme] .matchday-hero .muted{color:rgba(255,255,255,.82)!important}
html[data-theme="paper"] .ticker-label,
html[data-theme="paper"] .np-new{color:#fff!important}
html[data-theme="paper"] .np-ps,
html[data-theme="paper"] .np-hero{
  --up-text:#ECF1EE; --up-muted:#9AA8B2; --text:#ECF1EE; --muted:#9AA8B2; --text-dim:#C3CDC9; --n-soft:#C3CDC9;
  --up-line:rgba(236,241,238,.1); --line:rgba(236,241,238,.1);
  --up-accent:#F2C14E; --up-on-accent:#14110A; --gold:#F2C14E; color:#ECF1EE;
}
html[data-theme="paper"] .np-ps-tags span{color:#ECF1EE}
html[data-theme="paper"] .np-ps h2,
html[data-theme="paper"] .np-hero h2,
html[data-theme="paper"] #modal .modal-card .np-ps h2,
html[data-theme="paper"] #modal .modal-card .np-ps h3,
html[data-theme="paper"] #modal .modal-card .np-hero h2,
html[data-theme="paper"] #modal .modal-card .np-hero h3{color:#fff!important}
html[data-theme="paper"] #modal .modal-card .np-ps p,
html[data-theme="paper"] #modal .modal-card .np-hero p,
html[data-theme="paper"] #modal .modal-card .np-ps .muted,
html[data-theme="paper"] #modal .modal-card .np-hero .muted{color:rgba(236,241,238,.82)!important}
html[data-theme="paper"] .stars{color:#B7861E}

/* 8. Bugs communs aux deux themes */
/* La carte du manager et le menu « Plus » de la barre laterale etaient ecrases */
html:not([data-ui="simple"]) #sidebar>*{flex-shrink:0}
/* Nom du club coupe alors qu'il y a la place (mode Simple) */
.s-versus .s-vs-name{max-width:100%}
/* Pastille de forme : lettre illisible sur fond colore en sombre */
html[data-theme="ink"] .form-dot.form-L{color:#0B120E}
/* Lien « Voir les defis » : bouton blanc a texte dore */
html[data-theme] #openDefisLink{
  display:inline-flex; align-items:center; justify-content:center; padding:0 1rem; min-height:42px;
  border-radius:12px; text-decoration:none; font-weight:700;
  background:color-mix(in srgb,var(--up-accent) 12%,transparent)!important;
  color:var(--up-accent)!important;
  border:1px solid color-mix(in srgb,var(--up-accent) 35%,transparent)!important;
}
/* Lien d'evitement clavier */
html[data-theme] .x11-skip{color:#14110A!important}
