/* medical-cases-styles.css - Styles pour les cas médicaux */

.medical-cases-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================== HEADER ==================== */

.cases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.cases-header h2 {
    font-size: 1.8rem;
    color: #1f2937;
    margin: 0;
}

.btn-create-case {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
}

.btn-create-case:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

/* ==================== FILTRES ==================== */

.cases-filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.filter-group select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    background: white;
}

/* ==================== GRILLE DES CAS ==================== */

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.case-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.case-card-header {
    margin-bottom: 1rem;
}

.case-card-header h3 {
    font-size: 1.1rem;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.case-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.case-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 1rem 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.case-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.case-tags .tag {
    background: #eff6ff;
    color: #3b82f6;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.case-stats {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

.case-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.case-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.case-card-footer small {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* ==================== LOADING ==================== */

.cases-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.no-cases {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.no-cases p:first-child {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ==================== DÉTAIL D'UN CAS ==================== */

.case-detail-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.case-detail-header {
    margin-bottom: 2rem;
}

.btn-back {
    background: #f3f4f6;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: background 0.2s ease;
}

.btn-back:hover {
    background: #e5e7eb;
}

.case-title-section h2 {
    font-size: 1.8rem;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.case-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* ==================== TABS ==================== */

.case-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.case-tab {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.case-tab:hover {
    color: #3b82f6;
}

.case-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* ==================== CONTENU ==================== */

.case-content {
    min-height: 400px;
}

.info-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-card h3 {
    font-size: 1.1rem;
    color: #1f2937;
    margin: 0 0 1rem 0;
}

.info-card p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.participant-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.participant-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.participant-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.participant-info strong {
    font-size: 0.9rem;
    color: #1f2937;
}

.participant-info .specialty {
    font-size: 0.8rem;
    color: #6b7280;
}

.role-badge {
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
}

/* ==================== CONVERSATIONS ==================== */

.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.conversation-item {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.conv-info strong {
    color: #1f2937;
    font-size: 1rem;
}

.conv-info p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.conv-info small {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* ==================== NOTES ==================== */

.btn-add-note {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.btn-add-note:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-item {
    background: #fffbeb;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.note-header strong {
    color: #1f2937;
    font-size: 0.95rem;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.private-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.note-content {
    color: #78350f;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ==================== MODALS ==================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #1f2937;
}

.btn-close {
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.btn-close:hover {
    background: #e5e7eb;
}

.modal-content form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tag-input-container {
    display: flex;
    gap: 0.5rem;
}

.btn-add-tag {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tags-list .tag {
    background: #eff6ff;
    color: #3b82f6;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tags-list .tag button {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
    font-size: 1.1rem;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .medical-cases-container {
        padding: 1rem;
    }

    .cases-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cases-filters {
        flex-direction: column;
        gap: 1rem;
    }

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

    .case-tabs {
        overflow-x: auto;
    }

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

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

