/**
 * perf-cls-placeholders.css — réservation d'espace pour blocs injectés en JS.
 * Fix CLS home mobile (Lighthouse avant 0.64 -> cible <0.1).
 * Injection : home-hero-cta.js, positionning-blocks.js, cart-added-popup.js, etc.
 *
 * + font-display:swap override pour éviter FOIT (~3s de texte invisible pendant DL fonts Google)
 */

/* Fix font-display swap : le theme iqit charge Poppins/Open Sans/Oswald SANS display=swap.
   Cette règle force le swap → texte visible immédiatement avec fallback système,
   puis remplacé par la font Google dès qu'elle est chargée. */
@font-face { font-family: 'Poppins';    font-display: swap; src: local('Poppins'); }
@font-face { font-family: 'Open Sans';  font-display: swap; src: local('Open Sans'); }
@font-face { font-family: 'Oswald';     font-display: swap; src: local('Oswald'); }
@font-face { font-family: 'Karla';      font-display: swap; src: local('Karla'); }
@font-face { font-family: 'Roboto';     font-display: swap; src: local('Roboto'); }

/* Hero CTA (home-hero-cta.js) : 3 boutons + meta = ~220px mobile / ~90px desktop */
@media (max-width: 639px) {
  .eghome-desc + #eg-hero-cta:empty,
  .eghome-desc ~ *:not(#eg-hero-cta):not(#eg-positionning) {
    /* pas besoin */
  }
  /* Reserve l'espace du CTA AVANT que le JS ne l'injecte */
  .eghome-desc {
    min-height: unset;
  }
  /* Placeholder invisible du hero-CTA (contenu identique à ce qu'injecte le JS) */
  #eg-hero-cta { min-height: 240px; }
  #eg-positionning { min-height: 700px; }
}
@media (min-width: 640px) {
  #eg-hero-cta { min-height: 100px; }
  #eg-positionning { min-height: 500px; }
}

/* Topbar Eco-gobelets (.eg-topbar) : chargée en CSS déjà mais dimensionnée post-CSS */
.eg-topbar { min-height: 36px; box-sizing: border-box; }
@media (max-width: 639px) {
  .eg-topbar { min-height: 40px; }
}

/* Cart trust bar (cart-trust.js) sur panier */
#eg-cart-trust-banner { min-height: 60px; }

/* Sticky CTA (cart-sticky-cta.js / product-boost.js) — space en bas de page */
/* déjà en position:fixed donc ne cause pas de CLS */

/* Popups (cart-added-popup, checkout-exit-intent) : fixed, pas de CLS */

/* Images cards home : ratio fixé pour éviter reflow au chargement */
.eghome-usage-image img,
.card-1-perso-home img,
.eghome-usage-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  height: auto;
}
