/* =====================================================
   STYLES POUR STATISTIQUES TEMPORELLES
   ===================================================== */

.period-selector {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.period-selector .btn {
    padding: 6px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.period-selector .btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Insights */
.insights-card {
    margin-top: 30px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.insight-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.insight-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.insight-content {
    flex: 1;
}

.insight-content h5 {
    margin: 0 0 10px 0;
    color: #2F4F4F;
    font-size: 16px;
}

.insight-content p {
    margin: 5px 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.insight-change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.insight-change.positive {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.insight-change.negative {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Yearly Performers */
.year-performers {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.year-performers:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.year-performers h5 {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-size: 16px;
}

.performers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.performer-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.performer-rank {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.performer-info {
    flex: 1;
}

.performer-name {
    font-weight: 600;
    color: #2F4F4F;
    margin-bottom: 5px;
}

.performer-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.performer-stats .badge {
    font-size: 11px;
    padding: 3px 8px;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #2F4F4F;
    border-bottom: 2px solid #e9ecef;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.change-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.change-indicator.positive {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.change-indicator.negative {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

.loading-state .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-text {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .period-selector {
        flex-wrap: wrap;
        margin-top: 10px;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .performer-stats {
        flex-direction: column;
        gap: 5px;
    }
}
