/* Styles de templates/encyclopedie/category.html.twig, sortis du template pour être mis en cache. */
/* ── Layout 2 colonnes ── */
.enc-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    align-items: start;
    gap: 0;
}
.enc-sidebar {
    border-right: 1px solid var(--border-color, #4a5568);
    background-color: var(--bg-secondary, #1a202c);
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 1rem 0;
}
.enc-sidebar-title {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #a0aec0);
    padding: 0 1rem 0.6rem;
}
.enc-nav-item {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.28rem 1rem;
    font-size: 0.81rem;
    color: var(--text-muted, #a0aec0);
    text-decoration: none;
    border-left: 2px solid transparent;
    line-height: 1.4;
}
.enc-nav-item i { font-size: 0.68rem; flex-shrink: 0; opacity: 0.7; position: relative; top: -1px; }
.enc-nav-item:hover { color: var(--text-primary, #e2e8f0); background-color: var(--bg-primary, #2d3748); }
.enc-nav-item.active {
    color: var(--text-primary, #e2e8f0);
    background-color: var(--bg-primary, #2d3748);
    border-left-color: var(--accent-color, #9c8d86);
    font-weight: 600;
}
.enc-nav-dir { font-weight: 500; }
.enc-nav-children { padding-left: 0.75rem; }
.enc-main { min-width: 0; padding: 0 1.5rem; }

/* Mobile */
.enc-sidebar-btn {
    display: none;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-secondary, #1a202c);
    border: 1px solid var(--border-color, #4a5568);
    color: var(--text-muted, #a0aec0);
    border-radius: 4px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    margin-bottom: 1rem;
}
.enc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 999;
}
@media (max-width: 767px) {
    .enc-layout { grid-template-columns: 1fr; }
    .enc-sidebar {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        box-shadow: 4px 0 12px rgba(0,0,0,0.4);
    }
    .enc-sidebar.open { display: block; }
    .enc-sidebar-btn { display: inline-flex; }
    .enc-overlay.open { display: block; }
    .enc-main { padding: 0 1rem; } /* marge de lecture sur téléphone (docs/std/36 RG-LEC-02) */
}

.page-header {
    background-color: var(--bg-secondary, #1a202c);
    border-bottom: 1px solid var(--border-color, #4a5568);
    padding: 2rem 0 1.5rem;
    margin-bottom: 2rem;
}
.page-header h1 {
    color: var(--text-primary, #e2e8f0);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0;
}
.breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}
.breadcrumb-nav a {
    color: var(--text-muted, #a0aec0);
    text-decoration: none;
}
.breadcrumb-nav a:hover { color: var(--text-primary, #e2e8f0); }
.breadcrumb-sep { color: var(--text-muted, #a0aec0); }
.breadcrumb-current { color: var(--text-primary, #e2e8f0); }

/* Description du nœud courant */
.node-description {
    color: var(--text-muted, #a0aec0);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

/* Sous-dossiers */
.section-title {
    color: var(--text-primary, #e2e8f0);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color, #4a5568);
}
/* Articles et sections */
.article-card {
    background-color: var(--bg-primary, #2d3748);
    border: 1px solid var(--border-color, #4a5568);
    border-radius: 6px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.6rem;
    transition: border-color 0.15s;
}
.article-card:hover { border-color: var(--accent-color, #9c8d86); }
.article-card h3 {
    font-size: 0.95rem;
    margin: 0 0 0.3rem;
}
.article-card h3 a {
    color: var(--text-primary, #e2e8f0);
    text-decoration: none;
    font-weight: 600;
}
.article-card h3 a:hover { color: var(--accent-color, #9c8d86); }
.article-description {
    color: var(--text-muted, #a0aec0);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.article-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
    font-size: 0.7rem;
    padding: 1px 8px;
    border-radius: 10px;
    background-color: var(--bg-secondary, #1a202c);
    color: var(--text-muted, #a0aec0);
}
.article-meta { color: var(--text-muted, #a0aec0); font-size: 0.75rem; margin-top: 0.4rem; }
.badge-level { font-size: 0.68rem; padding: 1px 7px; border-radius: 10px; font-weight: 500; }
.badge-debutant    { background-color: #276749; color: #c6f6d5; }
.badge-intermediaire { background-color: #744210; color: #fefcbf; }
.badge-expert      { background-color: #742a2a; color: #fed7d7; }

.filter-bar { margin-bottom: 1rem; }
.filter-bar input {
    width: 100%;
    padding: 0.55rem 1rem;
    background-color: var(--bg-primary, #2d3748);
    border: 1px solid var(--border-color, #4a5568);
    border-radius: 6px;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.9rem;
}
.filter-bar input::placeholder { color: var(--text-muted, #a0aec0); }
.filter-bar input:focus { outline: none; border-color: var(--accent-color, #9c8d86); }
#no-results { display: none; color: var(--text-muted, #a0aec0); padding: 1.5rem 0; text-align: center; }
.article-card.hidden { display: none; }

/* Contenu _index.md */
.node-content {
    border-top: 1px solid var(--border-color, #4a5568);
    padding-top: 1.5rem;
    color: var(--text-primary, #e2e8f0);
    line-height: 1.7;
}
.node-content h2 { color: var(--text-primary, #e2e8f0); font-size: 1.2rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.node-content h3 { color: var(--text-primary, #e2e8f0); font-size: 1rem; font-weight: 600; margin-top: 1rem; margin-bottom: 0.4rem; }
.node-content p { margin-bottom: 0.9rem; }
.node-content strong { color: var(--text-primary, #e2e8f0); }
.node-content a { color: var(--accent-color, #9c8d86); }
.node-content img { max-width: 100%; height: auto; display: block; }
