/* Styles pour la page de statistiques de lecture */

.statistics-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.statistics-modal.active {
    display: flex;
}

.statistics-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.statistics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.statistics-header h2 {
    margin: 0;
    color: #333;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.statistics-header h2 i {
    color: #ff6b6b;
}

.statistics-close-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.statistics-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.profile-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.profile-info h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-info p {
    margin: 5px 0;
    opacity: 0.9;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card.success {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #333;
}

.stat-card.warning {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.stat-card .stat-icon {
    font-size: 36px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.stat-card .stat-value {
    font-size: 42px;
    font-weight: bold;
    margin: 10px 0;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.recent-activity {
    margin-top: 30px;
}

.recent-activity h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-list {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.activity-icon {
    font-size: 24px;
    color: #667eea;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.activity-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 15px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}

.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 8px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .statistics-container {
        padding: 20px;
        max-height: 95vh;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card .stat-value {
        font-size: 36px;
    }
    
    .statistics-header h2 {
        font-size: 22px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeIn 0.5s ease forwards;
}

.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; }
