/**
 * ============================================================================
 * RESEARCH DASHBOARD - STYLES
 * ============================================================================
 * 
 * Styles pour le tableau de bord analytique complet
 * Design moderne et professionnel avec animations
 */

/* Container principal */
.dashboard-container {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

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

/* En-tête */
.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.dashboard-header h1 {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.dashboard-header .subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    margin: 0;
}

/* Grille de statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Cartes de statistiques */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

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

.stat-card.stat-primary {
    border-left-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.stat-card.stat-success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.stat-card.stat-info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.stat-card.stat-warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.stat-card.stat-secondary {
    border-left-color: #8b5cf6;
}

.stat-card.stat-accent {
    border-left-color: #ec4899;
}

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

.stat-card.stat-gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-icon {
    font-size: 2.5em;
    opacity: 0.8;
    min-width: 60px;
    text-align: center;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.2em;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.95em;
    opacity: 0.7;
    font-weight: 500;
}

.stat-detail {
    font-size: 0.85em;
    opacity: 0.6;
    margin-top: 5px;
}

.stat-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    margin-top: 8px;
}

.stat-badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.stat-progress {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    animation: progressAnim 1s ease;
}

@keyframes progressAnim {
    from { width: 0; }
}

.stat-stars {
    color: #f59e0b;
    font-size: 1.1em;
    margin-top: 5px;
}

/* Navigation des vues */
.dashboard-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.nav-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
}

.nav-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.nav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-btn i {
    margin-right: 8px;
}

/* Vues */
.dashboard-views {
    position: relative;
}

.view-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-content.active {
    display: block;
}

/* Grilles de graphiques */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.chart-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card h3 {
    margin: 0 0 20px 0;
    font-size: 1.3em;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card h3 i {
    color: #667eea;
}

.chart-card canvas {
    max-height: 400px;
}

/* Timeline stats */
.timeline-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-top: 25px;
}

.timeline-stat {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.timeline-stat i {
    font-size: 2em;
    color: #667eea;
}

.timeline-stat strong {
    display: block;
    margin-bottom: 5px;
    color: #4b5563;
}

/* Détails de satisfaction */
.satisfaction-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.satisfaction-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #667eea;
}

.satisfaction-card h4 {
    margin: 0 0 15px 0;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.satisfaction-score {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    margin-bottom: 15px;
}

.score-value {
    font-size: 2.5em;
    font-weight: 700;
    color: #667eea;
    display: block;
    margin-bottom: 10px;
}

.score-stars {
    color: #f59e0b;
    font-size: 1.2em;
}

.satisfaction-details > div {
    font-size: 0.9em;
    color: #6b7280;
    margin-top: 8px;
}

/* Patterns */
.patterns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.pattern-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.pattern-section h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
}

.pattern-card {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.pattern-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pattern-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pattern-header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 1.1em;
}

.pattern-badge {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.pattern-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pattern-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.9em;
}

.pattern-stat i {
    color: #667eea;
}

.pattern-impact {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
    margin-top: 5px;
}

.pattern-impact.élevé {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.pattern-impact.moyen {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.pattern-impact.faible {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.no-data {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 30px;
}

/* Synthèses */
.syntheses-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.synthese-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.synthese-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f3f4f6;
}

.synthese-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.6em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.synthese-header h3 i {
    color: #667eea;
}

.synthese-section {
    margin-bottom: 25px;
}

.synthese-section h4 {
    color: #4b5563;
    font-size: 1.2em;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.synthese-section h4 i {
    color: #667eea;
    font-size: 0.9em;
}

.synthese-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.synthese-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #e5e7eb;
    transition: all 0.3s ease;
}

.synthese-list li:hover {
    background: #f3f4f6;
    border-left-color: #667eea;
    transform: translateX(5px);
}

.synthese-list.constats li {
    border-left-color: #3b82f6;
}

.synthese-list.recommendations li {
    border-left-color: #10b981;
}

.synthese-list li::before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    margin-right: 10px;
}

/* Actions rapides */
.quick-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
    padding: 25px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.action-btn {
    flex: 1;
    min-width: 200px;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.action-btn.primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.action-btn.secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.action-btn.accent {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.action-btn.info {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 15px;
    }

    .dashboard-header h1 {
        font-size: 1.8em;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-nav {
        flex-direction: column;
    }

    .nav-btn {
        min-width: 100%;
    }

    .quick-actions {
        flex-direction: column;
    }

    .action-btn {
        min-width: 100%;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}
