/**
 * CampusQCM Analytics System - CSS
 * 
 * Styles pour le système d'analytics avancé.
 * Premium SaaS Design avec support Light/Dark mode.
 * 
 * @package CampusQCM
 * @since 2.0.0
 */

/* =====================================================
   VARIABLES ANALYTICS - Light Mode
   ===================================================== */
:root {
    /* Couleurs sémantiques */
    --analytics-success: #10b981;
    --analytics-success-bg: rgba(16, 185, 129, 0.12);
    --analytics-success-border: rgba(16, 185, 129, 0.25);
    --analytics-warning: #f59e0b;
    --analytics-warning-bg: rgba(245, 158, 11, 0.12);
    --analytics-warning-border: rgba(245, 158, 11, 0.25);
    --analytics-danger: #ef4444;
    --analytics-danger-bg: rgba(239, 68, 68, 0.12);
    --analytics-danger-border: rgba(239, 68, 68, 0.25);
    --analytics-info: #6366f1;
    --analytics-info-bg: rgba(99, 102, 241, 0.12);
    --analytics-info-border: rgba(99, 102, 241, 0.25);
    
    /* Surfaces */
    --analytics-surface: #ffffff;
    --analytics-surface-elevated: #ffffff;
    --analytics-surface-hover: #f8fafc;
    --analytics-bg: #f1f5f9;
    
    /* Texte */
    --analytics-text: #1e293b;
    --analytics-text-secondary: #475569;
    --analytics-text-muted: #94a3b8;
    
    /* Bordures et ombres */
    --analytics-border: rgba(148, 163, 184, 0.2);
    --analytics-border-strong: rgba(148, 163, 184, 0.35);
    --analytics-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --analytics-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --analytics-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    
    /* Accent */
    --analytics-primary: #6366f1;
    --analytics-primary-light: #818cf8;
    --analytics-primary-bg: rgba(99, 102, 241, 0.1);
    
    /* Glassmorphism */
    --analytics-glass: rgba(255, 255, 255, 0.7);
    --analytics-glass-border: rgba(255, 255, 255, 0.4);
}

/* Dark Mode */
body.qcm-dark,
[data-theme="dark"],
.dark-mode {
    --analytics-success-bg: rgba(16, 185, 129, 0.15);
    --analytics-success-border: rgba(16, 185, 129, 0.3);
    --analytics-warning-bg: rgba(245, 158, 11, 0.15);
    --analytics-warning-border: rgba(245, 158, 11, 0.3);
    --analytics-danger-bg: rgba(239, 68, 68, 0.15);
    --analytics-danger-border: rgba(239, 68, 68, 0.3);
    --analytics-info-bg: rgba(99, 102, 241, 0.15);
    --analytics-info-border: rgba(99, 102, 241, 0.3);
    
    /* Surfaces */
    --analytics-surface: #1a1d26;
    --analytics-surface-elevated: #22262f;
    --analytics-surface-hover: #2a2f3a;
    --analytics-bg: #0f1117;
    
    /* Texte */
    --analytics-text: #f1f5f9;
    --analytics-text-secondary: #cbd5e1;
    --analytics-text-muted: #64748b;
    
    /* Bordures et ombres */
    --analytics-border: rgba(148, 163, 184, 0.12);
    --analytics-border-strong: rgba(148, 163, 184, 0.2);
    --analytics-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --analytics-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
    --analytics-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
    
    /* Accent */
    --analytics-primary-bg: rgba(99, 102, 241, 0.2);
    
    /* Glassmorphism */
    --analytics-glass: rgba(26, 29, 38, 0.8);
    --analytics-glass-border: rgba(255, 255, 255, 0.08);
}

/* =====================================================
   1. SIGNAL CLÉ - PRIORITÉ DU JOUR
   Premium glassmorphism design
   ===================================================== */
.analytics-priority-card {
    background: linear-gradient(135deg, 
        var(--analytics-info-bg) 0%, 
        rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid var(--analytics-info-border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: var(--analytics-shadow-md);
}

.analytics-priority-card::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--analytics-primary-bg) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.analytics-priority-card::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--analytics-info-bg) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.analytics-priority-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.analytics-priority-card__icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--analytics-primary) 0%, var(--analytics-primary-light) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.analytics-priority-card__title {
    font-size: 12px;
    font-weight: 700;
    color: var(--analytics-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.analytics-priority-card__subject {
    font-size: 26px;
    font-weight: 800;
    color: var(--analytics-text);
    margin: 0 0 12px 0;
    position: relative;
    z-index: 1;
}

.analytics-priority-card__reason {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--analytics-surface);
    border: 1px solid var(--analytics-border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--analytics-text-secondary);
    position: relative;
    z-index: 1;
}

.analytics-priority-card__stats {
    display: flex;
    gap: 32px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--analytics-border);
    position: relative;
    z-index: 1;
}

