/* ─── GOOGLE FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,600;1,400&family=Unbounded:wght@700;900&display=swap');
@font-face{font-family:"Material Design Icons"; src:url(../fonts/materialdesignicons-webfont.woff2);}
/* ─── TOKENS ─── */
:root {
    --bg: #f7f9fa;
    --surface: #ffffff;
    --surface2: #f7f9fa;
    --surface3: #eff3f4;
    --border: rgba(0, 0, 0, .08);
    --border2: rgba(0, 0, 0, .14);
    --text: #0f1419;
    --text-dim: #536471;
    --text-dimmer: #8b98a5;
    --accent: #1d9bf0;
    --accent2: #00ba7c;
    --accent3: #f91880;
    --accent4: #ff7a00;
    --accent5: #7c4dff;
    --accent6: #00bcd4;
    --err: #f4212e;
    --keyword: #1d9bf0;
    --string: #00ba7c;
    --number: #ff7a00;
    --comment: #8b9eb7;
    --bool: #ff7a00;
    --sidebar-w: 230px;
    --header-h: 56px;
}

/* ─── RESET ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ─── HEADER ─── */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: clamp(18px, 2.5vw, 24px);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
}

.bird {
    font-size: 26px;
    line-height: 1;
}

/* ─── LAYOUT ─── */
.layout {
    display: flex;
    min-height: calc(100vh - var(--header-h));
}

/* ─── SIDEBAR ─── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 0 40px;
    transition: transform .25s ease, width .25s ease;
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border2);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1;
}

.nav-group {
    margin-bottom: 20px;
}

.nav-group-sep {
    height: 1px;
    background: var(--border);
    margin: 8px 20px 20px;
}

.nav-section-title {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text);
    padding: 0 20px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    font-size: 11.5px;
    color: var(--text-dim);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all .15s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--accent);
    background: rgba(29, 155, 240, .05);
}

.nav-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(29, 155, 240, .06);
}

/* ─── MAIN ─── */
main {
    flex: 1;
    min-width: 0;
    padding: 0 clamp(20px, 4vw, 40px) 100px;
}

/* ─── HERO ─── */
.hero {
    padding: 52px 0 40px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
    background-image: url('../image/pattern-bg.svg');
    background-repeat: repeat;
}

.hero h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -2px;
    margin-bottom: 12px;
    line-height: 1.1;
}

.hero-sub {
    font-size: 13px;
    color: var(--text-dim);
    max-width: 560px;
    line-height: 1.75;
    margin-bottom: 28px;
}

.hero-stats {
    display: flex;
    gap: clamp(16px, 4vw, 32px);
    flex-wrap: wrap;
    margin-top: 8px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(16px, 3vw, 22px);
    font-weight: 900;
    line-height: 1;
}

.stat-value.purple {
    color: var(--accent);
}

.stat-value.green {
    color: var(--accent2);
}

.stat-value.pink {
    color: var(--accent3);
}

.stat-value.orange {
    color: var(--accent4);
}

.stat-label {
    font-size: 10px;
    color: var(--text-dimmer);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ─── CHAPTER DIVIDER ─── */
.chapter-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: clamp(16px, 3vw, 28px) clamp(14px, 3vw, 32px);
    border-radius: 14px;
    margin-bottom: 40px;
    margin-top: 16px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.chapter-divider.about {
    background: rgba(29, 155, 240, .04);
    border-color: rgba(29, 155, 240, .18);
}

.chapter-divider.ref {
    background: rgba(0, 186, 124, .04);
    border-color: rgba(0, 186, 124, .18);
}

.chapter-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -.5px;
    margin-bottom: 10px;
}

.chapter-desc {
    font-size: 11.5px;
    color: var(--text-dim);
}

/* ─── SECTION ─── */
.section {
    margin-bottom: 56px;
    scroll-margin-top: 72px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.section-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.5px;
}

.section-sub {
    font-size: 11.5px;
    color: var(--text-dimmer);
    margin-top: 2px;
}

.cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

.card:hover {
    border-color: var(--border2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.card-header {
    padding: 10px 16px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--text);
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.card-body {
    padding: 14px 16px;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.75;
}

.card-body p {
    margin-bottom: 5px;
}

.card-body p:last-child {
    margin-bottom: 0;
}

.row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}

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

.row:hover {
    background: var(--surface2);
}

.row.comment-row {
    grid-template-columns: 1fr;
}

.row code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    white-space: nowrap;
    color: var(--text);
}

