/* ============================================
   HAALS FORMATION - FIX COULEUR TEXTE AU SCROLL
   ============================================ */

/* S'assurer que tous les éléments de texte gardent leur couleur d'origine */
* {
  /* Réinitialiser les couleurs héritées des liens */
}

/* Forcer la couleur noire pour tous les éléments de texte non-lien */
body,
body *:not(a):not(.btn):not(.badge):not(.nav-link):not(.filter-btn.active) {
  color: inherit;
}

/* Exception : texte blanc dans les sections avec fond orange */
.hero,
.hero *:not(a):not(.btn),
section[style*="background-color: var(--color-orange)"] *:not(a):not(.btn),
section[style*="background: var(--color-orange)"] *:not(a):not(.btn),
section[style*="background-color: var(--color-orange)"] h2,
section[style*="background-color: var(--color-orange)"] h3,
section[style*="background-color: var(--color-orange)"] p {
  color: var(--color-white) !important;
}

/* Titres - toujours noir sauf si lien */
h1:not(a), h2:not(a), h3:not(a), h4:not(a), h5:not(a), h6:not(a) {
  color: var(--color-black) !important;
}

/* Paragraphes - toujours noir sauf si lien */
p:not(a) {
  color: var(--color-black) !important;
}

/* Listes - toujours noir sauf si lien */
li:not(a) {
  color: var(--color-black) !important;
}

/* Spans - toujours noir sauf si lien */
span:not(a):not(.text-orange):not(.stat-number) {
  color: inherit;
}

/* Divs - toujours noir sauf si lien */
div:not(a) {
  color: inherit;
}

/* Sections - texte toujours noir sauf hero, footer et sections orange */
.section:not(.hero):not(.footer):not([style*="background-color: var(--color-orange)"]):not([style*="background: var(--color-orange)"]) *:not(a):not(.btn):not(.badge):not(.nav-link):not(.filter-btn.active):not(.text-orange) {
  color: var(--color-black) !important;
}

/* Footer - texte toujours blanc */
.footer,
.footer *:not(a):not(.btn):not(.badge) {
  color: var(--color-white) !important;
}

.footer h1:not(a),
.footer h2:not(a),
.footer h3:not(a),
.footer h4:not(a),
.footer h5:not(a),
.footer h6:not(a),
.footer p:not(a),
.footer span:not(a),
.footer li:not(a),
.footer div:not(a) {
  color: var(--color-white) !important;
}

/* Cartes - texte toujours noir */
.card *:not(a):not(.btn):not(.badge):not(.text-orange) {
  color: var(--color-black) !important;
}

/* Témoignages - texte toujours noir */
.testimonial *:not(a):not(.btn) {
  color: inherit !important;
}

/* Stats - texte toujours noir sauf les chiffres */
.stat-item *:not(a):not(.stat-number):not(.text-orange) {
  color: var(--color-black) !important;
}

/* Formations - texte toujours noir */
.formation-card *:not(a):not(.btn):not(.badge):not(.text-orange) {
  color: var(--color-black) !important;
}

/* Empêcher les changements de couleur lors des animations */
.animate-on-scroll *:not(a):not(.btn):not(.badge):not(.nav-link):not(.filter-btn.active):not(.text-orange) {
  color: inherit !important;
}

.fade-in *:not(a):not(.btn):not(.badge):not(.nav-link):not(.filter-btn.active):not(.text-orange) {
  color: inherit !important;
}

.card-visible *:not(a):not(.btn):not(.badge):not(.text-orange) {
  color: inherit !important;
}

.section-visible *:not(a):not(.btn):not(.badge):not(.nav-link):not(.filter-btn.active):not(.text-orange) {
  color: inherit !important;
}

/* Empêcher les changements de couleur au scroll */
@media (prefers-reduced-motion: no-preference) {
  *:not(a):not(.btn):not(.badge):not(.nav-link):not(.filter-btn.active):not(.text-orange) {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  
  *:not(a):not(.btn):not(.badge):not(.nav-link):not(.filter-btn.active):not(.text-orange) {
    transition-property: opacity, transform, box-shadow, border-color !important;
  }
}

