/* D518 Readability fix Yacine 29avr 22h
   Force contraste minimum WCAG AA sur fond clair */

/* Stat sources - cards trust signals */
.stat-source {
  color: #475569 !important;
  font-weight: 500 !important;
}
.stat-label {
  color: #1f2937 !important;
  font-weight: 600 !important;
}

/* Style attribute trop clairs */
[style*="color:#999"],
[style*="color: #999"],
[style*="color:#9ca3af"],
[style*="color: #9ca3af"],
[style*="color:#94a3b8"],
[style*="color: #94a3b8"],
[style*="color:#cbd5e0"],
[style*="color: #cbd5e0"] {
  color: #475569 !important;
}

[style*="color:#6b7280"],
[style*="color: #6b7280"] {
  color: #4b5563 !important;
}

/* Opacity trop basse sur texte */
[style*="opacity:0.5"]:not(button):not([class*="absolute"]),
[style*="opacity: 0.5"]:not(button):not([class*="absolute"]),
[style*="opacity:.5"]:not(button):not([class*="absolute"]) {
  opacity: 0.85 !important;
}

/* Tailwind utility classes */
.text-gray-300, .text-gray-400 { color: #475569 !important; }
.text-slate-300, .text-slate-400 { color: #475569 !important; }
.text-purple-200, .text-purple-300 { color: #4c1d95 !important; }
.text-violet-200, .text-violet-300 { color: #4c1d95 !important; }
.text-indigo-200, .text-indigo-300 { color: #312e81 !important; }

/* Dark mode preservation */
html.dark .text-gray-300, html.dark .text-gray-400 { color: #cbd5e0 !important; }
html.dark .text-slate-300, html.dark .text-slate-400 { color: #cbd5e0 !important; }
html.dark [style*="color:#94a3b8"] { color: #cbd5e0 !important; }


/* === D519 FAQ readability dark mode === */
.wr-faq-a p,
.faq-answer,
.faq-content {
  color: #e2e8f0 !important;
  font-weight: 400 !important;
}
.wr-faq-q,
.faq-question,
.faq-title {
  color: #f1f5f9 !important;
  font-weight: 600 !important;
}
.wr-case-card p,
.case-card p {
  color: #cbd5e0 !important;
}
.wr-case-card h3,
.case-card h3 {
  color: #f1f5f9 !important;
}
/* Avoid #94a3b8 on dark bg overall */
[style*="background:#0a0e1a"] [style*="color:#94a3b8"],
[style*="background:#0f172a"] [style*="color:#94a3b8"],
.wr-faq-section [style*="color:#94a3b8"] {
  color: #cbd5e0 !important;
}


/* === D520 CRITIQUE Yacine 29avr 23h — FAQ questions span override === */
/* Le span dans .wr-faq-q hérite #1f2937 (gray-800) d'un selector global,
   ce qui rend les questions invisibles sur fond noir #0f172a */
.wr-faq-q,
.wr-faq-q *,
.wr-faq-q span,
.wr-faq-q span:not(.wr-faq-arrow) {
  color: #f1f5f9 !important;
  font-weight: 600 !important;
}
.wr-faq-q .wr-faq-arrow {
  color: #6366f1 !important;  /* Indigo accent for arrow */
}
.wr-faq-item {
  background: #0f172a !important;  /* Ensure dark bg consistent */
}
.wr-faq-section {
  background: #0a0e1a !important;
}
.wr-faq-title {
  color: #f1f5f9 !important;
  font-weight: 800 !important;
}

/* Case studies cards same dark theme */
.wr-case-card {
  background: #0f172a !important;
}
.wr-case-card *,
.wr-case-card h3,
.wr-case-card p,
.wr-case-card span {
  color: #e2e8f0 !important;
}
.wr-case-card h3 {
  color: #f1f5f9 !important;
  font-weight: 700 !important;
}
.wr-case-card .wr-case-badge {
  /* Badge keeps its custom color (e.g. teal/orange) */
  background: rgba(99, 102, 241, 0.15) !important;
}

/* Cases section title */
.wr-cases-section {
  background: #0a0e1a !important;
}
.wr-cases-title {
  color: #f1f5f9 !important;
}


/* === D521 FAQ visibility MAX Yacine 29avr 23h30 === */
/* Augmenter max-height + force display + bordure visible */
.wr-faq-item.open .wr-faq-a {
  max-height: 800px !important;
  padding: 0 24px 22px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.wr-faq-item.open {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.3) !important;
}
.wr-faq-a p {
  color: #f1f5f9 !important;  /* Push to même blanc que questions */
  font-size: 1rem !important;
  line-height: 1.7 !important;
  font-weight: 400 !important;
  margin: 0 !important;
}
.wr-faq-q {
  background: #131b30 !important;  /* Légèrement plus clair pour distinction */
  padding: 20px 24px !important;
  font-size: 1rem !important;
}
.wr-faq-q span:not(.wr-faq-arrow) {
  color: #ffffff !important;  /* Maximum contrast */
  font-weight: 600 !important;
}
.wr-faq-item {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  margin-bottom: 12px !important;
  border-radius: 12px !important;
}
.wr-faq-item:hover {
  border-color: #475569 !important;
}
.wr-faq-section {
  background: #0a0e1a !important;
  padding: 80px 24px !important;
}
.wr-faq-title {
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 2rem !important;
  margin-bottom: 40px !important;
  text-align: center !important;
}

/* === D522 FIX MASSIF Yacine 29avr 23h45 — TOUS éléments gris-sur-noir === */

/* 1. Contact section labels (EMAIL / 🇲🇦 CONTACT MAROC / 🇫🇷 FRANCE / 🇺🇸 USA) */
.contact-label,
.contact-section .contact-label,
[class*="contact"] .label,
[class*="contact"] [class*="label"],
.contact-section h4,
.contact-section h3 {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  letter-spacing: 0.5px !important;
}
.contact-value,
.contact-section .contact-value,
.contact-section a,
.contact-section p {
  color: #e2e8f0 !important;
}
.contact-section,
[class*="contact-section"],
.contact-grid {
  background: #0f172a !important;
}

/* 2. h4 invisible (🌍 Nos bureaux) */
h4 {
  color: inherit !important;
}
[class*="bureau"] h4,
[class*="office"] h4,
.section-title h4,
section h4 {
  color: #f1f5f9 !important;
  font-weight: 700 !important;
}

/* 3. Office cards (🇲🇦 Maroc / 🇫🇷 France / 🇺🇸 USA) */
.office,
[class*="office"] {
  color: #ffffff !important;
}
.office *,
[class*="office"] * {
  color: #ffffff !important;
}

/* 4. Newsletter badges (Case Studies / FAQ pill labels) */
.wr-newsletter-badge {
  color: #ffffff !important;
  background: #6366f1 !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  letter-spacing: 1px !important;
}

/* 5. Case-card badges (Pharma / IA / ERP) - upgrade contrast */
.wr-case-badge {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* 6. Nav buttons readable */
.nav-link {
  color: #1f2937 !important;
}
.nav-link:hover, .nav-link.active {
  color: #6366f1 !important;
}

/* 7. Tech Radar button - keep teal but more visible */
#nav-radar {
  color: #00a583 !important;
  font-weight: 600 !important;
}

/* 8. Trouver ma solution - blanc sur indigo */
#nav-sf {
  color: #ffffff !important;
  background: #6366f1 !important;
  font-weight: 600 !important;
}

/* 9. Footer / dark sections - text always lisible */
footer, [class*="footer"], .dark-section, [class*="dark-bg"] {
  color: #e2e8f0;
}
footer h1, footer h2, footer h3, footer h4, footer h5,
[class*="footer"] h1, [class*="footer"] h2, [class*="footer"] h3, [class*="footer"] h4 {
  color: #ffffff !important;
}
footer p, footer li, footer a, footer span,
[class*="footer"] p, [class*="footer"] li, [class*="footer"] a, [class*="footer"] span {
  color: #cbd5e0 !important;
}

/* 10. Generic dark-bg text override (catch-all) */
[style*="background:#0a0e1a"] *:not(button):not(.wr-case-badge):not(.wr-newsletter-badge),
[style*="background:#0f172a"] *:not(button):not(.wr-case-badge):not(.wr-newsletter-badge),
[style*="background:#111827"] *:not(button):not(.wr-case-badge):not(.wr-newsletter-badge),
[style*="background:#1f2937"] *:not(button):not(.wr-case-badge):not(.wr-newsletter-badge),
[style*="background:#0c0e1a"] *:not(button):not(.wr-case-badge):not(.wr-newsletter-badge) {
  color: #e2e8f0 !important;
}

/* 11. Spans/divs avec color sombre forcée par Tailwind sur fond sombre */
[class*="bg-gray-9"] *,
[class*="bg-slate-9"] *,
[class*="bg-gray-8"] *,
[class*="bg-slate-8"] *,
[class*="bg-zinc-9"] * {
  color: #e2e8f0;
}
[class*="bg-gray-9"] h1, [class*="bg-gray-9"] h2, [class*="bg-gray-9"] h3, [class*="bg-gray-9"] h4,
[class*="bg-slate-9"] h1, [class*="bg-slate-9"] h2, [class*="bg-slate-9"] h3, [class*="bg-slate-9"] h4 {
  color: #ffffff !important;
}

/* 12. Section dark backgrounds gros catch-all */
section[style*="background-color: rgb(15"], section[style*="background-color: rgb(17"],
section[style*="background-color: rgb(31"], section[style*="background-color: rgb(10"] {
  color: #e2e8f0;
}