.row .desc {
    font-size: 10.5px;
    color: var(--text-dimmer);
    text-align: right;
    white-space: nowrap;
}

.code-block {
    background: #f0f4f8;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
    font-size: clamp(11px, 1.5vw, 11.5px);
    line-height: 1.85;
    white-space: pre;
    overflow-x: auto;
    margin: 10px 16px 14px;
    display: block;
    color: var(--text);
    -webkit-overflow-scrolling: touch;
}

.kw {
    color: var(--keyword);
}

.str {
    color: var(--string);
}

.cmt {
    color: var(--comment);
    font-style: italic;
}

.cm {
    color: var(--comment);
    font-style: italic;
}

.type {
   color: #ff7a00;
}

.fn {
    color: #7856ff;
}
.num {
    color: #7856ff;
}

.bl {
    color: var(--bool);
}

.op {
    color: var(--accent4);
}

.err {
    color: var(--err);
}

.note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 16px 14px;
    font-size: 11.5px;
    line-height: 1.65;
}

.note.info {
    background: rgba(29, 155, 240, .06);
    border: 1px solid rgba(29, 155, 240, .18);
    color: #0e6fa8;
}

.note.warn {
    background: rgba(255, 122, 0, .06);
    border: 1px solid rgba(255, 122, 0, .18);
    color: #c45e00;
}

.note.danger {
    background: rgba(244, 33, 46, .05);
    border: 1px solid rgba(244, 33, 46, .18);
    color: #b01a25;
}

.note.success {
    background: rgba(0, 186, 124, .06);
    border: 1px solid rgba(0, 186, 124, .18);
    color: #007a53;
}

.op-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.op-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color .15s;
}

.op-item:hover {
    border-color: var(--border2);
}

.op-sym {
    font-weight: 600;
    min-width: 40px;
    font-size: 12px;
    color: var(--accent4);
}

.op-name {
    font-size: 11.5px;
    color: var(--text);
}

.op-hint {
    font-size: 9.5px;
    color: var(--text-dimmer);
}

.op-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.fn-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fn-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .2s;
}

.fn-card:hover {
    border-color: var(--border2);
}

.fn-sig {
    padding: 10px 14px 8px;
    font-size: 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.fn-body {
    padding: 8px 14px 10px;
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.6;
}

.fn-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
}

.fn-tag.math {
    background: rgba(255, 122, 0, .1);
    color: #c45e00;
    border: 1px solid rgba(255, 122, 0, .2);
}

.fn-tag.text {
    background: rgba(0, 186, 124, .08);
    color: #007a53;
    border: 1px solid rgba(0, 186, 124, .2);
}
.fn-tag.draw {
    background: rgba(0, 188, 212, .08);
    color: #00838f;
    border: 1px solid rgba(0, 188, 212, .2);
}
.fn-tag.arr {
    background: rgba(29, 155, 240, .08);
    color: #0e6fa8;
    border: 1px solid rgba(29, 155, 240, .2);
}

.fn-tag.date {
    background: rgba(249, 24, 128, .08);
    color: #b0005e;
    border: 1px solid rgba(249, 24, 128, .2);
}

.fn-tag.file {
    background: rgba(124, 77, 255, .08);
    color: #5e35b1;
    border: 1px solid rgba(124, 77, 255, .2);
}

.fn-tag.util {
    background: var(--surface2);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.fn-tag.enrg {
    background: rgba(244, 33, 46, .08);
    color: #b01a25;
    border: 1px solid rgba(244, 33, 46, .2);
}

.cat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    margin-top: 4px;
    color: var(--text-dim);
}

.cat-label span {
    width: 3px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
}

.ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.ref-table th {
    text-align: left;
    padding: 8px 14px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dimmer);
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

.ref-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.55;
    color: var(--text-dim);
}

.ref-table tr:hover td {
    background: var(--surface2);
}

.ref-table code {
    font-size: 11.5px;
    color: var(--text);
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.philosophy-quote {
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text);
    font-style: italic;
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 14px 16px;
    background: rgba(29, 155, 240, .04);
    border-radius: 0 8px 8px 0;
}

.prose {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.85;
    margin-bottom: 14px;
}

.concept-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 12px;
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.8;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.3px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

h2::before {
    content: '';
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--accent);
    flex-shrink: 0;
}

