/**
 * Hunik AI Stats Block Styles V2
 * Fond gris clair, cards blanches, animations modernes
 */

/* Stats Section — marge réduite avec le hero */
.wp-block-group.hunik-stats {
    background: var(--color-gray-100, #f8f8f8);
    padding: 80px 24px;
    margin-top: 0 !important;
    position: relative;
    overflow: hidden;
}

/* Background effects subtils */
.hunik-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(56, 84, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(144, 36, 245, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Stats Grid */
.hunik-stats__grid {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    .hunik-stats__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Stat Card */
.hunik-stat-card {
    background: #ffffff;
    border: 1px solid var(--color-gray-200, #E5E5E5);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hunik-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(56, 84, 255, 0.04) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.hunik-stat-card:hover {
    border-color: rgba(56, 84, 255, 0.25);
    box-shadow: 0 8px 32px rgba(56, 84, 255, 0.1);
    transform: translateY(-4px);
}

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

/* Stat Number (Counter) */
.hunik-stat__number {
    font-family: var(--font-primary, 'Montserrat', sans-serif);
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #3854ff 0%, #9024f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px 0;
    line-height: 1;
    position: relative;
    z-index: 2;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Counter animation (when visible) */
.hunik-stat__number.counting {
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stat Label */
.hunik-stat__label {
    font-family: var(--font-secondary, 'Raleway', sans-serif);
    font-size: 14px;
    color: var(--color-text, #3D3D3D);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    font-weight: 600;
}

/* Stat Description */
.hunik-stat__description {
    font-family: var(--font-secondary, 'Raleway', sans-serif);
    font-size: 12px;
    color: var(--color-text-light, #707070);
    margin: 8px 0 0 0;
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

/* Gradient line under card */
.hunik-stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #3854ff 0%, #9024f5 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.hunik-stat-card:hover::after {
    transform: scaleX(1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wp-block-group.hunik-stats {
        padding: 60px 24px;
    }

    .hunik-stat-card {
        padding: 24px 16px;
    }

    .hunik-stat__number {
        font-size: 36px;
        min-height: 50px;
    }

    .hunik-stat__label {
        font-size: 12px;
    }
}
