/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 0;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* Navigation */
.nav-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 10px;
    backdrop-filter: blur(10px);
}

.nav-tab {
    padding: 15px 30px;
    margin: 0 5px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.nav-tab.active {
    background: rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.section.active {
    display: block;
}

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

/* Cards */
.card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 600;
}

.card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Grille responsive */
.grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Graphiques */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.chart-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #4a5568;
}

/* Filtres */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Tableaux */
.table-container {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

tr:hover {
    background: #f7fafc;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-high {
    background: #48bb78;
    color: white;
}

.badge-medium {
    background: #ed8936;
    color: white;
}

.badge-low {
    background: #e53e3e;
    color: white;
}

/* Barres de progression */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

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

/* Insights */
.insight {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    border-left: 5px solid #2b6cb0;
}

.insight h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.insight p {
    opacity: 0.95;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }
    
    .header p {
        font-size: 1.1rem;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        padding: 15px;
    }
    
    .nav-tab {
        padding: 12px 20px;
        margin: 5px;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 20px 0;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .chart-container {
        height: 250px;
        padding: 15px;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

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

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2d3748;
    z-index: 1000;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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