.analytics-priority-card__stat {
    text-align: center;
}

.analytics-priority-card__stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--analytics-text);
    letter-spacing: -0.02em;
}

.analytics-priority-card__stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--analytics-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.analytics-priority-card__action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--analytics-primary) 0%, var(--analytics-primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 20px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    position: relative;
    z-index: 1;
}

.analytics-priority-card__action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
    color: white;
    transform: translateY(-1px);
}

/* =====================================================
   2. VÉLOCITÉ D'APPRENTISSAGE
   Premium card with gradient border
   ===================================================== */
.analytics-velocity {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--analytics-surface);
    border: 1px solid var(--analytics-border);
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: var(--analytics-shadow-sm);
    transition: all 0.25s ease;
}

.analytics-velocity:hover {
    box-shadow: var(--analytics-shadow-md);
    transform: translateY(-1px);
}

.analytics-velocity--up {
    background: linear-gradient(135deg, var(--analytics-success-bg) 0%, var(--analytics-surface) 100%);
    border-color: var(--analytics-success-border);
}

.analytics-velocity--down {
    background: linear-gradient(135deg, var(--analytics-danger-bg) 0%, var(--analytics-surface) 100%);
    border-color: var(--analytics-danger-border);
}

.analytics-velocity--stable {
    background: linear-gradient(135deg, var(--analytics-warning-bg) 0%, var(--analytics-surface) 100%);
    border-color: var(--analytics-warning-border);
}

.analytics-velocity__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: var(--analytics-shadow-sm);
}

