/* ============================================
   DASHBOARD MÉDECIN - STYLES
   ============================================ */

/* HEADER */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.date-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
}

/* CARTES STATISTIQUES */
.stats-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color-1), var(--card-color-2));
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-blue {
    --card-color-1: #667eea;
    --card-color-2: #764ba2;
}

.card-green {
    --card-color-1: #11998e;
    --card-color-2: #38ef7d;
}

.card-orange {
    --card-color-1: #f093fb;
    --card-color-2: #f5576c;
}

.card-purple {
    --card-color-1: #4facfe;
    --card-color-2: #00f2fe;
}

.stats-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, var(--card-color-1), var(--card-color-2));
    color: white;
    flex-shrink: 0;
}

.stats-content {
    flex: 1;
}

.stats-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.stats-label {
    font-size: 0.95rem;
    color: #7f8c8d;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stats-trend {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7f8c8d;
}

.stats-trend.positive {
    color: #27ae60;
}

.stats-trend.negative {
    color: #e74c3c;
}

.stats-trend i {
    font-size: 1rem;
}

/* DASHBOARD CARDS */
.dashboard-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: none;
    overflow: hidden;
}

.dashboard-card .card-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e9ecef;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
}

.dashboard-card .card-actions {
    display: flex;
    gap: 0.5rem;
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

/* ALERTES */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
    transition: all 0.3s ease;
}

.alert-item:hover {
    background: #f1f3f5;
    transform: translateX(5px);
}

.alert-item.alert-urgent {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.alert-item.alert-high {
    border-left-color: #fd7e14;
    background: #fff8f0;
}

.alert-item.alert-medium {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.alert-item.alert-low {
    border-left-color: #17a2b8;
    background: #f0fbff;
}

.alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.alert-urgent .alert-icon {
    background: #dc3545;
    color: white;
}

.alert-high .alert-icon {
    background: #fd7e14;
    color: white;
}

.alert-medium .alert-icon {
    background: #ffc107;
    color: white;
}

.alert-low .alert-icon {
    background: #17a2b8;
    color: white;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.alert-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.alert-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #95a5a6;
}

.alert-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.alert-actions {
    display: flex;
    gap: 0.5rem;
}

/* AGENDA */
.agenda-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.agenda-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.agenda-item:hover {
    background: #e9ecef;
    transform: scale(1.02);
}

.agenda-time {
    font-weight: 700;
    color: #667eea;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.agenda-details {
    flex: 1;
}

.agenda-patient {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.agenda-type {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.agenda-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.agenda-status.confirmé {
    background: #d4edda;
    color: #155724;
}

.agenda-status.en.attente {
    background: #fff3cd;
    color: #856404;
}

/* GRAPHIQUES */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1rem;
}

/* LÉGENDE APTITUDES */
.aptitude-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: #f8f9fa;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-label {
    flex: 1;
    font-size: 0.9rem;
    color: #495057;
}

.legend-value {
    font-weight: 700;
    color: #2c3e50;
}

/* PATHOLOGIES */
.pathologies-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pathology-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
}

.pathology-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pathology-name {
    font-weight: 600;
    color: #2c3e50;
}

.pathology-count {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.pathology-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.pathology-progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 1s ease;
}

.pathology-percentage {
    font-weight: 700;
    color: #667eea;
    min-width: 45px;
    text-align: right;
}

/* RISQUES PROFESSIONNELS */
.risks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.risk-item {
    padding: 1rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.risk-sector {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
}

.risk-level {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.risk-level.risk-high {
    background: #fee;
    color: #dc3545;
}

.risk-level.risk-medium {
    background: #fff8f0;
    color: #fd7e14;
}

.risk-level.risk-low {
    background: #f0fbff;
    color: #17a2b8;
}

.risk-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.risk-type {
    font-size: 0.9rem;
    color: #495057;
}

.risk-affected {
    font-size: 0.85rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* CONFORMITÉ */
.compliance-metric {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    height: 100%;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.bg-success-light {
    background: #d4edda;
}

.bg-warning-light {
    background: #fff3cd;
}

.bg-info-light {
    background: #d1ecf1;
}

.bg-danger-light {
    background: #f8d7da;
}

.bg-primary-light {
    background: #cfe2ff;
}

.bg-purple-light {
    background: #e7d6ff;
}

.metric-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.metric-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 600;
}

.metric-progress {
    margin-top: 0.5rem;
}

.metric-progress .progress {
    height: 6px;
    border-radius: 10px;
    background: #e9ecef;
}

.metric-progress .progress-bar {
    border-radius: 10px;
}

/* ACCÈS RAPIDES */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-action-item:hover {
    background: white;
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.quick-action-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.quick-action-label {
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.text-purple {
    color: #9b59b6 !important;
}

/* EMPTY STATE */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #95a5a6;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .stats-value {
        font-size: 2rem;
    }

    .stats-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .date-display {
        width: 100%;
        justify-content: center;
    }

    .stats-card {
        padding: 1rem;
    }

    .stats-value {
        font-size: 1.75rem;
    }

    .stats-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-container {
        height: 250px;
    }

    .pathology-item {
        grid-template-columns: 1fr;
    }

    .pathology-bar {
        order: 2;
    }

    .pathology-percentage {
        order: 3;
    }
}

@media (max-width: 576px) {
    .dashboard-title {
        font-size: 1.5rem;
    }

    .stats-card {
        flex-direction: column;
        text-align: center;
    }

    .stats-value {
        font-size: 1.5rem;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .compliance-metric {
        flex-direction: column;
        text-align: center;
    }
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-card,
.dashboard-card,
.quick-action-item {
    animation: fadeInUp 0.5s ease-out;
}

.stats-card:nth-child(1) { animation-delay: 0.1s; }
.stats-card:nth-child(2) { animation-delay: 0.2s; }
.stats-card:nth-child(3) { animation-delay: 0.3s; }
.stats-card:nth-child(4) { animation-delay: 0.4s; }
