/* ============================================
   ANIMATIONS ULTRA ANIMÉES POUR LE SITE
   ============================================ */

/* Animation au chargement de la page */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes flip {
    from {
        transform: perspective(400px) rotateY(0);
    }
    to {
        transform: perspective(400px) rotateY(180deg);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Classes d'animation pour les éléments */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotateIn {
    animation: rotateIn 0.8s ease-out forwards;
}

.animate-slideInUp {
    animation: slideInUp 1s ease-out forwards;
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* Animations au survol */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
}

/* Animations pour les icônes */
.icon-bounce {
    display: inline-block;
    transition: transform 0.3s ease;
}

.icon-bounce:hover {
    animation: bounce 0.6s ease-in-out;
}

.icon-pulse {
    display: inline-block;
    transition: transform 0.3s ease;
}

.icon-pulse:hover {
    animation: pulse 1s ease-in-out infinite;
}

.icon-rotate {
    display: inline-block;
    transition: transform 0.3s ease;
}

.icon-rotate:hover {
    transform: rotate(360deg);
}

/* Animations pour les boutons */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

.btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Animation pour les cartes Why Choose et Features - Appliqué automatiquement */
.choose-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

.choose-item.animated {
    animation: fadeInUp 0.6s ease-out forwards;
}

.choose-item:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

.feature-item {
    transition: transform 0.4s ease !important;
}

.feature-item.animated {
    animation: fadeInUp 0.6s ease-out forwards;
}

.feature-item:hover {
    transform: translateY(-10px) !important;
}

/* Animations pour les images */
.img-zoom {
    overflow: hidden;
    transition: transform 0.5s ease;
}

.img-zoom img {
    transition: transform 0.5s ease;
    width: 100%;
    height: auto;
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* Animation pour les images avec background-image */
.services-photo {
    transition: transform 0.5s ease, filter 0.5s ease !important;
    overflow: hidden;
}

.services-item:hover .services-photo {
    transform: scale(1.05) !important;
    filter: brightness(1.1);
}

/* Animation de chargement */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation pour le texte */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    transform: translateX(-100%);
    animation: reveal 1s ease-out forwards;
}

@keyframes reveal {
    to {
        transform: translateX(100%);
    }
}

/* Animation pour les barres de progression */
.progress-bar-animated {
    animation: progressBar 2s ease-out forwards;
}

@keyframes progressBar {
    from {
        width: 0%;
    }
}

/* Animation pour les éléments de liste */
.list-item-animated {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInListItem 0.5s ease-out forwards;
}

.list-item-animated:nth-child(1) { animation-delay: 0.1s; }
.list-item-animated:nth-child(2) { animation-delay: 0.2s; }
.list-item-animated:nth-child(3) { animation-delay: 0.3s; }
.list-item-animated:nth-child(4) { animation-delay: 0.4s; }
.list-item-animated:nth-child(5) { animation-delay: 0.5s; }
.list-item-animated:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInListItem {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation pour le menu */
.menu-item-animated {
    position: relative;
    transition: all 0.3s ease;
}

.menu-item-animated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.menu-item-animated:hover::after {
    width: 100%;
}

/* Animation pour les compteurs - Appliqué automatiquement */
.counter-item {
    transition: transform 0.4s ease !important;
}

.counter-item.animated {
    animation: scaleIn 0.6s ease-out forwards;
}

.counter-item:hover {
    transform: scale(1.05) !important;
}

/* Animation pour les modales */
.modal-animated {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation pour le scroll to top */
.scroll-top-animated {
    animation: bounceIn 0.5s ease-out;
}

@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);
    }
}

/* Animation de parallaxe */
.parallax-element {
    transition: transform 0.3s ease-out;
}

/* Animation pour les onglets */
.tab-content-animated {
    animation: fadeInUp 0.5s ease-out;
}

/* Animation pour les accordéons */
.accordion-item-animated {
    transition: all 0.3s ease;
}

.accordion-item-animated:hover {
    transform: translateX(5px);
}

/* Animation pour les formulaires */
.input-animated {
    transition: all 0.3s ease;
}

.input-animated:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Animation pour les badges */
.badge-animated {
    animation: scaleIn 0.5s ease-out;
}

/* Animation pour les notifications */
.notification-animated {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation pour les portfolios - Appliqué automatiquement */
.filtr-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

.filtr-item.animated {
    animation: scaleIn 0.6s ease-out forwards;
}

.portfolio-group {
    transition: transform 0.4s ease !important;
}

.portfolio-group:hover {
    transform: translateY(10px) scale(0.98) !important;
}

.portfolio-photo {
    transition: transform 0.5s ease, filter 0.5s ease !important;
}

.portfolio-group:hover .portfolio-photo {
    transform: scale(0.9) !important;
    filter: brightness(0.9);
}

/* Animation pour les services - Appliqué automatiquement */
.services-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

.services-item.animated {
    animation: fadeInUp 0.6s ease-out forwards;
}

.services-item:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

/* Animation pour les témoignages - Appliqué automatiquement */
.testimonial-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

.testimonial-item.animated {
    animation: fadeInUp 0.6s ease-out forwards;
}

.testimonial-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Animation pour les équipes - Appliqué automatiquement */
.team-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

.team-item.animated {
    animation: fadeInUp 0.6s ease-out forwards;
}

.team-item:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

.team-item .team-social {
    transition: transform 0.3s ease !important;
}

.team-item:hover .team-social {
    transform: translateY(0) !important;
}

/* Animation pour les blog posts - Appliqué automatiquement */
.blog-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

.blog-item.animated {
    animation: fadeInUp 0.6s ease-out forwards;
}

.blog-item:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.blog-image {
    overflow: hidden;
    transition: transform 0.5s ease !important;
}

.blog-item:hover .blog-image {
    transform: scale(1.05) !important;
}

/* Animation pour le header */
.header-animated {
    transition: all 0.3s ease;
}

.header-scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

/* Animation pour les filtres */
.filter-item-animated {
    transition: all 0.3s ease;
}

.filter-item-animated:hover {
    transform: scale(1.1);
}

.filter-item-animated.active {
    animation: pulse 1s ease-in-out infinite;
}

/* Animation pour les prix - Appliqué automatiquement */
.price-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

.price-item.animated {
    animation: fadeInUp 0.6s ease-out forwards;
}

.price-item:hover {
    transform: translateY(-15px) scale(1.05) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
}

/* Animation pour les FAQ */
.faq-item-animated {
    transition: all 0.3s ease;
}

.faq-item-animated:hover {
    transform: translateX(5px);
}

/* Animation pour le footer */
.footer-animated {
    animation: fadeInUp 1s ease-out;
}

/* Animation pour les icônes Bootstrap */
.bi-animated {
    transition: all 0.3s ease;
    display: inline-block;
}

.bi-animated:hover {
    transform: scale(1.2) rotate(5deg);
}

/* Animation pour les Font Awesome */
.fa-animated {
    transition: all 0.3s ease;
    display: inline-block;
}

.fa-animated:hover {
    transform: scale(1.2) rotate(5deg);
}

/* Réduire les animations sur mobile pour les performances */
@media (max-width: 768px) {
    .animate-fadeInUp,
    .animate-fadeInDown,
    .animate-fadeInLeft,
    .animate-fadeInRight,
    .animate-scaleIn,
    .animate-rotateIn,
    .animate-slideInUp {
        animation-duration: 0.4s;
    }
    
    .hover-scale:hover,
    .hover-lift:hover,
    .card-animated:hover,
    .portfolio-item-animated:hover,
    .service-item-animated:hover {
        transform: none;
    }
}

/* Mode préférence utilisateur réduit motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

