/**
 * Statistiques Publiques - Styles
 */

.public-stats {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.stats-header {
    text-align: center;
    margin-bottom: 3rem;
}

.stats-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.stats-subtitle {
    font-size: 1.2rem;
    color: var(--font-secondary);
    margin-bottom: 0.5rem;
}

.stats-update {
    font-size: 0.9rem;
    color: var(--font-muted);
    font-style: italic;
}

/* Grille de statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--section-bg-color);
    border-radius: var(--section-radius);
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    border-left: 5px solid;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-blue {
    border-left-color: var(--primary-color);
}

.card-green {
    border-left-color: var(--success-color);
}

.card-purple {
    border-left-color: #6b46c1;
}

.card-orange {
    border-left-color: var(--warning-color);
}

.stat-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.card-blue .stat-icon {
    color: var(--primary-color);
    background: rgba(26, 58, 95, 0.1);
}

.card-green .stat-icon {
    color: var(--success-color);
    background: rgba(47, 133, 90, 0.1);
}

.card-purple .stat-icon {
    color: #6b46c1;
    background: rgba(107, 70, 193, 0.1);
}

.card-orange .stat-icon {
    color: var(--warning-color);
    background: rgba(237, 137, 54, 0.1);
}

.stat-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--font-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-number-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-detail {
    margin: 0;
    color: var(--font-muted);
    font-size: 0.9rem;
}

/* Sections de statistiques */
.stats-section {
    background: var(--section-bg-color);
    border-radius: var(--section-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stats-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stats-section h2 i {
    font-size: 1.5rem;
}

/* Distribution par âge */
.age-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.age-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.age-label {
    min-width: 100px;
    font-weight: 500;
    color: var(--font-color);
}

.age-bar-container {
    flex: 1;
    height: 40px;
    background: var(--section-head-bg-color);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.age-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
    transition: width 0.6s ease;
    min-width: fit-content;
}

.age-count {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Distribution par quartier */
.district-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.district-item {
    background: var(--section-head-bg-color);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.district-item:hover {
    background: var(--form-border-color);
    transform: translateX(5px);
}

.district-name {
    font-weight: 500;
    color: var(--font-color);
}

.district-count {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Engagement stats */
.engagement-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.engagement-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.engagement-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--section-head-bg-color);
    color: var(--primary-color);
    flex-shrink: 0;
}

.engagement-content h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.engagement-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--font-color);
    margin: 0 0 0.5rem 0;
}

.engagement-detail {
    margin: 0;
    color: var(--font-secondary);
    font-size: 0.9rem;
}

/* Call to action */
.stats-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover-color));
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--section-radius);
    text-align: center;
    margin-top: 3rem;
}

.stats-cta h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: white;
    font-size: 2rem;
}

.stats-cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stats-cta .button {
    background: var(--section-bg-color);
    color: var(--primary-color);
    font-weight: 600;
}

.stats-cta .button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.stats-cta .button.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.stats-cta .button.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .district-grid {
        grid-template-columns: 1fr;
    }

    .engagement-stats {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .stats-cta .button {
        width: 100%;
    }
}