/* Animations et styles pour la page d'accueil */

/* Animation de pulsation subtile pour les statistiques */
@keyframes pulse-subtle {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

/* Animation de fade-in pour l'apparition */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container pour les statistiques avec effet de carte */
.stat-card {
    background: linear-gradient(135deg, var(--CouleurFondBoites2) 0%, var(--CouleurFondBoites3) 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fade-in-up 0.6s ease;
    border: 2px solid var(--CouleurBordure-2);
    min-width: 250px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--CouleurBordure-3);
}

/* Conteneur pour les chiffres avec animation */
.stat-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ecd4c5 0%, #f4dbc2 100%);
    border-radius: 8px;
    padding: 10px 15px;
    margin: 5px;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--CouleurTitres);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 60px;
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Icônes pour les statistiques */
.stat-icon {
    font-size: 2em;
    margin-bottom: 10px;
    color: var(--CouleurFond);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

/* Animation de rotation subtile pour les icônes */
@keyframes rotate-subtle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

.stat-icon:hover {
    animation: rotate-subtle 0.5s ease;
}

/* Section de statistiques principales */
.stats-main-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    animation: fade-in-up 0.8s ease;
}

/* Section de statistiques par site */
.stats-sites-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    animation: fade-in-up 1s ease;
}

/* Animation décalée pour chaque carte */
.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

.stat-card:nth-child(5) {
    animation-delay: 0.5s;
}

.stat-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Style pour les titres de statistiques */
.stat-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--CouleurTitres);
}

/* Amélioration visuelle du titre de la section */
.section-title-enhanced {
    background: linear-gradient(135deg, var(--CouleurFond2) 0%, var(--CouleurFond) 100%);
    color: #fff;
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin: 20px 0;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Animation de brillance */
@keyframes shine {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.stat-number.loading {
    background: linear-gradient(90deg,
            #ecd4c5 0%,
            #f4dbc2 50%,
            #ecd4c5 100%);
    background-size: 200% auto;
    animation: shine 1.5s linear infinite;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .stat-card {
        min-width: 200px;
        padding: 15px;
    }

    .stat-icon {
        font-size: 1.5em;
    }

    .stat-number {
        font-size: 1em;
        padding: 8px 12px;
    }
}

/* Amélioration des cartes de profils */
.flex-column-center.margin-10 {
    transition: all 0.3s ease;
}

.flex-column-center.margin-10:hover {
    transform: scale(1.05);
}

/* Animation pour les images de profil */
#affich_image_profil {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

#affich_image_profil::after {
    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;
}

#affich_image_profil:hover::after {
    left: 100%;
}

/* Amélioration du titre avec animation de gradient */
.section-title-enhanced {
    position: relative;
    overflow: hidden;
}

.section-title-enhanced::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.7s ease;
}

.section-title-enhanced:hover::before {
    left: 100%;
}

/* Animation d'entrée pour le titre principal */
.flex-line-center h1 {
    animation: fade-in-up 0.5s ease;
}

/* Animation pour le texte de bienvenue */
.maxwidth-800 {
    animation: fade-in-up 0.7s ease;
}