/* ===== ANIMATIONS PRINCIPALES ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

/* ===== CLASSES D'ANIMATION ===== */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-left {
    animation: slideInFromLeft 0.5s ease-out forwards;
}

.animate-slide-right {
    animation: slideInFromRight 0.5s ease-out forwards;
}

.animate-pulse-once {
    animation: pulse 0.5s ease-out;
}

.animate-bounce-once {
    animation: bounce 0.8s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-ripple {
    position: relative;
    overflow: hidden;
}

.animate-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.animate-ripple:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

/* ===== TRANSITIONS PERSONNALISÉES ===== */
.transition-all-custom {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-transform-custom {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.transition-opacity-custom {
    transition: opacity 0.3s ease-out;
}

.transition-bg-custom {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ===== ANIMATIONS DE CARTES ===== */
.card-hover-effect {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.card-hover-effect:hover::before {
    left: 100%;
}

.card-hover-effect:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* ===== ANIMATIONS DE BOUTONS ===== */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-animated:active::after {
    animation: ripple 1s ease-out;
}

.btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-animated:active {
    transform: translateY(1px);
}

/* ===== LOADING & SKELETON ===== */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.spinner-grow-custom {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    background-color: currentColor;
    border-radius: 50%;
    opacity: 0;
    animation: spinner-grow 0.75s linear infinite;
}

@keyframes spinner-grow {
    0% { transform: scale(0); }
    50% { opacity: 1; }
}

/* ===== ANIMATIONS DE TRANSITION DE PAGE ===== */
.page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s, transform 0.5s;
}

.page-transition-exit {
    opacity: 1;
    transform: translateY(0);
}

.page-transition-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s, transform 0.5s;
}

/* ===== ANIMATIONS SPÉCIFIQUES STRUCTURE ===== */
.structure-card-selected {
    animation: cardSelection 0.5s ease-out forwards;
}

@keyframes cardSelection {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); box-shadow: 0 0 0 3px currentColor; }
}

/* ===== ANIMATIONS DE CONNEXION ===== */
.role-switch-transition {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.login-form-appear {
    animation: formAppear 0.6s ease-out forwards;
}

@keyframes formAppear {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== EFFETS DE FOCUS ===== */
.input-focus-effect {
    transition: all 0.3s ease;
}

.input-focus-effect:focus {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ===== ANIMATIONS D'ICÔNES ===== */
.icon-rotate {
    transition: transform 0.3s ease;
}

.icon-rotate:hover {
    transform: rotate(15deg);
}

.icon-bounce {
    animation: bounce 2s infinite;
}

/* ===== PROGRESS BARS ANIMÉES ===== */
.progress-bar-animated {
    position: relative;
    overflow: hidden;
}

.progress-bar-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-enter {
    transform: translateX(100%);
    opacity: 0;
}

.toast-enter-active {
    transform: translateX(0);
    opacity: 1;
    transition: all 0.3s ease-out;
}

.toast-exit {
    transform: translateX(0);
    opacity: 1;
}

.toast-exit-active {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in;
}

/* ===== RESPONSIVE ANIMATIONS ===== */
@media (max-width: 768px) {
    .animate-on-mobile {
        animation: fadeIn 0.4s ease-out forwards;
    }
    
    .card-hover-effect:hover {
        transform: translateY(-4px);
    }
}