.feature-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color .2s;
}

.feature-item:hover {
    border-color: rgba(29, 155, 240, .3);
}

.feature-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.feature-desc {
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.55;
}

.feature-list {
    display: flex;
    flex-direction: column;
}

.feature-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
}

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

.fli-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.fli-desc {
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.55;
}

.kw-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 16px;
}

.kw-tag {
    background: rgba(29, 155, 240, .08);
    border: 1px solid rgba(29, 155, 240, .2);
    color: #0e6fa8;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
}

.arch-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.arch-layer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.arch-layer:last-child {
    border-bottom: none;
}

.arch-num {
    font-family: 'Unbounded', sans-serif;
    font-size: 11.5px;
    font-weight: 900;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.arch-layer.l1 .arch-num {
    background: rgba(29, 155, 240, .1);
    color: var(--accent);
}

.arch-layer.l2 .arch-num {
    background: rgba(0, 186, 124, .1);
    color: var(--accent2);
}

.arch-layer.l3 .arch-num {
    background: rgba(255, 122, 0, .1);
    color: var(--accent4);
}

.arch-layer.l4 .arch-num {
    background: rgba(249, 24, 128, .1);
    color: var(--accent3);
}

.arch-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.arch-detail {
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.5;
}

.audience-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.audience-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

.audience-card:last-child {
    border-bottom: none;
}

.audience-card:hover {
    background: var(--surface2);
}

.audience-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.audience-desc {
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.55;
}

.conclusion-banner {
    background: rgba(29, 155, 240, .04);
    border: 1px solid rgba(29, 155, 240, .16);
    border-radius: 14px;
    padding: clamp(20px, 4vw, 32px) clamp(18px, 4vw, 36px);
}

.big-quote {
    font-size: clamp(13px, 1.8vw, 15px);
    line-height: 1.85;
    color: var(--text);
    font-style: italic;
    margin-bottom: 18px;
}

.big-quote span {
    color: var(--accent2);
    font-style: normal;
    font-weight: 600;
}

.conclusion-banner p {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.8;
}

.copy-btn {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--text-dimmer);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    float: right;
    font-family: 'IBM Plex Mono', monospace;
    transition: color .15s, background .15s;
}

.copy-btn:hover {
    color: var(--text);
    background: var(--surface3);
}

.download-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.download-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    flex-wrap: wrap;
}

.dv-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dimmer);
}

.dv-num {
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 900;
    color: var(--accent2);
}

.dv-stable {
    background: rgba(0, 186, 124, .1);
    border: 1px solid rgba(0, 186, 124, .22);
    color: #007a53;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 7px;
}

.download-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px !important;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.3px;
}

.download-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-download-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .15s, transform .15s;
}

.btn-download-main:hover {
    background: #1a8cd8;
    transform: translateY(-1px);
}

.download-hero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dl-feat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding-bottom: 10px;
    color: var(--text-dim);
}

.dl-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dl-dot.green {
    background: var(--accent2);
}

.chapter-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: clamp(16px, 3vw, 28px) clamp(14px, 3vw, 32px);
    border-radius: 14px;
    margin-bottom: 40px;
    margin-top: 16px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.chapter-divider.debutant {
    background: rgba(29, 155, 240, .04);
    border-color: rgba(29, 155, 240, .18);
}

.chapter-divider.intermediaire {
    background: rgba(0, 186, 124, .04);
    border-color: rgba(0, 186, 124, .18);
}

.chapter-divider.avance {
    background: rgba(255, 122, 0, .04);
    border-color: rgba(255, 122, 0, .18);
}

.chapter-divider.expert {
    background: rgba(249, 24, 128, .04);
    border-color: rgba(249, 24, 128, .18);
}

.chapter-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -.5px;
    margin-bottom: 10px;
}

.chapter-desc {
    font-size: 11.5px;
    color: var(--text-dim);
}

.chapter-divider.c1 {
    background: rgba(29, 155, 240, .04);
    border-color: rgba(29, 155, 240, .18);
}

.chapter-divider.c2 {
    background: rgba(0, 186, 124, .04);
    border-color: rgba(0, 186, 124, .18);
}

.chapter-divider.c3 {
    background: rgba(255, 122, 0, .04);
    border-color: rgba(255, 122, 0, .18);
}

.chapter-divider.c4 {
    background: rgba(249, 24, 128, .04);
    border-color: rgba(249, 24, 128, .18);
}

