/* ==========================================
   ANIMATIONS
   ========================================== */

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

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

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

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

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

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

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

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

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

/* ==========================================
   ANIMATIONS D'APPLICATION
   ========================================== */

/* Éléments avec animation au chargement */
.hero-content {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.about-card {
    animation: fadeInUp 0.8s ease both;
}

.about-card:nth-child(1) {
    animation-delay: 0.1s;
}

.about-card:nth-child(2) {
    animation-delay: 0.2s;
}

.process-card {
    animation: fadeInUp 0.8s ease both;
}

.process-card:nth-child(1) {
    animation-delay: 0.1s;
}

.process-card:nth-child(2) {
    animation-delay: 0.2s;
}

.process-card:nth-child(3) {
    animation-delay: 0.3s;
}

.process-card:nth-child(4) {
    animation-delay: 0.4s;
}

.service-card {
    animation: fadeInUp 0.8s ease both;
}

.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature {
    animation: fadeInUp 0.8s ease both;
}

.feature:nth-child(1) {
    animation-delay: 0.1s;
}

.feature:nth-child(2) {
    animation-delay: 0.2s;
}

.feature:nth-child(3) {
    animation-delay: 0.3s;
}

.feature:nth-child(4) {
    animation-delay: 0.4s;
}

.feature:nth-child(5) {
    animation-delay: 0.5s;
}

.feature:nth-child(6) {
    animation-delay: 0.6s;
}

.review-card {
    animation: fadeInUp 0.8s ease both;
}

.review-card:nth-child(1) {
    animation-delay: 0.1s;
}

.review-card:nth-child(2) {
    animation-delay: 0.2s;
}

.review-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* ==========================================
   HOVER ANIMATIONS
   ========================================== */

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(0, 102, 204, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    width: 100%;
}

/* Effets de carte */
.service-card,
.review-card,
.about-card,
.process-card {
    position: relative;
    overflow: hidden;
}

.service-card::before,
.review-card::before,
.about-card::before,
.process-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.5s ease;
}

.service-card:hover::before,
.review-card:hover::before,
.about-card:hover::before,
.process-card:hover::before {
    left: 100%;
}

/* ==========================================
   PAGE LOAD ANIMATIONS
   ========================================== */

/* Fade-in progressif des sections */
.section-title {
    animation: fadeInUp 0.8s ease 0.3s both;
}

.section-subtitle {
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* ==========================================
   TRANSITION ENTRE PAGES
   ========================================== */

body {
    animation: fadeIn 0.5s ease;
}

.container > section {
    animation: fadeInUp 0.6s ease 0.2s both;
}

/* ==========================================
   INTERACTION UTILISATEUR
   ========================================== */

/* Click feedback */
button,
a[role="button"],
input[type="button"],
input[type="submit"] {
    position: relative;
    overflow: hidden;
}

button::after,
a[role="button"]::after,
input[type="button"]::after,
input[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

button:active::after,
a[role="button"]:active::after,
input[type="button"]:active::after,
input[type="submit"]:active::after {
    animation: ripple 0.6s ease;
}

@keyframes ripple {
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */

.scroll-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

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

/* ==========================================
   LOADING STATE
   ========================================== */

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 1000px 100%;
}

/* ==========================================
   ERROR/SUCCESS MESSAGES
   ========================================== */

.message {
    animation: slideDown 0.4s ease;
}

.message.success {
    background-color: rgba(39, 174, 96, 0.1);
    border-left: 4px solid #27ae60;
}

.message.error {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
}

/* ==========================================
   MICRO-INTERACTIONS
   ========================================== */

/* Hover sur input */
input:focus,
textarea:focus,
select:focus {
    animation: scaleIn 0.3s ease;
}

/* Hover sur liens */
a {
    transition: all 0.3s ease;
    position: relative;
}

/* ==========================================
   RESPONSIVE ANIMATIONS
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================
   DARK MODE (optionnel)
   ========================================== */

@media (prefers-color-scheme: dark) {
    /* Les variables seront remplacées automatiquement par JavaScript si nécessaire */
}
