/* Allo Compagnie — CSS partagé des widgets CTA
   Centralise les styles qui étaient dupliqués en inline <style> dans chaque widget.
   Enqueued 1x par Allo_Performance_Optimizer. */

/* === Layout bouton CTA (partagé Header_CTA + Intro_CTA) === */
.elementskit-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    text-align: center !important;
}
.ekit-btn-icon--left,
.ekit-btn-icon--right {
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
}
.ekit-btn-text {
    line-height: 1 !important;
    display: inline-block !important;
    vertical-align: middle !important;
}
.elementskit-btn svg {
    width: 1em;
    height: 1em;
    display: block !important;
}

/* === Animation rebond (activable via classe .allo-bounce-animation) === */
.allo-bounce-animation {
    animation: alloBounce 2s infinite;
}
@keyframes alloBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* === Disclaimer widget === */
.elementor-alert-title {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}
.elementor-alert-description {
    display: block;
    line-height: 1.5;
}
.elementor-alert {
    border-style: solid;
    border-width: 0 0 0 5px;
    padding: 20px;
}

/* === Reviews widget : avatar SVG + étoiles SVG === */
.review-avatar-svg {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    flex-shrink: 0;
    display: block;
}
.review-stars-svg {
    display: inline-block;
    vertical-align: middle;
    color: #f5b301;
}

/* === CLS fix : Elementor swiper chevrons sans dimensions ===
   Identifié par PSI (CLS 0.982 desktop) — la SVG chevron-right du swiper
   se rend sans taille et décale tout le viewport. */
.elementor-swiper-button svg,
.elementor-swiper-button .e-font-icon-svg,
.swiper-button-next svg,
.swiper-button-prev svg {
    width: 28px !important;
    height: 28px !important;
    display: inline-block !important;
}
.elementor-swiper-button,
.swiper-button-next,
.swiper-button-prev {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

/* === CLS fix : logo header (générique pour tous sites) ===
   Ciblage large par classes WP/Elementor. Les règles src-specific pour le logo
   du site sont injectées dynamiquement en <style> via
   Allo_Performance_Optimizer::inject_pattern_specific_css() (33.11.0). */
.site-logo img,
.elementor-widget-theme-site-logo img {
    aspect-ratio: 1 / 1;
    max-width: 100%;
    height: auto;
}

/* Note 33.11.0 : les règles img[src*="..."] spécifiques au hero Camion / logo
   allo ont été déplacées en PHP (injection dynamique) pour support multi-sites.
   Voir Allo_Performance_Optimizer::inject_pattern_specific_css(). */

/* === CLS MOBILE fix (33.10.4 / corrigé 33.10.5) =========================
   33.10.4 BUG POSTMORTEM : la règle `img[width][height] { aspect-ratio:
   attr(width)/attr(height); height:auto; }` cassait TOUT desktop (CLS 0→0.982).
   Cause : syntaxe attr() non-typée = string invalide pour aspect-ratio →
   propriété droppée, MAIS `height:auto` strippait la réservation native
   du navigateur basée sur les attrs width/height = full page reflow.
   → Règle supprimée en 33.10.5. Le navigateur gère déjà nativement la
   réservation d'espace via les attrs width/height depuis Chrome 79+. */

/* Images lazy-loadées LSC : on NE TOUCHE PAS à height.
   Le browser utilise width/height attrs pour réserver nativement. */
img[data-lazyloaded],
img.lazyloaded {
    max-width: 100%;
}

/* Placeholder visuel pendant le lazy-load pour éviter le "flash" blanc. */
img[data-lazyloaded="1"]:not([src]),
img.lazyload:not([src]) {
    background: #f0f0f0;
    min-height: 1px;
}

/* === CLS : SVG Elementor icons HORS swiper buttons =======================
   33.10.5 : on EXCLUT explicitement les chevron-right/left pour ne pas
   entrer en conflit avec le fix 33.10.3 (28px !important sur swiper). */
.e-font-icon-svg:not(.e-eicon-chevron-right):not(.e-eicon-chevron-left):not([class*="swiper"]),
.elementor-icon-list-icon svg.e-font-icon-svg {
    width: 1em;
    height: 1em;
    display: inline-block;
}
/* Icon lists Elementor (li > span > svg) : réserve la hauteur du conteneur. */
.elementor-icon-list-item .elementor-icon-list-icon {
    display: inline-flex;
    align-items: center;
    min-width: 1em;
    min-height: 1em;
}

/* === CLS : CTA bounce ne doit pas shifter le layout ======================
   `.allo-bounce-animation` translateY peut provoquer un shift sur
   certains layouts mobiles. On isole l'animation. */
.elementskit-btn.allo-cta-track,
.elementskit-btn.allo-bounce-animation {
    min-height: 44px;
    contain: layout;
    will-change: transform;
}
.allo-bounce-animation {
    transform: translateZ(0);
    backface-visibility: hidden;
}
