/* ==========================================================================
   Correctifs performance + accessibilité - audit Lighthouse du 22/10/2026
   Chargé en dernier (functions.php). Fichier non compilé : à éditer directement.
   ========================================================================== */

/* --- Hero de l'accueil : entrée animée sur transform uniquement ----------
   L'ancienne animation anime.js partait de opacity: 0, ce qui retardait
   l'affichage du H1 (élément LCP) d'environ 1,2 s. */
@keyframes he-hero-entree {
  from { transform: translateX(60px); }
  to   { transform: none; }
}
.hero-entree > * {
  animation: he-hero-entree 0.6s ease-out both;
}
@media (prefers-reduced-motion: reduce) {
  .hero-entree > * { animation: none; }
}

/* --- Images du thème : width/height servent seulement à réserver le ratio
   (anti-CLS) ; la taille affichée reste pilotée par le CSS existant. */
:where(img[width][height][src*="/assets/images/"]) {
  width: auto;
}

/* --- Contrastes (WCAG AA, ratio 4,5:1 sur fond blanc) ------------------- */
:root {
  --p-color: #656464; /* était #7B7A7A (4,27:1) */
}
.text-medium-gray {
  color: #656464;
}

/* Orange de marque utilisé en texte sur fond clair : version foncée lisible.
   Les boutons, pictos et décors gardent l'orange #FFA400. */
.section-partenaires h5,
.section-confiance .wrapper-numero .numero,
#faq .text-orange,
.section-chantiers-photovoltaique .section-chantiers .wrapper-titre-nav .wrapper-gauche .installations {
  color: #a65e00;
}

/* Ancien <h5> "Nos installations" devenu un <p> (ordre des titres) : même rendu */
.section-chantiers-photovoltaique .section-chantiers .wrapper-titre-nav .wrapper-gauche .installations {
  font-family: Jakarta, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 2.2rem;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  padding: 0;
  margin: 0;
}

/* Texte décoratif géant (Photovoltaïque / Climatisation...) : rendu en CSS pour
   qu'il ne soit plus considéré comme du texte de contenu à contraste insuffisant */
.section-chantiers-photovoltaique .texte-defilant-track span::before {
  content: attr(data-texte);
}

/* Compteur "1 / 3" de la carte des agences */
#fch-map-counter {
  opacity: 1 !important;
  color: #6b6e75;
}

/* Liens dans le texte du pied de page : soulignés pour se distinguer du texte */
.footer-main .footer-mentions-texte a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Zones cliquables : puces des carrousels espacées de 24 px (WCAG 2.5.8) */
.swiper-pagination-bullets.swiper-pagination-horizontal .swiper-pagination-bullet,
.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
  margin: 0 8px !important;
}
