/**
 * =========================================================
 *  FANTASY PENTATHLON — Moteur de thème centralisé v2.0
 *  Modifiez CE FICHIER UNIQUEMENT pour changer les couleurs
 *  ou le design de tout le jeu fantaisie.
 * =========================================================
 */

/* ═══════════════════════════════════════════════════════
   1. DESIGN TOKENS — variables CSS globales
   ═══════════════════════════════════════════════════════ */
:root {
    /* ── Fonds ─────────────────────────────────────────── */
    --ft-bg-page:        #f1f5f9;
    --ft-bg-card:        #ffffff;
    --ft-bg-card-hover:  #f8fafc;
    --ft-bg-input:       #f1f5f9;

    /* ── Textes ────────────────────────────────────────── */
    --ft-text:           #111827;
    --ft-text-sec:       #6b7280;
    --ft-text-muted:     #9ca3af;
    --ft-text-on-color:  #ffffff;

    /* ── Bordures ──────────────────────────────────────── */
    --ft-border:         rgba(0,0,0,0.08);
    --ft-border-accent:  rgba(5,150,105,0.18);

    /* ── Ombres ────────────────────────────────────────── */
    --ft-shadow-sm:      0 1px 4px rgba(0,0,0,0.06);
    --ft-shadow-md:      0 2px 10px rgba(0,0,0,0.08);
    --ft-shadow-header:  0 1px 4px rgba(0,0,0,0.07);
    --ft-shadow-nav:     0 -2px 10px rgba(0,0,0,0.07);
    --ft-shadow-card:    0 2px 12px rgba(0,0,0,0.06);

    /* ── Couleur principale : VERT ─────────────────────── */
    --ft-green:          #059669;
    --ft-green-mid:      #10b981;
    --ft-green-light:    #34d399;
    --ft-green-bg:       rgba(5,150,105,0.07);
    --ft-green-border:   rgba(5,150,105,0.18);

    /* ── Statuts ───────────────────────────────────────── */
    --ft-success:        #059669;
    --ft-warning:        #d97706;
    --ft-danger:         #dc2626;
    --ft-gold:           #d97706;
    --ft-gold-light:     #fbbf24;

    /* ── Disciplines ───────────────────────────────────── */
    --ft-escrime:        #ef4444;
    --ft-natation:       #06b6d4;
    --ft-equitation:     #22c55e;
    --ft-laser-run:      #a855f7;

    /* ── Rayons ────────────────────────────────────────── */
    --ft-r-sm:   10px;
    --ft-r-md:   16px;
    --ft-r-lg:   20px;
    --ft-r-xl:   24px;
}

/* ═══════════════════════════════════════════════════════
   2. BASE
   ═══════════════════════════════════════════════════════ */
html, body {
    background: var(--ft-bg-page) !important;
    color:      var(--ft-text)    !important;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════
   3. COMPOSANTS
   ═══════════════════════════════════════════════════════ */

/* ── Cartes ─────────────────────────────────────────────── */
.card-dark, .card-clean, .ft-card {
    background:    var(--ft-bg-card) !important;
    border:        1px solid var(--ft-border) !important;
    box-shadow:    var(--ft-shadow-card) !important;
    border-radius: var(--ft-r-md);
    color:         var(--ft-text) !important;
}
.card-dark.ft-accent, .ft-card-accent { border-color: var(--ft-green-border) !important; }

/* ── Header sticky (pmf-topbar) ─────────────────────────── */
.pmf-topbar,
.app-header,
header.sticky,
header[class*="sticky top-0"],
.ft-header {
    background:    rgba(255,255,255,0.97) !important;
    border-bottom: 1px solid var(--ft-border) !important;
    box-shadow:    var(--ft-shadow-header) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--ft-text) !important;
}
.pmf-topbar *:not([class*="text-green"]):not([class*="text-emerald"]):not([class*="text-amber"]):not([class*="text-yellow"]):not(.club-crest):not(.club-crest *):not(.gradient-text) {
    color: var(--ft-text) !important;
}
.pmf-title    { color: var(--ft-text) !important; font-weight: 900; }
.pmf-subtitle { color: var(--ft-text-sec) !important; }
.pmf-section-title { color: var(--ft-text-sec) !important; }
.pmf-back, .pmf-icon-btn {
    background:   var(--ft-green-bg) !important;
    border-color: var(--ft-green-border) !important;
    color:        var(--ft-green) !important;
}

