/**
 * ============================================
 * MARKDOWN STYLES - Complet
 * ============================================
 */

/* Tables */
.markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

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

.markdown-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #5568d3;
}

.markdown-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.markdown-table tbody tr {
    transition: background-color 0.2s ease;
}

.markdown-table tbody tr:hover {
    background-color: #f8f9fa;
}

.markdown-table tbody tr:last-child td {
    border-bottom: none;
}

/* Alternance couleurs lignes */
.markdown-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.markdown-table tbody tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

/* Alignement colonnes */
.markdown-table th[style*="center"],
.markdown-table td[style*="center"] {
    text-align: center;
}

.markdown-table th[style*="right"],
.markdown-table td[style*="right"] {
    text-align: right;
}

/* Blockquotes */
.markdown-blockquote {
    margin: 1rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #555;
}

.markdown-blockquote p:first-child {
    margin-top: 0;
}

.markdown-blockquote p:last-child {
    margin-bottom: 0;
}

/* Images */
.markdown-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Code inline */
.cell-markdown code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

/* Code blocks */
.cell-markdown pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid #3d3d3d;
}

.cell-markdown pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Headers */
.cell-markdown h1,
.cell-markdown h2,
.cell-markdown h3,
.cell-markdown h4,
.cell-markdown h5,
.cell-markdown h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: #2c3e50;
}

.cell-markdown h1 {
    font-size: 2rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.cell-markdown h2 {
    font-size: 1.6rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.4rem;
}

.cell-markdown h3 {
    font-size: 1.3rem;
}

.cell-markdown h4 {
    font-size: 1.1rem;
}

.cell-markdown h5 {
    font-size: 1rem;
}

.cell-markdown h6 {
    font-size: 0.9rem;
    color: #666;
}

/* Paragraphes */
.cell-markdown p {
    margin: 0.75rem 0;
    line-height: 1.6;
    color: #333;
}

/* Lists */
.cell-markdown ul,
.cell-markdown ol {
    margin: 0.75rem 0;
    padding-left: 2rem;
}

.cell-markdown li {
    margin: 0.25rem 0;
    line-height: 1.6;
}

.cell-markdown ul {
    list-style-type: disc;
}

.cell-markdown ol {
    list-style-type: decimal;
}

/* Nested lists */
.cell-markdown ul ul,
.cell-markdown ol ul {
    list-style-type: circle;
}

.cell-markdown ul ul ul,
.cell-markdown ol ul ul {
    list-style-type: square;
}

/* Task lists */
.cell-markdown .task-list-item {
    list-style: none;
    margin-left: -2rem;
    padding-left: 2rem;
}

.cell-markdown .task-list-item input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Links */
.cell-markdown a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.cell-markdown a:hover {
    color: #5568d3;
    border-bottom-color: #5568d3;
}

/* Horizontal rules */
.cell-markdown hr {
    margin: 2rem 0;
    border: none;
    border-top: 2px solid #e0e0e0;
    border-radius: 2px;
}

/* Strong/Bold */
.cell-markdown strong {
    font-weight: 600;
    color: #2c3e50;
}

/* Emphasis/Italic */
.cell-markdown em {
    font-style: italic;
    color: #555;
}

/* Strikethrough */
.cell-markdown del {
    text-decoration: line-through;
    color: #999;
}

/* Définition du contenu markdown */
.cell-markdown .markdown-content {
    padding: 1rem;
    max-width: 100%;
    word-wrap: break-word;
}

/* Amélioration responsive tables */
@media (max-width: 768px) {
    .markdown-table {
        font-size: 0.85rem;
    }
    
    .markdown-table th,
    .markdown-table td {
        padding: 8px 12px;
    }
}

/* Amélioration print */
@media print {
    .markdown-table {
        border: 1px solid #000;
    }
    
    .markdown-table thead {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
}