/* 
 * TimeVox - Animations CSS
 * Effets visuels et animations
 */

/* Animation du bouton de don - DÉSACTIVÉE pour éviter les conflits */
/*
.donate-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    }
}
*/

/* Animation du logo principal */
.logo-showcase {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-logo {
    width: 280px;
    height: 280px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 0 8px rgba(255, 107, 53, 0.1),
        0 0 0 16px rgba(255, 107, 53, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.15);
    animation: logoFloat 4s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.main-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.main-logo:hover::before {
    animation: shimmer 1.5s ease-in-out;
    opacity: 1;
}

.main-logo:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 0 12px rgba(255, 107, 53, 0.15),
        0 0 0 24px rgba(255, 107, 53, 0.08),
        0 25px 80px rgba(0, 0, 0, 0.25);
}

@keyframes logoFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-8px) rotate(1deg); 
    }
    50% { 
        transform: translateY(0px) rotate(0deg); 
    }
    75% { 
        transform: translateY(-5px) rotate(-1deg); 
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.logo-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

/* Animation des ondes sonores autour du logo */
.sound-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.sound-ring {
    position: absolute;
    border: 2px solid var(--accent-orange);
    border-radius: 50%;
    opacity: 0;
    animation: soundRing 3s linear infinite;
}

.sound-ring:nth-child(1) {
    width: 320px;
    height: 320px;
    top: -160px;
    left: -160px;
    animation-delay: 0s;
}

.sound-ring:nth-child(2) {
    width: 380px;
    height: 380px;
    top: -190px;
    left: -190px;
    animation-delay: 1s;
}

.sound-ring:nth-child(3) {
    width: 440px;
    height: 440px;
    top: -220px;
    left: -220px;
    animation-delay: 2s;
}

@keyframes soundRing {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    10% {
        opacity: 1;
    }
    80% {
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

/* Animations d'apparition au scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(60px) !important;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Animation des cartes qui s'empilent */
.stagger-animation .card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-animation .card:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation .card:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation .card:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation .card:nth-child(4) { transition-delay: 0.4s; }
.stagger-animation .card:nth-child(5) { transition-delay: 0.5s; }
.stagger-animation .card:nth-child(6) { transition-delay: 0.6s; }

.stagger-animation.visible .card {
    opacity: 1;
    transform: translateY(0);
}

/* Animation du cadran téléphonique */
.dial-animation {
    position: relative;
    width: 150px;
    height: 150px;
    border: 4px solid var(--accent-orange);
    border-radius: 50%;
    margin: 2rem auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.dial-animation:hover {
    transform: rotate(36deg);
}

.dial-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--accent-orange);
    border-radius: 50%;
}

/* Animation de frappe de texte */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--accent-orange);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent-orange); }
}

/* Animation des statistiques/compteurs */
.counter {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-orange);
}

.counter-animation {
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    0% { 
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation des boutons au hover */
.btn-animate {
    position: relative;
    overflow: hidden;
}

.btn-animate::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.5s ease;
}

.btn-animate:hover::before {
    left: 100%;
}

/* Animation de chargement */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* Animation des onglets */
.tab-content {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
    opacity: 1;
    transform: translateX(0);
}

/* Animation de flip des cartes */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    height: 300px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
}

.flip-card-front {
    background: white;
    border: 1px solid #e0e0e0;
}

.flip-card-back {
    background: var(--accent-orange);
    color: white;
    transform: rotateY(180deg);
}

/* Animation du progress bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent-orange);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Animation des icônes flottantes */
.floating-icon {
    animation: float 3s ease-in-out infinite;
}

.floating-icon:nth-child(even) {
    animation-delay: 1s;
    animation-direction: reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Animation de révélation du texte */
.reveal-text {
    position: relative;
    overflow: hidden;
}

.reveal-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-orange);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.reveal-text.animate::before {
    transform: translateX(100%);
}

/* Animation de particules */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-orange);
    border-radius: 50%;
    opacity: 0.7;
    animation: particle-float 4s linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Animation de glow/lueur */
.glow {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
    }
}