/* Nocturne — palette de design-system/tokens.css et overlay-themes.json (nocturne).
   Copie autonome : le blog ne dépend pas du serveur local de l'Atelier. */
html:root {
    color-scheme: dark;
    --background-color: #080c0b;
    --ghost-accent-color: #83f52c;
    --nocturne-soft: #b8ff70;
    --nocturne-panel: #090f0c;
    --color-white: #f0f3e9;
    --color-primary-text: #f0f3e9;
    --color-darker-gray: #f0f3e9;
    --color-secondary-text: #a2ad9b;
    --color-lighter-gray: #121c14;
    --color-light-gray: #263323;
    --color-mid-gray: #354631;
    --color-dark-gray: #a2ad9b;
    --color-border: #354631;
    --color-dark-border: #a2ad9b;
    --font-sans: "Titillium Web", "Segoe UI", Arial, sans-serif;
    --gh-font-body: var(--font-sans);
    --gh-font-heading: "Russo One", "Segoe UI", sans-serif;
    --container-width: 1240px;
    --grid-gap: 32px;
}

body { background: radial-gradient(ellipse at 78% 0, #83f52c09, transparent 45%), var(--background-color); }
::selection { background: #83f52c; color: #080c0b; }
a:hover { opacity: 1; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--ghost-accent-color);
    outline-offset: 5px;
}
.nocturne-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nocturne-skip { position: fixed; top: 12px; left: 16px; z-index: 4000000; padding: 12px 20px; background: #83f52c; color: #080c0b; transform: translateY(-160%); }
.nocturne-skip:focus { transform: none; }

/* Navigation en bandeau, repère citron et signature compacte. */
#gh-navigation { height: 88px; background: var(--nocturne-panel); border-top: 2px solid var(--ghost-accent-color); border-bottom: 1px solid var(--color-border); }
.gh-navigation-logo { letter-spacing: -.055em; }
.gh-navigation-logo img { max-height: 48px; }
.gh-navigation .nav a { color: var(--color-secondary-text); }
.gh-navigation .nav a:hover, .gh-navigation .nav-current a { color: var(--ghost-accent-color); }
.gh-button, .gh-form .gh-button {
    color: #080c0b;
    background: var(--ghost-accent-color);
    border: 1px solid transparent;
    border-radius: 3px 3px 14px 3px;
    min-height: 44px;
    font-weight: 700;
}
.gh-button:hover { background: var(--nocturne-soft); opacity: 1; }
.gh-button svg { width: 18px; height: 18px; }
.gh-icon-button { min-width: 44px; min-height: 44px; }

/* Une ouverture en diptyque : manifeste et dernier article. */
.nocturne-hero { position: relative; padding-block: clamp(48px, 7vw, 96px); border-bottom: 1px solid var(--color-border); }
.nocturne-hero-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 88px); }
.nocturne-intro h1 { margin-top: 0; font-size: clamp(4.4rem, 5.2vw, 7.4rem); font-weight: 750; letter-spacing: -.055em; line-height: 1.04; }
.nocturne-intro h1 span { color: var(--ghost-accent-color); }
.nocturne-lead { max-width: 420px; margin-top: 26px; color: var(--color-secondary-text); font-size: 1.8rem; line-height: 1.65; }
.nocturne-hero-actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 32px; }
.nocturne-spotlight { min-width: 0; padding: 20px; background: var(--nocturne-panel); border: 1px solid var(--color-border); border-radius: 3px 3px 32px 3px; position: relative; }
.nocturne-spotlight::before { content: ''; position: absolute; top: -1px; left: 20px; width: 90px; height: 2px; background: var(--ghost-accent-color); box-shadow: 0 0 16px #83f52c35; }
.nocturne-spotlight .gh-card-image { aspect-ratio: 16/10; }
.nocturne-spotlight .gh-card-wrapper { padding-top: 20px; }
.nocturne-spotlight .gh-card-title { font-size: clamp(2.4rem, 2.3vw, 3.2rem); }
.nocturne-spotlight .gh-card-excerpt { -webkit-line-clamp: 3; font-size: 1.6rem; line-height: 1.6; }
.nocturne-spotlight .gh-card-meta { margin-top: 16px; }

/* Le carnet remplace la grille de journal de Source. */
.gh-container { margin-top: 64px; scroll-margin-top: 24px; }
.gh-container:not(.has-sidebar) :is(.gh-container-title, .gh-main, .gh-more) { grid-column: 1 / -1; }
.gh-container-title { font-size: 1.2rem; letter-spacing: .16em; color: var(--color-secondary-text); padding-bottom: 20px; margin-bottom: 28px; }
.gh-container.is-grid .gh-feed { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; overflow: visible; }
.gh-container .gh-card { min-width: 0; background: var(--nocturne-panel); border: 1px solid var(--color-border); border-radius: 3px 3px 24px 3px; transition: border-color .2s ease; }
.gh-container .gh-card:hover, .nocturne-spotlight:hover { border-color: var(--ghost-accent-color); }
.gh-container .gh-card::before, .gh-container .gh-card::after { display: none; }
.gh-card-link { height: 100%; }
.gh-card-image { overflow: hidden; border-radius: 2px 2px 0 0; }
.gh-card-image img { height: 100%; width: 100%; object-fit: cover; }
.gh-container .gh-card-wrapper { padding: 22px; }
.gh-card-title { letter-spacing: -.035em; line-height: 1.2; }
.gh-card-link:hover .gh-card-title { color: var(--nocturne-soft); opacity: 1; }
.gh-card-tag { color: var(--ghost-accent-color); letter-spacing: .1em; font-size: 1.05rem; }
.gh-card-excerpt { color: var(--color-secondary-text); line-height: 1.6; }
.gh-card-meta { font-size: 1.2rem; }
.gh-container.is-list .gh-card-link { gap: 0; align-items: stretch; }
.gh-container.is-list .gh-card-image { border-radius: 2px 0 0 2px; }
.gh-container.is-list .no-image .gh-card-link { padding-block: 0; }
.gh-container.is-list .gh-card-wrapper { align-self: center; }
.gh-more a { display: inline-flex; align-items: center; gap: 12px; padding: 14px 20px; border: 1px solid var(--color-border); border-radius: 3px 3px 14px 3px; color: var(--ghost-accent-color); }

/* Lecture : colonne calme, chapitres et citations ponctués de citron. */
.gh-article-header { padding-top: 24px; }
.gh-article-tag { letter-spacing: .14em; }
.gh-article-title { font-size: clamp(3.4rem, 4.4vw, 6rem); letter-spacing: -.045em; line-height: 1.1; text-wrap: balance; }
.gh-article-excerpt { color: var(--color-secondary-text); line-height: 1.65; }
.gh-article-meta { margin-top: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--color-border); }
.gh-article-image img { border-radius: 3px 3px 28px 3px; }
.gh-content { --content-font-size: 1.9rem; line-height: 1.85; letter-spacing: 0; }
.gh-content > h2 { padding-top: 20px; border-top: 1px solid var(--color-border); }
.gh-content > h2::before { content: ''; display: block; width: 42px; height: 2px; background: var(--ghost-accent-color); margin-top: -22px; margin-bottom: 24px; }
.gh-content a:not([class]) { color: var(--nocturne-soft); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.gh-content :is(blockquote, .kg-blockquote-alt) { padding: 16px 24px; border-left: 2px solid var(--ghost-accent-color); background: var(--nocturne-panel); color: var(--color-primary-text); }
.gh-content :not(pre) > code { background: var(--color-lighter-gray); color: var(--nocturne-soft); }
.gh-content pre { background: var(--nocturne-panel); border: 1px solid var(--color-border); }
.gh-content :is(th, td) { border-color: var(--color-border); }
.gh-content .kg-toggle-card { box-shadow: inset 0 0 0 1px var(--color-border); }
.gh-content .kg-callout-card:not([class*='kg-callout-card-']) { background: var(--color-lighter-gray); }
.gh-content .kg-callout-card a { color: inherit; }
.gh-content .kg-button-card a.kg-btn { color: #080c0b; background: var(--ghost-accent-color); border-radius: 3px 3px 14px 3px; }
.gh-archive-inner { border-color: var(--color-border); }

/* La lettre devient un rendez-vous de pied de page. */
.gh-footer { margin-top: 96px; background: var(--nocturne-panel); border-top: 1px solid var(--color-border); }
.gh-footer-inner { display: flex; flex-direction: column; }
.gh-footer-signup { order: -1; padding-block: 64px; text-align: left; max-width: none; margin: 0; border-bottom: 1px solid var(--color-border); }
.gh-footer-signup-header { font-size: clamp(3rem, 4vw, 4.8rem); letter-spacing: -.045em; }
.gh-footer-signup-subhead { color: var(--color-secondary-text); }
.gh-footer-signup .gh-form { margin: 24px 0 0; }
.gh-footer-bar { margin-bottom: 0; border: 0; padding-block: 28px; }
.gh-footer-copyright { color: var(--color-secondary-text); }
.gh-form { border: 1px solid var(--color-border); border-radius: 3px 3px 16px 3px; background: var(--background-color); }
.gh-form:hover, .has-light-text .gh-form:hover { background: var(--color-lighter-gray); }
.gh-form:focus-within { border-color: var(--ghost-accent-color); }
.gh-form-input { color: var(--color-primary-text); border-radius: inherit; }
.gh-form-input::placeholder { color: var(--color-secondary-text); }
.gh-form.error { box-shadow: 0 0 0 1px #ffb4a2; }
.gh-form [data-members-error] { color: #ffb4a2; }

@media (max-width: 991px) {
    .gh-container.is-grid .gh-feed, .post-template .gh-container.is-grid .gh-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nocturne-hero-inner { gap: 32px; }
}
@media (max-width: 767px) {
    #gh-navigation { height: 76px; }
    #gh-navigation.is-open { height: 100%; }
    .nocturne-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .nocturne-intro h1 { font-size: clamp(4.4rem, 10vw, 6.4rem); }
    .nocturne-spotlight { padding: 16px; }
    .gh-container { margin-top: 40px; }
    .gh-container.is-grid .gh-feed, .post-template .gh-container.is-grid .gh-feed { grid-template-columns: minmax(0, 1fr); }
    .gh-container.is-list .gh-card-image { border-radius: 2px 2px 0 0; }
    .gh-content { --content-font-size: 1.8rem; }
    .gh-footer { margin-top: 64px; }
    .gh-footer-signup { padding-block: 40px; }
    .gh-footer-bar { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Neutraliser les espacements et centrages hérités de Source. */
.nocturne-spotlight .gh-card-link, .gh-container.is-grid .gh-card-link { gap: 0; }
.gh-footer-signup { align-items: flex-start; }

.gh-navigation-logo, .gh-footer-logo { display: inline-flex; align-items: center; gap: 12px; }
.nocturne-wordmark { font-size: 2.6rem; font-weight: 750; letter-spacing: -.055em; }

@font-face { font-family: 'Russo One'; src: url('../fonts/russo-one-latin-400-normal.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Titillium Web'; src: url('../fonts/titillium-web-latin-400-normal.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Titillium Web'; src: url('../fonts/titillium-web-latin-700-normal.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }
/* Russo One ne possède qu'une graisse : éviter le faux gras du navigateur. */
body :is(h1, h2, h3, h4, h5, h6, .is-title, .nocturne-wordmark) { font-family: var(--gh-font-heading); font-weight: 400; letter-spacing: -.015em; }
body :is(h1, h2, h3, h4, h5, h6, .is-title, .nocturne-wordmark) { font-synthesis: none; }
.nocturne-intro h1 { font-size: clamp(3.5rem, 4.3vw, 6rem); }
.gh-navigation-actions { gap: 24px; }
.gh-search { border: 1px solid var(--color-border); border-radius: 4px; background: #121c14; }
.gh-search:hover { border-color: var(--ghost-accent-color); color: var(--ghost-accent-color); }
.gh-navigation-members > a[data-portal='signin']:not(.gh-button) { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 14px; }
/* L’ancienne injection Ghost impose parfois une couleur sombre à tous les .gh-button. */
.nocturne-hero-actions .nocturne-twitch { background: #9146ff; color: #fff !important; gap: 10px; }
.nocturne-hero-actions .nocturne-twitch:hover { background: #772ce8; }
#ghost-portal-root iframe:not([data-nocturne-ready]), #sodo-search-root iframe:not([data-nocturne-ready]) { visibility: hidden; }
@media (max-width: 767px) { .nocturne-intro h1 { font-size: clamp(3rem, 8.6vw, 5rem); } }

.kg-signup-card-button { color: #080c0b !important; }

/* Ghost audio cards have a fixed white surface; style their controls together. */
.gh-content .kg-audio-card { background: var(--nocturne-panel); color: var(--color-primary-text); border: 1px solid var(--color-border); border-radius: 3px 3px 20px 3px; box-shadow: none; font-family: var(--gh-font-body); }
.kg-audio-card .kg-audio-player-container button { color: inherit; }
.kg-audio-card .kg-audio-time { color: var(--color-secondary-text); }
.kg-audio-card .kg-audio-thumbnail.placeholder svg { fill: #080c0b; }
.kg-audio-card .kg-audio-player-container input[type='range'] { color: var(--ghost-accent-color); }
.kg-audio-card .kg-audio-player-container input[type='range']::-webkit-slider-runnable-track { background: #52664a; }
.kg-audio-card .kg-audio-player-container input[type='range']::-moz-range-track { background: #52664a; }
.kg-audio-card .kg-audio-player-container input[type='range']::-webkit-slider-thumb { background: var(--ghost-accent-color); }
.kg-audio-card .kg-audio-player-container input[type='range']::-moz-range-thumb { background: var(--ghost-accent-color); }
.kg-audio-card .kg-audio-player-container input[type='range']:focus-visible { outline: none; }
.kg-audio-card .kg-audio-player-container input[type='range']:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--nocturne-panel), 0 0 0 3px var(--nocturne-soft); }
.kg-audio-card .kg-audio-player-container input[type='range']:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--nocturne-panel), 0 0 0 3px var(--nocturne-soft); }
#ghost-comments-root iframe[title='comments-frame']:not([data-nocturne-ready]) { visibility: hidden; }
