/**
 * Mes Statistiques - Dashboard analytique auteur
 * LivreConnect
 */

/* ── Titre ── */
.stats-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

/* ── Selecteur de periode ── */
.period-selector .btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    margin-left: 2px;
}

/* ── KPI Cards ── */
.stats-kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.stats-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a2e;
}

.kpi-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Stats Cards ── */
.stats-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.stats-card .card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 1rem 1.25rem;
}

.stats-card .card-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.stats-card .card-body {
    padding: 1.25rem;
}

/* ── Chart containers ── */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

.chart-container-sm {
    position: relative;
    width: 100%;
    height: 180px;
}

/* ── Mini stat cards ── */
.stat-mini-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem 0.75rem;
}

.stat-mini-value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-mini-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── Reaction bars ── */
.reaction-bar .progress {
    background-color: #e9ecef;
    border-radius: 3px;
}

/* ── Table tweaks ── */
.stats-card .table {
    margin-bottom: 0;
}

.stats-card .table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-top: none;
    font-weight: 600;
}

.stats-card .table td {
    font-size: 0.875rem;
    vertical-align: middle;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .stats-title {
        font-size: 1.25rem;
    }

    .period-selector {
        width: 100%;
        justify-content: center;
    }

    .period-selector .btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .kpi-value {
        font-size: 1.2rem;
    }

    .kpi-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .chart-container {
        height: 220px;
    }

    .chart-container-sm {
        height: 150px;
    }

    .stat-mini-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .stats-kpi-card {
        padding: 0.875rem;
        gap: 0.75rem;
    }

    .kpi-label {
        font-size: 0.7rem;
    }
}
