/* 🌟 ANIMATIONS D'APPARITION DE PAGE - CORRIGÉES */

/* Animation fade-in pour le body - sans masquer le contenu */
body {
    opacity: 1; /* Toujours visible par défaut */
    animation: pageLoad 0.8s ease-out;
}

@keyframes pageLoad {
    0% {
        opacity: 0.7;
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation pour le header - sans masquer le contenu */
header {
    opacity: 1; /* Toujours visible par défaut */
    animation: slideInTop 0.8s ease-out 0.1s;
}

@keyframes slideInTop {
    0% {
        opacity: 0.7;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation pour le main content - sans masquer le contenu */
main {
    opacity: 1; /* Toujours visible par défaut */
    animation: slideInUp 0.8s ease-out 0.2s;
}

@keyframes slideInUp {
    0% {
        opacity: 0.7;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 🎨 EFFETS DE HOVER AMÉLIORÉS */

/* Effet de brillance sur les boutons */
.btn, .menu-link, .cta {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before, .menu-link::before, .cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before, .menu-link:hover::before, .cta:hover::before {
    left: 100%;
}

/* Effet de hover sur les images */
.profile-pic, .cabinet-pic {
    transition: all 0.3s ease;
    filter: brightness(1);
}

.profile-pic:hover, .cabinet-pic:hover {
    filter: brightness(1.1) contrast(1.1);
    transform: scale(1.05);
}

/* Effet de pulsation sur les éléments importants */
.new-page {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(107, 112, 92, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(107, 112, 92, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(107, 112, 92, 0);
    }
}

/* 🌊 ANIMATIONS DE SCROLL */

/* Classe pour les éléments qui apparaissent au scroll - CORRIGÉE */
.scroll-reveal {
    opacity: 1; /* Toujours visible par défaut */
    transform: translateY(0);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Effet parallax léger pour le background */
body {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Animation pour les éléments de navigation - CORRIGÉE */
nav ul li {
    opacity: 1; /* Toujours visible par défaut */
    animation: slideInNav 0.5s ease-out;
}

nav ul li:nth-child(1) { animation-delay: 0.1s; }
nav ul li:nth-child(2) { animation-delay: 0.2s; }
nav ul li:nth-child(3) { animation-delay: 0.3s; }
nav ul li:nth-child(4) { animation-delay: 0.4s; }
nav ul li:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInNav {
    0% {
        opacity: 0.7;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 🎯 MICRO-INTERACTIONS */

/* Effet de focus amélioré sur les inputs */
input:focus, textarea:focus {
    outline: none;
    border: 2px solid #6B705C;
    box-shadow: 0 0 10px rgba(107, 112, 92, 0.3);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Effet de hover sur les liens */
a {
    transition: all 0.3s ease;
}

a:hover {
    transform: translateY(-1px);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Animation pour les alertes/messages */
.highlight-message, .success-message {
    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% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Effet de typing pour les titres */
.typing-effect {
    overflow: hidden;
    border-right: 3px solid #6B705C;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.5s step-end infinite;
}

@keyframes typing {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes blink-caret {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: #6B705C; }
}

/* 🌈 EFFETS DE COULEUR DYNAMIQUES */

/* Effet arc-en-ciel subtil sur hover */
.rainbow-hover:hover {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
    background-size: 400% 400%;
    animation: rainbow 2s ease infinite;
}

@keyframes rainbow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Effet de particules flottantes */
.floating-particles {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(107, 112, 92, 0.3);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 0.3;
    }
}

/* 🎪 ANIMATIONS POUR LES SECTIONS */

/* Effet de slide pour les sections */
.section-slide {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.section-slide.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* Rotation douce au hover sur les logos */
.logos img {
    transition: all 0.3s ease;
}

.logos img:hover {
    transform: rotate(360deg) scale(1.1);
}

/* Effet de zoom sur les images au survol */
.zoom-effect {
    transition: transform 0.3s ease;
    overflow: hidden;
}

.zoom-effect:hover {
    transform: scale(1.1);
}

/* 🎨 ANIMATIONS POUR LES FORMULAIRES */

/* Effet de label flottant */
.form-floating-label {
    position: relative;
    margin-bottom: 20px;
}

.form-floating-label input,
.form-floating-label textarea {
    border: none;
    border-bottom: 2px solid #ccc;
    background: transparent;
    transition: all 0.3s ease;
    padding: 10px 0;
}

.form-floating-label label {
    position: absolute;
    top: 10px;
    left: 0;
    color: #999;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-floating-label input:focus + label,
.form-floating-label textarea:focus + label,
.form-floating-label input:valid + label,
.form-floating-label textarea:valid + label {
    top: -20px;
    font-size: 12px;
    color: #6B705C;
}

/* 🎊 CONFETTI EFFECT (optionnel) */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #6B705C;
    animation: confetti-fall 3s linear infinite;
    pointer-events: none;
    z-index: 1000;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 🌟 ANIMATIONS SPÉCIALES POUR MOBILE */
@media (max-width: 768px) {
    /* Réduction des animations pour économiser la batterie */
    .floating-particles {
        display: none;
    }
    
    /* Animations plus rapides sur mobile */
    .btn, .menu-link, .cta {
        transition: all 0.2s ease;
    }
    
    /* Suppression du parallax sur mobile */
    body {
        background-attachment: scroll;
    }
}

/* 🎭 ANIMATIONS POUR LES ÉTATS DE CHARGEMENT */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6B705C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Effet de glitch subtil */
.glitch-effect {
    position: relative;
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-1px, 1px);
    }
    40% {
        transform: translate(-1px, -1px);
    }
    60% {
        transform: translate(1px, 1px);
    }
    80% {
        transform: translate(1px, -1px);
    }
}