/* Animations de boutons */
.p-btn-animation-border-move > a {
    position: relative;
}

.p-btn-animation-border-move > a::before {
    border: 2px solid transparent;
    opacity: 0.9;
    content: "";
    position: absolute;
    z-index: 5;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border-radius: 4px;
    transition: opacity 0.5s ease, border 0.5s ease, transform 0.5s ease;
}

.p-btn-animation-border-move > a:hover::before {
    border: 2px solid var(--border-color);
    opacity: 0;
    transform: scale(1.2, 1.5);
}

/* Animation de pulsation */
.p-btn-animation-pulse {
    transition: 0.3s;
}

.p-btn-animation-pulse:hover {
    animation: prespa_pulse 1s infinite;
    transition: 0.3s;
}

@keyframes prespa_pulse {
    0% {
        transform: scale(1);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Animation pulse exagérée Prespa avec halo lumineux */
.p-btn-animation-pulse.wp-block-button {
    transition: 0.3s;
    position: relative;
    z-index: 1;
    overflow: visible;
}
.p-btn-animation-pulse.wp-block-button:hover,
.p-btn-animation-pulse.wp-block-button:focus {
    animation: prespa_pulse_exag 0.7s infinite;
    box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.5), 0 0 20px 10px rgba(30, 144, 255, 0.15);
    transition: 0.3s;
}
@keyframes prespa_pulse_exag {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.5), 0 0 20px 10px rgba(30, 144, 255, 0.15);
    }
    50% {
        transform: scale(0.7);
        box-shadow: 0 0 0 20px rgba(30, 144, 255, 0), 0 0 40px 20px rgba(30, 144, 255, 0.10);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.5), 0 0 20px 10px rgba(30, 144, 255, 0.15);
    }
}

/* Animation de glissement */
.p-btn-animation-slide-in a {
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.15) 100%) !important;
    background-size: 0 100%;
    background-repeat: no-repeat;
    background-position: left 100%;
    display: inline-block;
    transition: background-size 0.6s ease-in-out;
}

.p-btn-animation-slide-in a:hover {
    background-size: 100% 100%;
}

/* Animation de bordure */
.p-btn-animation-border a {
    position: relative;
    transition: 0.6s;
    border: 2px solid transparent;
}

.p-btn-animation-border a:hover {
    border: 2px solid transparent;
    color: currentcolor;
}

.p-btn-animation-border a::before,
.p-btn-animation-border a::after {
    width: 100%;
    height: 100%;
    z-index: 3;
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    transform: scale(0);
    transition: 0.6s;
}

.p-btn-animation-border a::before {
    border-bottom: 2px solid currentcolor;
    border-left: 2px solid currentcolor;
    transform-origin: 0 100%;
}

.p-btn-animation-border a::after {
    border-top: 2px solid currentcolor;
    border-right: 2px solid currentcolor;
    transform-origin: 100% 0%;
}

.p-btn-animation-border a:hover::after,
.p-btn-animation-border a:hover::before {
    transform: scale(1);
}

/* Effet glow Prespa appliqué par défaut à tous les boutons (version forcée) */
.wp-block-button a,
.wp-block-button__link,
.wp-element-button {
    box-shadow: 0 0 0 8px rgba(66, 133, 244, 0.25), 0 0 0 16px rgba(66, 133, 244, 0.10) !important;
    position: relative !important;
    z-index: 2 !important;
    overflow: visible !important;
    transition: box-shadow 0.15s cubic-bezier(0.45, 0.05, 0.55, 0.95) !important;
}

.wp-block-button a:hover,
.wp-block-button__link:hover,
.wp-element-button:hover,
.wp-block-button a:focus,
.wp-block-button__link:focus,
.wp-element-button:focus {
    box-shadow: 0 0 0 16px rgba(66, 133, 244, 0.25), 0 0 0 32px rgba(66, 133, 244, 0.10) !important;
    transition: box-shadow 0.15s cubic-bezier(0.45, 0.05, 0.55, 0.95) !important;
}

.wp-block-kubio-button__link {
    position: relative;
    overflow: visible;
    z-index: 1;
}

.wp-block-kubio-button__link::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 100%;
    height: 100%;
    border-radius: 24px;
    border: 2px solid #aeadd3;
    opacity: 0;
    pointer-events: none;
    transition: none;
    z-index: 0;
}

.wp-block-kubio-button__link:hover::after,
.wp-block-kubio-button__link:focus::after {
    animation: prespa-kubio-glow 0.5s;
}

@keyframes prespa-kubio-glow {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1, 1);
    }
    33% {
        opacity: 0.66;
        transform: translate(-50%, -50%) scale(1.15, 1.30);
    }
    66% {
        opacity: 0.33;
        transform: translate(-50%, -50%) scale(1.30, 1.55);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.40, 1.80);
    }
}