/* ============================================
   ECOBANK - Animations CSS
   Animations fluides et légères
   ============================================ */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.fade-in-delay-1 {
    animation: fadeIn 0.5s ease-in-out 0.1s backwards;
}

.fade-in-delay-2 {
    animation: fadeIn 0.5s ease-in-out 0.2s backwards;
}

.fade-in-delay-3 {
    animation: fadeIn 0.5s ease-in-out 0.3s backwards;
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-up-delay-1 {
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.fade-in-up-delay-2 {
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.fade-in-up-delay-3 {
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.pulse-hover:hover {
    animation: pulse 0.5s ease-in-out;
}

/* Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Rotate */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 1s linear;
}

.rotate-hover:hover {
    animation: rotate 0.5s linear;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 90, 169, 0.2);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 90, 169, 0.3);
}

/* Loading Spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 90, 169, 0.1);
    border-top-color: #005AA9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* Progress Bar Animation */
@keyframes progress {
    from {
        width: 0%;
    }
}

.progress-bar {
    height: 8px;
    background-color: rgba(0, 90, 169, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #005AA9;
    border-radius: 4px;
    animation: progress 1s ease-out forwards;
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.ripple:active::after {
    transform: scale(2);
    opacity: 1;
    transition: transform 0.3s, opacity 0.3s;
}

/* Skeleton Loading */
@keyframes skeleton {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Tooltip Animation */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Modal Animation */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Notification Animation */
@keyframes slideInNotification {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutNotification {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification {
    animation: slideInNotification 0.5s ease-out;
}

.notification.closing {
    animation: slideOutNotification 0.5s ease-out forwards;
}

/* Accordion Animation */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Tab Animation */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
}

/* Input Focus Animation */
.form-control {
    transition: all 0.3s ease;
}

.form-control:focus {
    transform: translateY(-2px);
}

/* Button Press Animation */
.btn:active {
    transform: scale(0.98);
}

/* Card Hover Animation */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Staggered Animation for Lists */
.staggered-item {
    opacity: 0;
    transform: translateY(20px);
}

.staggered-item:nth-child(1) { animation: fadeInUp 0.5s ease-out 0.1s backwards; }
.staggered-item:nth-child(2) { animation: fadeInUp 0.5s ease-out 0.2s backwards; }
.staggered-item:nth-child(3) { animation: fadeInUp 0.5s ease-out 0.3s backwards; }
.staggered-item:nth-child(4) { animation: fadeInUp 0.5s ease-out 0.4s backwards; }
.staggered-item:nth-child(5) { animation: fadeInUp 0.5s ease-out 0.5s backwards; }
.staggered-item:nth-child(6) { animation: fadeInUp 0.5s ease-out 0.6s backwards; }
.staggered-item:nth-child(7) { animation: fadeInUp 0.5s ease-out 0.7s backwards; }
.staggered-item:nth-child(8) { animation: fadeInUp 0.5s ease-out 0.8s backwards; }
