/*
 * CLS fix + UCSS protection — rovex-child (Clef 2026-05-29)
 * Updates :
 *   - Preloader full-kill (était cause de CLS 0.77 mobile via flash 100vh → 0)
 *   - Hero container reserve space (image-anime load)
 *   - Background video mobile killed (privacy + perf)
 *   - typed.js stabilisé sans rectangle jaune visible
 */

/* ---------- Preloader : kill totalement ---------- */
/* Le preloader Rovex/Awaiken cause un layout shift massif quand il disparaît.
   Avec QUIC.cloud + Critical CSS le LCP est <2s, donc inutile. */
.preloader,
.rovex-preloader,
.elementor-screen-loader,
.elementor-preloader,
.theme-loader,
.site-preloader,
#preloader,
.at-loader {
  display: none !important;
}

/* Au cas où le thème l'inject inline avec style="display:flex" : on overrride avec attribute selector */
[class*="preloader"][style] {
  display: none !important;
}

/* ---------- Hero container : reserve space pour éviter shift au load image-anime ---------- */
.elementor-element-bc30ab9 {
  min-height: 413px;
}

@media (max-width: 767px) {
  .elementor-element-bc30ab9 {
    min-height: 360px;
  }
}

/* ---------- Background video : kill on mobile (third-party demo.awaikenthemes.com + bandwidth + CLS) ---------- */
@media (max-width: 767px) {
  .elementor-background-video-container,
  .elementor-background-video-hosted {
    display: none !important;
  }
}

/* ---------- typed.js : stabilise sans rectangle jaune ---------- */
#typed-words,
.typed-words,
span.highlight {
  display: inline-block;
  white-space: nowrap;
}

/* ---------- typed.js : reserve hauteur 2 lignes du titre hero (fix CLS 0.56 mobile, WEB-5) ----------
   Le titre "Transformez vos Idées en <mot dynamique>" passe de 1 à 2 lignes selon
   la longueur du mot typé, ce qui pousse sous-titre + bouton en boucle (~0.276/cycle).
   On réserve 2 lignes (2 × line-height 1.4em) sur mobile + tablette où le titre wrappe.
   Desktop intact (1 ligne, CLS déjà vert). */
@media (max-width: 1024px) {
  h1.hero-title {
    min-height: 2.8em;
  }
}

/* ---------- Logos partenaires : aspect-ratio reserve ---------- */
.elementor-image-carousel-wrapper img,
.swiper-slide img {
  height: auto;
}
