/*
 * D507 v2 - Contrast WCAG Systemic Fix (refined)
 * Yacine: 'TRACK LES TEXT SUR FOND DE LA MEME COULEUR PARTOUT'
 * 
 * v2: More conservative, avoid breaking layouts.
 * Focus on EXACT pattern: text color matches bg-color (semi-transparent)
 */

/* ═══════════════════════════════════════════════════════════════
   PATTERN 1 LIMITED: Specific known pills with same-color bg
   ═══════════════════════════════════════════════════════════════ */

/* Common pattern: green pill on green-transparent bg */
[class*="pill"][style*="background:rgba(34,197,94"],
[class*="badge"][style*="background:rgba(34,197,94"] {
    color: #f0fdf4 !important;  /* near-white green tint */
    text-shadow: 0 1px 2px rgba(0,0,0,0.7) !important;
}

/* Cyan pills */
[class*="pill"][style*="background:rgba(6,182,212"],
[class*="badge"][style*="background:rgba(6,182,212"] {
    color: #ecfeff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7) !important;
}

/* Blue pills */
[class*="pill"][style*="background:rgba(99,102,241"],
[class*="badge"][style*="background:rgba(99,102,241"] {
    color: #eef2ff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7) !important;
}

/* ═══════════════════════════════════════════════════════════════
   PATTERN 2: tab-badge / v67-vm-live (training)
   ═══════════════════════════════════════════════════════════════ */

.tab-badge {
    /* was: color same as bg (rgba 0.2) */
    color: #f0fdf4 !important;
    background: rgba(34, 197, 94, 0.5) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.6);
    font-weight: 600 !important;
}

.v67-vm-live {
    color: #f0fdfa !important;
    background: rgba(72, 187, 120, 0.5) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.6);
    font-weight: 600 !important;
}

/* ═══════════════════════════════════════════════════════════════
   PATTERN 3: Light red on cream
   ═══════════════════════════════════════════════════════════════ */

strong[style*="rgb(254"] {
    color: #991b1b !important;
}

/* ═══════════════════════════════════════════════════════════════
   PATTERN 4: White on white (homepage critical)
   ═══════════════════════════════════════════════════════════════ */

.contact-button {
    color: #1a1a1a !important;
    background: #ffd700 !important;
    border: 2px solid #1a1a1a !important;
}

.wr-case-badge {
    color: #ffffff !important;
    background: rgba(0, 201, 167, 0.65) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.6) !important;
    font-weight: 700 !important;
}

/* ═══════════════════════════════════════════════════════════════
   PATTERN 5: Selection (always readable)
   ═══════════════════════════════════════════════════════════════ */

::selection {
    background: rgba(103, 232, 249, 0.6) !important;
    color: #000000 !important;
    text-shadow: none !important;
}
::-moz-selection {
    background: rgba(103, 232, 249, 0.6) !important;
    color: #000000 !important;
    text-shadow: none !important;
}
