/* ==========================================================================
   AMÉLIORATIONS UI/UX - Vision Bâtiments
   Micro-interactions et animations modernes
   ========================================================================== */

/* Variables pour animations */
:root {
    --easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-sharp: cubic-bezier(0.4, 0, 0.6, 1);
}

/* Smooth scroll global */
html {
    scroll-behavior: smooth;
}

/* Amélioration des boutons avec micro-interactions */
.btn {
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.3s var(--easing-smooth);
}

.btn::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;
    pointer-events: none;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 35, 126, 0.3);
}

.btn:active {
    transform: translateY(-1px);
    transition-duration: 0.1s;
}

/* Nouvelles animations d'apparition en scroll */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    animation: slideUpReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    animation: slideLeftReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    animation: slideRightReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-subtitle-corporate {
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.95;
    margin-bottom: 3rem;
    animation: corporateSubtitleReveal 1.2s ease-out forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

.hero-buttons-corporate {
    opacity: 0;
    transform: translateY(20px);
    animation: corporateButtonsReveal 1s ease-out forwards;
    animation-delay: 1.8s;
    gap: 2rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-corporate-primary {
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: white;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.3);
}

.btn-corporate-primary::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.6s ease;
}

.btn-corporate-primary:hover::before {
    left: 100%;
}

.btn-corporate-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(26, 35, 126, 0.4);
}

.btn-corporate-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 10px 26px;
    font-size: 0.95rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.btn-corporate-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-3px);
}

/* Délais pour animations séquentielles */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

@keyframes slideUpReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes slideLeftReveal {
    0% {
        opacity: 0;
        transform: translateX(-40px) rotateY(-15deg);
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotateY(0deg);
        filter: blur(0);
    }
}

@keyframes slideRightReveal {
    0% {
        opacity: 0;
        transform: translateX(40px) rotateY(15deg);
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotateY(0deg);
        filter: blur(0);
    }
}

/* Pulse animation pour CTA */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Amélioration des cards avec effets sophistiqués */
.service-card, .testimonial-item {
    transition: all 0.6s var(--easing-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Service cards avec images - effets hover */
.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 50px rgba(26, 35, 126, 0.2);
}

/* Animation de reveal pour les sections */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-reveal.animate {
    opacity: 1;
    transform: translateY(0);
}

@keyframes sparkleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0);
    }
}

/* Hero avec effet d'étirement */
.hero-bg {
    transform: scale(1);
    transition: none;
    will-change: transform;
    backface-visibility: hidden;
}

/* Amélioration de la performance */
.hero {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Effets hover pour les petits boutons */
.btn-primary-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4) !important;
}

.btn-secondary-small:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.5) !important;
    transform: translateY(-2px);
}

/* Animation défilement partenaires */
@keyframes slidePartners {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.partners-track:hover {
    animation-play-state: paused;
}

.partner-item:hover {
    opacity: 1 !important;
    transform: translateY(-5px);
}

/* Amélioration des témoignages avec hover pause */
.testimonials-track {
    transition: transform 0.3s ease;
}

.testimonial-item:hover {
    transform: scale(1.02);
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    box-shadow: 0 15px 30px rgba(26, 35, 126, 0.1);
}

/* Étoiles animées */
.star {
    transition: all 0.3s ease;
    cursor: pointer;
}

.star:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px #ffd700);
}

/* Amélioration des formulaires */
.form-group {
    position: relative;
}

.form-control {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
    transform: translateY(-2px);
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Amélioration de la navigation avec indicator */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Amélioration des icônes avec rotation */
.service-icon {
    transition: transform 0.3s var(--easing-bounce);
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
}

/* Nouvelles animations modernes pour le hero */
@keyframes corporateReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
        letter-spacing: 8px;
    }
    60% {
        opacity: 0.8;
        transform: translateY(10px);
        letter-spacing: 5px;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: 3px;
    }
}

@keyframes lineExpand {
    0% {
        scale: 0;
    }
    100% {
        scale: 1;
    }
}

@keyframes corporateSubtitleReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
        letter-spacing: 3px;
    }
    100% {
        opacity: 0.95;
        transform: translateY(0);
        letter-spacing: 1px;
    }
}

@keyframes corporateButtonsReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes buttonFloat {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 5px 15px rgba(26, 35, 126, 0.3);
    }
    50% {
        transform: translateY(-8px);
        box-shadow: 0 15px 30px rgba(26, 35, 126, 0.4);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.hero-title-corporate {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: #ffffff;
    position: relative;
    font-family: 'Helvetica Neue', sans-serif;
    animation: corporateReveal 1.5s ease-out forwards;
    opacity: 0;
}

.hero-title-corporate::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ffb300);
    animation: lineExpand 1s ease-out forwards;
    animation-delay: 1s;
    transform-origin: center;
    scale: 0;
}

/* Amélioration du scroll indicator */
.scroll-indicator {
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateX(-50%) scale(1.1);
    opacity: 1;
}

/* Feedback visuel pour les interactions */
.interactive {
    transition: all 0.2s ease;
}

.interactive:hover {
    cursor: pointer;
    opacity: 0.8;
}

.interactive:active {
    transform: scale(0.95);
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gradient-primary);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(26, 35, 126, 0.3);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s var(--easing-smooth);
    z-index: 9999;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.toast.error {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
}

/* Amélioration responsive avec breakpoints fluides */
@media (max-width: 768px) {
    .fade-in-up, .fade-in-left, .fade-in-right {
        animation-duration: 0.6s;
    }

    .btn:hover {
        transform: none; /* Désactiver les hovers sur mobile */
    }

    .service-card:hover {
        transform: none;
    }
}

/* Amélioration de l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus visible amélioré */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Amélioration du contraste pour l'accessibilité */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }

    .nav-link::after {
        height: 3px;
    }
}

/* Animation du timer pour les témoignages */
@keyframes fillTimer {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Styles pour les témoignages avec timer */
.testimonial-slide {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.testimonial-slide.exit {
    opacity: 0;
    transform: translateX(-100%);
}

.progress-dot.active {
    background: #1a237e !important;
    transform: scale(1.2);
}

.testimonial-pause:hover {
    background: rgba(26, 35, 126, 0.2) !important;
    transform: scale(1.1);
}

/* Responsive témoignages */
@media (max-width: 768px) {
    .testimonial-wrapper {
        height: 350px !important;
    }

    .testimonial-slide {
        padding: 30px 20px !important;
    }

    .testimonial-text {
        font-size: 1.1rem !important;
    }

    .testimonial-controls {
        margin-left: 10px !important;
    }
}