.q-num.green {
    background: var(--accent2);
}

.q-num.orange {
    background: var(--accent4);
}

.note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 11.5px;
    line-height: 1.65;
    margin-top: 10px;
}

.note.warn {
    background: rgba(255, 122, 0, .06);
    border: 1px solid rgba(255, 122, 0, .18);
    color: #c45e00;
}

footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px) 28px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-brand {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 18px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.footer-tagline {
    font-size: 10.5px;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 220px;
    margin-bottom: 14px;
}

.footer-version {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 186, 124, .08);
    border: 1px solid rgba(0, 186, 124, .2);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    color: #007a53;
    letter-spacing: 1px;
}

.footer-col-title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-link {
    font-size: 11.5px;
    color: var(--text-dim);
    text-decoration: none;
    transition: color .15s;
}

.footer-link:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 10.5px;
    color: var(--text);
    flex-wrap: wrap;
    gap: 8px;
}

.contact-intro {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.9;
    margin-bottom: 36px;
}

.contact-intro strong {
    color: var(--text);
    font-weight: 500;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: border-color .18s, transform .18s;
    cursor: default;
    flex-wrap: wrap;
}

.contact-item:hover {
    border-color: var(--border2);
    transform: translateX(3px);
}

.contact-item.highlight {
    border-color: rgba(0, 186, 124, .2);
    background: rgba(0, 186, 124, .03);
}

.contact-item.highlight:hover {
    border-color: rgba(0, 186, 124, .35);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon.teal {
    background: rgba(0, 186, 124, .1);
}

.contact-icon.purple {
    background: rgba(29, 155, 240, .1);
}

.contact-icon.yellow {
    background: rgba(255, 122, 0, .1);
}

.contact-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.contact-value {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.contact-value a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity .15s;
    font-weight: 900;
}

.contact-value a:hover {
    opacity: .75;
}

.contact-note {
    font-size: 10.5px;
    color: var(--text-dim);
    margin-top: 3px;
    line-height: 1.5;
}

.contact-badge {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 5px;
    background: rgba(0, 186, 124, .08);
    color: #007a53;
    border: 1px solid rgba(0, 186, 124, .2);
}

/* ===== Formulaire de contact ===== */
.contact-form {
    margin-top: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 24px 28px;
}

.contact-form-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1 1 200px;
}

.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 7px;
}

.form-req {
    color: var(--accent);
}

.form-input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 11px 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    width: 100%;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: var(--text-dimmer);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input.has-error {
    border-color: #e0245e;
}

.form-input.has-error:focus {
    box-shadow: 0 0 0 3px rgba(224, 36, 94, .12);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-error {
    font-size: 11px;
    color: #e0245e;
    margin-top: 6px;
}

.form-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 12px 26px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .15s, transform .15s;
}

.form-submit:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.form-submit:active {
    transform: translateY(0);
}

.form-note {
    font-size: 10.5px;
    color: var(--text-dim);
    margin-top: 14px;
}

