/* Builder Elementor : aucune règle de visibilité par pays ne doit masquer les widgets dans l’éditeur. */
body.elementor-editor-active .kehira-country-visibility-enabled,
body.elementor-editor-active .kehira-country-visibility-pending,
body.elementor-editor-active .kehira-country-visibility-hidden,
body.elementor-editor-active .kehira-country-visibility-visible,
.elementor-editor-active .kehira-country-visibility-enabled,
.elementor-editor-active .kehira-country-visibility-pending,
.elementor-editor-active .kehira-country-visibility-hidden,
.elementor-editor-active .kehira-country-visibility-visible {
    display: revert !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body:not(.elementor-editor-active) .kehira-country-visibility-hidden {
    display: none !important;
}

/* Anti-flash autorisé : pendant la détection, on réserve la place de la section/conteneur
   sans l’afficher. Cela évite le saut visuel et le clignotement quand le pays est autorisé. */
body:not(.elementor-editor-active) .kehira-country-visibility-pending {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body:not(.elementor-editor-active) .kehira-country-visibility-visible {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body:not(.elementor-editor-active) .kehira-country-visibility-enabled {
    transition: none !important;
    animation-duration: 0s !important;
}

body:not(.elementor-editor-active) .kehira-country-visibility-enabled,
body:not(.elementor-editor-active) .kehira-country-visibility-enabled * {
    transition-property: none !important;
}

/* Widgets Elementor : garder le widget réellement rendu pendant la détection.
   Cela évite le placeholder/espace gris et laisse Elementor charger images, styles et scripts. */
body:not(.elementor-editor-active) .kehira-country-visibility-widget-mode.kehira-country-visibility-visible,
body:not(.elementor-editor-active) .kehira-country-visibility-widget-mode.kehira-country-visibility-pending {
    display: revert !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body:not(.elementor-editor-active) .kehira-country-visibility-widget-mode.kehira-country-visibility-hidden {
    display: none !important;
}
