/**
 * WikiTips - Style Wikipedia-like
 * Design inspiré de Wikimedia
 */

/* Variables */
:root {
    --wiki-blue: #3366cc;
    --wiki-blue-dark: #2a4b8d;
    --wiki-link: #0645ad;
    --wiki-visited: #0b0080;
    --wiki-red: #ba0000;
    --wiki-border: #a2a9b1;
    --wiki-bg: #f6f6f6;
    --wiki-bg-light: #f8f9fa;
    --wiki-text: #202122;
    --wiki-text-light: #54595d;
    --content-width: 960px;
    --sidebar-width: 200px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--wiki-text);
    background: #fff;
}

a {
    color: var(--wiki-link);
    text-decoration: none;
}

a:visited {
    color: var(--wiki-visited);
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.wiki-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.wiki-header {
    background: var(--wiki-bg-light);
    border-bottom: 1px solid var(--wiki-border);
    padding: 10px 20px;
}

.wiki-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wiki-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--wiki-text);
}

.wiki-logo img {
    height: 50px;
}

.wiki-logo h1 {
    font-size: 1.5em;
    font-weight: normal;
}

.wiki-logo .subtitle {
    font-size: 0.75em;
    color: var(--wiki-text-light);
}

.wiki-search {
    display: flex;
    gap: 5px;
}

.wiki-search input {
    padding: 6px 10px;
    border: 1px solid var(--wiki-border);
    border-radius: 2px;
    width: 250px;
    font-size: 13px;
}

.wiki-search button {
    padding: 6px 12px;
    background: var(--wiki-bg);
    border: 1px solid var(--wiki-border);
    border-radius: 2px;
    cursor: pointer;
}

.wiki-search button:hover {
    background: #eaecf0;
}

/* Navigation */
.wiki-nav {
    background: var(--wiki-bg-light);
    border-bottom: 1px solid var(--wiki-border);
}

.wiki-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    padding: 8px 20px;
    padding-left: calc(var(--sidebar-width) + 20px);
    font-size: 13px;
}

.wiki-nav a {
    color: var(--wiki-link);
    white-space: nowrap;
}

/* Menu hamburger (mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    color: var(--wiki-text);
}

/* Sidebar */
.wiki-sidebar {
    width: var(--sidebar-width);
    padding: 20px;
    background: var(--wiki-bg-light);
    border-right: 1px solid var(--wiki-border);
    min-height: calc(100vh - 120px);
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 12px;
    font-weight: bold;
    color: var(--wiki-text-light);
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--wiki-border);
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section li {
    margin: 5px 0;
}

.sidebar-section a {
    font-size: 13px;
}

/* Content */
.wiki-content {
    flex: 1;
    padding: 20px 30px;
    max-width: calc(100% - var(--sidebar-width));
}

/* Article */
.article-header {
    border-bottom: 1px solid var(--wiki-border);
    padding-bottom: 5px;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 1.8em;
    font-weight: normal;
    line-height: 1.3;
}

.article-meta {
    font-size: 12px;
    color: var(--wiki-text-light);
    margin-top: 5px;
}

.article-actions {
    float: right;
    font-size: 12px;
}

.article-actions a {
    margin-left: 10px;
}

/* Article sections */
.article-section {
    margin: 20px 0;
}

.article-section h2 {
    font-size: 1.4em;
    font-weight: normal;
    border-bottom: 1px solid var(--wiki-border);
    padding-bottom: 3px;
    margin-bottom: 10px;
}

.article-section h3 {
    font-size: 1.2em;
    font-weight: bold;
    margin: 15px 0 10px;
}

.article-section h4 {
    font-size: 1em;
    font-weight: bold;
    margin: 10px 0 5px;
}

.article-section p {
    margin: 10px 0;
}

.article-section ul, .article-section ol {
    margin: 10px 0 10px 25px;
}

.article-section li {
    margin: 5px 0;
}

/* Infobox */
.infobox {
    float: right;
    width: 280px;
    margin: 0 0 20px 20px;
    border: 1px solid var(--wiki-border);
    background: var(--wiki-bg-light);
    font-size: 13px;
}

.infobox-header {
    background: var(--wiki-blue);
    color: white;
    padding: 8px 10px;
    font-weight: bold;
    text-align: center;
}

.infobox-content {
    padding: 10px;
}

.infobox-row {
    display: flex;
    border-bottom: 1px solid var(--wiki-border);
    padding: 5px 0;
}

.infobox-row:last-child {
    border-bottom: none;
}

.infobox-label {
    width: 90px;
    font-weight: bold;
    color: var(--wiki-text-light);
}

