:root {
  color-scheme: light;
  --palette-primary: #6546a8;
  --palette-strong: #4d318d;
  --palette-soft: #eee9fa;
  --palette-background: #f8f7fb;
  --palette-dark: #b99aec;
  --color-primary: var(--palette-primary);
  --color-primary-strong: var(--palette-strong);
  --color-primary-soft: var(--palette-soft);
  --color-background: var(--palette-background);
  --color-on-primary: #fff;
  --color-surface: #ffffff;
  --color-text: #252230;
  --color-muted: #686276;
  --color-border: #ded9e8;
  --color-focus: #b45f06;
  --color-code: #f5f3f8;
  --reading-width: 47rem;
  --content-width: 74rem;
  --radius: 1rem;
  --site-footer-safe-bottom:env(safe-area-inset-bottom, 0px);
  --site-footer-height:calc(2.75rem + .3rem + 1px + var(--site-footer-safe-bottom));
  --shadow: 0 16px 44px rgba(55, 42, 86, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  font-synthesis: none;
}

:root[data-color="bleu"] { --palette-primary:#285b91; --palette-strong:#1c436e; --palette-soft:#e1ecf7; --palette-background:#edf3fa; --palette-dark:#94bff0; }
:root[data-color="vert"] { --palette-primary:#286447; --palette-strong:#194930; --palette-soft:#dfefe5; --palette-background:#edf5f0; --palette-dark:#8fd4ad; }
:root[data-color="rose"] { --palette-primary:#974967; --palette-strong:#76354f; --palette-soft:#f5e1e9; --palette-background:#fbf0f3; --palette-dark:#f0a3c0; }
:root[data-color="orange"] { --palette-primary:#984b20; --palette-strong:#753816; --palette-soft:#f9e4d2; --palette-background:#fff3e9; --palette-dark:#f5b286; }
:root[data-color="sable"] { --palette-primary:#76602e; --palette-strong:#56451e; --palette-soft:#eee6d1; --palette-background:#f6f2e8; --palette-dark:#d9c18c; }
:root[data-color="gris"] { --palette-primary:#4d5c70; --palette-strong:#344155; --palette-soft:#e1e6ec; --palette-background:#f0f2f4; --palette-dark:#b3c2d6; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-primary: var(--palette-dark);
  --color-primary-strong: color-mix(in srgb, var(--palette-dark) 75%, white);
  --color-primary-soft: color-mix(in srgb, var(--palette-dark) 18%, #17141e);
  --color-on-primary: #17141e;
  --color-background: #17141e;
  --color-surface: #211d2a;
  --color-text: #f1edf7;
  --color-muted: #bbb3c8;
  --color-border: #40384d;
  --color-focus: #ffc46b;
  --color-code: #282330;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.23);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-bottom:calc(var(--site-footer-height) + .75rem); }
body { margin: 0; background: var(--color-background); color: var(--color-text); }
a { color: var(--color-primary-strong); text-underline-offset: .18em; }
a:hover { color: var(--color-primary); }
button, input { font: inherit; }
button { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body[data-config-loading] { background: #f3f4f6; color-scheme: light; }
body[data-config-loading] > :not(script) { display: none !important; }

.skip-link { position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .6rem .9rem; border-radius: .55rem; background: var(--color-surface); box-shadow: var(--shadow); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent); background: color-mix(in srgb, var(--color-background) 90%, transparent); backdrop-filter: blur(12px); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; width: min(calc(100% - 2rem), var(--content-width)); min-height: 4.6rem; margin-inline: auto; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--color-text); font-weight: 800; text-decoration: none; }
.brand__logo { display: block; width: 2.35rem; height: 2.35rem; flex-shrink: 0; object-fit: contain; }
.brand__mark { display: grid; width: 2.35rem; height: 2.35rem; flex-shrink: 0; place-items: center; border-radius: .7rem .7rem .7rem .2rem; background: var(--color-primary); color: var(--color-on-primary); font-family: Georgia, serif; font-size: 1.15rem; }
.header-actions { display: flex; align-items: center; gap: .65rem; }
.button, .icon-button { display: inline-flex; min-height: 2.65rem; align-items: center; justify-content: center; border: 0; border-radius: .7rem; cursor: pointer; font-weight: 750; text-decoration: none; }
.button { padding: .6rem .9rem; gap: .45rem; }
.button--primary { background: var(--color-primary); color: var(--color-on-primary); box-shadow: 0 7px 18px rgba(84, 54, 144, .18); }
.button--primary:hover { background: var(--color-primary-strong); color: var(--color-on-primary); }
.icon-button { width: 2.65rem; padding: 0; border: 1px solid var(--color-border); background: var(--color-surface); }

main { width: min(calc(100% - 2rem), var(--content-width)); margin-inline: auto; }
.home-page .site-header__inner { min-height: 4.2rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(16rem, .8fr); align-items: center; padding-block: clamp(2.25rem, 3.3vw, 3rem) clamp(1.5rem, 2.2vw, 2.25rem); gap: clamp(1.75rem, 3vw, 3rem); }
.hero:not(:has(.hero__intro:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.hero__identity { min-width: 0; }
.overline { margin: 0 0 .6rem; color: var(--color-primary); font-size: .77rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, h4 { line-height: 1.16; text-wrap: balance; overflow-wrap: anywhere; }
.hero h1, .article-hero h1, .posts-heading h2, .comments h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: -.035em; }
.hero h1 { max-width: none; margin: 0; font-size: clamp(3rem, 5.8vw, 5.4rem); }
.hero__intro { max-width: 32rem; margin: 0; padding: .8rem 0 .8rem 1.1rem; border-left: 3px solid var(--color-primary); color: var(--color-muted); font-size: .96rem; line-height: 1.65; white-space: pre-line; }

.posts-section { padding-bottom: 6rem; scroll-margin-top: 1rem; }
/* Cible du lien d’évitement : conserver le focus sans encadrer toute la liste. */
.posts-section:focus { outline: none; }
.posts-toolbar { display: grid; grid-template-columns: minmax(18rem, .8fr) minmax(0, 1.2fr); align-items: end; gap: 1.25rem; margin-bottom: 1.35rem; }
.posts-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: .85rem; gap: 1rem; }
.posts-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); }
.search label { display: block; margin-bottom: .35rem; font-size: .85rem; font-weight: 800; }
.search__control { position: relative; }
.search__control > .fa-solid { position: absolute; top: 50%; left: .95rem; color: var(--color-primary); transform: translateY(-50%); pointer-events: none; }
.search input { width: 100%; min-height: 3rem; padding: .65rem .9rem .65rem 2.65rem; border: 1px solid var(--color-border); border-radius: .75rem; background: var(--color-surface); color: var(--color-text); box-shadow: 0 5px 18px rgba(55, 42, 86, .04); }
.search input:disabled { cursor: wait; opacity: .6; }
.search p { margin: .3rem 0 0; color: var(--color-muted); font-size: .76rem; }
.theme-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
.theme-filter { max-width: 100%; min-height: 2.25rem; padding: .35rem .75rem; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); cursor: pointer; font-size: .82rem; font-weight: 750; overflow-wrap: anywhere; text-align: left; }
.theme-filter:hover { border-color: var(--color-primary); background: var(--color-primary-soft); }
.theme-filter[aria-pressed="true"] { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }
.results-summary { min-height: 1.5rem; margin: 0 0 .3rem; color: var(--color-muted); font-size: .85rem; text-align: right; }
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.post-card { position: relative; display: flex; min-height: 22rem; min-width: 0; flex-direction: column; padding: 1.35rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease; }
.post-card:hover { border-color: color-mix(in srgb, var(--color-primary) 48%, var(--color-border)); transform: translateY(-3px); }
.post-card__labels, .article-labels { display: flex; flex-wrap: wrap; gap: .4rem; }
.post-label { display: inline-flex; padding: .18rem .55rem; border-radius: 999px; background: var(--color-primary-soft); color: var(--color-primary-strong); font-size: .73rem; font-weight: 750; text-decoration: none; }
.post-card h3 { margin: 1.2rem 0 .8rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 600; }
.post-card__excerpt { margin: 0; color: var(--color-muted); font-size: .92rem; }
.post-card__footer { margin-top: auto; padding-top: 1.25rem; color: var(--color-muted); font-size: .78rem; font-weight: 650; }
.post-card__footer p { margin: 0; }
.post-card__footer .post-card__update { margin-top: .35rem; font-size: .75rem; font-weight: 450; line-height: 1.45; }
.post-card__link { position: absolute; inset: 0; border-radius: inherit; }
.post-card__link:focus-visible { outline-offset: 4px; }
.empty-results { grid-column: 1 / -1; padding: 3rem 1rem; border: 1px dashed var(--color-border); border-radius: var(--radius); color: var(--color-muted); text-align: center; }
.loading-panel { display: flex; min-height: 13rem; align-items: center; justify-content: center; flex-direction: column; gap: .8rem; padding: 1rem; border: 1px dashed var(--color-border); border-radius: var(--radius); background: color-mix(in srgb, var(--color-surface) 75%, transparent); text-align: center; }
.loading-panel--error { border-color: color-mix(in srgb, #a83e52 45%, var(--color-border)); color: #8e3043; }
:root[data-theme="dark"] .loading-panel--error { color: #ff9caf; }
.loading-illustration { display: block; width: min(100%, 8rem); height: auto; }
[data-loading-text] { font-weight: 650; }
/* One article-level wait; its children retain their final measuring width. */
[data-article][data-math-loading] { visibility:hidden; height:0; overflow:hidden; }

.article-shell { width: min(calc(100% - 2rem), var(--reading-width)); margin: 2.8rem auto 0; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 2.2rem; color: var(--color-muted); font-size: .86rem; font-weight: 750; text-decoration: none; }
.article-hero { margin-bottom: 2.8rem; padding-bottom: 2rem; border-bottom: 1px solid var(--color-border); }
.article-hero h1 { margin: 1rem 0 0; font-size: clamp(2.5rem, 8vw, 4.8rem); }
.article-content { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.04rem, 2vw, 1.14rem); }
.markdown-body > :first-child { margin-top: 0; }.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin: 2.6rem 0 .8rem; color: var(--color-text); font-family: Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.02em; }
.markdown-body h2 { font-size: clamp(1.85rem, 5vw, 2.5rem); }.markdown-body h3 { font-size: 1.55rem; }.markdown-body h4 { font-size: 1.25rem; }.markdown-body h5, .markdown-body h6 { font-size: 1.08rem; }
.markdown-body p, .markdown-body ul, .markdown-body ol { margin-block: 1.1rem; }
.markdown-body li + li { margin-top: .35rem; }
.markdown-body blockquote { margin: 1.7rem 0; padding: .75rem 1.1rem; border-left: 4px solid var(--color-primary); border-radius: 0 .6rem .6rem 0; background: var(--color-primary-soft); color: var(--color-muted); }
.markdown-body blockquote > :first-child { margin-top: 0; }.markdown-body blockquote > :last-child { margin-bottom: 0; }
.markdown-body hr { margin: 2.7rem 0; border: 0; border-top: 1px solid var(--color-border); }
.article-content img { display: block; width: 75%; max-width: 100%; height: auto; margin: 1.8rem auto; border-radius: .7rem; }
.article-content__zoomable-image { cursor: zoom-in; }
.markdown-body .article-figure { display: flex; width: fit-content; max-width: 100%; align-items: center; margin: 1.8rem auto; flex-direction: column; }
.markdown-body .article-figure:not(.article-figure--inline) { width: 100%; }
.markdown-body .article-figure img { margin: 0 auto; }
.markdown-body .article-figure:not(.article-figure--inline) > a { display: block; width: 75%; max-width: 100%; }
.markdown-body .article-figure:not(.article-figure--inline) > a > img { width: 100%; }
.markdown-body .article-figure__caption { width: 100%; margin-top: .55rem; color: color-mix(in srgb, var(--color-text) 72%, var(--color-background)); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .84rem; font-style: italic; line-height: 1.45; text-align: center; }
.markdown-body .article-figure:not(.article-figure--inline) > .article-figure__caption { width: 75%; }
.markdown-body .article-figure--inline { display: inline-flex; margin: .65rem; vertical-align: middle; }
.markdown-body .user-html-flex { max-width: 100%; flex-wrap: wrap; }
.markdown-body .user-html-flex > img { min-width: 0; margin-block: .5rem; }
.markdown-body table { display: block; max-width: 100%; margin: 1.5rem 0; overflow-x: auto; border-collapse: collapse; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .88rem; }
.markdown-body th, .markdown-body td { padding: .65rem .75rem; border: 1px solid var(--color-border); text-align: left; }
.markdown-body th { background: var(--color-primary-soft); }
.markdown-body a { overflow-wrap: anywhere; }
.iframe-responsive { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; margin-block: 1.8rem; overflow: hidden; border-radius: .7rem; background: var(--color-code); }
.iframe-responsive iframe { display: block; width: 100%; height: 100%; border: 0; }
.attachment-link { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .65rem; border-radius: .5rem; background: var(--color-primary-soft); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .88rem; font-weight: 750; }
.attachment-link::before { font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f0c1"; }
.image-lightbox { position: fixed; z-index: 1000; inset: 0; display: grid; padding: 5vw; place-items: center; background: rgba(0, 0, 0, .82); }
.image-lightbox[hidden] { display: none; }
.image-lightbox__image { display: block; max-width: 90vw; max-height: 90vh; width: auto; height: auto; object-fit: contain; }
.image-lightbox__figure { display: contents; }
/* Scale TikZ to the viewport, reserving space for the close control. */
.image-lightbox--tikz { --lightbox-top: max(4.5rem, 5vw); --lightbox-height: calc(100dvh - var(--lightbox-top) - 5vw); padding-top: var(--lightbox-top); }
.image-lightbox--tikz .image-lightbox__figure { display: block; }
.image-lightbox--tikz .image-lightbox__image { width: min(calc(90vw - 2 * var(--tikz-padding)), calc((var(--lightbox-height) - 2 * var(--tikz-padding)) * var(--tikz-ratio))); max-height: calc(var(--lightbox-height) - 2 * var(--tikz-padding)); }
.image-lightbox__close { position: fixed; top: 1rem; right: 1rem; display: grid; width: 2.75rem; height: 2.75rem; padding: 0; place-items: center; border: 1px solid rgba(255, 255, 255, .65); border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; font-size: 1.8rem; line-height: 1; }
.image-lightbox__close:hover { background: rgba(0, 0, 0, .8); }
.image-lightbox__cross { position:relative; display:block; width:1.15rem; height:1.15rem; }
.image-lightbox__cross::before, .image-lightbox__cross::after { content:""; position:absolute; top:50%; left:50%; width:100%; height:2px; border-radius:1px; background:currentColor; transform:translate(-50%,-50%) rotate(45deg); }
.image-lightbox__cross::after { transform:translate(-50%,-50%) rotate(-45deg); }
.image-lightbox-open { position: fixed; overflow: hidden; }

/* TikZ: local construction indicator adapted from QCM-MD (MIT). */
.markdown-body .tikz-scroll { width: 100%; max-width: 100%; min-width: 0; margin: 1.2rem 0; overflow-x: auto; overscroll-behavior-x: contain; }
.markdown-body .tikz-figure, .image-lightbox--tikz .image-lightbox__figure { --tikz-padding: 1rem; padding: var(--tikz-padding); border-radius: .5rem; }
.markdown-body .tikz-figure:has(> .tikz-image), .image-lightbox--tikz .image-lightbox__figure { background: #fff; }
.markdown-body .tikz-figure { width: var(--tikz-width, fit-content); max-width: 100%; min-width: 0; margin: 0 auto; text-align: center; }
.markdown-body .tikz-figure:empty { min-height: clamp(8.5rem, 22vw, 12rem); }
.markdown-body .tikz-figure .tikz-image { display: block; width: auto; max-width: 100%; height: auto; margin: 0; background: transparent; border-radius: 0; filter: none; }
.markdown-body .tikz-figure[style*="--tikz-width"] { max-width: none; }
.markdown-body .tikz-figure[style*="--tikz-width"] .tikz-image { width: 100%; }
.markdown-body .tikz-figure[data-tikz-align="left"] { margin-left: 0; margin-right: auto; }
.markdown-body .tikz-figure[data-tikz-align="right"] { margin-left: auto; margin-right: 0; }
.tikz-image:focus-visible { outline-offset: -3px; }
.tikz-loading { display: grid; place-items: center; width: 100%; max-width: 100%; min-height: clamp(8.5rem, 22vw, 12rem); margin: 0 auto; text-align: center; }
.tikz-construction { display: block; width: clamp(11rem, 38vw, 16rem); max-width: 100%; height: auto; margin: 0 auto; overflow: visible; }
.tikz-guide { fill: none; stroke: var(--color-primary); stroke-width: 2; stroke-dasharray: 4 6; opacity: .25; }
.tikz-line, .tikz-arc { fill: none; stroke: var(--color-primary-strong); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.tikz-line { stroke-dasharray: 420; animation: tikz-draw-line 1.6s ease-in-out infinite; }
.tikz-arc { stroke-dasharray: 190; animation: tikz-draw-arc 1.6s ease-in-out infinite; }
.tikz-label { fill: var(--color-primary-strong); font: 700 15px Inter, ui-sans-serif, system-ui, sans-serif; text-anchor: middle; animation: tikz-pulse 1.6s ease-in-out infinite; }
.tikz-status-text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.markdown-body .tikz-error { margin: .5rem 0; color: var(--color-muted); font: .9rem/1.5 Inter, ui-sans-serif, system-ui, sans-serif; text-align: center; overflow-wrap: anywhere; }
@keyframes tikz-draw-line { 0%, 12% { stroke-dashoffset: 420; opacity: 1; } 55%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes tikz-draw-arc { 0%, 54% { stroke-dashoffset: 190; opacity: 0; } 55% { stroke-dashoffset: 190; opacity: 1; } 78%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes tikz-pulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@media (max-width: 600px) {
  .markdown-body .tikz-figure { width: var(--tikz-mobile-width, var(--tikz-width, fit-content)); }
  .markdown-body .tikz-figure[style*="--tikz-mobile-width"] { max-width: none; }
  .markdown-body .tikz-figure[style*="--tikz-mobile-width"] .tikz-image { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tikz-line, .tikz-arc, .tikz-label { animation: none; stroke-dashoffset: 0; opacity: 1; }
}
:not(pre) > code { padding: .12rem .32rem; border: 1px solid var(--color-border); border-radius: .35rem; background: var(--color-code); font-family: "SFMono-Regular", Consolas, monospace; font-size: .86em; }
.markdown-body pre { position: relative; max-width: 100%; margin: 1.7rem 0; overflow-x: auto; border: 1px solid var(--color-border); border-radius: .75rem; background: var(--color-code); font-family: "SFMono-Regular", Consolas, monospace; font-size: .83rem; line-height: 1.55; }
.markdown-body pre code, .markdown-body pre code.hljs { display: block; min-width: max-content; padding: 2.7rem 1rem 1rem; background: transparent; }
/* Keep syntax hues while meeting text contrast on the site's code background. */
.markdown-body pre { --syntax-comment:#626270; --syntax-red:#b52f2a; --syntax-green:#2e7033; --syntax-blue:#295dbb; --syntax-gold:#765000; --syntax-cyan:#066788; }
:root[data-theme="dark"] .markdown-body pre { --syntax-comment:#a9a1b5; --syntax-red:#e06c75; --syntax-green:#98c379; --syntax-blue:#61aeee; --syntax-gold:#d19a66; --syntax-cyan:#56b6c2; }
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) .markdown-body pre { --syntax-comment:#a9a1b5; --syntax-red:#e06c75; --syntax-green:#98c379; --syntax-blue:#61aeee; --syntax-gold:#d19a66; --syntax-cyan:#56b6c2; } }
.markdown-body pre .hljs-comment, .markdown-body pre .hljs-quote { color:var(--syntax-comment); }
.markdown-body pre .hljs-deletion, .markdown-body pre .hljs-name, .markdown-body pre .hljs-section, .markdown-body pre .hljs-selector-tag, .markdown-body pre .hljs-subst { color:var(--syntax-red); }
.markdown-body pre .hljs-addition, .markdown-body pre .hljs-attribute, .markdown-body pre .hljs-meta .hljs-string, .markdown-body pre .hljs-regexp, .markdown-body pre .hljs-string { color:var(--syntax-green); }
.markdown-body pre .hljs-bullet, .markdown-body pre .hljs-link, .markdown-body pre .hljs-meta, .markdown-body pre .hljs-selector-id, .markdown-body pre .hljs-symbol, .markdown-body pre .hljs-title { color:var(--syntax-blue); }
.markdown-body pre .hljs-attr, .markdown-body pre .hljs-number, .markdown-body pre .hljs-selector-attr, .markdown-body pre .hljs-selector-class, .markdown-body pre .hljs-selector-pseudo, .markdown-body pre .hljs-template-variable, .markdown-body pre .hljs-type, .markdown-body pre .hljs-variable, .markdown-body pre .hljs-built_in, .markdown-body pre .hljs-class .hljs-title, .markdown-body pre .hljs-title.class_ { color:var(--syntax-gold); }
.markdown-body pre .hljs-literal { color:var(--syntax-cyan); }
.code-language { position: absolute; z-index: 2; top: .65rem; left: .8rem; color: var(--color-muted); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .68rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.copy-code { position: absolute; z-index: 3; top: .45rem; right: .55rem; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .55rem; border: 1px solid var(--color-border); border-radius: .45rem; background: var(--color-surface); color: var(--color-muted); cursor: pointer; font-size: .72rem; font-weight: 750; }
.copy-code:hover { color: var(--color-primary-strong); }
.math-inline { display: inline-block; max-width: 100%; overflow-x: auto; overflow-y: hidden; vertical-align: middle; white-space: nowrap; }.math-block { max-width: 100%; margin: 1.5rem 0; overflow-x: auto; overflow-y: hidden; text-align: center; }
.math-inline mjx-container[jax="SVG"], .math-block mjx-container[jax="SVG"] { min-width: max-content; }
.math-inline[data-math-state="pending"], .math-block[data-math-state="pending"] { visibility:hidden; }
.math-inline[data-math-state="error"], .math-block[data-math-state="error"] { font-family:monospace; white-space:pre-wrap; }
mjx-container[jax="SVG"] { max-width: 100%; color: var(--color-text); }
mjx-container[jax="SVG"] > svg { max-width: none; height: auto; }
.markdown-body .footnote-ref { margin-left: .08em; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .72em; line-height: 0; vertical-align: super; }
.markdown-body .footnote-ref a { padding: .12rem .16rem; border-radius: .25rem; font-weight: 800; text-decoration: none; }
.markdown-body .footnotes-sep { margin: 2.8rem 0 1rem; border-top-color: var(--color-border); }
.markdown-body .footnotes { color: var(--color-muted); font-size: .9em; overflow-wrap: anywhere; }
.markdown-body .footnotes-list { margin: 0; padding-left: 1.45rem; }
.markdown-body .footnote-item { padding-left: .2rem; }
.markdown-body .footnote-item p { margin: .65rem 0; }
.markdown-body .footnote-backref { display: inline-flex; min-width: 1.9rem; min-height: 1.9rem; align-items: center; justify-content: center; margin-left: .12rem; border-radius: .35rem; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 800; text-decoration: none; }
.markdown-body .footnote-ref a:hover, .markdown-body .footnote-backref:hover { background: var(--color-primary-soft); }
.markdown-fallback { padding: 1rem; border: 1px solid var(--color-border); border-radius: .7rem; overflow-x: auto; white-space: pre-wrap; }
.empty-content { color: var(--color-muted); font-style: italic; }

.article-attachments { margin-top: 3.2rem; padding: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: color-mix(in srgb, var(--color-surface) 86%, var(--color-primary-soft)); }
.article-attachments .overline { margin-bottom: .2rem; }
.article-attachments h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 600; letter-spacing: -.02em; }
.article-attachments__list { display: grid; margin: 1rem 0 0; padding: 0; gap: .6rem; list-style: none; }
.article-attachments__link { display: flex; min-width: 0; align-items: center; gap: .6rem; padding: .7rem .8rem; border-radius: .6rem; background: var(--color-surface); font-size: .88rem; font-weight: 750; text-decoration: none; overflow-wrap: anywhere; }
.article-attachments__link:hover { background: var(--color-primary-soft); }
.article-attachments__link .fa-solid { flex: 0 0 auto; color: var(--color-primary); }

.comments { margin-top: 4.5rem; padding-top: 2.7rem; border-top: 1px solid var(--color-border); }
.comments__header { display: flex; align-items: start; justify-content: space-between; gap: 1.5rem; }
.comments__header h2 { margin: 0; font-size: clamp(2rem, 5vw, 2.7rem); }
.comments__header p:not(.overline) { max-width: 31rem; margin: .45rem 0 0; color: var(--color-muted); font-size: .85rem; }
.comments__status { margin-top: 1.5rem; color: var(--color-muted); }
.comments__list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.comment-thread { display: grid; gap: .75rem; min-width: 0; }
.comment-thread__replies { display: grid; gap: .75rem; margin-left: 2.8rem; padding-left: 1rem; border-left: 2px solid var(--color-border); }
.comment { min-width: 0; padding: 1.1rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); box-shadow: 0 8px 24px rgba(55, 42, 86, .05); }
.comment--reply { box-shadow: none; }
.comment__header { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.comment__avatar-wrap { position: relative; display: grid; flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem; overflow: hidden; place-items: center; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); }
.comment__avatar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }.comment__avatar-fallback { font-size: 1.1rem; }
.comment__identity { display: grid; min-width: 0; line-height: 1.35; }.comment__author { overflow-wrap: anywhere; color: var(--color-text); font-weight: 750; text-decoration: none; }.comment__date { color: var(--color-muted); font-size: .77rem; }
.comment__body { margin: 1rem 0 0 3.5rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment__footer { margin: .8rem 0 0 3.5rem; }.comment__reaction { display: inline-flex; align-items: center; gap: .4rem; color: var(--color-muted); font-size: .8rem; font-weight: 750; }
.reading-progress { position: fixed; z-index: 80; top: 0; right: 0; left: 0; height: 3px; }.reading-progress span { display: block; width: 0; height: 100%; background: var(--color-primary); }

.site-footer { position: relative; display: flex; align-items: center; justify-content: space-between; width: min(calc(100% - 2rem), var(--content-width)); margin: 5rem auto 0; padding: .7rem 0 calc(.7rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--color-border); gap: 1rem; color: var(--color-muted); font-size: .84rem; }
.content-credits { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.content-credits:not(:has(> :not([hidden]))) { display: none; }
.footer-control { display: inline-flex; min-width: 2.75rem; min-height: 2.75rem; align-items: center; justify-content: center; gap: .25rem; padding: .4rem; border: 0; border-radius: .5rem; background: transparent; color: var(--color-muted); cursor: pointer; font-size: .9rem; text-decoration: none; }
.footer-control:hover, .footer-control[aria-expanded="true"], .engine-info[open] > summary { background: var(--color-primary-soft); color: var(--color-primary-strong); }
.engine-info > summary { list-style: none; }
.engine-info > summary::-webkit-details-marker { display: none; }
.engine-info > summary:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.footer-panel { position: absolute; z-index: 50; bottom: calc(100% + .5rem); left: 0; width: min(23rem, 100%); max-height: calc(100vh - 6rem); max-height: calc(100dvh - 6rem); overflow-y: auto; padding: 1rem; border: 1px solid var(--color-border); border-radius: .75rem; background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow); overflow-wrap: anywhere; }
.content-info-panel { right: 0; left: auto; }
.footer-panel p { margin: 0; }
.footer-panel p + p, .content-info-panel section + section { margin-top: .65rem; }
.footer-panel h2 { margin: 0 0 .25rem; font-size: inherit; }
.footer-panel a:not([href]) { color: inherit; text-decoration: none; }
.license-icons { display: flex; gap: .3rem; margin-top: .4rem; font-size: 1.1rem; }
.footer-panel-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--color-border); }
.footer-panel-actions a { display: inline-flex; min-height: 2.75rem; align-items: center; gap: .4rem; padding: .4rem .65rem; border: 1px solid var(--color-border); border-radius: .5rem; background: var(--color-background); text-decoration: none; }
.footer-panel-actions a:hover { border-color: var(--color-primary); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --color-primary:var(--palette-dark); --color-primary-strong:color-mix(in srgb, var(--palette-dark) 75%, white); --color-primary-soft:color-mix(in srgb, var(--palette-dark) 18%, #17141e); --color-on-primary:#17141e; --color-background:#17141e; --color-surface:#211d2a; --color-text:#f1edf7; --color-muted:#bbb3c8; --color-border:#40384d; --color-focus:#ffc46b; --color-code:#282330; --shadow:0 18px 48px rgba(0,0,0,.23); }
}
@media (max-width: 880px) { .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .article-content img, .markdown-body .article-figure:not(.article-figure--inline) > a, .markdown-body .article-figure:not(.article-figure--inline) > .article-figure__caption { width: 100%; }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1fr); align-items: start; padding-block: 2.25rem 1.75rem; gap: 1.15rem; }
  .hero__intro { max-width: 38rem; padding-block: .55rem; }
  .posts-toolbar { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 1rem; }
  .search { max-width: 32rem; }
}
@media (max-width: 620px) {
  .site-header__inner, main, .site-footer, .article-shell { width: min(calc(100% - 1.25rem), var(--content-width)); }
  .site-header__inner { align-items: stretch; padding-block: .7rem; flex-direction: column; }.brand { justify-content: center; }.header-actions { justify-content: center; }.header-actions .button { flex: 1; }
  .hero { padding-block: 2rem 1.5rem; gap: 1rem; }.hero h1 { font-size: clamp(2.75rem, 13vw, 3.8rem); }.hero__intro { padding-left: .85rem; font-size: .92rem; }
  .posts-toolbar { margin-bottom: 1.15rem; }.posts-heading { align-items: start; margin-bottom: .7rem; flex-direction: column; gap: .2rem; }.results-summary { margin: 0; text-align: left; }
  .posts-grid { grid-template-columns: 1fr; }.post-card { min-height: 18rem; }
  .article-shell { margin-top: 2rem; }.article-hero { margin-bottom: 2rem; }.article-content { font-size: 1rem; }
  .comments__header { display: grid; }.comments__header .button { justify-self: start; }.comment-thread__replies { margin-left: .5rem; padding-left: .65rem; }.comment__body, .comment__footer { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.post-card { transition: none; } }
@media print { .site-header,.site-footer,.back-link,.comments,.reading-progress,.copy-code,.footnote-backref { display:none !important; }.article-shell { width:100%; margin:0; }.article-content pre { white-space:pre-wrap; } }

/* Navigation de TickéSite : accès principaux en tête, contexte de lecture ciblé. */
.site-main, .site-main [id] { scroll-margin-top:calc(var(--header-height,5rem) + 1rem); }
.site-page .site-header { position:sticky; top:0; z-index:40; background:color-mix(in srgb,var(--color-surface) 96%,transparent); box-shadow:0 3px 24px #00000005; }
.site-page .site-header__inner { width:min(calc(100% - 3rem),86rem); min-height:5rem; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto; gap:clamp(.8rem,2vw,2rem); }
.site-page .brand { justify-content:flex-start; max-width:none; min-width:0; width:100%; gap:.7rem; }
.site-page .brand > [data-blog-title] { min-width:0; flex:1; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; overflow-wrap:anywhere; white-space:normal; line-height:1.3; font-size:1.05rem; }
.site-page .brand__logo { width:2.55rem; height:2.55rem; flex-shrink:0; object-fit:contain; }
.site-page .header-actions { margin:0; flex-shrink:0; gap:.4rem; }
.site-header button { -webkit-tap-highlight-color:transparent; }
.site-page .icon-button { min-width:2.75rem; min-height:2.75rem; background:transparent; border-color:transparent; color:var(--color-text); }
.site-page .icon-button:hover, .site-page .icon-button[aria-expanded="true"] { background:var(--color-primary-soft); }
.site-navigation { min-width:0; justify-self:stretch; }
.site-navigation ul, .context-sidebar ul { margin:0; padding:0; list-style:none; }
.site-navigation .nav-top { display:flex; align-items:center; justify-content:flex-end; column-gap:.25rem; width:100%; }
.nav-top > li { position:relative; flex:0 0 auto; min-width:0; }
.nav-row { display:flex; align-items:center; min-width:0; }
.nav-row a { display:block; min-width:0; flex:1; padding:.65rem .75rem; color:var(--color-text); text-decoration:none; line-height:1.4; border-radius:.55rem; font-size:.88rem; overflow-wrap:anywhere; }
.nav-top > li > .nav-row > a { white-space:nowrap; font-weight:700; }
.nav-row a:hover { background:var(--color-primary-soft); color:var(--color-primary-strong); }
.nav-row a[aria-current="page"], .nav-top > .is-active-branch > .nav-row > a { color:var(--color-primary-strong); background:var(--color-primary-soft); }
.submenu-toggle { display:grid; place-items:center; padding:0; width:2.3rem; min-height:2.75rem; flex-shrink:0; border:0; border-radius:.5rem; background:transparent; color:var(--color-primary-strong); cursor:pointer; }
.submenu-toggle:hover, .submenu-toggle[aria-expanded="true"] { background:var(--color-primary-soft); }
.mobile-submenu-toggle { display:none; width:42px; min-width:42px; min-height:42px; font-size:1rem; }
.nav-compact .mobile-submenu-toggle { display:grid; }
.nav-dropdown { position:absolute; z-index:45; left:0; top:100%; width:21rem; max-width:calc(100vw - 2rem); padding:.6rem !important; border:1px solid var(--color-border); border-radius:.9rem; background:var(--color-surface); box-shadow:var(--shadow); max-height:min(65vh,calc(100dvh - var(--header-height,5rem) - 2rem)); overflow-y:auto; overscroll-behavior:contain; }
.nav-dropdown .nav-children, .context-sidebar .nav-children { margin:.2rem 0 .45rem .8rem; padding-left:.55rem; border-left:1px solid var(--color-border); }
.nav-dropdown .nav-row a { padding:.65rem .7rem; white-space:normal; }
.nav-overflow__toggle { display:flex; gap:.5rem; width:auto; padding:.6rem .7rem; white-space:nowrap; font-size:.85rem; font-weight:700; }
.nav-overflow.is-active-branch > .nav-overflow__toggle { color:var(--color-primary-strong); background:var(--color-primary-soft); }
.nav-overflow__list > li { margin-bottom:.15rem; }
.nav-overflow__list .nav-dropdown { position:static; width:auto; max-width:none; max-height:none; border:0; border-radius:0; box-shadow:none; background:transparent; padding:0 0 0 .6rem !important; margin-left:.7rem; border-left:1px solid var(--color-border); }
.header-search { width:min(calc(100% - 3rem),40rem); margin:0 auto; padding:.3rem 0 1.3rem; }
.header-search .search { max-width:none; }
.header-search .search label { font-size:.8rem; }
.site-layout { padding-top:clamp(1.5rem,3vw,2.5rem); display:grid; grid-template-columns:minmax(0,1fr); align-items:start; width:min(calc(100% - 3rem),var(--content-width)); margin:0 auto; gap:2.5rem; }
.site-page { padding-bottom:var(--site-footer-height); }
.site-main { width:100%; max-width:56rem; min-width:0; margin:0 auto; padding:0 0 2rem; }
.site-main:focus { outline:none; }
.site-layout--with-context { grid-template-columns:minmax(0,52rem) minmax(12rem,15rem); justify-content:center; }
.site-layout--with-context .site-main { grid-column:1; grid-row:1; }
.context-sidebar { grid-column:2; grid-row:1; position:sticky; top:calc(var(--header-height,5rem) + 2rem); min-width:0; }
.context-panel { padding:1.25rem; background:color-mix(in srgb,var(--color-surface) 75%,transparent); border:1px solid var(--color-border); border-radius:.9rem; }
.context-panel > header { margin-bottom:.7rem; }
.context-panel > header > span { display:block; color:var(--color-muted); font-size:.7rem; letter-spacing:.1em; text-transform:uppercase; }
.context-panel > header > strong { display:block; margin:.3rem 0 .7rem; line-height:1.4; font-size:.95rem; overflow-wrap:anywhere; }
.context-sidebar nav { max-height:calc(100dvh - var(--header-height,5rem) - 12rem); overflow-y:auto; }
.context-sidebar .nav-row a { font-size:.82rem; padding:.55rem .5rem; }
.context-sidebar nav > .nav-children { margin:0; padding:0; border:0; }
.breadcrumbs { margin-bottom:1.8rem; color:var(--color-muted); font-size:.8rem; }
.breadcrumbs ol { display:flex; flex-wrap:wrap; gap:.35rem .5rem; list-style:none; margin:0; padding:0; }
.breadcrumbs li { display:flex; align-items:baseline; gap:.5rem; min-width:0; overflow-wrap:anywhere; }
.breadcrumbs li + li::before { content:"/"; color:var(--color-muted); }
.breadcrumbs a { color:var(--color-muted); }
.breadcrumbs [aria-current="page"] { color:var(--color-text); }
.site-main .article-hero { margin-bottom:1.8rem; padding-bottom:0; border:0; }
.site-main .article-hero h1 { margin-top:0; font-size:clamp(2.1rem,3.7vw,3.4rem); }
.site-main .article-content { line-height:1.85; }
.site-main .comments { margin-top:3rem; }
.section-title, .welcome-panel > h1 { font-family:Georgia,'Times New Roman',serif; font-weight:600; font-size:clamp(2.1rem,3.7vw,3.4rem); letter-spacing:-.035em; margin:0 0 1.5rem; }
.site-collection { margin-top:2.4rem; }
.site-collection > h2 { font-size:1.3rem; margin:0 0 1rem; }
.resource-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; padding:0; margin:0; list-style:none; }
.resource-card { min-width:0; padding:1.3rem; border:1px solid var(--color-border); border-radius:.85rem; background:var(--color-surface); }
.resource-card h3 { margin:0; font-size:1.15rem; line-height:1.4; }
.resource-card h3 a { text-decoration:none; }
.resource-card h3 a:hover { text-decoration:underline; }
.resource-card p { margin:.6rem 0 0; font-size:.88rem; color:var(--color-muted); overflow-wrap:anywhere; }
.search-results { border-bottom:1px solid var(--color-border); padding-bottom:1.5rem; margin-bottom:2rem; }
.search-results .results-summary { text-align:left; margin-bottom:.75rem; }
.welcome-panel { padding:clamp(1.5rem,4vw,2.5rem); border:1px solid var(--color-border); background:var(--color-surface); border-radius:var(--radius); }
.welcome-panel > .overline { font-size:.68rem; line-height:1.8; }
.welcome-panel > h1 { margin-top:.8rem; }
.welcome-panel p { white-space:pre-line; }
.onboarding-steps { padding-left:1.5rem; margin-top:2rem; }
.onboarding-steps li { padding-left:.5rem; margin:1.4rem 0; }
.onboarding-steps li::marker { color:var(--color-primary); font-weight:800; }
.onboarding-steps h2 { font-size:1.1rem; margin:0; }
.onboarding-steps p { margin:.5rem 0; color:var(--color-muted); font-size:.9rem; }
.welcome-actions { display:flex; flex-wrap:wrap; gap:.7rem; margin-top:1.5rem; }
.button--secondary { border:1px solid var(--color-border); background:var(--color-primary-soft); }
.structure-notice { padding:1rem; border-left:3px solid var(--color-primary); color:var(--color-muted); font-size:.85rem; }
.site-page .site-footer { position:fixed; z-index:60; bottom:0; left:0; right:0; width:100%; margin:0; padding:.15rem max(1.5rem,calc((100% - var(--content-width))/2)) calc(.15rem + var(--site-footer-safe-bottom)); border-top-color:transparent; background:var(--color-background); }
.site-page .site-footer::before { content:""; position:absolute; top:-1px; left:max(1.5rem,calc((100% - var(--content-width))/2)); right:max(1.5rem,calc((100% - var(--content-width))/2)); border-top:1px solid var(--color-border); }
.site-page .footer-control:focus-visible { outline-offset:-3px; }
.site-page .footer-panel { width:min(23rem,calc(100vw - 2rem)); left:max(1.5rem,calc((100% - var(--content-width))/2)); }
.site-page .content-info-panel { left:auto; right:max(1.5rem,calc((100% - var(--content-width))/2)); }
.site-page .loading-panel h1 { font-size:1.6rem; margin:.5rem; }
.site-page .loading-panel p { margin:.5rem; }
/* Gecko Android can include the dynamic address bar in the bottom inset (Mozilla
   2057232). With our default viewport-fit=auto, the normal browser already keeps
   content inside the device's safe viewport. Use only a static hardware inset
   here; retain the dynamic inset for standalone/fullscreen and other engines. */
@supports (-moz-appearance:none) {
  @media (hover:none) and (display-mode:browser) {
    :root { --site-footer-safe-bottom:env(safe-area-max-inset-bottom, 0px); }
  }
}
@media (max-width:1050px) {
  .context-sidebar { display:none; }
}
@media (max-width:760px), (hover:none) and (pointer:coarse) {
  .site-page .site-header__inner { width:calc(100% - 2rem); min-height:0; grid-template-columns:minmax(0,1fr) 86px; gap:.5rem .75rem; padding:.4rem 0; }
  .site-page .brand > [data-blog-title] { font-size:.95rem; }
  .site-page .brand__logo { width:2.1rem; height:2.1rem; }
  .site-page .header-actions { grid-column:2; grid-row:1; display:grid; grid-template-columns:repeat(2,42px); grid-template-rows:repeat(2,42px); gap:2px; justify-self:end; }
  .site-page .header-actions .icon-button { width:42px; height:42px; min-width:0; min-height:0; padding:0; font-size:19px; }
  .site-page .theme-toggle { grid-column:1; grid-row:1; }
  .site-page .create-page-link { grid-column:2; grid-row:1; }
  .site-page .search-toggle { grid-column:1; grid-row:2; }
  .site-page .menu-toggle { grid-column:2; grid-row:2; }
  .site-navigation { grid-column:1 / -1; width:100%; padding:.65rem 0; max-height:calc(100dvh - 86px - 1.3rem - var(--site-footer-height)); overflow-y:auto; overscroll-behavior:contain; }
  .site-navigation .nav-top { display:block; }
  .nav-top > li { margin-bottom:.25rem; }
  .nav-top > li > .nav-row > a { white-space:normal; }
  .nav-row a { padding:.75rem; }
  .context-sidebar { display:none; }
  .site-layout--with-context .site-main { grid-row:1; }
  .site-layout--with-context { gap:1.5rem; }
  .site-layout--with-context { grid-template-columns:minmax(0,1fr); }
  /* Les sous-menus partagent le défilement du menu mobile, sans le capturer. */
  .nav-dropdown { position:static; width:auto; max-width:none; max-height:none; overflow:visible; overscroll-behavior:auto; padding:0 .4rem .4rem .6rem !important; margin:.2rem 0 .65rem .7rem !important; background:transparent; border:0; border-left:1px solid var(--color-border); border-radius:0; box-shadow:none; }
  .header-search, .site-layout { width:calc(100% - 2rem); }
  .site-main .article-hero h1 { font-size:clamp(1.9rem,7vw,2.65rem); }
  .resource-grid { grid-template-columns:1fr; }
  .site-page .site-footer { width:100%; padding-inline:1rem; }
  .site-page .site-footer::before { left:1rem; right:1rem; }
  .site-page .footer-panel { left:1rem; }
  .site-page .content-info-panel { left:auto; right:1rem; }
}

/* Sur ordinateur, le lien du parent suffit ; les descendants restent lisibles. */
body:not(.nav-compact) .nav-top > li > .nav-dropdown { display:none; }
body:not(.nav-compact) .nav-top > li:not(.is-dismissed):focus-within > .nav-dropdown,
body:not(.nav-compact) .nav-top > li.is-open > .nav-dropdown { display:block; }
@media (hover:hover) {
  body:not(.nav-compact) .nav-top > li:not(.is-dismissed):hover > .nav-dropdown { display:block; }
}


@media print { .context-sidebar,.header-search { display:none !important; }.site-layout,.site-layout--with-context { display:block; }.site-main { max-width:100%; }.site-page { padding-bottom:0; } }

/* Questionnaires Markdown : contrôles natifs, couleurs de la palette active. */
.qcm { --qcm-correct-bg:#edf7f0; --qcm-correct-border:#94b7a0; --qcm-correct-icon:#267044; --qcm-incorrect-bg:#fcf0ef; --qcm-incorrect-border:#d5aaa5; --qcm-incorrect-icon:#a14540; }
:root[data-theme="dark"] .qcm { --qcm-correct-bg:#243b30; --qcm-correct-border:#567763; --qcm-correct-icon:#9dd7b1; --qcm-incorrect-bg:#422d31; --qcm-incorrect-border:#94666b; --qcm-incorrect-icon:#edaaa6; }
.qcm { min-width:0; margin:2rem 0; padding:clamp(1rem,3vw,1.4rem); border:1px solid var(--color-border); border-radius:var(--radius); background:var(--color-surface); }
.qcm, .qcm-preparation { font-family:Inter,ui-sans-serif,system-ui,sans-serif; font-size:.95rem; line-height:1.6; }
.qcm-preparation { position:fixed; top:0; left:0; visibility:hidden; pointer-events:none; }
.qcm .qcm-progress-text { margin:0 0 .4rem; font-size:.8rem; color:var(--color-muted); }
.qcm-progress { display:block; width:100%; height:.35rem; margin:0 0 1rem; border:0; border-radius:1rem; overflow:hidden; background:var(--color-border); accent-color:var(--color-primary); }
.qcm-progress::-webkit-progress-bar { background:var(--color-border); }
.qcm-progress::-webkit-progress-value { background:var(--color-primary); }
.qcm-progress::-moz-progress-bar { background:var(--color-primary); }
.qcm-question { min-width:0; margin:0; padding:0; border:0; }
.qcm .qcm-title, .qcm-preparation .qcm-title { display:block; max-width:100%; margin:0 0 .5rem; padding:0; font-family:Georgia,'Times New Roman',serif; font-size:clamp(1.2rem,1.1rem + .5vw,1.3rem); font-weight:700; line-height:1.4; overflow-wrap:anywhere; }
.qcm .qcm-hint, .qcm .qcm-retry-note { margin:.25rem 0 .75rem; color:var(--color-muted); font-size:.85rem; }
.qcm-choices { display:grid; gap:.6rem; }
.qcm-choice { min-width:0; padding:.8rem; border:1px solid var(--color-border); border-radius:.7rem; cursor:pointer; }
.qcm-choice:has(input:checked) { background:var(--color-primary-soft); border-color:var(--color-primary); }
.qcm-choice:focus-within { outline:3px solid var(--color-focus); outline-offset:2px; }
.qcm-choice__row { display:flex; align-items:flex-start; gap:.75rem; }
.qcm-choice__row { -webkit-user-select:none; user-select:none; }
.qcm-choice input { flex:0 0 auto; width:1.2rem; height:1.2rem; margin:.2rem 0 0; accent-color:var(--color-primary-strong); }
.qcm-choice__content { min-width:0; flex:1; overflow-wrap:anywhere; }
.qcm-choice__content > :first-child, .qcm-feedback > :first-child, .qcm-stem > :first-child { margin-top:0; }
.qcm-choice__content > :last-child, .qcm-feedback > :last-child, .qcm-stem > :last-child { margin-bottom:0; }
.qcm-choice input:disabled { opacity:1; }
.qcm-choice:has(input:disabled) { cursor:default; }
.qcm .qcm-choice.qcm-choice--correct { background:var(--qcm-correct-bg); border-color:var(--qcm-correct-border); }
.qcm .qcm-choice.qcm-choice--incorrect { background:var(--qcm-incorrect-bg); border-color:var(--qcm-incorrect-border); }
.qcm-choice__state { flex:0 0 auto; align-self:center; color:var(--qcm-correct-icon); font-size:1.15rem; line-height:1; }
.qcm-choice--incorrect .qcm-choice__state { color:var(--qcm-incorrect-icon); }
.qcm-feedback { margin-top:.5rem; padding-top:.5rem; border-top:1px solid var(--color-border); font-size:.88rem; }
.qcm-result:not(:empty) { margin:1rem 0; font-weight:700; }
.qcm-result--correct { color:var(--color-primary-strong); }
.qcm-actions { display:flex; flex-wrap:wrap; gap:.7rem; margin-top:.8rem; }
.qcm button:disabled { opacity:.6; cursor:not-allowed; box-shadow:none; }
.qcm .button { white-space:normal; }
.qcm button, .qcm-choice { -webkit-tap-highlight-color:transparent; }
.qcm-finish { margin-top:1.5rem; padding-top:1rem; border-top:1px solid var(--color-border); }
.qcm .qcm-finish__title { margin:0 0 .7rem; font-size:1.35rem; }
.qcm .qcm-stars { margin:.25rem 0 1rem; color:var(--color-primary-strong); font-size:1.6rem; line-height:1.3; letter-spacing:.12em; }
.qcm .qcm-error { margin:0; }
.qcm-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }

/* Textes à trous : mêmes progression, bilan et couleurs de correction que les QCM. */
.trous-text { min-width:0; overflow-wrap:anywhere; }
.trous-text > :first-child { margin-top:.75rem; }
.trous-text > :last-child { margin-bottom:.75rem; }
.trous-gap, .trous-word { min-height:44px; max-width:100%; padding:.3rem .65rem; border:1px solid var(--color-border); border-radius:.5rem; background:var(--color-surface); color:var(--color-text); line-height:1.5; font-weight:500; vertical-align:baseline; white-space:normal; overflow-wrap:anywhere; user-select:none; cursor:pointer; }
.trous-gap { display:inline-block; min-width:5rem; margin:.15rem .1rem; border-style:dashed; background:var(--color-code); }
.trous-gap[data-word]:not([data-word=""]) { border-style:solid; }
.trous-word[aria-pressed="true"], .trous-drop-target { outline:2px solid var(--color-primary); outline-offset:2px; background:var(--color-primary-soft); }
.trous-bank { margin-top:1rem; padding:.8rem; border:1px solid var(--color-border); border-radius:.7rem; background:var(--color-code); }
.trous .trous-bank .qcm-hint { margin:0 0 .6rem; }
.trous-words { display:flex; flex-wrap:wrap; gap:.5rem; }
.trous button.trous-gap:disabled { opacity:1; cursor:default; }
.trous-gap.trous-gap--correct { background:var(--qcm-correct-bg); border:1px solid var(--qcm-correct-border); }
.trous-gap.trous-gap--incorrect { background:var(--qcm-incorrect-bg); border:1px solid var(--qcm-incorrect-border); }
.trous-gap .fa-regular { margin-left:.4rem; color:var(--qcm-correct-icon); }
.trous-gap--incorrect .fa-regular { color:var(--qcm-incorrect-icon); }
.trous .trous-status:empty { margin:0; }
.trous .activity-summary { margin:.5rem 0 1rem; }
@media (forced-colors:active) { .trous-gap--correct, .trous-gap--incorrect { border:2px solid CanvasText; } }

/* Encadrés Markdown et spoilers natifs, sans état JavaScript. */
.markdown-container { --container-accent:var(--color-primary-strong); min-width:0; max-width:100%; margin:1.5rem 0; border:1px solid color-mix(in srgb,var(--container-accent) 30%,var(--color-border)); border-radius:var(--radius); background:color-mix(in srgb,var(--container-accent) 6%,var(--color-surface)); color:var(--color-text); overflow-wrap:anywhere; }
.markdown-container--info { --container-accent:#245c8e; }
.markdown-container--success { --container-accent:#286347; }
.markdown-container--warning { --container-accent:#81510e; }
.markdown-container--danger { --container-accent:#9b423d; }
:root[data-theme="dark"] .markdown-container--info { --container-accent:#9ac8f2; }
:root[data-theme="dark"] .markdown-container--success { --container-accent:#9dd7b1; }
:root[data-theme="dark"] .markdown-container--warning { --container-accent:#e7c17b; }
:root[data-theme="dark"] .markdown-container--danger { --container-accent:#edaaa6; }
.markdown-container > .markdown-container__title, .markdown-spoiler > .markdown-spoiler__summary { display:flex; align-items:baseline; gap:.65rem; margin:0; padding:.85rem 1rem; color:var(--container-accent); font-family:Inter,ui-sans-serif,system-ui,sans-serif; font-size:1rem; font-weight:750; line-height:1.5; }
.markdown-container__title > .fa-solid, .markdown-spoiler__summary > .fa-solid { flex:0 0 1.1rem; text-align:center; }
.markdown-container__label { min-width:0; }
.markdown-container__body { min-width:0; padding:0 1rem 1rem; }
.markdown-container__body > :first-child { margin-top:0; }
.markdown-container__body > :last-child { margin-bottom:0; }
.markdown-container__body .qcm { margin:1rem 0; }
.markdown-spoiler { border-color:var(--color-border); background:var(--color-primary-soft); }
.markdown-spoiler > .markdown-spoiler__summary { min-height:48px; cursor:pointer; list-style:none; border-radius:inherit; }
.markdown-spoiler > .markdown-spoiler__summary::-webkit-details-marker { display:none; }
.markdown-spoiler > .markdown-spoiler__summary::marker { content:""; }
.markdown-spoiler > .markdown-spoiler__summary:focus-visible { outline:3px solid var(--color-focus); outline-offset:3px; }
.markdown-spoiler > .markdown-spoiler__summary > .markdown-spoiler__open-icon,
.markdown-spoiler > .markdown-spoiler__summary > .markdown-spoiler__hide { display:none; }
.markdown-spoiler[open] > .markdown-spoiler__summary > .markdown-spoiler__closed-icon,
.markdown-spoiler[open] > .markdown-spoiler__summary > .markdown-spoiler__show { display:none; }
.markdown-spoiler[open] > .markdown-spoiler__summary > .markdown-spoiler__open-icon,
.markdown-spoiler[open] > .markdown-spoiler__summary > .markdown-spoiler__hide { display:inline-block; }
.markdown-container-error { color:var(--color-muted); font-size:.9rem; }
