/* Animations CSS avancées */

/* Animation d'apparition progressive */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Animation de flottement */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* Animation de rotation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation de slide down pour FAQ */
@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 200px;
        opacity: 1;
    }
}

/* Classes d'animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Hover effects sophistiqués */
.service-card {
    transition: all var(--transition-medium);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.service-card:hover .service-icon {
    animation: pulse 2s infinite;
}

/* Effet de vague au hover */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Animation des cartes au scroll */
.info-card {
    transition: all var(--transition-medium);
}

.info-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px var(--ombre-moyenne);
}

/* Animation du toggle FAQ */
.faq-toggle {
    transition: all var(--transition-medium);
}

.faq-item:hover .faq-toggle {
    color: var(--bleu-fonce);
    transform: scale(1.1);
}

/* Animation des badges transport */
.transport-type {
    transition: all var(--transition-medium);
}

.transport-list li:hover .transport-type {
    transform: scale(1.1);
    box-shadow: 0 2px 10px var(--ombre-moyenne);
}

/* Effet de révélation au scroll */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation de typing pour le hero */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* Effet parallaxe léger */
.hero {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* Animation smooth pour la navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--bleu-principal);
    transition: all var(--transition-medium);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Animation des formulaires */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: scale(1.02);
}

/* Animation de succès pour le formulaire */
.form-success {
    background: var(--vert-pale);
    border: 2px solid var(--vert-accent);
    color: var(--vert-accent);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    text-align: center;
    animation: slideDown 0.5s ease;
}

/* Animation d'erreur pour le formulaire */
.form-error {
    background: #FEF2F2;
    border: 2px solid #EF4444;
    color: #DC2626;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    text-align: center;
    animation: slideDown 0.5s ease;
}

/* Micro-interactions */
.service-details li {
    transition: all var(--transition-fast);
}

.service-details li:hover {
    transform: translateX(5px);
    color: var(--bleu-principal);
}

/* Animation des icônes au hover */
.info-card h3 {
    transition: all var(--transition-medium);
}

.info-card:hover h3 {
    transform: scale(1.05);
}

/* Effet de vague sur les boutons footer */
.btn-footer {
    position: relative;
    overflow: hidden;
}

.btn-footer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-footer:hover::before {
    width: 200px;
    height: 200px;
}

/* Animation des modales */
.modal {
    transition: all var(--transition-medium);
}

.modal.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.modal.show .modal-content {
    animation: slideInDown 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Effet de loader */
.btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

/* Animation de chargement de page */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: pageLoad 0.8s ease;
}

/* Animation personnalisée pour les badges */
.badge {
    transition: all var(--transition-medium);
}

.badge:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.3);
}

/* Animation de focus pour l'accessibilité */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    animation: focusPulse 0.3s ease;
}

@keyframes focusPulse {
    0% { box-shadow: 0 0 0 0 rgba(91, 139, 160, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(91, 139, 160, 0); }
    100% { box-shadow: 0 0 0 0 rgba(91, 139, 160, 0); }
}

/* Responsive animations */
@media (max-width: 768px) {
    /* Réduire les animations sur mobile pour les performances */
    .service-card:hover {
        transform: translateY(-3px) scale(1.01);
    }
    
    .btn-primary::before,
    .btn-footer::before {
        display: none;
    }
    
    .hero-decoration {
        display: none;
    }
}

/* Micro-interactions */
.service-details li {
    transition: all var(--transition-fast);
}

.service-details li:hover {
    transform: translateX(5px);
    color: var(--bleu-principal);
}

/* Animation des icônes au hover */
.info-card h3 {
    transition: all var(--transition-medium);
}

.info-card:hover h3 {
    transform: scale(1.05);
}

/* Effet de vague sur les boutons footer */
.btn-footer {
    position: relative;
    overflow: hidden;
}

.btn-footer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-footer:hover::before {
    width: 200px;
    height: 200px;
}