.form-alert {
    border-radius: 9px;
    padding: 13px 16px;
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.form-counter {
    font-size: 10.5px;
    color: var(--text-dimmer);
    margin-top: 6px;
    text-align: right;
}

.form-counter.near-limit {
    color: #e0245e;
    font-weight: 600;
}

.form-alert-success {
    background: rgba(0, 186, 124, .1);
    border: 1px solid rgba(0, 186, 124, .3);
    color: #007a53;
}

.form-alert-error {
    background: rgba(224, 36, 94, .08);
    border: 1px solid rgba(224, 36, 94, .28);
    color: #c01e50;
}

/* Honeypot : invisible pour l'humain, atteignable par les bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 36px 0;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface3);
    border-radius: 3px;
    cursor: pointer;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, .15);
}

@media (max-width: 1024px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        top: var(--header-h);
        left: 0;
        z-index: 90;
        transform: translateX(-100%);
        width: min(var(--sidebar-w), 80vw);
        box-shadow: 4px 0 24px rgba(0, 0, 0, .1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--header-h);
    left: min(var(--sidebar-w), 80vw); /* ← ajout */
    background: rgba(0, 0, 0, .25);
    z-index: 89;
}
    .sidebar-backdrop.open {
        display: block;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    main {
        padding: 0 20px 80px;
    }

    .hero {
        padding: 36px 0 28px;
    }

    .hero h1 {
        letter-spacing: -1px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .chapter-divider {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    header {
        padding: 0 16px;
    }

    .brand {
        font-size: 18px;
    }

    main {
        padding: 0 14px 60px;
    }

    .hero {
        padding: 28px 0 20px;
        margin-bottom: 32px;
    }

    .hero h1 {
        font-size: 24px;
        letter-spacing: -1px;
    }

    .hero-sub {
        font-size: 12px;
    }

    .hero-stats {
        gap: 16px;
    }

    .section-title {
        font-size: 13px;
    }

    .code-block {
        margin: 8px 0 12px;
        font-size: 11.5px;
    }

    .note {
        margin: 8px 0 12px;
    }

    .card-header {
        font-size: 10px;
    }

    .card-body {
        font-size: 11.5px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .row .desc {
        text-align: left;
    }

    .contact-item {
        padding: 14px 16px;
        gap: 12px;
    }

    .contact-badge {
        margin-left: 0;
        margin-top: 6px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .philosophy-quote {
        font-size: 12px;
        margin: 10px 0;
    }

    .chapter-divider {
        padding: 16px;
    }

    .chapter-title {
        font-size: 14px;
    }

    .conclusion-banner {
        padding: 20px 16px;
    }

    .big-quote {
        font-size: 13px;
    }

    .arch-layer {
        gap: 10px;
    }

    .btn-download-main {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .hero h1 {
        font-size: 20px;
    }

    .stat-value {
        font-size: 16px;
    }

}
/* ========== EXPLORATEUR + FAQ (repris de la galerie) ========== */
/* ─── GOOGLE FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,600;1,400&family=Unbounded:wght@700;900&display=swap');
/* Couleurs de coloration syntaxique EduCode (reprises de l'éditeur) */
:root {
    --fn-color: #7856ff;
    --type-color: #ff7a00;
    --op-color: #ff7a00;
    --number: #7856ff;
    --debug-color: #e53935;
}

/* Lien « retour au site » dans le header (remplace l'entrée de la sidebar) */
.header-back {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--border2);
    border-radius: 999px;
    transition: color .15s, border-color .15s, background .15s;
}
.header-back:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(29, 155, 240, .06);
}

main {
    max-width: 1100px;
    margin: 0 auto;
}

.ex-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card.hidden {
    display: none;
}

.ex-hero {
    padding: 44px 0 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
    background-image: url('../image/pattern-bg.svg');
    background-repeat: repeat;
}

.ex-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(29, 155, 240, .08);
    border: 1px solid rgba(29, 155, 240, .2);
    margin-bottom: 16px;
}

.ex-hero h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -1.5px;
    margin-bottom: 12px;
    line-height: 1.1;
}

.ex-hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.ex-hero p {
    font-size: 13px;
    color: var(--text-dim);
    max-width: 640px;
    line-height: 1.75;
}

.ex-toolbar {
    position: sticky;
    top: var(--header-h);
    z-index: 50;
    background: var(--bg);
    padding: 14px 0;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.ex-kbd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--text-dimmer);
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 7px;
    pointer-events: none;
    transition: opacity .15s;
}

.ex-search input:focus~.ex-kbd {
    opacity: 0;
}

.ex-search .clear-btn.show~.ex-kbd,
.ex-search:focus-within .ex-kbd {
    opacity: 0;
}

.ex-empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--text-dim);
}

.ex-empty .mdi {
    font-size: 46px;
    color: var(--text-dimmer);
    display: block;
    margin-bottom: 14px;
}

.ex-empty strong {
    color: var(--text);
}

.ex-empty-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-dimmer);
}

.ex-empty-hint code {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 11px;
}

.cta {
    margin-top: 48px;
    padding: clamp(22px, 4vw, 36px);
    background: rgba(29, 155, 240, .04);
    border: 1px solid rgba(29, 155, 240, .18);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-icon img {
    height: 72px;
    display: block;
}

.cta-content {
    flex: 1;
    min-width: 240px;
}

.cta-content h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
    border: none;
    padding: 0;
    margin: 0 0 6px;
    letter-spacing: -.5px;
}

.cta-content h2::before {
    display: none;
}

.cta-content p {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.7;
    margin: 0;
}

.cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cta a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: 8px;
    text-decoration: none;
    letter-spacing: .3px;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cta a.primary {
    background: var(--accent);
    color: #fff;
}

