.chart-container {
    position: relative;
    height: 300px;
}

.kpi-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-card.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.kpi-card.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.kpi-card.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Amélioration du contenu des KPIs */
.kpi-card .card-body {
    padding: 1.5rem 1rem !important;
    position: relative;
    z-index: 2;
}

.kpi-card .kpi-value {
    font-size: 2.2rem !important; /* Beaucoup plus petit que display-4 */
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.kpi-card .kpi-label {
    font-size: 0.9rem !important;
    font-weight: 500;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.kpi-card .kpi-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.3;
}

/* Version encore plus compacte pour mobile */
@media (max-width: 768px) {
    .kpi-card .kpi-value {
        font-size: 1.8rem !important;
    }

    .kpi-card .kpi-label {
        font-size: 0.8rem !important;
    }

    .kpi-card .card-body {
        padding: 1rem 0.75rem !important;
    }
}

/* Variante ultra-compacte si besoin */
.kpi-compact .kpi-value {
    font-size: 1.6rem !important;
}

.kpi-compact .kpi-label {
    font-size: 0.8rem !important;
}

.kpi-compact .card-body {
    padding: 1rem !important;
}

.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

.training-row h6 {
    font-size: 0.95rem !important; /* Réduction du titre */
    font-weight: 600;
    margin-bottom: 2px;
}

.training-row small {
    font-size: 0.75rem !important; /* Sous-titre plus petit */
}

.table th {
    font-size: 0.85rem !important; /* En-têtes plus petits */
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.table td {
    font-size: 0.85rem !important; /* Cellules plus petites */
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.badge {
    font-size: 0.75rem !important; /* Badges plus petits */
    font-weight: 500;
    padding: 0.4rem 0.8rem;
}

.btn-sm {
    font-size: 0.75rem !important; /* Boutons plus petits */
    padding: 0.25rem 0.75rem;
}

/* Icône plus petite */
.training-icon {
    width: 35px;
    height: 35px;
    font-size: 0.85rem;
}

.training-icon i {
    font-size: 1rem; /* Taille d'icône ajustée */
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .training-row h6 {
        font-size: 0.85rem !important;
    }

    .training-row small {
        font-size: 0.7rem !important;
    }

    .table th,
    .table td {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem;
    }

    .badge {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.6rem;
    }
}

/* Version encore plus compacte si nécessaire */
.compact-table .training-row h6 {
    font-size: 0.85rem !important;
    margin-bottom: 1px;
}

.compact-table .training-row small {
    font-size: 0.7rem !important;
}

.compact-table .table th,
.compact-table .table td {
    font-size: 0.8rem !important;
    padding: 0.5rem 0.75rem;
}