.infobox-value {
    flex: 1;
}

/* Human Rights Analysis Box */
.human-rights-box {
    background: #f8f4e8;
    border: 1px solid #c8b06b;
    border-radius: 3px;
    padding: 15px;
    margin: 20px 0;
}

.human-rights-box h3 {
    color: #6b5900;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.human-rights-analysis .analysis-section {
    margin: 15px 0;
    padding: 10px;
    background: white;
    border-radius: 3px;
}

.human-rights-analysis .analysis-section h4 {
    color: var(--wiki-blue-dark);
    margin-bottom: 8px;
}

.human-rights-analysis .concerns li {
    color: var(--wiki-red);
}

.human-rights-analysis .overall {
    background: #e8f4e8;
    border-left: 3px solid #28a745;
}

.human-rights-analysis .recommendations {
    background: #e8f0f8;
    border-left: 3px solid var(--wiki-blue);
}

/* Categories */
.article-categories {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 1px solid var(--wiki-border);
    font-size: 12px;
}

.category-tag {
    display: inline-block;
    background: var(--wiki-bg);
    border: 1px solid var(--wiki-border);
    padding: 2px 8px;
    margin: 2px;
    border-radius: 2px;
}

/* Source box */
.source-box {
    background: var(--wiki-bg-light);
    border: 1px solid var(--wiki-border);
    padding: 10px;
    margin: 15px 0;
    font-size: 12px;
}

.source-box a {
    word-break: break-all;
}

/* Article list */
.article-list {
    list-style: none;
}

.article-list-item {
    padding: 15px;
    border-bottom: 1px solid var(--wiki-border);
}

.article-list-item:hover {
    background: var(--wiki-bg-light);
}

.article-list-item h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.article-list-item .summary {
    font-size: 13px;
    color: var(--wiki-text-light);
    margin-bottom: 5px;
}

.article-list-item .meta {
    font-size: 11px;
    color: var(--wiki-text-light);
}

/* Editor */
.editor-container {
    background: var(--wiki-bg-light);
    border: 1px solid var(--wiki-border);
    padding: 20px;
    margin: 20px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--wiki-border);
    border-radius: 2px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--wiki-border);
    border-radius: 4px;
    background: var(--wiki-bg-light);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.form-group input[type="file"]:hover {
    border-color: var(--wiki-blue);
    background: #e8f0fe;
}

.form-group input[type="file"]::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    border: none;
    border-radius: 4px;
    background: var(--wiki-blue);
    color: white;
    cursor: pointer;
    font-weight: 500;
}

.form-group input[type="file"]::file-selector-button:hover {
    background: var(--wiki-blue-dark);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group textarea.large {
    min-height: 300px;
}

.form-group .help-text {
    font-size: 12px;
    color: var(--wiki-text-light);
    margin-top: 3px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--wiki-border);
    border-radius: 2px;
    background: var(--wiki-bg);
    color: var(--wiki-text);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: #eaecf0;
    text-decoration: none;
}

.btn-primary {
    background: var(--wiki-blue);
    border-color: var(--wiki-blue-dark);
    color: white;
}

.btn-primary:hover {
    background: var(--wiki-blue-dark);
}

.btn-danger {
    background: #fee;
    border-color: var(--wiki-red);
    color: var(--wiki-red);
}

.btn-danger:hover {
    background: #fdd;
}

.btn-bluesky {
    background: #0085ff;
    border-color: #0066cc;
    color: white !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
}

.btn-bluesky:hover {
    background: #0066cc;
    text-decoration: none;
}

.btn-bluesky:visited {
    color: white;
}

.btn-whatsapp {
    background: #25D366;
    border-color: #128C7E;
    color: white !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
}

.btn-whatsapp:hover {
    background: #128C7E;
    text-decoration: none;
}

.btn-whatsapp:visited {
    color: white;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 3px;
    margin: 15px 0;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Success/Error messages */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 15px;
    border-radius: 3px;
    margin: 15px 0;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 3px;
    margin: 15px 0;
}