.cta a.primary:hover {
    background: #1788d6;
}

.cta a.ghost {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border2);
}

.cta a.ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.code-accordion {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin: 12px 16px 16px;
}

.code-accordion-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: var(--surface);
    border: none;
    border-bottom: 1px solid transparent;
    padding: 10px 14px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--text-dim);
    text-align: left;
    transition: background .15s, color .15s;
}

.code-accordion-toggle:hover {
    color: var(--text);
    background: var(--surface3);
}

.code-accordion-toggle .mdi-chevron-right {
    transition: transform .2s ease;
    font-size: 18px;
    margin-left: auto;
}

.code-accordion.open .code-accordion-toggle {
    color: var(--text);
    border-bottom-color: var(--border);
}

.code-accordion.open .code-accordion-toggle .mdi-chevron-right {
    transform: rotate(90deg);
}

.code-accordion .code-block {
    display: none;
    margin: 0;
    border: none;
    border-radius: 0;
}

.code-accordion.open .code-block {
    display: block;
}
/* ============================================================= */
/*  EXPLORER : arborescence + visionneuse de code                */
/* ============================================================= */
.ex-explorer {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 18px;
    align-items: start;
    margin-bottom: 32px;
    /* Hauteur commune arbre / visionneuse */
    --explorer-h: 520px;
}

/* ---------- Arbre ---------- */
.ex-tree {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    height: var(--explorer-h);
    overflow-y: auto;
}

.ex-tree-loading {
    padding: 20px 12px;
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ex-cat + .ex-cat {
    margin-top: 2px;
}
.ex-cat.hidden {
    display: none;
}

.ex-cat-head {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    text-align: left;
    transition: background .15s;
}
.ex-cat-head:hover {
    background: var(--surface3);
}
.ex-cat-caret {
    font-size: 18px;
    color: var(--text-dimmer);
    transition: transform .2s;
}
.ex-cat.collapsed .ex-cat-caret {
    transform: rotate(-90deg);
}
.ex-cat-icon {
    font-size: 17px;
    color: var(--accent);
}
.ex-cat-name {
    flex: 1;
}
.ex-cat-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    background: var(--surface3);
    border-radius: 999px;
    padding: 1px 8px;
    min-width: 20px;
    text-align: center;
}

.ex-file-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
    padding-left: 6px;
}
.ex-cat.collapsed .ex-file-list {
    display: none;
}

.ex-file {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    border-left: 2px solid transparent;
    cursor: pointer;
    padding: 8px 10px 8px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: var(--text-dim);
    text-align: left;
    transition: background .15s, color .15s, border-color .15s;
}
.ex-file:hover {
    background: var(--surface3);
    color: var(--text);
}
.ex-file .mdi {
    font-size: 16px;
    color: var(--text-dimmer);
    flex-shrink: 0;
}
.ex-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ex-file.active {
    background: rgba(29, 155, 240, .10);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}
.ex-file.active .mdi {
    color: var(--accent);
}
.ex-file.hidden {
    display: none;
}

/* ---------- Visionneuse ---------- */
.ex-viewer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: var(--explorer-h);
}

.ex-viewer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}
.ex-viewer-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
}
.ex-viewer-title .mdi {
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
}
.ex-viewer-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ex-viewer-body {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: auto;
}
.ex-viewer-placeholder {
    margin: auto;
    text-align: center;
    color: var(--text-dimmer);
    padding: 40px 24px;
    max-width: 320px;
}
.ex-viewer-placeholder .mdi {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
    opacity: .5;
}
.ex-viewer-placeholder div {
    font-size: 13px;
    line-height: 1.6;
}

.ex-viewer-code {
    margin: 0;
    padding: 18px 20px;
    width: 100%;
    overflow-x: auto;
    background: #f0f4f8;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--text);
    white-space: pre;
    tab-size: 3;
}
.ex-viewer-code code {
    font-family: inherit;
}