.analytics-velocity--up .analytics-velocity__icon {
    background: linear-gradient(135deg, var(--analytics-success) 0%, #059669 100%);
    color: white;
}

.analytics-velocity--down .analytics-velocity__icon {
    background: linear-gradient(135deg, var(--analytics-danger) 0%, #dc2626 100%);
    color: white;
}

.analytics-velocity--stable .analytics-velocity__icon {
    background: linear-gradient(135deg, var(--analytics-warning) 0%, #d97706 100%);
    color: white;
}

.analytics-velocity__content {
    flex: 1;
}

.analytics-velocity__title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--analytics-text);
}

.analytics-velocity__message {
    font-size: 14px;
    color: var(--analytics-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.analytics-velocity__delta {
    font-size: 28px;
    font-weight: 800;
    text-align: right;
    letter-spacing: -0.02em;
}

.analytics-velocity--up .analytics-velocity__delta {
    color: var(--analytics-success);
}

.analytics-velocity--down .analytics-velocity__delta {
    color: var(--analytics-danger);
}

.analytics-velocity--stable .analytics-velocity__delta {
    color: var(--analytics-warning);
}

/* =====================================================
   3. STABILITÉ PAR MATIÈRE
   Premium cards with micro-interactions
   ===================================================== */
.analytics-stability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-stability-card {
    background: var(--analytics-surface);
    border: 1px solid var(--analytics-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.analytics-stability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--analytics-border);
    transition: background 0.3s ease;
}

.analytics-stability-card:hover {
    box-shadow: var(--analytics-shadow-lg);
    transform: translateY(-4px);
    border-color: var(--analytics-border-strong);
}

.analytics-stability-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}

.analytics-stability-card__subject {
    font-size: 17px;
    font-weight: 700;
    color: var(--analytics-text);
    margin: 0;
    line-height: 1.3;
}

.analytics-stability-card__badge {
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.analytics-stability-card__badge--excellent {
    background: var(--analytics-success-bg);
    color: var(--analytics-success);
    border: 1px solid var(--analytics-success-border);
}

.analytics-stability-card--excellent::before {
    background: var(--analytics-success);
}

.analytics-stability-card__badge--good {
    background: var(--analytics-success-bg);
    color: var(--analytics-success);
    border: 1px solid var(--analytics-success-border);
}

.analytics-stability-card--good::before {
    background: var(--analytics-success);
}

.analytics-stability-card__badge--medium {
    background: var(--analytics-warning-bg);
    color: var(--analytics-warning);
    border: 1px solid var(--analytics-warning-border);
}

.analytics-stability-card--medium::before {
    background: var(--analytics-warning);
}

.analytics-stability-card__badge--low {
    background: var(--analytics-danger-bg);
    color: var(--analytics-danger);
    border: 1px solid var(--analytics-danger-border);
}

.analytics-stability-card--low::before {
    background: var(--analytics-danger);
}

.analytics-stability-card__badge--insufficient {
    background: var(--analytics-bg);
    color: var(--analytics-text-muted);
    border: 1px solid var(--analytics-border);
}

.analytics-stability-card__bar {
    height: 6px;
    background: var(--analytics-bg);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 16px;
}

.analytics-stability-card__bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.analytics-stability-card__bar-fill--excellent {
    background: linear-gradient(90deg, var(--analytics-success), #059669);
}

.analytics-stability-card__bar-fill--good {
    background: linear-gradient(90deg, #34d399, var(--analytics-success));
}

.analytics-stability-card__bar-fill--medium {
    background: linear-gradient(90deg, #fbbf24, var(--analytics-warning));
}

.analytics-stability-card__bar-fill--low {
    background: linear-gradient(90deg, #f87171, var(--analytics-danger));
}

.analytics-stability-card__stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--analytics-text-muted);
    flex-wrap: wrap;
    gap: 8px;
}

.analytics-stability-card__stat-highlight {
    font-weight: 700;
    color: var(--analytics-text);
}

.analytics-stability-card__message {
    font-size: 13px;
    color: var(--analytics-text-secondary);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--analytics-border);
    line-height: 1.5;
}

/* =====================================================
   4. CRÉNEAUX OPTIMAUX
   Premium time slot cards
   ===================================================== */
.analytics-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.analytics-slot {
    padding: 20px 16px;
    background: var(--analytics-surface);
    border: 1px solid var(--analytics-border);
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.analytics-slot:hover {
    transform: translateY(-2px);
    box-shadow: var(--analytics-shadow-md);
}

.analytics-slot--best {
    background: linear-gradient(135deg, var(--analytics-warning-bg) 0%, var(--analytics-surface) 100%);
    border-color: var(--analytics-warning-border);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.analytics-slot--best::after {
    content: '⭐';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
}

.analytics-slot__icon {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}

.analytics-slot__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--analytics-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.analytics-slot--best .analytics-slot__label {
    color: var(--analytics-warning);
}

.analytics-slot__avg {
    font-size: 24px;
    font-weight: 800;
    color: var(--analytics-text);
    letter-spacing: -0.02em;
}

.analytics-slot--best .analytics-slot__avg {
    color: var(--analytics-warning);
}

.analytics-slot__count {
    font-size: 11px;
    color: var(--analytics-text-muted);
    margin-top: 6px;
}

/* =====================================================
   5. STREAK
   Premium animated streak display
   ===================================================== */
.analytics-streak {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    background: linear-gradient(135deg, var(--analytics-warning-bg) 0%, var(--analytics-surface) 100%);
    border: 1px solid var(--analytics-warning-border);
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: var(--analytics-shadow-sm);
}

.analytics-streak__fire {
    font-size: 52px;
    animation: fireGlow 1.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.3));
}

@keyframes fireGlow {
    0%, 100% { transform: scale(1) rotate(-3deg); }
    50% { transform: scale(1.1) rotate(3deg); }
}

.analytics-streak__content {
    flex: 1;
}

.analytics-streak__days {
    font-size: 42px;
    font-weight: 900;
    color: var(--analytics-warning);
    line-height: 1;
    letter-spacing: -0.02em;
}

.analytics-streak__label {
    font-size: 15px;
    color: var(--analytics-text-secondary);
    font-weight: 600;
    margin-top: 4px;
}

.analytics-streak__stats {
    display: flex;
    gap: 28px;
}

.analytics-streak__stat {
    text-align: center;
}

.analytics-streak__stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--analytics-text);
}

.analytics-streak__stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--analytics-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* =====================================================
   6. MINI-INSIGHTS
   Premium insight cards with icons
   ===================================================== */
.analytics-insights {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytics-insight {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--analytics-surface);
    border: 1px solid var(--analytics-border);
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--analytics-shadow-sm);
}

.analytics-insight:hover {
    transform: translateX(4px);
    border-color: var(--analytics-primary-bg);
    box-shadow: var(--analytics-shadow-md);
}

.analytics-insight__icon {
    font-size: 26px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--analytics-bg);
    border-radius: 12px;
}