/* Bluesky option in forms */
.bluesky-option {
    background: #e8f4ff;
    border: 1px solid #b8daff;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--wiki-border);
    border-top-color: var(--wiki-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-draft {
    background: #ffc107;
    color: #856404;
}

.status-published {
    background: #28a745;
    color: white;
}

/* Footer */
.wiki-footer {
    background: var(--wiki-bg-light);
    border-top: 1px solid var(--wiki-border);
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--wiki-text-light);
}

/* Responsive */
/* Tablette */
@media (max-width: 1024px) {
    .wiki-nav-inner {
        padding-left: 20px;
    }

    .wiki-sidebar {
        width: 180px;
    }

    .wiki-content {
        max-width: calc(100% - 180px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .wiki-container {
        flex-direction: column;
    }

    .wiki-sidebar {
        display: none;
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--wiki-border);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        background: var(--wiki-bg-light);
        overflow-y: auto;
        padding-top: 60px;
    }

    .wiki-sidebar.active {
        display: block;
    }

    .wiki-content {
        max-width: 100%;
        padding: 15px;
    }

    .wiki-header-inner {
        flex-direction: column;
        gap: 10px;
    }

    .wiki-search {
        width: 100%;
    }

    .wiki-search input {
        width: 100%;
    }

    .wiki-nav-inner {
        padding-left: 20px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .menu-toggle {
        display: block;
    }

    .infobox {
        float: none;
        width: 100%;
        margin: 15px 0;
    }

    /* Tables responsive */
    .summary-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    .wiki-nav-inner a {
        font-size: 12px;
    }

    .wiki-header-inner {
        padding: 10px;
    }

    .wiki-logo h1 {
        font-size: 1.2em;
    }

    .article-header h1 {
        font-size: 1.4em;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Print */
@media print {
    .wiki-sidebar,
    .wiki-nav,
    .article-actions,
    .btn {
        display: none;
    }

    .wiki-content {
        max-width: 100%;
    }
}

/* ==============================
   IA-Tips Specific Styles
   ============================== */

/* Type Badges */
.type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    vertical-align: middle;
}

.type-badge.type-article {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.type-badge.type-prompt {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

/* Type Selector for forms */
.type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.type-option {
    flex: 1;
    cursor: pointer;
}

.type-option input[type="radio"] {
    display: none;
}

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border: 2px solid var(--wiki-border);
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
}

.type-option input:checked + .type-card {
    border-color: var(--wiki-blue);
    background: #e8f0fe;
}

.type-option:hover .type-card {
    border-color: var(--wiki-blue-dark);
}

.type-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.type-label {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

.type-desc {
    font-size: 12px;
    color: var(--wiki-text-light);
    text-align: center;
}

/* Prompt Box */
.prompt-box {
    background: #1e1e1e;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
}

.prompt-header h2 {
    color: #e0e0e0;
    font-size: 14px;
    margin: 0;
}

.prompt-content {
    padding: 15px;
    margin: 0;
    color: #d4d4d4;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

.btn-copy {
    padding: 6px 12px;
    background: var(--wiki-blue);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: var(--wiki-blue-dark);
}

/* Analysis Box */
.analysis-box {
    background: var(--wiki-bg-light);
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.analysis-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--wiki-text);
    border-bottom: 1px solid var(--wiki-border);
    padding-bottom: 10px;
}

.analysis-meta {
    margin-bottom: 15px;
}

.analysis-section {
    margin-bottom: 15px;
}

.analysis-section h4 {
    font-size: 13px;
    color: var(--wiki-text-light);
    margin-bottom: 8px;
}

/* Badges for analysis */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 5px;
}

.badge-info {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-level {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-type {
    background: #fff3e0;
    color: #e65100;
}

.badge-complexity {
    background: #fce4ec;
    color: #c2185b;
}

/* Tech Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #e8e8e8;
    color: var(--wiki-text);
    border-radius: 4px;
    font-size: 12px;
}

/* Variable Tags */
.variable-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.variable-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #2d2d2d;
    color: #9cdcfe;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

/* Code Textarea */
.code-textarea {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    background: #1e1e1e;
    color: #d4d4d4;
    border: 1px solid #404040;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 12px;
    color: var(--wiki-text-light);
    font-weight: bold;
}

/* Success Button */
.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* List Item with Type */
.article-list-item h3 .type-badge {
    margin-right: 10px;
}

/* ================================
   Home Page Two-Column Layout
   ================================ */

.home-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.home-column {
    background: #fff;
    border: 1px solid var(--wiki-border);
    border-radius: 4px;
    padding: 20px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wiki-bg);
}

.column-header h2 {
    margin: 0;
    font-size: 1.3em;
    color: var(--wiki-text);
}

.column-header .view-all {
    font-size: 0.9em;
    color: var(--wiki-link);
}

.content-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-list-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--wiki-bg);
}

.content-list-item:last-child {
    border-bottom: none;
}

.content-list-item h3 {
    margin: 0 0 5px 0;
    font-size: 1em;
    font-weight: normal;
}

.content-list-item h3 a {
    color: var(--wiki-link);
}

.content-list-item .summary {
    margin: 5px 0;
    font-size: 0.85em;
    color: var(--wiki-text-light);
    line-height: 1.4;
}

.content-list-item .meta {
    font-size: 0.8em;
    color: var(--wiki-text-light);
}

.content-list-item .category-tag {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 5px;
    background: var(--wiki-bg);
    border-radius: 3px;
    font-size: 0.85em;
}

.content-list-item .prompt-tag {
    background: #e8f5e9;
    color: #2e7d32;
}

.prompt-item {
    border-left: 3px solid #4caf50;
    padding-left: 12px;
    margin-left: -12px;
}

.empty-message {
    color: var(--wiki-text-light);
    font-style: italic;
    padding: 20px 0;
    text-align: center;
}

.category-dropdown {
    margin-bottom: 15px;
}

.category-dropdown select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--wiki-border);
    border-radius: 4px;
    background: #fff;
    font-size: 0.9em;
    color: var(--wiki-text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.category-dropdown select:hover {
    border-color: var(--wiki-blue);
}

.category-dropdown select:focus {
    outline: none;
    border-color: var(--wiki-blue);
    box-shadow: 0 0 0 2px rgba(51, 102, 204, 0.2);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* ================================
   Text Formatting Toolbar
   ================================ */

.formatting-toolbar {
    display: flex;
    gap: 5px;
    padding: 8px;
    background: var(--wiki-bg);
    border: 1px solid var(--wiki-border);
    border-bottom: none;
    border-radius: 2px 2px 0 0;
}

.formatting-toolbar button {
    padding: 6px 10px;
    background: #fff;
    border: 1px solid var(--wiki-border);
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
    min-width: 32px;
    transition: all 0.15s ease;
}

.formatting-toolbar button:hover {
    background: var(--wiki-bg-light);
    border-color: var(--wiki-blue);
}

.formatting-toolbar button:active {
    background: #e8f0fe;
}

.formatting-toolbar button.btn-bold {
    font-weight: bold;
}

.formatting-toolbar button.btn-italic {
    font-style: italic;
}

.formatting-toolbar button.btn-underline {
    text-decoration: underline;
}

.formatting-toolbar .separator {
    width: 1px;
    background: var(--wiki-border);
    margin: 0 5px;
}

.formatting-toolbar .help-icon {
    margin-left: auto;
    color: var(--wiki-text-light);
    font-size: 12px;
    cursor: help;
}

/* Textarea avec toolbar */
.textarea-with-toolbar {
    border-radius: 0 0 2px 2px;
    border-top: none;
}

/* Summary content styling */
.summary-content {
    line-height: 1.6;
}

.summary-content strong,
.summary-content b {
    font-weight: bold;
}

.summary-content em,
.summary-content i {
    font-style: italic;
}

.summary-content u {
    text-decoration: underline;
}

/* Liens dans les résumés */
.summary-content a {
    color: var(--wiki-blue);
    text-decoration: none;
}

.summary-content a:hover {
    text-decoration: underline;
}

/* Images dans les résumés */
.summary-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Listes dans les résumés */
.summary-content ul,
.summary-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.summary-content ul {
    list-style-type: disc;
}

.summary-content ol {
    list-style-type: decimal;
}

.summary-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.summary-content li:last-child {
    margin-bottom: 0;
}

/* Tableaux dans les résumés */
.summary-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    background: #fff;
    border: 1px solid var(--wiki-border);
}

.summary-content thead {
    background: var(--wiki-bg);
}

.summary-content th,
.summary-content td {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid var(--wiki-border);
}

.summary-content th {
    font-weight: 600;
    background: var(--wiki-bg-light);
}

.summary-content tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.summary-content tbody tr:hover {
    background: #f0f6ff;
}

/* Blocs prompt dans les résumés */
.summary-content pre.prompt,
.summary-content pre {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d3d 100%);
    color: #e0e0e0;
    padding: 16px 20px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    margin: 20px 0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-left: 4px solid #6366f1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-content pre.prompt::before {
    content: "PROMPT";
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #6366f1;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #3d3d4d;
}

/* Bouton prompt dans la toolbar */
.formatting-toolbar .btn-prompt {
    font-family: monospace;
    font-weight: bold;
}

/* Responsive for new elements */
@media (max-width: 768px) {
    .home-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .type-selector {
        flex-direction: column;
    }

    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group {
        flex-wrap: wrap;
    }

    .prompt-box {
        margin: 15px -15px;
        border-radius: 0;
    }

    .formatting-toolbar {
        flex-wrap: wrap;
    }
}