/* Bouton copier — état de base (CETTE RÈGLE MANQUAIT) */
.copy-btn,
.viewer-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    color: #fff;
    background: var(--accent, #2563eb);
    border: 1px solid var(--accent, #2563eb);
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease, opacity .15s ease;
    position: relative;
    z-index: 5;
}
.copy-btn:hover:not(:disabled),
.viewer-copy-btn:hover:not(:disabled) {
    filter: brightness(1.08);
}
.copy-btn:active:not(:disabled),
.viewer-copy-btn:active:not(:disabled) {
    transform: translateY(1px);
}
/* Empêche les enfants éventuels d'intercepter le clic */
.copy-btn *,
.viewer-copy-btn * { pointer-events: none; }

/* État « copié » */
.copy-btn.copied,
.viewer-copy-btn.copied {
    background: var(--accent2, #16a34a);
    color: #fff;
    border-color: var(--accent2, #16a34a);
}

/* État désactivé */
.copy-btn:disabled,
.viewer-copy-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.mdi-spin {
    animation: ex-spin 1s linear infinite;
}

/* ---- Card derniers ajouts ---- */
.ex-recent-card {
    margin-top: 1.5rem;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg, #fff);
}
.ex-recent-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .9rem 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border, #e0e0e0);
}
.ex-recent-list { display: flex; flex-direction: column; }
.ex-recent-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 1.1rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border, #f0f0f0);
    text-align: left;
    cursor: pointer;
    width: 100%;
    transition: background .15s;
}
.ex-recent-item:last-child { border-bottom: none; }
.ex-recent-item:hover { background: var(--hover, #f5f5f5); }
.ex-recent-icon { font-size: 1.3rem; opacity: .8; }
.ex-recent-info { display: flex; flex-direction: column; }
.ex-recent-name { font-weight: 500; }
.ex-recent-meta { font-size: .8em; opacity: .7; }
.ex-recent-loading { padding: 1rem 1.1rem; opacity: .7; }

/* ---- Compteur de copies ---- */
.ex-copy-counter {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9em;
    opacity: .8;
    margin-top: .5rem;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .ex-explorer {
        grid-template-columns: 1fr;
        --explorer-h: 380px;
    }
    .ex-tree {
        height: 300px;
    }
}
/* ============================================================= */
/*  Supplément FAQ — recherche + rendu de la réponse            */
/*  (réutilise le thème et l'explorateur de la galerie)          */
/* ============================================================= */

/* Barre de recherche au-dessus de l'explorateur */
.ex-search {
    position: relative;
    margin-bottom: 18px;
}
.ex-search input {
    width: 100%;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 10px;
    padding: 12px 42px 12px 40px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.ex-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(29, 155, 240, .12);
}
.ex-search input::placeholder { color: var(--text-dimmer); }
.ex-search .s-icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-dimmer);
    font-size: 18px;
    pointer-events: none;
}
.ex-search .s-clear {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    display: none;
    background: none; border: none;
    color: var(--text-dimmer);
    font-size: 20px; line-height: 1;
    cursor: pointer; padding: 3px;
}
.ex-search .s-clear.show { display: block; }
.ex-search .s-clear:hover { color: var(--text); }
.ex-search-meta {
    margin-top: 7px;
    font-size: 10.5px;
    color: var(--text-dimmer);
    min-height: 13px;
    letter-spacing: .3px;
}

/* Badge catégorie dans l'en-tête de la visionneuse */
.ex-viewer-cat {
    flex-shrink: 0;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(29, 155, 240, .08);
    border: 1px solid rgba(29, 155, 240, .2);
    border-radius: 999px;
    padding: 4px 11px;
}

/* Corps de réponse (remplace le <pre> code quand on affiche une Q/R) */
.ex-answer {
    width: 100%;
    padding: 22px 24px;
    overflow-y: auto;
}
.faq-question {
    font-family: 'Unbounded', sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.5px;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 14px;
}
.faq-answer {
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.85;
    white-space: pre-wrap;
}
.faq-code-wrap { margin-top: 16px; }
.faq-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
}
.faq-code-head .mdi { margin-right: 6px; color: var(--accent); }
.faq-code {
    margin: 0;
    padding: 16px 18px;
    background: #f0f4f8;
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    overflow-x: auto;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--text);
    white-space: pre;
    tab-size: 3;
}
.faq-code code { font-family: inherit; }
.faq-kws {
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.faq-kws .lab {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dimmer);
    margin-right: 2px;
}
.faq-kw {
    font-size: 10.5px;
    color: var(--text-dim);
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 9px;
}

/* Message « aucun résultat » dans l'arbre */
.ex-tree-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--text-dimmer);
    font-size: 12.5px;
    line-height: 1.6;
}
.ex-tree-empty .mdi { font-size: 32px; display: block; margin-bottom: 8px; opacity: .6; }
