/**
 * Effets modernes pour les éléments de la page d'accueil
 * - Animations au survol pour les cadres de services
 * - Effets visuels pour améliorer l'expérience utilisateur
 */

/* Styles de base pour les cadres de service */
.service-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Animation au survol */
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.15);
}

/* Effet de brillance au survol */
.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    opacity: 0;
    transition: opacity 0.6s, transform 0.6s;
    pointer-events: none;
    z-index: -1;
}

.service-card:hover::after {
    opacity: 1;
    transform: rotate(30deg) translate(10%, 10%);
}

/* Styles pour l'icône du service */
.service-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.2);
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

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

/* Animation de pulsation pour les icônes */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Styles spécifiques pour chaque service */
.service-card.development .service-icon {
    background: linear-gradient(135deg, #5865F2, #EB459E);
}

.service-card.strategy .service-icon {
    background: linear-gradient(135deg, #57F287, #3BA55C);
}

.service-card.infrastructure .service-icon {
    background: linear-gradient(135deg, #FEE75C, #F47B67);
}

/* Animation pour le texte */
.service-card h3 {
    transition: all 0.3s ease;
}

.service-card:hover h3 {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Animation pour le texte descriptif */
.service-card p {
    transition: all 0.3s ease;
}

.service-card:hover p {
    color: rgba(255, 255, 255, 1);
}

/* Animation pour les particules de fond */
.service-particle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    z-index: -1;
}

/* Animation pour les particules */
@keyframes float-up {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}

/* Styles pour les cartes de statistiques */
.stat-card {
    position: relative;
    transition: all 0.4s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Effet 3D au survol des statistiques */
.stat-card:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

/* Effet de profondeur pour les cartes de statistiques */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    transform: translateZ(-10px);
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    z-index: -1;
}

.stat-card:hover::before {
    opacity: 1;
}

/* Texte en noir pour les statistiques */
.stat-number, .stat-description {
    color: #000000;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-number {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateZ(20px);
}

/* Animation de flottement pour les icônes de statistiques */
.stat-card:hover .stat-icon {
    animation: float 3s ease-in-out infinite;
}

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

/* Animations pour le tableau analytique */
.analytics-chart {
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 1s ease-out, opacity 1s ease-out;
}

.analytics-chart.animate-in {
    transform: translateX(0);
    opacity: 1;
}

.metrics-grid {
    transform: translateX(150%);
    opacity: 0;
    transition: transform 1.2s ease-out, opacity 1.2s ease-out;
}

.metrics-grid.animate-in {
    transform: translateX(0);
    opacity: 1;
}

/* Animation des lignes du graphe */
#messages-line, #participations-line, #reponses-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-in-out;
}

.animate-graph #messages-line,
.animate-graph #participations-line,
.animate-graph #reponses-line {
    stroke-dashoffset: 0;
}

/* Animation des points du graphe */
.data-point {
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: calc(var(--index) * 0.1s);
}

.animate-graph .data-point {
    opacity: 1;
    transform: scale(1);
}

/* Animation des valeurs des métriques */
.metric-value {
    position: relative;
    display: inline-block;
}

.metric-value.animate-value {
    animation: countUp 2s forwards ease-out;
}

@keyframes countUp {
    from {
        opacity: 0.3;
    }
    to {
        opacity: 1;
    }
}

/* Styles pour les particules d'emojis et de réactions Discord */
.services {
    position: relative;
    overflow: hidden;
}

.emoji-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.emoji-particle {
    position: absolute;
    font-size: 24px;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    animation: floatEmoji 3s ease-out forwards;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

@keyframes floatEmoji {
    0% {
        transform: translateY(20px) scale(0.5);
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) scale(1.2) rotate(var(--rotate-deg));
        opacity: 0;
    }
}

.discord-reaction {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
    opacity: 0;
    transform: scale(0);
    animation: popReaction 2s ease-out forwards;
}

@keyframes popReaction {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    20% {
        transform: scale(1.2);
        opacity: 1;
    }
    80% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .service-card:hover {
        transform: translateY(-5px);
    }
    
    .stat-card:hover {
        transform: rotateY(5deg) rotateX(3deg);
    }
}