.analytics-insight__message {
    font-size: 14px;
    color: var(--analytics-text);
    font-weight: 500;
    line-height: 1.5;
}

/* =====================================================
   7. SECTION ANALYTICS
   Premium section headers
   ===================================================== */
.analytics-section {
    margin-bottom: 36px;
}

.analytics-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.analytics-section__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--analytics-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.analytics-section__subtitle {
    font-size: 14px;
    color: var(--analytics-text-muted);
    margin: 6px 0 0 0;
    line-height: 1.5;
}

.analytics-section__action {
    font-size: 14px;
    color: var(--analytics-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--analytics-primary-bg);
    border-radius: 100px;
    transition: all 0.2s ease;
}

.analytics-section__action:hover {
    background: var(--analytics-primary);
    color: white;
}

/* =====================================================
   8. GRAPHIQUE PROGRESSION
   Premium chart container
   ===================================================== */
.analytics-chart {
    background: var(--analytics-surface);
    border: 1px solid var(--analytics-border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--analytics-shadow-sm);
}

.analytics-chart__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.analytics-chart__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--analytics-text);
    margin: 0;
}

.analytics-chart__legend {
    display: flex;
    gap: 16px;
}

.analytics-chart__legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--analytics-text-secondary);
}

.analytics-chart__legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.analytics-chart__legend-dot--score {
    background: var(--analytics-primary);
}

.analytics-chart__legend-dot--xp {
    background: var(--analytics-success);
}

.analytics-chart__canvas {
    width: 100%;
    height: 200px;
}

/* Mini barchart fallback (sans JS) */
.analytics-chart__bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    padding: 0 8px;
}

.analytics-chart__bar {
    flex: 1;
    background: linear-gradient(180deg, var(--analytics-primary) 0%, var(--cq-primary-light, #818cf8) 100%);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
    position: relative;
}

.analytics-chart__bar:hover {
    opacity: 0.8;
}

.analytics-chart__bar-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--analytics-text);
    color: var(--analytics-surface);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 6px;
}

.analytics-chart__bar:hover .analytics-chart__bar-tooltip {
    display: block;
}

.analytics-chart__labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 8px;
}

.analytics-chart__label {
    font-size: 10px;
    color: var(--analytics-text-muted);
}

/* =====================================================
   9. EMPTY STATES
   ===================================================== */
.analytics-empty {
    text-align: center;
    padding: 40px 20px;
    background: var(--analytics-bg);
    border-radius: 12px;
    border: 2px dashed var(--analytics-border);
}

.analytics-empty__icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.analytics-empty__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--analytics-text-secondary);
    margin: 0 0 8px 0;
}

.analytics-empty__message {
    font-size: 14px;
    color: var(--analytics-text-secondary);
    margin: 0;
    max-width: 300px;
    margin: 0 auto;
}

.analytics-empty__action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--analytics-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.analytics-empty__action:hover {
    background: var(--cq-primary-dark, #4f46e5);
    color: white;
}

/* =====================================================
   10. RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .analytics-priority-card {
        padding: 20px;
    }
    
    .analytics-priority-card__subject {
        font-size: 20px;
    }
    
    .analytics-priority-card__stats {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .analytics-velocity {
        flex-direction: column;
        text-align: center;
    }
    
    .analytics-velocity__delta {
        text-align: center;
    }
    
    .analytics-stability-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-slots {
        flex-direction: column;
    }
    
    .analytics-streak {
        flex-direction: column;
        text-align: center;
    }
    
    .analytics-streak__stats {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .analytics-section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .analytics-priority-card__stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   11. ANIMATIONS
   ===================================================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.analytics-section {
    animation: slideInUp 0.4s ease forwards;
}

.analytics-section:nth-child(2) { animation-delay: 0.1s; }
.analytics-section:nth-child(3) { animation-delay: 0.2s; }
.analytics-section:nth-child(4) { animation-delay: 0.3s; }
.analytics-section:nth-child(5) { animation-delay: 0.4s; }

/* Pulse pour attirer l'attention */
@keyframes pulse-attention {
    0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(14, 165, 233, 0); }
}

.analytics-priority-card--attention {
    animation: pulse-attention 2s ease-in-out infinite;
}