/* ── Navigation bas ──────────────────────────────────────── */
#pmf-bottom-nav > div > div,
.ft-nav,
nav[class*="fixed bottom"],
nav[class*="fixed inset-x"] {
    background:   rgba(255,255,255,0.97) !important;
    border-color: var(--ft-border) !important;
    box-shadow:   var(--ft-shadow-nav) !important;
}
#pmf-bottom-nav .nav-item:not(.active) .nav-icon  { color: #6b7280 !important; }
#pmf-bottom-nav .nav-item:not(.active) .nav-label { color: #9ca3af !important; }
#pmf-bottom-nav .nav-badge     { border-color: #ffffff !important; }
#pmf-bottom-nav .center-btn-inner { border-color: #ffffff !important; }

/* ── Nav Drawer / Sidebar Desktop ───────────────────────── */
#nav-drawer-panel {
    background:   #ffffff !important;
    border-right: 1px solid var(--ft-border) !important;
    box-shadow:   4px 0 20px rgba(0,0,0,0.06) !important;
}
.nd-label { color: var(--ft-text) !important; }
.nd-sec   { color: var(--ft-text-sec) !important; }
.nd-sec::after { background: var(--ft-border) !important; }
.nd-row   {
    border-color: rgba(0,0,0,0.05) !important;
    background:   rgba(0,0,0,0.01) !important;
}
.nd-chev  { color: #cbd5e1 !important; }

/* ── Boutons ─────────────────────────────────────────────── */
.ft-btn { border-radius: var(--ft-r-sm); font-weight: 800; font-size: 12px; padding: 10px 18px; border: none; cursor: pointer; transition: opacity .15s; }
.ft-btn-primary { background: var(--ft-green) !important; color: #ffffff !important; }
.ft-btn-primary:hover { opacity: .88; }
.ft-btn-ghost   { background: var(--ft-green-bg) !important; color: var(--ft-green) !important; border: 1px solid var(--ft-green-border) !important; }

/* ── Badges ──────────────────────────────────────────────── */
.ft-badge { font-size: 9px; font-weight: 900; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.ft-badge-green  { background: var(--ft-green-bg);       color: var(--ft-green);   border: 1px solid var(--ft-green-border); }
.ft-badge-gold   { background: rgba(217,119,6,.08);      color: var(--ft-gold);    border: 1px solid rgba(217,119,6,.2); }
.ft-badge-red    { background: rgba(220,38,38,.08);      color: var(--ft-danger);  border: 1px solid rgba(220,38,38,.2); }
.ft-badge-purple { background: rgba(168,85,247,.08);     color: #a855f7;           border: 1px solid rgba(168,85,247,.2); }

/* ── Disciplines ─────────────────────────────────────────── */
.ft-disc-escrime    { color: var(--ft-escrime)    !important; }
.ft-disc-natation   { color: var(--ft-natation)   !important; }
.ft-disc-equitation { color: var(--ft-equitation) !important; }
.ft-disc-laser-run  { color: var(--ft-laser-run)  !important; }

/* ── Barres de progression ───────────────────────────────── */
.energy-bar, .ch-bar-wrap, .ft-progress-track {
    background: rgba(0,0,0,0.07) !important;
    border-radius: 99px;
    overflow: hidden;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--ft-bg-page); }
::-webkit-scrollbar-thumb { background: rgba(5,150,105,.22); border-radius: 4px; }

/* ═══════════════════════════════════════════════════════
   4. OVERRIDES — classes pmf-* & composants spécifiques
   ═══════════════════════════════════════════════════════ */

/* ── Any fixed-bottom element ────────────────────────────── */
[class*="fixed bottom"], [class*="fixed inset-x"] {
    background: rgba(255,255,255,0.97) !important;
    border-color: var(--ft-border) !important;
}
nav[style*="rgba(2,6,23"],nav[style*="rgba(7,20,12"],nav[style*="rgba(15,23,42"],
nav[style*="rgba(4,14,9"],nav[style*="rgba(7,16,31"] {
    background: rgba(255,255,255,0.97) !important;
    border-color: var(--ft-border) !important;
    box-shadow: var(--ft-shadow-nav) !important;
}

/* ── Black/dark headers ──────────────────────────────────── */
header[class*="bg-black"],header[style*="background:rgba(0"],
header[style*="background:#0"],header[style*="background:#1"] {
    background: rgba(255,255,255,0.97) !important;
    border-color: var(--ft-border) !important;
}
.app-header * { color: var(--ft-text) !important; }

/* ── pmf-panel / pmf-card ────────────────────────────────── */
.pmf-panel, .pmf-card, .pmf-hero-panel {
    background: var(--ft-bg-card) !important;
    border-color: var(--ft-border) !important;
    color: var(--ft-text) !important;
}

/* ── Match preview (index.php) ───────────────────────────── */
.match-preview {
    background: var(--ft-bg-card) !important;
    border-color: var(--ft-green-border) !important;
}
.match-preview::before { display: none; }
.match-team-name  { color: var(--ft-text) !important; }
.match-team-sub   { color: var(--ft-text-sec) !important; }
.match-vs         { color: var(--ft-text-muted) !important; }
.match-team-crest {
    background:   var(--ft-green-bg) !important;
    border-color: var(--ft-green-border) !important;
}

/* ── Action banner (À faire maintenant) ─────────────────── */
.action-banner {
    background: var(--ft-bg-card) !important;
    border-color: var(--ft-border) !important;
    box-shadow: var(--ft-shadow-sm) !important;
}
.action-banner-text  { color: var(--ft-text) !important; }
.action-banner-label { opacity: 1; font-weight: 900; }

/* ── Stat chips & tiles ──────────────────────────────────── */
.stat-chip {
    background:   var(--ft-bg-page) !important;
    border-color: var(--ft-border) !important;
}
.stat-chip-val { color: var(--ft-text) !important; }
.tile2-title   { color: var(--ft-text) !important; }
.tile2-sub     { color: var(--ft-text-muted) !important; }

/* ── Challenges tracks ───────────────────────────────────── */
.ch-track {
    background:   var(--ft-bg-card) !important;
    border-color: var(--ft-border) !important;
}
.ch-track.done {
    background:   rgba(5,150,105,0.05) !important;
    border-color: var(--ft-green-border) !important;
}
.ch-title    { color: var(--ft-text) !important; }
.ch-bar-wrap { background: rgba(0,0,0,0.07) !important; }
.result-score { color: var(--ft-text) !important; }

/* ── Texte dans les cartes sombres ──────────────────────── */
.card-dark .text-white:not(button):not(a):not([class*="bg-"]):not(.badge) { color: #1e293b !important; }
.card-dark .text-neutral-100,.card-dark .text-neutral-200,.card-dark .text-neutral-300 { color: #374151 !important; }
.card-dark .text-neutral-400,.card-dark .text-neutral-500 { color: var(--ft-text-sec) !important; }
.card-dark .text-neutral-600,.card-dark .text-neutral-700 { color: var(--ft-text-muted) !important; }

/* ═══════════════════════════════════════════════════════
   4b. OVERRIDES — fonds sombres inline → blanc
   ═══════════════════════════════════════════════════════ */

/* Hex sombres */
[style*="background:#000"],[style*="background: #000"] { background: var(--ft-bg-page) !important; }
[style*="background:#111"],[style*="background: #111"] { background: var(--ft-bg-card) !important; }
[style*="background:#03130d"],[style*="background: #03130d"] { background: var(--ft-bg-page) !important; }
[style*="background:#0f172a"],[style*="background: #0f172a"] { background: var(--ft-bg-page) !important; }
[style*="background:#020504"],[style*="background: #020504"] { background: var(--ft-bg-page) !important; }
[style*="background:#061018"],[style*="background: #061018"] { background: var(--ft-bg-page) !important; }
[style*="background:#070d0b"],[style*="background: #070d0b"] { background: var(--ft-bg-card) !important; }
[style*="background:#0b1f1a"],[style*="background: #0b1f1a"] { background: var(--ft-bg-card) !important; }
[style*="background:#1e293b"],[style*="background: #1e293b"] { background: var(--ft-bg-card) !important; }
[style*="background:#0d1a2e"],[style*="background: #0d1a2e"] { background: var(--ft-bg-card) !important; }

/* rgba sombres */
[style*="background:rgba(2,6,23"],[style*="background: rgba(2,6,23"]   { background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }
[style*="background:rgba(7,20,12"],[style*="background: rgba(7,20,12"] { background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }
[style*="background:rgba(7,16,31"],[style*="background: rgba(7,16,31"] { background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }
[style*="background:rgba(4,14,9" ],[style*="background: rgba(4,14,9" ] { background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }
[style*="background:rgba(15,23,42"],[style*="background: rgba(15,23,42"]{ background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }
[style*="background:rgba(3,19,13"],[style*="background: rgba(3,19,13"] { background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }
[style*="background:rgba(6,78,59"],[style*="background: rgba(6,78,59"] { background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }
[style*="background:rgba(15,31,52"],[style*="background: rgba(15,31,52"]{ background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }
[style*="background:rgba(6,16,10"],[style*="background: rgba(6,16,10"] { background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }
[style*="background:rgba(8,28,26"],[style*="background: rgba(8,28,26"] { background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }
[style*="background:rgba(3,30,20"],[style*="background: rgba(3,30,20"] { background: var(--ft-bg-card) !important; color: var(--ft-text) !important; }

/* rgba(0,0,0) avec opacité > 0.1 — fonds noir semi-transparent → clair */
[style*="background:rgba(0,0,0,0.9"],[style*="background: rgba(0,0,0,0.9"],
[style*="background:rgba(0,0,0,.9"],[style*="background: rgba(0,0,0,.9"],
[style*="background:rgba(0,0,0,0.8"],[style*="background: rgba(0,0,0,0.8"],
[style*="background:rgba(0,0,0,.8"],[style*="background: rgba(0,0,0,.8"],
[style*="background:rgba(0,0,0,0.7"],[style*="background: rgba(0,0,0,0.7"],
[style*="background:rgba(0,0,0,.7"],[style*="background: rgba(0,0,0,.7"],
[style*="background:rgba(0,0,0,0.6"],[style*="background: rgba(0,0,0,0.6"],
[style*="background:rgba(0,0,0,.6"],[style*="background: rgba(0,0,0,.6"],
[style*="background:rgba(0,0,0,0.5"],[style*="background: rgba(0,0,0,0.5"],
[style*="background:rgba(0,0,0,.5"],[style*="background: rgba(0,0,0,.5"],
[style*="background:rgba(0,0,0,0.4"],[style*="background: rgba(0,0,0,0.4"],
[style*="background:rgba(0,0,0,.4"],[style*="background: rgba(0,0,0,.4"],
[style*="background:rgba(0,0,0,0.3"],[style*="background: rgba(0,0,0,0.3"],
[style*="background:rgba(0,0,0,.3"],[style*="background: rgba(0,0,0,.3"],
[style*="background:rgba(0,0,0,0.2"],[style*="background: rgba(0,0,0,0.2"],
[style*="background:rgba(0,0,0,.2"],[style*="background: rgba(0,0,0,.2"] { background: rgba(0,0,0,.04) !important; }

/* Tailwind dark → clair */
.bg-black,.bg-neutral-950,.bg-neutral-900,.bg-gray-900,.bg-slate-900,
.bg-neutral-800,.bg-gray-800,.bg-slate-800,
.bg-neutral-950,.bg-gray-950 { background-color: var(--ft-bg-page) !important; }

/* Variantes avec opacité */
.bg-black\/90,.bg-black\/80,.bg-black\/70,.bg-black\/60,
.bg-black\/50,.bg-black\/40,.bg-black\/30,.bg-black\/20 { background-color: rgba(255,255,255,.96) !important; }

.bg-slate-900\/90,.bg-slate-900\/80,.bg-slate-900\/70,.bg-slate-900\/60,
.bg-slate-900\/50,.bg-slate-900\/40,.bg-slate-900\/30,.bg-slate-900\/20,
.bg-slate-800\/90,.bg-slate-800\/80,.bg-slate-800\/70,.bg-slate-800\/60,
.bg-slate-800\/50,.bg-slate-800\/40,.bg-slate-800\/30 { background-color: rgba(0,0,0,.04) !important; }

.bg-gray-900\/90,.bg-gray-900\/80,.bg-gray-900\/70,.bg-gray-900\/60,
.bg-gray-900\/50,.bg-gray-900\/40,.bg-gray-900\/30,.bg-gray-900\/20,
.bg-gray-800\/90,.bg-gray-800\/80,.bg-gray-800\/70,.bg-gray-800\/60,
.bg-gray-800\/50,.bg-gray-800\/40,.bg-gray-800\/30 { background-color: rgba(0,0,0,.04) !important; }

.bg-neutral-900\/90,.bg-neutral-900\/80,.bg-neutral-900\/70,.bg-neutral-900\/60,
.bg-neutral-900\/50,.bg-neutral-900\/40,.bg-neutral-900\/30,.bg-neutral-900\/20,
.bg-neutral-800\/90,.bg-neutral-800\/80,.bg-neutral-800\/70,.bg-neutral-800\/60,
.bg-neutral-800\/50,.bg-neutral-800\/40,.bg-neutral-800\/30 { background-color: rgba(0,0,0,.04) !important; }

/* Bordures blanches transparentes */
.border-white\/5,.border-white\/6,.border-white\/8,.border-white\/10,.border-white\/12,
.border-white\/15,.border-white\/20,.border-white\/25,.border-white\/30 { border-color: var(--ft-border) !important; }

/* Fonds neutres foncés → clair */
.bg-neutral-800,.bg-neutral-700,.bg-neutral-600,
.bg-gray-800,.bg-gray-700,.bg-gray-600,
.bg-slate-800,.bg-slate-700,.bg-slate-600 { background-color: var(--ft-bg-input) !important; }

/* Variantes opacité neutrals */
.bg-neutral-800\/80,.bg-neutral-800\/60,.bg-neutral-800\/50,.bg-neutral-800\/40,
.bg-neutral-700\/80,.bg-neutral-700\/60,.bg-neutral-700\/50,.bg-neutral-700\/40,
.bg-gray-800\/80,.bg-gray-800\/60,.bg-gray-800\/50,.bg-gray-800\/40,
.bg-gray-700\/80,.bg-gray-700\/60,.bg-gray-700\/50,.bg-gray-700\/40 { background-color: rgba(0,0,0,.05) !important; }

/* Bordures sombres → légères */
.border-neutral-700,.border-neutral-800,.border-neutral-900,
.border-gray-700,.border-gray-800,.border-gray-900,
.border-slate-700,.border-slate-800,.border-slate-900 { border-color: var(--ft-border) !important; }

/* Textes sombres Tailwind → réancrer */
.text-slate-300 { color: #374151 !important; }
.text-slate-400,.text-gray-400 { color: var(--ft-text-sec) !important; }
.text-slate-500,.text-gray-500 { color: var(--ft-text-muted) !important; }
.text-neutral-100,.text-neutral-200 { color: #374151 !important; }
.text-neutral-300 { color: #4b5563 !important; }

/* ═══════════════════════════════════════════════════════
   4c. TEXTES BLANCS INLINE → sombres
   ═══════════════════════════════════════════════════════ */
/* Blancs purs et quasi-blancs → texte sombre */
[style*="color:#fff"],[style*="color: #fff"],
[style*="color:#ffffff"],[style*="color: #ffffff"] { color: var(--ft-text) !important; }

/* Gris très clairs (ex: #e5e7eb #d1d5db #f3f4f6) → texte sombre lisible */
[style*="color:#e5e7eb"],[style*="color: #e5e7eb"],
[style*="color:#d1d5db"],[style*="color: #d1d5db"],
[style*="color:#e2e8f0"],[style*="color: #e2e8f0"],
[style*="color:#f3f4f6"],[style*="color: #f3f4f6"],
[style*="color:#f1f5f9"],[style*="color: #f1f5f9"],
[style*="color:#f9fafb"],[style*="color: #f9fafb"] { color: var(--ft-text) !important; }

/* Gris clairs moyens (ex: #cbd5e1 #c4b5fd) → texte secondaire */
[style*="color:#cbd5e1"],[style*="color: #cbd5e1"],
[style*="color:#e2e8f0"],[style*="color: #e2e8f0"] { color: var(--ft-text-sec) !important; }

[style*="color:rgba(255,255,255,.9"],[style*="color:rgba(255,255,255,0.9"],
[style*="color:rgba(255,255,255,.8"],[style*="color:rgba(255,255,255,0.8"],
[style*="color:rgba(255,255,255,.7"],[style*="color:rgba(255,255,255,0.7"] { color: var(--ft-text-sec) !important; }

[style*="color:rgba(255,255,255,.6"],[style*="color:rgba(255,255,255,0.6"],
[style*="color:rgba(255,255,255,.5"],[style*="color:rgba(255,255,255,0.5"],
[style*="color:rgba(255,255,255,.4"],[style*="color:rgba(255,255,255,0.4"],
[style*="color:rgba(255,255,255,.3"],[style*="color:rgba(255,255,255,0.3"],
[style*="color:rgba(255,255,255,.2"],[style*="color:rgba(255,255,255,0.2"],
[style*="color:rgba(255,255,255,.1"],[style*="color:rgba(255,255,255,0.1"] { color: var(--ft-text-muted) !important; }

/* ═══════════════════════════════════════════════════════
   4d. ACCENTS TROP CLAIRS INLINE → équivalents lisibles
   (couleurs Tailwind niveau 300/400 illisibles sur fond clair)
   ═══════════════════════════════════════════════════════ */
/* Verts clairs → vert lisible */
[style*="color:#6ee7b7"],[style*="color: #6ee7b7"],
[style*="color:#34d399"],[style*="color: #34d399"],
[style*="color:#4ade80"],[style*="color: #4ade80"],
[style*="color:#a7f3d0"],[style*="color: #a7f3d0"],
[style*="color:#86efac"],[style*="color: #86efac"] { color: var(--ft-green) !important; }

/* Bleus clairs → bleu lisible */
[style*="color:#93c5fd"],[style*="color: #93c5fd"],
[style*="color:#60a5fa"],[style*="color: #60a5fa"],
[style*="color:#38bdf8"],[style*="color: #38bdf8"],
[style*="color:#7dd3fc"],[style*="color: #7dd3fc"] { color: #2563eb !important; }

/* Violets clairs → violet lisible */
[style*="color:#c4b5fd"],[style*="color: #c4b5fd"],
[style*="color:#a78bfa"],[style*="color: #a78bfa"],
[style*="color:#c084fc"],[style*="color: #c084fc"],
[style*="color:#d8b4fe"],[style*="color: #d8b4fe"],
[style*="color:#818cf8"],[style*="color: #818cf8"] { color: #7c3aed !important; }

/* Jaunes/ambres clairs → ambre lisible */
[style*="color:#fcd34d"],[style*="color: #fcd34d"],
[style*="color:#fde047"],[style*="color: #fde047"],
[style*="color:#facc15"],[style*="color: #facc15"] { color: #d97706 !important; }

/* Roses clairs → rose lisible */
[style*="color:#f9a8d4"],[style*="color: #f9a8d4"],
[style*="color:#f472b6"],[style*="color: #f472b6"] { color: #db2777 !important; }

/* Rouges clairs → rouge lisible */
[style*="color:#fca5a5"],[style*="color: #fca5a5"],
[style*="color:#f87171"],[style*="color: #f87171"] { color: #dc2626 !important; }

/* Exception : ces accents restent clairs sur fond saturé/gradient sombre */
[style*="background:linear-gradient(135deg,#0"] [style*="color:#"],
[style*="background:#059669"] [style*="color:#"],
[style*="background:#10b981"] [style*="color:#"],
[style*="background:#7c3aed"] [style*="color:#"],
[style*="background:#2563eb"] [style*="color:#"],
[style*="background:#db2777"] [style*="color:#"],
[style*="background:#dc2626"] [style*="color:#"] { color: inherit; }

/* ═══════════════════════════════════════════════════════
   5. EXCEPTIONS — éléments colorés qui gardent le blanc
   ═══════════════════════════════════════════════════════ */

/* Tailwind classes de texte colorées → garder */
.text-green-400,.text-green-500,.text-emerald-400,.text-emerald-500 { color: var(--ft-green-mid) !important; }
.text-amber-400,.text-amber-500,.text-yellow-400  { color: var(--ft-gold-light) !important; }
.text-red-400,.text-red-500                       { color: var(--ft-danger) !important; }
.text-cyan-400,.text-cyan-500                     { color: var(--ft-natation) !important; }
.text-purple-400,.text-purple-500,.text-indigo-400 { color: var(--ft-laser-run) !important; }
.text-blue-400,.text-blue-500                     { color: #3b82f6 !important; }

/* Texte blanc / sombre → forcer sombre */
.text-white      { color: var(--ft-text) !important; }
.text-neutral-100,.text-neutral-200,.text-neutral-300 { color: #374151 !important; }
.text-neutral-400,.text-neutral-500 { color: var(--ft-text-sec) !important; }
.text-neutral-600,.text-neutral-700 { color: var(--ft-text-muted) !important; }

/* Éléments avec fond coloré → texte blanc légitime */
button[style*="color:#fff"],button[style*="color: #fff"],
a[style*="color:#fff"],a[style*="color: #fff"],
button.text-white, a.text-white,
.club-crest, .club-crest *,
.form-dot, .form-dot *,
.center-btn-inner, .center-btn-inner *,
button .text-white, a .text-white,
[class*="bg-emerald"] .text-white,[class*="bg-green"] .text-white,
.bg-emerald-500 .text-white,.bg-green-500 .text-white,
.bg-red-500 .text-white,.bg-blue-500 .text-white,
.bg-amber-500 .text-white,.bg-indigo-500 .text-white,
[style*="background:linear-gradient"] .text-white,
[style*="background:linear-gradient"] [style*="color:#fff"],
[style*="background:linear-gradient"] [style*="color: #fff"],
[style*="background:#059669"] *,[style*="background:#10b981"] *,
[style*="background:#ef4444"] *,[style*="background:#dc2626"] *,
[style*="background:#d97706"] *,[style*="background:#f59e0b"] *,
[style*="background:#a855f7"] *,[style*="background:#06b6d4"] *,
[style*="background:#3b82f6"] *,[style*="background:#6366f1"] *,
button[style*="background"], a[style*="background:linear-gradient"] { color: inherit; }

/* Cartes volontairement sombres ou colorées (aide de page, bandeau du mode
   Draft, carte « Vraie compétition » de l'accueil) :
   le texte blanc y reste blanc. */
#fm-page-tip [style*="color:#fff"],
.hero-classic .text-white,
.pmf-real-hero, .pmf-real-hero a[style*="color:#fff"] { color: #ffffff !important; }

/* Texte blanc posé sur un fond franc (boutons verts, bleus, rouges…) : la
   règle « texte blanc → sombre » ci-dessus le rendait illisible, car ses
   exceptions n'étaient pas prioritaires. Un élément qui porte lui-même un
   fond coloré et un texte blanc garde son texte blanc. Les teintes claires
   (vert, émeraude, ambre, orange, cyan, turquoise, ciel en 500) gardent le
   texte sombre, plus lisible sur ces fonds. */
[class~="bg-blue-500"].text-white:not(:disabled),
[class~="bg-blue-600"].text-white:not(:disabled),
[class~="bg-blue-700"].text-white:not(:disabled),
[class~="bg-emerald-600"].text-white:not(:disabled),
[class~="bg-emerald-700"].text-white:not(:disabled),
[class~="bg-green-600"].text-white:not(:disabled),
[class~="bg-green-700"].text-white:not(:disabled),
[class~="bg-red-500"].text-white:not(:disabled),
[class~="bg-red-600"].text-white:not(:disabled),
[class~="bg-red-700"].text-white:not(:disabled),
[class~="bg-indigo-500"].text-white:not(:disabled),
[class~="bg-indigo-600"].text-white:not(:disabled),
[class~="bg-indigo-700"].text-white:not(:disabled),
[class~="bg-purple-500"].text-white:not(:disabled),
[class~="bg-purple-600"].text-white:not(:disabled),
[class~="bg-purple-700"].text-white:not(:disabled),
[class~="bg-violet-500"].text-white:not(:disabled),
[class~="bg-violet-600"].text-white:not(:disabled),
[class~="bg-violet-700"].text-white:not(:disabled),
[class~="bg-amber-600"].text-white:not(:disabled),
[class~="bg-amber-700"].text-white:not(:disabled),
[class~="bg-orange-600"].text-white:not(:disabled),
[class~="bg-orange-700"].text-white:not(:disabled),
[class~="bg-rose-500"].text-white:not(:disabled),
[class~="bg-rose-600"].text-white:not(:disabled),
[class~="bg-rose-700"].text-white:not(:disabled),
[class~="bg-pink-500"].text-white:not(:disabled),
[class~="bg-pink-600"].text-white:not(:disabled),
[class~="bg-pink-700"].text-white:not(:disabled),
[class~="bg-cyan-600"].text-white:not(:disabled),
[class~="bg-cyan-700"].text-white:not(:disabled),
[class~="bg-teal-600"].text-white:not(:disabled),
[class~="bg-teal-700"].text-white:not(:disabled),
[class~="bg-sky-600"].text-white:not(:disabled),
[class~="bg-sky-700"].text-white:not(:disabled),
[style*="color:#fff"][style*="background:linear-gradient"],
[style*="color:#fff"][style*="background:#"],
[style*="color: #fff"][style*="background: linear-gradient"] { color: #ffffff !important; }
