:root {
    --pb-motion-fast: 150ms;
    --pb-motion-panel: 200ms;
    --pb-motion-modal: 250ms;
    --animate-duration: var(--pb-motion-modal);
    --animate-delay: 0ms;
}

/*
 * Sous-ensemble local d'Animate.css utilisé par ProspectBat.
 * Garder ces noms permet de préserver les composants existants sans dépendre
 * d'un CDN au moment où une modale ou une alerte doit s'afficher.
 */
.animate__animated {
    animation-duration: var(--animate-duration);
    animation-fill-mode: both;
}

@keyframes pb-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pb-fade-in-up {
    from { opacity: 0; transform: translate3d(0, 18px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes pb-fade-in-down {
    from { opacity: 0; transform: translate3d(0, -18px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes pb-fade-in-left {
    from { opacity: 0; transform: translate3d(-22px, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes pb-fade-in-right {
    from { opacity: 0; transform: translate3d(22px, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes pb-zoom-in {
    from { opacity: 0; transform: scale3d(.96, .96, .96); }
    to { opacity: 1; transform: scale3d(1, 1, 1); }
}

@keyframes pb-shake-x {
    from, to { transform: translate3d(0, 0, 0); }
    20%, 60% { transform: translate3d(-7px, 0, 0); }
    40%, 80% { transform: translate3d(7px, 0, 0); }
}

.animate__fadeIn { animation-name: pb-fade-in; }
.animate__fadeInUp { animation-name: pb-fade-in-up; }
.animate__fadeInDown { animation-name: pb-fade-in-down; }
.animate__fadeInLeft { animation-name: pb-fade-in-left; }
.animate__fadeInRight { animation-name: pb-fade-in-right; }
.animate__zoomIn { animation-name: pb-zoom-in; }
.animate__shakeX { animation-name: pb-shake-x; }

.animate__faster {
    --animate-duration: var(--pb-motion-panel);
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --animate-duration: 1ms;
        --animate-delay: 0ms;
    }

    .animate__animated,
    [x-transition] {
        animation-name: none !important;
        animation-duration: 1ms !important;
        animation-delay: 0ms !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}
