/* DES FRAGS PROCESS / reset.99 / style principal */

/* ===== BASE V9 ===== */
/* Des Frags Process — styles structurels stabilisés V9r
   Les états visuels des composants interactifs sont centralisés dans
   assets/css/v9-foundation.css, chargé après cette feuille.
   Les anciennes déclarations conflictuelles ont été retirées ici.
*/

:root { --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --sans: Inter, Helvetica, Arial, sans-serif; }
* { box-sizing: border-box; }
html { color: var(--fg); font-family: var(--sans); }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-underline-offset: 0.18em; }
img { max-width: 100%; display: block; }
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(18px, 4vw, 46px); }
.brand { text-decoration: none; font-family: var(--mono); }
.brand span { display: block; text-transform: uppercase; }
.brand small { display: block; margin-top: 3px; }
.site-header nav { display: flex; font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.site-header nav a { text-decoration: none; }
.page { width: min(var(--max), calc(100vw - clamp(28px, 6vw, 88px))); margin: 0 auto; padding: clamp(30px, 7vh, 80px) 0; }
.page.narrow { width: min(720px, calc(100vw - 36px)); }
.intro { margin-bottom: 34px; }
.intro h1 { margin: 0 0 16px; font-family: var(--mono); font-size: clamp(34px, 7vw, 92px); line-height: 0.92; letter-spacing: -0.06em; text-transform: uppercase; }
.intro p { max-width: 760px; margin: 0; color: #cfcfcf; font-size: clamp(16px, 1.6vw, 22px); line-height: 1.45; }
.panel { border: 1px solid var(--line); margin-bottom: 18px; }
.panel h2 { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.error { border-color: var(--fg); }
.panel.error { border-width: 2px; }
.generator { display: grid; gap: 18px; }


.field { display: grid; gap: 8px; }
.field span, .check { color: var(--muted); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
input[type="text"], select { width: 100%; border: 1px solid #383838; background: #070707; color: var(--fg); padding: 14px 14px; font: 16px var(--mono); border-radius: 0; }
.check { display: block; margin: 10px 0; }
.check input { margin-right: 8px; }
.options-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

button { border: 1px solid #fff; background: #fff; color: #000; padding: 15px 18px; font: 12px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer; }
button:hover { background: #d9d9d9; }
body.is-generating button { opacity: 0.55; pointer-events: none; }

dl { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; }
dt { color: var(--muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
dd { margin: 0; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.process-trace { margin-top: 22px; }
.source-list { margin: 18px 0 0; padding-left: 22px; max-height: 420px; overflow: auto; }
.source-list li { margin-bottom: 10px; line-height: 1.35; }
.source-list span { display: block; font-size: 12px; margin-top: 2px; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.archive-card { background: var(--panel); border: 1px solid var(--line); }
.archive-card img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.card-meta { padding: 14px; }
.card-meta h2 { margin: 0 0 8px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; }
.card-meta p { margin: 6px 0; font-size: 13px; }
.site-footer { padding: 24px clamp(18px, 4vw, 46px) 38px; color: var(--muted); border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; }
.site-footer p { margin: 0; }
@media (max-width: 860px) {

  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  dl { grid-template-columns: 120px 1fr; }
}
@media (max-width: 560px) {
.site-header { align-items: flex-start; }
  .site-header nav { flex-direction: column; gap: 7px; align-items: flex-end; }
  .page { width: calc(100vw - 28px); padding: 28px 0; }
  .intro h1 { font-size: 42px; }
  .archive-grid { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; gap: 4px; }
  dd { margin-bottom: 10px; }
}
[hidden] { display: none; }
#preview[hidden], #preview:not([src]) { display: none; }
.small-note { margin-top: 14px; font-size: 12px; line-height: 1.35; }
@keyframes dfp-frag-appear { 0% { opacity: 0; transform: scale(0.12); } 35% { opacity: 0.25; transform: scale(0.65); } 60% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0.18; transform: scale(0.38); } }
body.is-generating { cursor: wait; }
.result-image-wrap, .progress-preview-wrap { background: #fff; border: 1px solid var(--line); }
.result-image-wrap[data-bg-mode="black"] { background: #000; }
.result-image-wrap[data-bg-mode="white"] { background: #fff; }
.result-image-wrap img, .progress-preview-wrap img { width: 100%; display: block; }
.result-image-wrap { position: relative; overflow: hidden; aspect-ratio: var(--result-aspect, auto); }
.progress-status-box { margin-top: 12px; }
.progress-status { font-family: var(--mono); font-size: 13px; margin-bottom: 12px; }
.progress-bar { height: 10px; border: 1px solid #2b2b2b; position: relative; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0%; transition: width 180ms linear; }
.progress-meta { margin-top: 10px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.progress-preview-wrap { position: relative; overflow: hidden; display: block; width: 100%; aspect-ratio: var(--preview-aspect, 1 / 1); min-height: 0; }
.progress-bg-layer { position: absolute; inset: 0; z-index: 0; background: #fff; transition: background-color 900ms ease; }
.progress-preview-wrap.matrix-fading .progress-bg-layer { background: #fff; }
.progress-preview-wrap.mosaic-visible[data-bg-mode="black"] .progress-bg-layer { background: #000; }
.progress-preview-wrap.mosaic-visible[data-bg-mode="white"] .progress-bg-layer { background: #fff; }
.progress-layer { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.matrix-layer { z-index: 2; opacity: 0; transition: opacity 2200ms ease; background: transparent; }
.matrix-layer.is-visible { opacity: 1; }
.progress-preview-wrap.matrix-fading .matrix-layer { opacity: 0; }
.mosaic-layer { z-index: 1; opacity: 0; transition: opacity 700ms ease; background: transparent; }
.mosaic-layer.is-visible { opacity: 1; }

.eyebrow { margin: 0 0 12px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.generator-intro p:last-child { max-width: 860px; }


.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.section-head h2 { margin-bottom: 0; }
.section-head p { margin: 0; max-width: 520px; font-size: 13px; line-height: 1.35; }

.source-group { border: 1px solid #202020; background: rgba(255,255,255,0.015); padding: 18px; }
.source-group h3 { margin: 0 0 16px; color: var(--fg); font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.09em; text-transform: uppercase; }
.preset-row { display: flex; flex-wrap: wrap; margin-bottom: 18px; }
.preset-btn:hover, .preset-btn.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.control-grid { display: grid; gap: 18px; }
.range-field { max-width: 720px; }
.range-field output { color: var(--fg); }


@media (max-width: 980px) {
.control-grid { grid-template-columns: 1fr 1fr; }
  
  
}
@media (max-width: 760px) {

  
  
  .section-head { display: block; }
  .section-head p { margin-top: 8px; }
  
  
}
.progress-page-v6g { --progress-gap: 18px; }
.progress-topbar { display: grid; gap: 22px; }
.progress-workbench { display: grid; align-items: start; }
.progress-stage-panel { margin: 0; }
.progress-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.progress-stage-head h2, .progress-inspector h2, .process-log-card h2 { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; }
.status-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border: 1px solid #383838; border-radius: 999px; color: var(--fg); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.progress-stage-panel figcaption { margin-top: 12px; font-family: var(--mono); font-size: 11px; }
.phase-stack { list-style: none; counter-reset: none; margin: 18px 0 24px; padding: 0; border-top: 1px solid #222; }
.phase-item { display: grid; gap: 10px 12px; padding: 14px 0; border-bottom: 1px solid #222; color: var(--muted); }
.phase-item span { grid-row: span 2; display: grid; place-items: center; border: 1px solid #303030; font-family: var(--mono); font-size: 10px; }
.phase-item strong { color: inherit; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.phase-item em { grid-column: 2; font-style: normal; font-size: 12px; line-height: 1.25; }
.phase-item.is-active { color: var(--fg); }
.phase-item.is-active span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.phase-item.is-done { color: #666; }
.phase-item.is-done span { color: #999; border-color: #444; }
.progress-stats { grid-template-columns: 140px 1fr; }
.process-log-card { margin: 0; }
.process-log { list-style: none; margin: 16px 0 0; padding: 0; overflow: auto; border-top: 1px solid #202020; }
.process-log li { display: grid; gap: 14px; padding: 10px 0; border-bottom: 1px solid #202020; font-family: var(--mono); font-size: 11px; line-height: 1.35; }
.process-log time { color: var(--muted); }
.process-log span { color: #dcdcdc; }
@media (max-width: 980px) {
.progress-topbar, .progress-workbench { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
.progress-stats { grid-template-columns: 1fr; }
  .process-log li { grid-template-columns: 1fr; gap: 4px; }
}
.progress-preview-wrap { background: #000; }
.matrix-layer { object-fit: cover; }
.mosaic-layer { object-fit: contain; }
.wire-grid { position: absolute; inset: 0; z-index: 4; pointer-events: none; transition: opacity 1100ms ease; mix-blend-mode: difference; }
.progress-preview-wrap.matrix-fading .wire-grid { opacity: 0.22; }
.progress-preview-wrap.mosaic-visible .wire-grid { opacity: 0; }
.process-log li { grid-template-columns: 84px 1fr; }
.process-log li span { overflow-wrap: anywhere; }
.phase-item.is-active strong { color: #fff; }
.progress-stage-panel figcaption { max-width: 760px; }
.process-influence-layout { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(180px, 260px); gap: 26px; align-items: end; }
.influence-scale { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; }
.influence-preview { position: relative; margin: 0; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid #303030; background: #090909; }
.influence-frag-field { position: absolute; inset: 0; z-index: 0; }
.influence-preview img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: var(--matrix-opacity, 0.42); filter: grayscale(1) contrast(1.08); transition: opacity 160ms linear; mix-blend-mode: screen; }
.influence-preview figcaption { position: absolute; z-index: 2; display: flex; justify-content: space-between; color: #fff; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
@media (max-width: 760px) {
.process-influence-layout { grid-template-columns: 1fr; }
  .influence-preview { width: min(260px, 100%); }
}
.result-page-v6k { --result-gap: 18px; }
.result-header-v6k { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.result-header-v6k h1 { margin: 0; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.button-link { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--fg); background: var(--fg); color: var(--bg); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-decoration: none; text-transform: uppercase; }
.button-link.secondary { background: transparent; color: var(--fg); border-color: #383838; }
.result-layout-v6k { display: grid; gap: var(--result-gap); align-items: start; margin-top: var(--result-gap); }
.result-main-figure { margin: 0; }
.result-main-figure figcaption { margin-top: 12px; max-width: 820px; font-family: var(--mono); font-size: 11px; line-height: 1.45; }
.result-cartel-v6k { position: static; top: auto; align-self: start; margin-top: 0; }
.result-cartel-v6k h2 { margin: 0 0 18px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; }
.result-cartel-v6k dl { grid-template-columns: 128px 1fr; }
.result-metrics-strip { margin-top: var(--result-gap); }
.result-metrics-strip article { min-height: 112px; padding: 16px; }
.result-metrics-strip span { display: block; margin-bottom: 12px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.result-metrics-strip strong { display: block; color: var(--fg); font-family: var(--mono); font-size: clamp(22px, 3.2vw, 42px); line-height: 1; font-weight: 400; letter-spacing: -0.05em; }
.process-trace-v6k { margin-top: var(--result-gap); }
.trace-grid-v6k { display: grid; margin: 18px 0; }
.trace-grid-v6k dl { border-top: 1px solid #202020; padding-top: 14px; }
.sources-details-v6k { margin-top: 20px; border-top: 1px solid #202020; padding-top: 16px; }
.sources-details-v6k summary { cursor: pointer; color: var(--fg); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.source-list-v6k { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid #202020; }
.source-list-v6k li { display: grid; grid-template-columns: 140px 1fr minmax(120px, 220px); gap: 14px; padding: 10px 0; border-bottom: 1px solid #202020; font-family: var(--mono); font-size: 11px; line-height: 1.35; }
.source-index, .source-license { color: var(--muted); }
.source-title a { color: var(--fg); }
@media (max-width: 980px) {
.result-header-v6k, .result-layout-v6k, .trace-grid-v6k { grid-template-columns: 1fr; }
  .result-header-v6k { display: block; }
  .result-actions { justify-content: flex-start; margin-top: 18px; }
  .source-list-v6k li { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 560px) {
.button-link { width: 100%; justify-content: center; }
}
.archive-page-v6l { --archive-gap: 18px; }
.archive-header-v6l { display: grid; gap: 24px; }
.archive-header-v6l h1 { margin: 0; font-family: var(--mono); text-transform: uppercase; }
.archive-counters-v6l { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.archive-counters-v6l article { padding: 14px; background: rgba(8,8,8,0.96); }
.archive-counters-v6l span { display: block; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.archive-counters-v6l strong { display: block; margin-top: 10px; color: var(--fg); font-family: var(--mono); font-weight: 400; letter-spacing: -0.055em; line-height: 1; }


.archive-grid-v6l { margin-top: var(--archive-gap); }
.archive-card-v6l { border: 1px solid var(--line); background: rgba(10,10,10,0.94); }
.archive-card-v6l[hidden] { display: none; }
.archive-thumb-v6l { display: grid; place-items: center; aspect-ratio: var(--archive-aspect, 1 / 1); overflow: hidden; border-bottom: 1px solid var(--line); }
.archive-thumb-v6l img { width: 100%; height: 100%; }
.card-meta-v6l h2 { margin: 0 0 10px; font-family: var(--mono); line-height: 1.05; text-transform: uppercase; }
.card-meta-v6l h2 a { text-decoration: none; }
.archive-keywords { margin: 0 0 14px; font-family: var(--mono); font-size: 11px; line-height: 1.35; }
.card-meta-v6l dl { grid-template-columns: 78px 1fr; gap: 6px 10px; margin: 0; font-size: 10px; }
.card-meta-v6l dt, .card-meta-v6l dd { border-top: 1px solid #202020; padding-top: 7px; }
.archive-grid-v6l.is-compact .card-meta-v6l { padding: 10px; }
.archive-grid-v6l.is-compact .archive-keywords, .archive-grid-v6l.is-compact .card-meta-v6l dl { display: none; }
.archive-grid-v6l.is-compact .card-meta-v6l h2 { margin: 0; font-size: 10px; }
@media (max-width: 900px) {
.archive-header-v6l{ grid-template-columns: 1fr; }
  
}
@media (max-width: 560px) {
.archive-counters-v6l { grid-template-columns: 1fr; }
  }
:root { --bg: #020202; --fg: #f1f1f1; --muted: #7f7f7f; --line: #303030; --line-soft: #1a1a1a; --panel: #080808; --panel2: #0c0c0c; --accent: #ffffff; }
html { background: #020202; }
body { color: var(--fg); }
::selection { background: #fff; color: #000; }
a { text-decoration-thickness: 1px; }
.site-header { backdrop-filter: none; border-bottom: 1px solid #3a3a3a; padding-top: 14px; padding-bottom: 14px; }
.brand { letter-spacing: 0.02em; }
.brand span { font-weight: 400; }
.brand small { color: #777; }
.site-header nav { gap: 0; border: 1px solid #2c2c2c; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-left: 1px solid #2c2c2c; color: #a0a0a0; }
.site-header nav a:first-child { border-left: 0; }
.site-header nav a:hover { background: #fff; color: #000; }
.intro h1, .archive-header-v6l h1, .result-header-v6k h1, .progress-topbar h1, .generator-intro h1 { font-weight: 400; text-rendering: geometricPrecision; }
.intro p, .generator-intro p, .archive-header-v6l p { color: var(--muted); }
.eyebrow { color: #909090; letter-spacing: 0.16em; }

.panel h2, .section-head h2, .progress-stage-head h2, .progress-inspector h2, .process-log-card h2, .result-cartel-v6k h2 { color: #9a9a9a; font-weight: 400; letter-spacing: 0.115em; }
.result-metrics-strip, .archive-counters-v6l{ border-color: #343434; background: #343434; }

.result-metrics-strip strong, .archive-counters-v6l strong { font-weight: 400; }
button, .button-link { border-radius: 0; font-weight: 400; }
button, input, select, textarea { border-radius: 0; }
button, input[type="submit"], .button-link { transition: background-color 120ms linear, color 120ms linear, border-color 120ms linear; }
input, select, textarea { background: #040404; border: 1px solid #343434; color: var(--fg); }
input:focus, select:focus, textarea:focus { outline: 1px solid #fff; outline-offset: 2px; border-color: #fff; }
.source-group, .archive-card-v6l, .result-image-wrap, .progress-preview-wrap, .influence-preview{ border-color: #343434; }


.phase-item, .process-log, .process-log li, .card-meta-v6l dt, .card-meta-v6l dd, .source-list-v6k, .source-list-v6k li, .sources-details-v6k, .trace-grid-v6k dl { border-color: #252525; }
.status-pill, .phase-item span { border-color: #3a3a3a; }
.phase-item.is-active span, .preset-btn.is-active, .preset-btn:hover { background: #fff; color: #000; border-color: #fff; }
.progress-bar { background: #050505; border-color: #3a3a3a; }
.progress-bar span { background: repeating-linear-gradient( 90deg, #fff 0, #fff 8px, #cfcfcf 8px, #cfcfcf 10px ); }
.wire-grid { opacity: 0; background-image: repeating-linear-gradient( to right, rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) 1px, transparent 1px, transparent calc(100% / var(--grid-cols, 30)) ), repeating-linear-gradient( to bottom, rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) 1px, transparent 1px, transparent calc(100% / var(--grid-rows, 30)) ); }
.wire-grid.is-visible { opacity: 0.48; }
.process-log li, .source-list-v6k li, .card-meta-v6l dl, .progress-stats, .result-cartel-v6k dl, .trace-grid-v6k dl { font-variant-numeric: tabular-nums; }
.archive-thumb-v6l[data-bg-mode="black"] { background: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px) 0 0 / 18px 18px, #000; }
.result-image-wrap[data-bg-mode="white"], .progress-preview-wrap[data-bg-mode="white"] { background: linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px) 0 0 / 18px 18px, #fff; }
.result-image-wrap[data-bg-mode="black"], .progress-preview-wrap[data-bg-mode="black"] { background: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px) 0 0 / 18px 18px, #000; }

@media (max-width: 560px) {
.site-header nav { width: 100%; }
  .site-header nav a { flex: 1; justify-content: center; }
}
.readme-page-v6n { --readme-gap: 18px; }
.readme-body { font-size: clamp(20px, 2.2vw, 34px); line-height: 1.18; letter-spacing: -0.035em; }
.readme-body p { max-width: 1050px; margin: 0; }
.readme-body p + p { margin-top: 1em; }
.readme-grid { display: grid; grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1fr); gap: var(--readme-gap); }
.readme-grid p { color: color-mix(in srgb, var(--fg) 82%, var(--bg)); line-height: 1.55; }
.readme-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid color-mix(in srgb, var(--fg) 16%, var(--bg)); }
.readme-steps li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 16%, var(--bg)); font-family: var(--mono); font-size: 12px; line-height: 1.35; }
.readme-steps span { color: color-mix(in srgb, var(--fg) 55%, var(--bg)); }
.readme-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) {
.readme-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
.readme-body { font-size: 20px; line-height: 1.25; }
  .readme-actions .button-link { width: 100%; }
}
:root[data-theme="light"] { --bg: #ffffff; --fg: #050505; --muted: #565656; --line: #1c1c1c; --line-soft: #d6d3ca; --panel: #ffffff; --panel2: #ffffff; --accent: #050505; }
:root[data-theme="light"] html, :root[data-theme="light"] body { background: linear-gradient(rgba(0,0,0,0.055) 1px, transparent 1px) 0 0 / 48px 48px, linear-gradient(90deg, rgba(0,0,0,0.055) 1px, transparent 1px) 0 0 / 48px 48px, #ffffff; color: #050505; }
:root[data-theme="light"] .site-header { background: #ffffff; border-bottom-color: #050505; }
:root[data-theme="light"] .brand small, :root[data-theme="light"] .site-header nav a, :root[data-theme="light"] .muted, :root[data-theme="light"] .eyebrow { color: #565656; }
:root[data-theme="light"] .site-header nav, :root[data-theme="light"] .site-header nav a, :root[data-theme="light"] .theme-toggle { border-color: #050505; }
:root[data-theme="light"] .site-header nav a:hover, :root[data-theme="light"] .theme-toggle:hover { background: #050505; color: #ffffff; }
.site-header nav .theme-toggle { appearance: none; display: inline-grid; place-items: center; width: 34px; min-height: 32px; padding: 0; border: 0; border-left: 1px solid #2c2c2c; background: transparent; cursor: pointer; }
.theme-toggle span { display: block; width: 14px; height: 14px; background: #fff; border: 1px solid #fff; }
:root[data-theme="light"] .theme-toggle span { background: #050505; border-color: #050505; }

:root[data-theme="light"] .panel h2, :root[data-theme="light"] .section-head h2, :root[data-theme="light"] .progress-stage-head h2, :root[data-theme="light"] .progress-inspector h2, :root[data-theme="light"] .process-log-card h2, :root[data-theme="light"] .result-cartel-v6k h2 { color: #555; }
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: #fff; color: #050505; border-color: #050505; }
:root[data-theme="light"] .result-metrics-strip, :root[data-theme="light"] .archive-counters-v6l{ border-color: #050505; background: #050505; }

:root[data-theme="light"] .button-link { background: #050505; color: #ffffff; border-color: #050505; }
:root[data-theme="light"] .button-link.secondary { background: transparent; color: #050505; }

:root[data-theme="light"] .phase-item.is-active span, :root[data-theme="light"] .preset-btn.is-active, :root[data-theme="light"] .preset-btn:hover { background: #050505; color: #ffffff; border-color: #050505; }
@media (max-width: 640px) {
.site-header { align-items: stretch; }
  .site-header nav { display: grid; grid-template-columns: repeat(4, 1fr) 34px; }
  .site-header nav a { padding: 0 8px; font-size: 10px; }
}
html[data-theme="light"] { color-scheme: light; background: #fff; }
html[data-theme="light"] body { color: #050505; }
html[data-theme="light"] .site-header, html[data-theme="light"] .site-footer { background: #fff; color: #050505; border-color: #050505; }

html[data-theme="light"] a, html[data-theme="light"] h1, html[data-theme="light"] h2, html[data-theme="light"] h3, html[data-theme="light"] strong, html[data-theme="light"] dt, html[data-theme="light"] dd, html[data-theme="light"] .brand span, html[data-theme="light"] .process-log span, html[data-theme="light"] .source-title a { color: #050505; }
html[data-theme="light"] .muted, html[data-theme="light"] .eyebrow, html[data-theme="light"] .brand small, html[data-theme="light"] .site-header nav a, html[data-theme="light"] .source-index, html[data-theme="light"] .source-license, html[data-theme="light"] .phase-item, html[data-theme="light"] .phase-item em { color: #555; }
html[data-theme="light"] input, html[data-theme="light"] select, html[data-theme="light"] textarea { background: #fff; color: #050505; border-color: #050505; }
html[data-theme="light"] .site-header nav, html[data-theme="light"] .site-header nav a, html[data-theme="light"] .theme-toggle { border-color: #050505; }
html[data-theme="light"] .site-header nav a, html[data-theme="light"] .theme-toggle { background: #fff; color: #050505; }
html[data-theme="light"] .site-header nav a:hover, html[data-theme="light"] .theme-toggle:hover, html[data-theme="light"] .button-link, html[data-theme="light"] .phase-item.is-active span, html[data-theme="light"] .preset-btn.is-active, html[data-theme="light"] .preset-btn:hover { background: #050505; color: #fff; border-color: #050505; }
html[data-theme="light"] .button-link.secondary { background: #fff; color: #050505; }
html[data-theme="light"] .theme-toggle span { background: #050505; border-color: #050505; }
html[data-theme="light"] .result-metrics-strip, html[data-theme="light"] .archive-counters-v6l{ background: #050505; border-color: #050505; }
html[data-theme="light"] .result-metrics-strip article, html[data-theme="light"] .archive-counters-v6l article{ background: #fff; color: #050505; }
html[data-theme="light"] .influence-preview, html[data-theme="light"] .progress-bar{ background: #fff; color: #050505; border-color: #050505; }
html[data-theme="light"] .progress-bar span { background: repeating-linear-gradient( 90deg, #050505 0, #050505 8px, #555 8px, #555 10px ); }
.influence-frag-field { background-image: linear-gradient(90deg, rgba(255,255,255,0.13) 1px, transparent 1px), linear-gradient(0deg, rgba(255,255,255,0.13) 1px, transparent 1px); background-size: 18px 18px, 18px 18px; background-position: 0 0, 0 0; opacity: 0.52; filter: none; }
.theme-toggle span { transition: transform 120ms linear, background-color 120ms linear, border-color 120ms linear; }
.theme-toggle:hover span { transform: scale(0.72); }


html[data-theme="light"] .influence-frag-field { background-image: linear-gradient(90deg, rgba(0,0,0,0.11) 1px, transparent 1px), linear-gradient(0deg, rgba(0,0,0,0.11) 1px, transparent 1px); background-size: 18px 18px, 18px 18px; opacity: 0.48; }
html[data-theme="light"] .influence-preview img { mix-blend-mode: multiply; }
html[data-theme="light"] .archive-grid-v6l.is-compact .archive-card-v6l { background: #fff; }
@media (max-width: 760px) {
.site-header { display: grid; grid-template-columns: 1fr; align-items: start; gap: 14px; padding: 20px 30px 28px; }
  .brand { max-width: 100%; }
  .brand span { font-size: 21px; line-height: 1.08; letter-spacing: 0.04em; }
  .brand small { max-width: 210px; font-size: 15px; line-height: 1.28; }
  .site-header nav { width: 100%; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.82fr) minmax(0, 0.62fr) 44px; gap: 0; }
  .site-header nav a, .site-header nav .theme-toggle { min-width: 0; min-height: 54px; }
  .site-header nav a { padding: 0 8px; justify-content: center; font-size: 14px; line-height: 1.05; text-align: center; white-space: normal; overflow-wrap: anywhere; }
  .site-header nav .theme-toggle { width: 44px; }
}
@media (max-width: 420px) {
.site-header { padding-left: 22px; padding-right: 22px; }
  .site-header nav a { font-size: 12px; padding: 0 5px; }
}
html[data-theme="light"] button { background: #050505; color: #fff; border-color: #050505; }
html[data-theme="light"] button:hover { background: #fff; color: #050505; }


.influence-preview figcaption { background: transparent; left: 8px; right: auto; bottom: 7px; padding: 0; text-shadow: none; }
html[data-theme="light"] .influence-preview figcaption { background: transparent; }
html[data-theme="light"] .influence-preview figcaption span { color: #050505; }
html[data-theme="light"] input[type="range"] { accent-color: #050505; }
html[data-theme="light"] input[type="range"]::-webkit-slider-runnable-track { border-color: rgba(0,0,0,0.55); }
html[data-theme="light"] input[type="range"]::-moz-range-track { border-color: rgba(0,0,0,0.55); background: transparent; }

.archive-header-v6l, .archive-header-v6l .panel{ background-image: none; }

.archive-view-btn { padding: 0 12px;   font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }

.archive-grid-v6l.is-colorgrid { display: grid; background: transparent; }
.archive-grid-v6l.is-colorgrid .archive-card-v6l { display: block; aspect-ratio: 1 / 1; min-height: 0; border: 0; }
.archive-grid-v6l.is-colorgrid .archive-thumb-v6l { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; border: 0; }
.archive-grid-v6l.is-colorgrid .archive-thumb-v6l img, .archive-grid-v6l.is-colorgrid .card-meta-v6l { display: none; }
html[data-theme="light"] .archive-header-v6l{ background-image: none; background-color: transparent; }
html[data-theme="light"] .archive-card-v6l, html[data-theme="light"] .archive-thumb-v6l { border-color: #050505; }
@media (max-width: 760px) {
.site-header { position: static; padding: 14px 20px 16px; gap: 10px; }
  .brand span { font-size: 16px; line-height: 1.05; }
  .brand small { max-width: 100%; font-size: 12px; line-height: 1.2; }
  .site-header nav { grid-template-columns: repeat(4, minmax(0, 1fr)) 34px; }
  .site-header nav a, .site-header nav .theme-toggle { min-height: 38px; }
  .site-header nav a { font-size: 10px; letter-spacing: 0.02em; padding: 0 4px; }
  .site-header nav .theme-toggle { width: 34px; }
  .theme-toggle span { width: 13px; height: 13px; }
}
@media (max-width: 420px) {
.site-header { padding-left: 16px; padding-right: 16px; }
  .site-header nav a { font-size: 9px; }
  
  
  .archive-view-btn { font-size: 9px; padding: 0 4px; }
}
.panel, .result-metrics-strip article, .archive-counters-v6l article, .source-group, .archive-card-v6l, .progress-inspector, .progress-stage-panel, .process-log-card, .result-main-figure, .result-cartel-v6k, .archive-header-v6l{ background-image: none; }
.panel { background-color: var(--panel); }
html[data-theme="light"] .panel { background-color: #fff; }
html[data-theme="light"] .result-metrics-strip article, html[data-theme="light"] .archive-counters-v6l article, html[data-theme="light"] .archive-card-v6l, html[data-theme="light"] .source-group{ background-image: none; background-color: #fff; }


.archive-header-v6l{ background: #050505; }
html[data-theme="light"] .archive-header-v6l{ background: #fff; }


.archive-grid-v6l.is-colorgrid .archive-card-v6l, html[data-theme="light"] .archive-grid-v6l.is-colorgrid .archive-card-v6l, .archive-grid-v6l.is-colorgrid .archive-thumb-v6l, html[data-theme="light"] .archive-grid-v6l.is-colorgrid .archive-thumb-v6l { background: var(--avg-color, #777); background-image: none; }
.site-header nav a, .site-header nav .theme-toggle { transition: background-color 120ms linear, color 120ms linear, border-color 120ms linear; }
.site-header nav .theme-toggle:hover span { background: #050505; border-color: #050505; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; margin: 0; background: transparent; border: 0; accent-color: auto; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; border: 0; background: #fff; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -6px; border: 1px solid #fff; border-radius: 50%; background: #050505; box-shadow: none; }
input[type="range"]::-moz-range-track { height: 2px; border: 0; background: #fff; }
input[type="range"]::-moz-range-progress { height: 2px; background: #fff; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 1px solid #fff; border-radius: 50%; background: #050505; box-shadow: none; }
html[data-theme="light"] input[type="range"]::-webkit-slider-runnable-track { background: #050505; }
html[data-theme="light"] input[type="range"]::-webkit-slider-thumb { border: 1px solid #050505; background: #fff; box-shadow: none; }
html[data-theme="light"] input[type="range"]::-moz-range-track, html[data-theme="light"] input[type="range"]::-moz-range-progress { background: #050505; }
html[data-theme="light"] input[type="range"]::-moz-range-thumb { border: 1px solid #050505; background: #fff; box-shadow: none; }
.result-image-wrap[data-bg-mode="white"], .progress-preview-wrap[data-bg-mode="white"], .archive-thumb-v6l { background-image: none; }

@media (max-width: 760px) {
.site-header { position: static; }
}
.preset-row { gap: 10px; }
.preset-btn { background: transparent; color: var(--fg); border: 1px solid var(--fg); }
.preset-btn.is-active, .preset-btn:hover { background: var(--fg); color: var(--bg); }
html[data-theme="light"] .preset-btn { background: #fff; color: #050505; border: 1px solid #050505; }
html[data-theme="light"] .preset-btn.is-active, html[data-theme="light"] .preset-btn:hover { background: #050505; color: #fff; }


.archive-view-btn { min-width: 82px; min-height: 34px;    }

.archive-grid-v6l { display: grid; width: 100%; overflow: visible; border: 0; outline: 0; }
.archive-page { overflow: visible; }
.archive-card-v6l { outline: 0; }


html[data-theme="light"] .archive-grid-v6l, html[data-theme="light"] .archive-page { border: 0; outline: 0; }
.preset-btn { border-width: 1px; border-color: rgba(255,255,255,0.58); box-shadow: none; }
.preset-btn.is-active, .preset-btn:hover { border-color: var(--fg); box-shadow: none; }
html[data-theme="light"] .preset-btn { border-width: 1px; border-color: rgba(0,0,0,0.55); box-shadow: none; }
html[data-theme="light"] .preset-btn.is-active, html[data-theme="light"] .preset-btn:hover { border-color: #050505; box-shadow: none; }
input[type="range"]:focus, input[type="range"]:focus-visible, html:not([data-theme="light"]) input[type="range"]:focus, html:not([data-theme="light"]) input[type="range"]:focus-visible { outline: none; box-shadow: none; }
input[type="range"]::-webkit-slider-runnable-track { outline: none; box-shadow: none; }
input[type="range"]::-moz-range-track { outline: none; box-shadow: none; }
:root { --max: 1280px; --block-pad: clamp(22px, 3.2vw, 34px); }
.page { padding-top: clamp(42px, 6vh, 72px); padding-bottom: clamp(42px, 6vh, 72px); }
.panel { padding: var(--block-pad); }
.site-header { min-height: 64px; }
.brand span { font-size: 13px; letter-spacing: 0.08em; }
.brand small { font-size: 10px; letter-spacing: 0.08em; }
.intro.generator-intro { display: grid; grid-template-columns: minmax(380px, 0.78fr) minmax(320px, 1fr); gap: 34px; align-items: end; margin-bottom: 26px; }
.intro.generator-intro h1 { max-width: 760px; font-size: clamp(58px, 9.6vw, 152px); line-height: 0.78; letter-spacing: -0.105em; }
.intro.generator-intro p:not(.eyebrow) { max-width: 620px; font-size: clamp(14px, 1.35vw, 18px); line-height: 1.48; }


.section-head { margin-bottom: 22px; }
.section-head h2, .panel h2 { font-size: 11px; letter-spacing: 0.16em; }

.progress-topbar { grid-template-columns: minmax(420px, 0.92fr) minmax(420px, 1fr); align-items: center; }
.progress-status-box { align-self: center; }
.progress-workbench { grid-template-columns: minmax(520px, 1.35fr) minmax(320px, 0.65fr); gap: 18px; }
.progress-preview-wrap { border: 1px solid color-mix(in srgb, var(--fg) 65%, transparent); }
.phase-stack { margin-top: 20px; }
.phase-item { grid-template-columns: 44px 1fr; min-height: 66px; }
.phase-item span { width: 26px; height: 26px; border-radius: 0; }
.process-log { max-height: 340px; }
.archive-header-v6l { grid-template-columns: minmax(460px, 1fr) minmax(420px, 0.72fr); align-items: stretch; }
.archive-header-v6l p { max-width: 620px; margin-top: 24px; }
.archive-counters-v6l article { min-height: 118px; display: flex; flex-direction: column; justify-content: space-between; }
.archive-counters-v6l strong { font-size: clamp(36px, 5vw, 72px); }

.archive-grid-v6l { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.archive-card-v6l { display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.archive-thumb-v6l { background: #000; }
.archive-thumb-v6l img { object-fit: cover; }
.card-meta-v6l { padding: 18px; }
.card-meta-v6l h2 { font-size: 12px; letter-spacing: 0.03em; }
.archive-keywords { color: color-mix(in srgb, var(--fg) 58%, var(--bg)); min-height: 3.6em; }
.archive-grid-v6l.is-compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.archive-grid-v6l.is-colorgrid { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 4px; padding: 0; border: 0; }
.archive-grid-v6l.is-colorgrid .archive-card-v6l { transition: transform 110ms linear; }
.archive-grid-v6l.is-colorgrid .archive-card-v6l:hover { transform: scale(1.12); z-index: 2; }
.result-layout-v6k { grid-template-columns: minmax(560px, 1.35fr) minmax(320px, 0.65fr); }
.result-image-wrap img { object-fit: contain; }
html[data-theme="light"] .archive-thumb-v6l { background: #fff; }
html[data-theme="light"] .archive-keywords { color: color-mix(in srgb, var(--fg) 58%, var(--bg)); }
html[data-theme="light"] .archive-counters-v6l strong, html[data-theme="light"] .result-metrics-strip strong { color: #050505; }
@media (max-width: 980px) {
.intro.generator-intro, .progress-topbar, .progress-workbench, .archive-header-v6l, .result-layout-v6k { grid-template-columns: 1fr; }
  .intro.generator-intro h1, .archive-header-v6l h1 { font-size: clamp(50px, 14vw, 104px); }
  .archive-grid-v6l { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 560px) {
.page { width: min(var(--max), calc(100vw - 32px)); }
  .panel { padding: 18px; }
  .intro.generator-intro h1 { font-size: clamp(42px, 17vw, 76px); }
  .archive-header-v6l h1 { font-size: clamp(54px, 18vw, 88px); }
  .archive-grid-v6l { grid-template-columns: 1fr; }
  .archive-grid-v6l.is-colorgrid { grid-template-columns: repeat(auto-fill, minmax(24px, 1fr)); }
}
body, html[data-theme="light"] body { background-attachment: fixed; }
:root { --display-font: "Tektur", var(--mono); }
.hero-splash { overflow: hidden; transform-origin: top left; transition: max-height 420ms cubic-bezier(.22,.61,.36,1), opacity 300ms linear, transform 420ms cubic-bezier(.22,.61,.36,1), margin-bottom 420ms cubic-bezier(.22,.61,.36,1), padding-top 420ms cubic-bezier(.22,.61,.36,1), padding-bottom 420ms cubic-bezier(.22,.61,.36,1); max-height: 640px; }
.hero-splash h1 { font-family: var(--display-font); font-weight: 900; text-transform: uppercase; }
.hero-splash .eyebrow { margin-bottom: 20px; }
.hero-splash p:not(.eyebrow) { max-width: 620px; }
.hero-splash.is-collapsed { max-height: 0; opacity: 0; transform: translateY(-18px); margin-bottom: 0; padding-top: 0; padding-bottom: 0; pointer-events: none; }

@media (max-width: 760px) {
.hero-splash h1 { letter-spacing: -0.075em; line-height: 0.82; }
  .hero-splash { max-height: 520px; }
}
html, body { min-height: 100%; }
body { position: relative; background: #020202; background-image: none; }
html[data-theme="light"] body { background: #fff; background-image: none; }
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 48px 48px; background-position: 0 0; transform: translateZ(0); }
html[data-theme="light"] body::before { background-image: linear-gradient(rgba(0,0,0,0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.055) 1px, transparent 1px); }
.site-header, .page, .site-footer { position: relative; z-index: 1; }
.hero-splash { grid-template-columns: minmax(620px, 0.9fr) minmax(280px, 0.45fr); align-items: end; text-align: left; }
.hero-title-block { align-self: end; }
.hero-splash h1 { margin: 0; max-width: 960px; font-size: clamp(96px, 14vw, 228px); line-height: 0.68; letter-spacing: -0.115em; text-align: left; }
.hero-splash .eyebrow { margin: 28px 0 0; max-width: 720px; font-size: clamp(15px, 1.4vw, 24px); letter-spacing: 0.18em; }
.hero-description { align-self: end; margin: 0 0 8px; max-width: 520px; }
.archive-card-v6l h2 { font-size: 13px; }
@media (max-width: 980px) {
.hero-splash { grid-template-columns: 1fr; }
  .hero-description { max-width: 680px; }
  .hero-splash h1 { font-size: clamp(68px, 18vw, 148px); }
}
@media (max-width: 560px) {
body::before { background-size: 34px 34px; }
  .hero-splash h1 { font-size: clamp(56px, 21vw, 104px); line-height: 0.74; }
  .hero-splash .eyebrow { margin-top: 18px; font-size: 13px; line-height: 1.35; }
}
.readme-hero-splash, .archive-hero-splash { margin-bottom: 18px; }
.readme-hero-splash h1, .archive-hero-splash h1 { font-family: var(--display-font); font-weight: 900; text-transform: uppercase; letter-spacing: -0.115em; line-height: 0.68; font-size: clamp(96px, 14vw, 228px); }
.readme-hero-splash .eyebrow, .archive-hero-splash .eyebrow { margin-top: 28px; font-size: clamp(15px, 1.4vw, 24px); letter-spacing: 0.18em; }
@media (max-width: 980px) {
.readme-hero-splash h1, .archive-hero-splash h1 { font-size: clamp(68px, 18vw, 148px); }
}
@media (max-width: 560px) {
.readme-hero-splash h1, .archive-hero-splash h1 { font-size: clamp(56px, 21vw, 104px); line-height: 0.74; }
  .readme-hero-splash .eyebrow, .archive-hero-splash .eyebrow { margin-top: 18px; font-size: 13px; line-height: 1.35; }
}
.archive-header-v6l h1 { font-size: clamp(46px, 7vw, 88px); line-height: 0.9; letter-spacing: -0.07em; }

.error-text { color: var(--fg); font-family: var(--mono); font-weight: 500; }
.archive-hero-splash { display: grid; margin-bottom: 18px; }
.archive-hero-splash h1 { font-family: var(--display-font); font-weight: 900; text-transform: uppercase; letter-spacing: -0.115em; line-height: 0.68; font-size: clamp(96px, 14vw, 228px); }
.archive-hero-splash .eyebrow { margin-top: 28px; font-size: clamp(15px, 1.4vw, 24px); letter-spacing: 0.18em; }
.archive-header-v6l h1 { display: none; }
.archive-subtitle-line { margin: 0 0 18px; font-family: var(--mono); font-size: clamp(14px, 1.4vw, 22px); line-height: 1.25; letter-spacing: 0.16em; text-transform: uppercase; }
.archive-header-v6l { margin-top: 0; }
@media (max-width: 980px) {
.archive-hero-splash h1 { font-size: clamp(68px, 18vw, 148px); }
}
@media (max-width: 560px) {
.archive-hero-splash h1 { font-size: clamp(56px, 21vw, 104px); line-height: 0.74; }
  .archive-hero-splash .eyebrow { margin-top: 18px; font-size: 13px; line-height: 1.35; }
}
.result-header-v6k .eyebrow { font-family: var(--mono); letter-spacing: 0.14em; }
input[type="checkbox"] { accent-color: #050505; filter: grayscale(1) contrast(1.25); }
html:not([data-theme="light"]) input[type="checkbox"] { accent-color: #fff; }
.check input[type="checkbox"] { width: 18px; height: 18px; }
.brand { display: block; }
.brand-title, .brand-author, .inline-art-link { color: inherit; text-decoration: none; }
.brand-title:hover, .brand-author:hover, .inline-art-link:hover { text-decoration: none; opacity: 0.62; }
.site-footer p { letter-spacing: 0.04em; }

.archive-card-v6l.is-status-selected { outline: 2px solid var(--fg); outline-offset: 3px; }
.danger-button { border-color: var(--fg); }
.danger-button:hover { background: var(--fg); color: var(--bg); }
@media (max-width: 980px) {
.trace-grid-v7m { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
.trace-grid-v7m { grid-template-columns: 1fr; }
}
.archive-grid-v6l.is-compact .archive-card-v6l { display: block; }
.archive-grid-v6l.is-compact .archive-thumb-v6l { border-bottom: 0; }
.archive-grid-v6l.is-colorgrid .card-meta-v6l, .archive-grid-v6l.is-colorgrid h2 { display: none; }
.site-header { isolation: isolate; }
.site-header::before,
.site-header::after,
.site-header nav::after { content: none; display: none; }
.site-header nav { position: relative; isolation: isolate; overflow: hidden; }
.site-header nav a,
.site-header nav .theme-toggle { backdrop-filter: none; }
.site-header nav > * { position: relative; z-index: 1; }
.archive-card-v6l[hidden], .archive-grid-v6l.is-compact .archive-card-v6l[hidden], .archive-grid-v6l.is-colorgrid .archive-card-v6l[hidden] { display: none; }
.control-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.archive-grid-v6l:not(.is-colorgrid) .archive-thumb-v6l img, .archive-grid-v6l.is-compact .archive-thumb-v6l img, .archive-grid-v6l:not(.is-colorgrid) .archive-card-v6l img { object-fit: contain; }
.archive-grid-v6l.is-compact .archive-thumb-v6l { background: var(--bg); }
html[data-theme="light"] .archive-grid-v6l.is-compact .archive-thumb-v6l { background: #fff; }
html:not([data-theme="light"]) .archive-grid-v6l.is-compact .archive-thumb-v6l { background: #050505; }
.trace-grid-v7m { grid-template-columns: repeat(2, minmax(360px, 1fr)); gap: 28px 42px; }
.trace-grid-v7m dl { display: grid; grid-template-columns: minmax(150px, 0.42fr) minmax(240px, 1fr); column-gap: 24px; row-gap: 11px; min-width: 0; }
.trace-grid-v7m dt, .trace-grid-v7m dd { min-width: 0; }
.trace-grid-v7m dd { overflow-wrap: break-word; word-break: normal; hyphens: none; }
@media (max-width: 980px) {
.trace-grid-v7m { grid-template-columns: 1fr; }
  .trace-grid-v7m dl { grid-template-columns: minmax(130px, 0.36fr) minmax(190px, 1fr); }
}
@media (max-width: 560px) {
.trace-grid-v7m dl { grid-template-columns: 1fr; row-gap: 4px; }
  .trace-grid-v7m dt { margin-top: 12px; }
}
.archive-grid-v6l:not(.is-compact):not(.is-colorgrid) .archive-thumb-v6l { display: flex; align-items: flex-start; justify-content: center; background: var(--bg); }
.archive-grid-v6l:not(.is-compact):not(.is-colorgrid) .archive-thumb-v6l img { width: 100%; height: 100%; object-fit: contain; object-position: top center; }
.archive-grid-v6l.is-compact .archive-thumb-v6l { aspect-ratio: 1 / 1; display: block; overflow: hidden; }
.archive-grid-v6l.is-compact .archive-thumb-v6l img { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.result-header-v6k { position: relative; }
.progress-stats #stat_elapsed, .progress-stats #stat_eta { font-variant-numeric: tabular-nums; }


.archive-sort-btn { font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }

.archive-keyword-cloud-v7v { margin-top: 18px; }
.archive-keyword-list-v7v { display: flex; flex-wrap: wrap; align-items: baseline; }
.archive-keyword-list-v7v em { margin-left: 4px; font-size: 0.62em; font-style: normal; opacity: 0.45; }
.archive-grid-v6l.is-colorgrid .archive-card-v6l { background: var(--avg-color, var(--bg)); }
.archive-grid-v6l.is-colorgrid .archive-thumb-v6l { background: var(--avg-color, var(--bg)); }
@media (max-width: 700px) {
  .archive-sort-btn { flex: 1 1 50%; margin-left: 0; }
}
.archive-keyword-cloud-v7v[hidden] { display: none; }
.archive-keyword-list-v7v { gap: 6px 12px; }
.archive-keyword-list-v7v em { display: none; }

.archive-sort-btn {    padding: 0; font-size: 11px;  text-decoration: none; }
.archive-sort-btn + .archive-sort-btn { margin-left: 0; }
.archive-sort-btn.is-active, .archive-sort-btn:hover, .archive-sort-btn:focus-visible {    text-decoration: none; }
.archive-grid-v6l:not(.is-compact):not(.is-colorgrid) + .archive-keyword-cloud-v7v { display: block; }

.progress-stats #stat_phase_collect_time, .progress-stats #stat_phase_prepare_time, .progress-stats #stat_phase_build_time { font-variant-numeric: tabular-nums; }

.preset-btn, button{ box-shadow: none; }


/* ==========================================================================
   V7bu — Couche structurée courante
   ========================================================================== */

/* ==========================================================================
   V7bu — CSS refactor courant
   Objectif : remplacer les micro-overrides V7ac→V7bt par une couche lisible.
   Sections : public / progress / archive / view / admin / theme / responsive.
   ========================================================================== */

/* 03 — Public / Générer : interactions */


/* 04 — Progress */

/* 05 — Archive */
.archive-counters-v7bf,
.archive-counters-v7bi,
.archive-counters-v6l.archive-counters-v7bf,
.archive-counters-v6l.archive-counters-v7bi {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 620px;
}

.archive-counters-v7bf article,
.archive-counters-v7bi article {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.archive-counters-v7bf em,
.archive-counters-v7bi em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.archive-stats-note-v7bf {
  max-width: 76ch;
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.archive-grid-v6l.is-compact .card-meta-v6l {
  display: none;
}

.archive-grid-v6l.is-compact .archive-card-v6l::after,
.archive-grid-v6l.is-colorgrid .archive-card-v6l::after {
  display: none;
  content: none;
}

/* 06 — View / résultat */
.color-chip-v7bg,
.archive-global-color-v7bg {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  border: 1px solid var(--fg);
  background: var(--chip-color, transparent);
  vertical-align: -0.15em;
}

.trace-grid-v7bg dl {
  align-content: start;
}

.trace-grid-v7bg .trace-group-title-v7bg {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: var(--fg);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trace-grid-v7bg .trace-group-title-v7bg + dd {
  display: none;
}

.result-main-figure .result-image-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: var(--result-aspect, auto);
  overflow: hidden;
  background: var(--panel);
}

.result-main-figure .result-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

/* 07 — Thème */
html[data-theme="light"] .archive-counters-v7bf em,
html[data-theme="light"] .archive-counters-v7bi em,
html[data-theme="light"] .archive-stats-note-v7bf {
  color: #555;
}

.site-header nav a:hover,
.site-header nav .theme-toggle:hover {
  background: var(--fg);
  color: var(--bg);
}

.site-header nav .theme-toggle:hover span {
  background: var(--bg);
  border-color: var(--bg);
}

html[data-theme="light"] .site-header nav .theme-toggle:hover span {
  background: #fff;
  border-color: #fff;
}

/* 08 — Responsive */
@media (max-width: 1180px) {
  .archive-counters-v7bf,
  .archive-counters-v7bi,
  .archive-counters-v6l.archive-counters-v7bf,
  .archive-counters-v6l.archive-counters-v7bi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .archive-counters-v7bf,
  .archive-counters-v7bi,
  .archive-counters-v6l.archive-counters-v7bf,
  .archive-counters-v6l.archive-counters-v7bi {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

/* ==========================================================================
   V7bv — Hotfix après refactor CSS
   Corrige :
   - cartes Réglages/Sources noires en thème clair ;
   - alignement Progress : État du processus en haut ;
   - Journal immédiatement sous l'image.
   ========================================================================== */

/* Public / Générer — cartes en thème clair */


/* ==========================================================================
   V7bw — Hotfix bordures Générer + calage Progress
   ========================================================================== */

/* Générer / thème clair : plus de bordure basse épaisse sur les cartes actives */


/* Champ mots-clés : placeholder “…” lisible, sans valeur par défaut */


/* ==========================================================================
   V7bx — Stabilisation layout / bordures / progress
   ========================================================================== */

/* Générer : cartes actives propres en thème clair, sans bordure basse parasite */


/* Champ mots-clés */


/* Progress : annule le sticky historique et cale les blocs sur la même ligne haute */
.progress-page-v6g .progress-workbench {
  display: grid;
  grid-template-columns: minmax(520px, 1.35fr) minmax(320px, 0.65fr);
  grid-auto-flow: row;
  align-items: start;
  align-content: start;
  column-gap: 18px;
  row-gap: 14px;
}

.progress-page-v6g .progress-stage-panel {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  margin: 0;
}

.progress-page-v6g .progress-inspector {
  position: static;
  top: auto;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin: 0;
  transform: none;
}

.progress-page-v6g .progress-inspector .phase-stack {
  margin-top: 0;
}

.progress-page-v6g .progress-preview-wrap,
.progress-page-v6g .progress-preview-wrap img,
.progress-page-v6g .progress-layer {
  max-height: none;
}

.progress-page-v6g .progress-preview-wrap img,
.progress-page-v6g .progress-layer {
  width: 100%;
  height: auto;
}

@media (max-width: 980px) {
  .progress-page-v6g .progress-workbench {
    grid-template-columns: 1fr;
  }

  .progress-page-v6g .progress-stage-panel,
  .progress-page-v6g .progress-inspector {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/* V7by — Progress preview : fond selon thème */
.progress-page-v6g .progress-preview-wrap,
.progress-page-v6g .progress-preview-wrap canvas,
.progress-page-v6g .progress-layer {
  background-color: #050505;
}

html[data-theme="light"] .progress-page-v6g .progress-preview-wrap,
html[data-theme="light"] .progress-page-v6g .progress-preview-wrap canvas,
html[data-theme="light"] .progress-page-v6g .progress-layer {
  background-color: #fff;
}

/* V7by — Admin test API */
.api-test-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 11px;
}

.api-test-table th,
.api-test-table td {
  padding: 9px 8px;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.api-test-good td { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.api-test-ok td { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.api-test-slow td { opacity: 0.78; }
.api-test-weak td,
.api-test-bad td { opacity: 0.62; }

.source-test-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 14px 0;
}

.source-test-grid label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px;
  align-items: start;
  font-family: var(--mono);
  font-size: 11px;
}

.source-test-grid small {
  grid-column: 2;
  color: var(--muted);
}

.api-probe-list {
  display: grid;
  gap: 8px;
  padding-left: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 11px;
}

@media (max-width: 760px) {
  .source-test-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   V7cc — Navigation de formulaire + corpus avant génération
   ========================================================================== */

html {
  scroll-behavior: smooth;
}


/* ==========================================================================
   V7cd — Quota visible avant génération
   ========================================================================== */

.quota-status-v7cd {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--fg) 28%, transparent);
  background: var(--panel);
  font-family: var(--mono);
}

.quota-status-v7cd h3 {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.quota-status-v7cd p {
  margin: 0;
  color: var(--fg);
  font-size: 11px;
  line-height: 1.35;
}

.quota-status-v7cd strong {
  font-weight: 400;
  color: var(--fg);
}

.quota-status-v7cd.is-empty {
  border-color: var(--fg);
}

html[data-theme="light"] .quota-status-v7cd {
  background: #fff;
  color: #050505;
  border-color: #050505;
}

html[data-theme="light"] .quota-status-v7cd h3,
html[data-theme="light"] .quota-status-v7cd p,
html[data-theme="light"] .quota-status-v7cd strong {
  color: #050505;
}

/* V7ce — Quota après le bouton Lancer */
.quota-status-after-button-v7ce {
  margin: 14px 0 0;
}

/* ==========================================================================
   V8a — Admin stable dashboard
   ========================================================================== */


/* ==========================================================================
   V8b — Correction boutons admin sur fond blanc
   ========================================================================== */


/* ==========================================================================
   V8c — Admin API test cache
   ========================================================================== */


.admin-api-test-page .api-test-good td,
.admin-api-test-page .api-test-ok td {
  border-left: 3px solid var(--fg);
}

.admin-api-test-page .api-test-slow td,
.admin-api-test-page .api-test-weak td,
.admin-api-test-page .api-test-bad td {
  border-left: 3px double var(--fg);
}

.admin-api-test-page details {
  border-top: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  padding: 10px 0;
}

.admin-api-test-page details summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ==========================================================================
   V8d — Admin Corpus
   ========================================================================== */


.admin-corpus-page details {
  border-top: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  padding-top: 9px;
}

.admin-corpus-page summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* ==========================================================================
   V8e — Cartel + contraste Générer + menu haut
   ========================================================================== */

/* Menu haut : correction thème sombre, bordures et lisibilité */
html:not([data-theme="light"]) .site-header {
  background: #050505;
  color: #fff;
  border-bottom: 1px solid #2c2c2c;
}

html:not([data-theme="light"]) .site-header nav {
  background: #050505;
  border: 1px solid #2c2c2c;
}

html:not([data-theme="light"]) .site-header nav a,
html:not([data-theme="light"]) .site-header nav .theme-toggle {
  background: #050505;
  color: #fff;
  border-color: #2c2c2c;
}

html:not([data-theme="light"]) .site-header nav a:hover,
html:not([data-theme="light"]) .site-header nav .theme-toggle:hover {
  background: #fff;
  color: #050505;
}

html:not([data-theme="light"]) .theme-toggle span {
  background: #fff;
  border-color: #fff;
}

html:not([data-theme="light"]) .site-header nav .theme-toggle:hover span {
  background: #050505;
  border-color: #050505;
}

/* Générer : icônes lisibles en thème clair */


/* ==========================================================================
   V8f — Admin Archives
   ========================================================================== */


/* ==========================================================================
   V8g — Correction globale boutons thème clair
   ========================================================================== */

/*
  Problème récurrent :
  des boutons héritent d'un fond noir via les règles générales,
  puis d'un texte noir via les règles light, ce qui donne des blocs noirs vides.
  Cette couche force une convention stable en thème clair.
*/

html[data-theme="light"] button,
html[data-theme="light"] input[type="submit"],
html[data-theme="light"] input[type="button"],
html[data-theme="light"] .button-link {
  border-color: #050505;
}

html[data-theme="light"] button:not(.secondary):not(.theme-toggle),
html[data-theme="light"] input[type="submit"],
html[data-theme="light"] input[type="button"],
html[data-theme="light"] .button-link:not(.secondary) {
  background: #050505;
  color: #fff;
}

html[data-theme="light"] button:not(.secondary):not(.theme-toggle):hover,
html[data-theme="light"] button:not(.secondary):not(.theme-toggle):focus-visible,
html[data-theme="light"] input[type="submit"]:hover,
html[data-theme="light"] input[type="submit"]:focus-visible,
html[data-theme="light"] input[type="button"]:hover,
html[data-theme="light"] input[type="button"]:focus-visible,
html[data-theme="light"] .button-link:not(.secondary):hover,
html[data-theme="light"] .button-link:not(.secondary):focus-visible {
  background: #fff;
  color: #050505;
}

html[data-theme="light"] button.secondary,
html[data-theme="light"] .button-link.secondary {
  background: #fff;
  color: #050505;
}

html[data-theme="light"] button.secondary:hover,
html[data-theme="light"] button.secondary:focus-visible,
html[data-theme="light"] .button-link.secondary:hover,
html[data-theme="light"] .button-link.secondary:focus-visible {
  background: #050505;
  color: #fff;
}

/* Bouton d'inversion : exception volontaire */
html[data-theme="light"] .theme-toggle {
  background: #fff;
  color: #050505;
}

html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .theme-toggle:focus-visible {
  background: #050505;
  color: #fff;
}

/* Admin : les anciens boutons de sélection utilisent parfois button sans classe. */


/* ==========================================================================
   V8i — Fix CSS prioritaire : thème clair, header fixe, progress dark fade
   ========================================================================== */

/*
  Correction de cascade :
  V8g imposait une règle globale sur button en thème clair.
  Les cartes de réglages sont aussi des <button>, donc elles héritaient
  d'un fond noir et devenaient illisibles. On les sort explicitement
  de la logique “bouton principal”.
*/



/* Header réellement fixe */
:root {
  --site-header-fixed-height-v8i: 64px;
}

body {
  padding-top: var(--site-header-fixed-height-v8i);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: var(--site-header-fixed-height-v8i);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

html:not([data-theme="light"]) .site-header {
  background: #050505;
  color: #fff;
}

html[data-theme="light"] .site-header {
  background: #fff;
  color: #050505;
}

@media (max-width: 640px) {
  :root {
    --site-header-fixed-height-v8i: 92px;
  }
}

/* Progress : fondu vers le noir en thème sombre */
html:not([data-theme="light"]) .progress-preview-wrap,
html:not([data-theme="light"]) .progress-bg-layer,
html:not([data-theme="light"]) .progress-preview-wrap.matrix-fading .progress-bg-layer {
  background: #000;
}

.progress-preview-wrap[data-bg-mode="black"],
.progress-preview-wrap[data-bg-mode="black"] .progress-bg-layer,
.progress-preview-wrap[data-bg-mode="black"].matrix-fading .progress-bg-layer {
  background: #000;
}

html[data-theme="light"] .progress-preview-wrap,
html[data-theme="light"] .progress-bg-layer,
html[data-theme="light"] .progress-preview-wrap.matrix-fading .progress-bg-layer,
.progress-preview-wrap[data-bg-mode="white"] .progress-bg-layer {
  background: #fff;
}

/* ==========================================================================
   V8j — Cascade CSS : cartes, archive, saisie + vides
   ========================================================================== */

/*
  Les cartes de réglages sont des boutons, mais ne doivent PAS hériter
  du style “bouton principal”. Sélecteurs volontairement plus forts que
  html[data-theme="light"] button:not(...).
*/


/* Saisie mots-clés : suppression du double contour navigateur */
input[name="keywords"]:focus, input[name="keywords"]:focus-visible{
  outline: 0;
  box-shadow: none;
}

html:not([data-theme="light"]) input[name="keywords"]:focus, html:not([data-theme="light"]) input[name="keywords"]:focus-visible{
  border-color: #fff;
}

html[data-theme="light"] input[name="keywords"]:focus, html[data-theme="light"] input[name="keywords"]:focus-visible{
  border-color: #050505;
}

/* ===== FONDATION V9 ===== */
/*
  Des Frags Process — V9R CSS Stable Foundation
  Source unique des états visuels et de la parité clair/sombre.
  Chargée après styles.css.
*/

/* ==========================================================================
   00. Tokens
   ========================================================================== */

:root {
  --dfp-bg: #050505;
  --dfp-fg: #ffffff;
  --dfp-panel: #050505;
  --dfp-muted: rgba(255,255,255,0.56);

  --dfp-block-border: rgba(255,255,255,0.28);
  --dfp-control-border: rgba(255,255,255,0.56);
  --dfp-active-border: rgba(255,255,255,0.96);

  --dfp-control-bg: #050505;
  --dfp-control-fg: #ffffff;
  --dfp-control-active-bg: #050505;
  --dfp-control-active-fg: #ffffff;

  --dfp-input-bg: #050505;
  --dfp-input-fg: #ffffff;

  --dfp-drop-border: rgba(255,255,255,0.54);
  --dfp-drop-active-border: #ffffff;

  --dfp-border-width: 1px;
}

html[data-theme="light"] {
  --dfp-bg: #ffffff;
  --dfp-fg: #050505;
  --dfp-panel: #ffffff;
  --dfp-muted: rgba(5,5,5,0.60);

  --dfp-block-border: rgba(5,5,5,0.72);
  --dfp-control-border: rgba(5,5,5,0.78);
  --dfp-active-border: #050505;

  --dfp-control-bg: #ffffff;
  --dfp-control-fg: #050505;
  --dfp-control-active-bg: #ffffff;
  --dfp-control-active-fg: #050505;

  --dfp-input-bg: #ffffff;
  --dfp-input-fg: #050505;

  --dfp-drop-border: rgba(5,5,5,0.58);
  --dfp-drop-active-border: #050505;
}

/* Compat anciens noms V9 */
:root,
html[data-theme="light"] {
  --dfp-choice-border: var(--dfp-control-border);
  --dfp-choice-active-border: var(--dfp-active-border);
  --dfp-choice-bg: var(--dfp-control-bg);
  --dfp-choice-fg: var(--dfp-control-fg);
  --dfp-choice-muted: var(--dfp-muted);
  --dfp-border-block: var(--dfp-block-border);
  --dfp-border-control: var(--dfp-control-border);
  --dfp-border-active: var(--dfp-active-border);
  --dfp-focus-ring: var(--dfp-active-border);
}

/* ==========================================================================
   01. Blocs structurels — passifs
   ========================================================================== */


/* ==========================================================================
   02. Menu protocole — C
   ========================================================================== */




/* Progress — journal intégré en bas de l’inspecteur */
.progress-page-v6g .progress-inspector-log {
  display: block;
  visibility: visible;
  opacity: 1;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--dfp-block-border);
  background: transparent;
  box-shadow: none;
}

.progress-page-v6g .progress-inspector-log h2 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.progress-page-v6g .progress-inspector-log .process-log {
  display: block;
  min-height: 84px;
  margin-bottom: 0;
  max-height: 260px;
  overflow: auto;
}

.progress-page-v6g .progress-inspector-log .process-log li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  font-size: 11px;
  line-height: 1.35;
}

/* ==========================================================================
   04. Zone d’action — D4 dépôt image
   ========================================================================== */


/* D4 — intérieur de la zone de dépôt et aperçu sélectionné
   Le nettoyage V9r avait retiré opacity:0 du champ fichier, ce qui rendait
   le contrôle natif visible au-dessus de l’aperçu. */


/* ==========================================================================
   05. Champs texte — E2 + Archives
   ========================================================================== */


/* Croix Archives — thème clair */


/* Croix Archives — thème sombre conservé */


/* Archives — correction définitive de la croix en thème clair.
   Sélecteur volontairement plus spécifique que les anciennes règles génériques
   de styles.css appliquées aux boutons du thème clair. */


/* ==========================================================================
   06. Boutons groupés — Archives
   ========================================================================== */


/* ==========================================================================
   07. Boutons d’action — H3 + Read Me + View
   ========================================================================== */


/* Générer / bouton principal — clair */


/* Générer / bouton principal — sombre */


/* Read Me — thème clair */
html[data-theme="light"] .readme-actions .button-link,
html[data-theme="light"] .readme-page .button-link {
  background: #ffffff;
  color: #050505;
  border: 1px solid #050505;
}

html[data-theme="light"] .readme-actions .button-link:hover,
html[data-theme="light"] .readme-actions .button-link:focus-visible,
html[data-theme="light"] .readme-page .button-link:hover,
html[data-theme="light"] .readme-page .button-link:focus-visible {
  background: #050505;
  color: #ffffff;
  border-color: #050505;
}

/* Read Me — thème sombre, équivalent inversé */
html:not([data-theme="light"]) .readme-actions .button-link,
html:not([data-theme="light"]) .readme-page .button-link {
  background: #ffffff;
  color: #050505;
  border: 1px solid #ffffff;
}

html:not([data-theme="light"]) .readme-actions .button-link:hover,
html:not([data-theme="light"]) .readme-actions .button-link:focus-visible,
html:not([data-theme="light"]) .readme-page .button-link:hover,
html:not([data-theme="light"]) .readme-page .button-link:focus-visible {
  background: #050505;
  color: #ffffff;
  border-color: #ffffff;
}

/* View — bouton principal Télécharger / bouton secondaire Archives */

/* Thème clair : télécharger noir, archives blanc */
html[data-theme="light"] .result-actions .button-link:first-child {
  background: #050505;
  color: #ffffff;
  border: 1px solid #050505;
}

html[data-theme="light"] .result-actions .button-link:first-child:hover,
html[data-theme="light"] .result-actions .button-link:first-child:focus-visible {
  background: #ffffff;
  color: #050505;
  border-color: #050505;
}

html[data-theme="light"] .result-actions .button-link.secondary,
html[data-theme="light"] .result-actions .button-link:nth-child(2) {
  background: #ffffff;
  color: #050505;
  border: 1px solid #050505;
}

html[data-theme="light"] .result-actions .button-link.secondary:hover,
html[data-theme="light"] .result-actions .button-link.secondary:focus-visible,
html[data-theme="light"] .result-actions .button-link:nth-child(2):hover,
html[data-theme="light"] .result-actions .button-link:nth-child(2):focus-visible {
  background: #050505;
  color: #ffffff;
  border-color: #050505;
}

/* Thème sombre : télécharger blanc, archives noir */
html:not([data-theme="light"]) .result-actions .button-link:first-child {
  background: #ffffff;
  color: #050505;
  border: 1px solid #ffffff;
}

html:not([data-theme="light"]) .result-actions .button-link:first-child:hover,
html:not([data-theme="light"]) .result-actions .button-link:first-child:focus-visible {
  background: #050505;
  color: #ffffff;
  border-color: #ffffff;
}

html:not([data-theme="light"]) .result-actions .button-link.secondary,
html:not([data-theme="light"]) .result-actions .button-link:nth-child(2) {
  background: #050505;
  color: #ffffff;
  border: 1px solid #ffffff;
}

html:not([data-theme="light"]) .result-actions .button-link.secondary:hover,
html:not([data-theme="light"]) .result-actions .button-link.secondary:focus-visible,
html:not([data-theme="light"]) .result-actions .button-link:nth-child(2):hover,
html:not([data-theme="light"]) .result-actions .button-link:nth-child(2):focus-visible {
  background: #ffffff;
  color: #050505;
  border-color: #ffffff;
}

/* ==========================================================================
   08. Footer
   ========================================================================== */

.site-footer {
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 5, 1) 0%,
    rgba(5, 5, 5, 1) 38%,
    rgba(5, 5, 5, 0) 100%
  );
  color: var(--dfp-muted);
  border-top: var(--dfp-border-width) solid var(--dfp-block-border);
  box-shadow: none;
}

html[data-theme="light"] .site-footer {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 1) 38%,
    rgba(255, 255, 255, 0) 100%
  );
}

.site-footer p,
.site-footer a,
.site-footer small {
  color: var(--dfp-muted);
}


/* ==========================================================================
   DES FRAGS PROCESS — V10 RESET
   Base : comportement V9 stable.
   Une seule feuille CSS, aucune couche @layer, aucune pile de correctifs.
   ========================================================================== */

:root {
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --display-font: "IBM Plex Mono", var(--mono);
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--mono);
}

body {
  font-weight: 300;
}

.site-header nav,
.site-header nav a,
.site-header nav button {
  font-family: var(--mono);
  font-weight: 400;
}

/* Logo compact : invisible en haut, visible après le repli V9 du hero. */
.brand-title {
  display: flex;
  align-items: center;
  width: clamp(185px, 19vw, 297px);
  height: 25px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(2px);
  transition: opacity 160ms linear, transform 160ms ease-out;
}

html.hero-collapsed .brand-title,
.site-header-compact .brand-title {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.brand-title span {
  display: none;
}

.brand-title svg {
  display: block;
  width: 100%;
  height: auto;
  color: currentColor;
}

/* Hero : flux naturel V9, aucune hauteur de viewport. */
.hero-splash,
.readme-hero-splash,
.archive-hero-splash {
  min-height: 0;
  height: auto;
  max-height: 760px;
  overflow: hidden;
}

.hero-splash h1,
.readme-hero-splash h1,
.archive-hero-splash h1 {
  width: min(58vw, 920px);
  max-width: 100%;
  margin: 0;
  font-size: 0;
  line-height: 0;
  letter-spacing: 0;
}

.hero-splash h1 .logo-svg,
.readme-hero-splash h1 .logo-svg,
.archive-hero-splash h1 .logo-svg {
  display: block;
  width: 100%;
}

.hero-splash h1 svg,
.readme-hero-splash h1 svg,
.archive-hero-splash h1 svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--fg);
}

.hero-splash.is-collapsed,
.readme-hero-splash.is-collapsed,
.archive-hero-splash.is-collapsed {
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.hero-splash .eyebrow,
.readme-hero-splash .eyebrow,
.archive-hero-splash .eyebrow {
  font-family: var(--mono);
  font-weight: 300;
}

.hero-description {
  font-family: var(--mono);
  font-weight: 300;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 760px) and (max-width: 1279px) {
  .hero-splash h1,
  .readme-hero-splash h1,
  .archive-hero-splash h1 {
    width: min(68vw, 720px);
  }
}

@media (max-width: 759px) {
  .brand-title {
    width: clamp(165px, 55vw, 236px);
    height: 20px;
  }

  .hero-splash h1,
  .readme-hero-splash h1,
  .archive-hero-splash h1 {
    width: min(88vw, 520px);
  }
}
/* ==========================================================================
   07. GÉNÉRER — V10 RESET 3
   Blanc/noir strict, sans grille interne, contrôles textuels compacts.
   ========================================================================== */

.generator-page { --generator-gap: clamp(14px, 2vw, 26px); }

.generator-page .protocol-strip {
  position: sticky; top: var(--header-height, 72px); z-index: 8;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 var(--generator-gap); border: 1px solid var(--line);
  background: var(--bg);
}
.generator-page .protocol-strip a {
  min-height: 48px; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-right: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font-family: var(--mono);
  font-size: 10px; font-weight: 400; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none;
}
.generator-page .protocol-strip.is-admin { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.generator-page .protocol-strip a:last-child { border-right: 0; }
.generator-page .protocol-strip a:hover,
.generator-page .protocol-strip a:focus-visible { box-shadow: inset 0 0 0 1px var(--fg); }
.generator-page .protocol-strip b { font-weight: 500; }

.generator-page .generator { display: grid; gap: var(--generator-gap); }

.generator-page .panel {
  margin: 0; padding: clamp(18px, 2.2vw, 30px);
  border: 1px solid var(--line); border-radius: 0;
  background: var(--bg); background-image: none; color: var(--fg);
}
.generator-page .panel::before,
.generator-page .panel::after { display: none; }

.generator-page .panel h2,
.generator-page .panel h3 {
  margin: 0; font-family: var(--mono); font-weight: 500; text-transform: uppercase;
}
.generator-page .panel h2 { font-size: clamp(13px, 1.1vw, 16px); letter-spacing: .07em; }
.generator-page .panel h3 { font-size: 11px; letter-spacing: .06em; }

.generator-page .section-head {
  display: grid; grid-template-columns: minmax(180px, .55fr) minmax(280px, 1fr);
  gap: var(--generator-gap); align-items: start; margin-bottom: clamp(18px, 2vw, 28px);
}
.generator-page .muted { color: var(--muted); font-weight: 300; }

.generator-page .upload-panel {
  display: grid; grid-template-columns: minmax(240px, .72fr) minmax(320px, 1.28fr);
  gap: var(--generator-gap); align-items: stretch;
}
.generator-page .upload-copy { display: flex; flex-direction: column; gap: 16px; }

.generator-page .preview-meta,
.generator-page .corpus-status-v7cc dl {
  display: grid; grid-template-columns: minmax(140px, .65fr) minmax(160px, 1fr);
  gap: 7px 20px; margin: auto 0 0; padding-top: 18px;
  border-top: 1px solid var(--line); font-size: 11px;
}
.generator-page dt { color: var(--muted); text-transform: uppercase; }
.generator-page dd { margin: 0; }

.generator-page .file-drop {
  min-height: 310px; display: grid; place-items: center; align-content: center;
  gap: 8px; padding: 24px; border: 1px dashed var(--line); cursor: pointer;
  text-align: center; background: var(--bg); background-image: none; color: var(--fg);
}
.generator-page .file-drop:hover,
.generator-page .file-drop:focus-within,
.generator-page .file-drop.is-dragover {
  border-style: solid; box-shadow: inset 0 0 0 1px var(--fg);
}
.generator-page .file-drop input[type="file"] {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; opacity: 0;
}
.generator-page .drop-title {
  font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
}
.generator-page .drop-help { font-size: 11px; font-weight: 300; }
.generator-page .file-drop img { width: 100%; max-height: 460px; object-fit: contain; }

.generator-page .field { display: grid; gap: 10px; }
.generator-page .field > span {
  font-size: 10px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase;
}
.generator-page input[type="text"] {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 0;
  background: var(--bg); color: var(--fg); font-family: var(--mono); font-weight: 400;
}
.generator-page .keyword-field { position: relative; }
.generator-page .keyword-counter {
  justify-self: end; margin-top: -4px; color: var(--muted); font-size: 10px;
}

.generator-page .visually-hidden-select-v7ai {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Composant de choix commun aux Sources et aux Réglages. */
.generator-page .source-family-grid-v7ai,
.generator-page .setting-choice-grid-v7ai {
  display: grid;
  border: 0;
}

.generator-page .source-family-card-v7ai,
.generator-page .setting-choice-card-v7ai {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg);
  background-image: none;
  color: var(--fg);
  cursor: pointer;
}

.generator-page .source-family-card-v7ai:hover,
.generator-page .source-family-card-v7ai:focus-within,
.generator-page .source-family-card-v7ai.is-active,
.generator-page .setting-choice-card-v7ai:hover,
.generator-page .setting-choice-card-v7ai:focus-visible,
.generator-page .setting-choice-card-v7ai.is-active {
  box-shadow: inset 0 0 0 1px var(--fg);
}

.generator-page .source-family-grid-v7ai {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.generator-page .source-family-grid-v7ai.is-admin-v108 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.generator-page .source-family-card-v7ai {
  min-height: 132px;
  display: block;
  padding: 18px;
}
.generator-page .source-family-card-v7ai input {
  position: absolute; opacity: 0; pointer-events: none;
}
.generator-page .source-family-card-v7ai h3 {
  max-width: 100%; margin-bottom: 10px;
}
.generator-page .source-family-card-v7ai p {
  max-width: 52ch; margin: 0; font-size: 11px; line-height: 1.5;
}
.generator-page .source-admin-link-v108 {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
  text-align: right;
}
.generator-page .source-admin-link-v108 a {
  color: inherit;
  text-decoration: none;
}
.generator-page .source-admin-link-v108 a:hover,
.generator-page .source-admin-link-v108 a:focus-visible {
  color: var(--fg);
}

.generator-page .settings-visual-groups-v7ai { display: grid; gap: 22px; }
.generator-page .setting-choice-group-v7ai { display: grid; gap: 10px; }
.generator-page .setting-choice-grid-v7ai,
.generator-page .setting-choice-grid-v7ai.five-v7am {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  justify-content: stretch;
  gap: 8px;
}
.generator-page .setting-choice-card-v7ai {
  min-height: 76px; display: grid; align-content: center; gap: 3px;
  padding: 13px 14px; text-align: left;
}
.generator-page .setting-choice-card-v7ai strong {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
}
.generator-page .setting-choice-card-v7ai em {
  font-size: 9px; font-style: normal; font-weight: 300;
}

.generator-page .process-panel-v6f { display: grid; gap: 18px; }
.generator-page .submit-row { display: grid; margin: 0; }
.generator-page .submit-row button,
.generator-page .submit-row .button {
  min-height: 58px; border: 1px solid var(--fg); border-radius: 0;
  background: var(--fg); color: var(--bg); font-family: var(--mono);
  font-size: 12px; font-weight: 500; letter-spacing: .07em;
  text-transform: uppercase; cursor: pointer;
}
.generator-page .submit-row button:hover,
.generator-page .submit-row button:focus-visible {
  background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg);
}


/* Fond des composants Générer : noir/blanc pur, sans trame interne.
   Sélecteurs volontairement plus spécifiques que les anciennes règles V9. */
html[data-theme="light"] body .generator-page .panel,
html[data-theme="light"] body .generator-page .upload-panel,
html[data-theme="light"] body .generator-page .keyword-panel-v7ae,
html[data-theme="light"] body .generator-page .source-panel-v7ai,
html[data-theme="light"] body .generator-page .controls-panel-v7ai,
html[data-theme="light"] body .generator-page .process-panel-v6f,
html[data-theme="light"] body .generator-page .file-drop {
  background: #fff;
  background-color: #fff;
  background-image: none;
}

html:not([data-theme="light"]) body .generator-page .panel,
html:not([data-theme="light"]) body .generator-page .upload-panel,
html:not([data-theme="light"]) body .generator-page .keyword-panel-v7ae,
html:not([data-theme="light"]) body .generator-page .source-panel-v7ai,
html:not([data-theme="light"]) body .generator-page .controls-panel-v7ai,
html:not([data-theme="light"]) body .generator-page .process-panel-v6f,
html:not([data-theme="light"]) body .generator-page .file-drop {
  background: #000;
  background-color: #000;
  background-image: none;
}

html[data-theme="light"] body .generator-page .source-family-card-v7ai,
html[data-theme="light"] body .generator-page .setting-choice-card-v7ai {
  background: #fff;
  background-color: #fff;
  background-image: none;
}

html:not([data-theme="light"]) body .generator-page .source-family-card-v7ai,
html:not([data-theme="light"]) body .generator-page .setting-choice-card-v7ai {
  background: #000;
  background-color: #000;
  background-image: none;
}


/* ==========================================================================
   PANNEAUX PUBLICS — MODÈLE UNIQUE
   Le bloc Image-matrice devient la référence : fond uni, sans grille interne.
   ========================================================================== */

html[data-theme="light"] body .panel, html[data-theme="light"] body .readme-page .panel, html[data-theme="light"] body .archive-page .panel, html[data-theme="light"] body .view-page .panel, html[data-theme="light"] body .progress-page .panel, html[data-theme="light"] body .archive-card-v6l, html[data-theme="light"] body .archive-header-v6l, html[data-theme="light"] body .result-cartel-v6k, html[data-theme="light"] body .progress-inspector, html[data-theme="light"] body .progress-stage-panel, html[data-theme="light"] body .process-log-card{
  background: #fff;
  background-color: #fff;
  background-image: none;
}

html:not([data-theme="light"]) body .panel, html:not([data-theme="light"]) body .readme-page .panel, html:not([data-theme="light"]) body .archive-page .panel, html:not([data-theme="light"]) body .view-page .panel, html:not([data-theme="light"]) body .progress-page .panel, html:not([data-theme="light"]) body .archive-card-v6l, html:not([data-theme="light"]) body .archive-header-v6l, html:not([data-theme="light"]) body .result-cartel-v6k, html:not([data-theme="light"]) body .progress-inspector, html:not([data-theme="light"]) body .progress-stage-panel, html:not([data-theme="light"]) body .process-log-card{
  background: #000;
  background-color: #000;
  background-image: none;
}

body .panel::before,
body .panel::after,
body .archive-card-v6l::before,
body .archive-card-v6l::after {
  display: none;
}


/* V10 RESET 7 — hero : séparation stricte logo / description */
.generator-page .hero-splash {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 34%);
  column-gap: clamp(28px, 5vw, 84px);
  align-items: end;
}

.generator-page .hero-title-block {
  min-width: 0;
}

.generator-page .hero-splash h1 {
  width: min(100%, 760px);
}

.generator-page .hero-description {
  position: relative;
  z-index: 1;
  max-width: 38ch;
  margin: 0 0 8px;
  padding-left: 0;
  background: transparent;
  color: var(--muted);
}

@media (max-width: 980px) {
  .generator-page .hero-splash {
    grid-template-columns: 1fr;
    row-gap: 22px;
  }

  .generator-page .hero-description {
    max-width: 58ch;
  }
}


@media (max-width: 920px) {
  .generator-page .protocol-strip {
    position: static; grid-template-columns: repeat(5, minmax(104px, 1fr)); overflow-x: auto;
  }
  .generator-page .protocol-strip.is-admin {
    grid-template-columns: repeat(5, minmax(104px, 1fr));
  }
  .generator-page .upload-panel,
  .generator-page .section-head { grid-template-columns: 1fr; }
  .generator-page .source-family-grid-v7ai { grid-template-columns: 1fr; }
  .generator-page .setting-choice-grid-v7ai,
  .generator-page .setting-choice-grid-v7ai.five-v7am {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  }
}
@media (max-width: 560px) {
  .generator-page .panel { padding: 16px; }
  .generator-page .file-drop { min-height: 230px; }
  .generator-page .setting-choice-grid-v7ai,
  .generator-page .setting-choice-grid-v7ai.five-v7am { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FONDS ET CONTRÔLES — RÈGLE CANONIQUE V10 RESET 10
   ========================================================================== */

html[data-theme="light"] body .panel, html[data-theme="light"] body .archive-card-v6l, html[data-theme="light"] body .archive-counters-v6l article, html[data-theme="light"] body .result-metrics-strip article, html[data-theme="light"] body .result-cartel-v6k, html[data-theme="light"] body .progress-inspector, html[data-theme="light"] body .progress-stage-panel, html[data-theme="light"] body .process-log-card, html[data-theme="light"] body .result-main-figure, html[data-theme="light"] body .archive-header-v6l{
  background: #fff;
  background-color: #fff;
  background-image: none;
}

html:not([data-theme="light"]) body .panel, html:not([data-theme="light"]) body .archive-card-v6l, html:not([data-theme="light"]) body .archive-counters-v6l article, html:not([data-theme="light"]) body .result-metrics-strip article, html:not([data-theme="light"]) body .result-cartel-v6k, html:not([data-theme="light"]) body .progress-inspector, html:not([data-theme="light"]) body .progress-stage-panel, html:not([data-theme="light"]) body .process-log-card, html:not([data-theme="light"]) body .result-main-figure, html:not([data-theme="light"]) body .archive-header-v6l{
  background: #000;
  background-color: #000;
  background-image: none;
}

/* Les cartes de réglage gardent leur fond et leur texte visibles. */
html[data-theme="light"] body .generator-page .setting-choice-card-v7ai {
  color: #000;
}

html[data-theme="light"] body .generator-page .setting-choice-card-v7ai strong,
html[data-theme="light"] body .generator-page .setting-choice-card-v7ai em {
  color: #000;
}

html:not([data-theme="light"]) body .generator-page .setting-choice-card-v7ai {
  color: #fff;
}

html:not([data-theme="light"]) body .generator-page .setting-choice-card-v7ai strong,
html:not([data-theme="light"]) body .generator-page .setting-choice-card-v7ai em {
  color: #fff;
}

html body .panel::before,
html body .panel::after,
html body .archive-card-v6l::before,
html body .archive-card-v6l::after {
  display: none;
}

/* ==========================================================================
   ARCHIVES — ÉTAT SÉLECTIONNÉ EN THÈME CLAIR
   Fond blanc, texte noir, bordure intérieure noire de 2 px.
   ========================================================================== */


/* ==========================================================================
   ARCHIVES — SÉLECTION SOMBRE + ALIGNEMENT DES CONTRÔLES
   ========================================================================== */

/* Thème sombre : fond noir, texte blanc, bordure intérieure blanche 2 px. */


/* Tous les contrôles de la barre Archives ont la même hauteur et le même axe. */


/* Sources : séparation nette entre les cartes et le statut du corpus. */
.generator-page .source-family-grid-v7ai + .corpus-status-v7cc {
  display: block;
  margin-top: clamp(30px, 4vw, 52px);
  padding-top: clamp(20px, 2.4vw, 30px);
  border-top: 1px solid var(--line);
}

.generator-page .corpus-status-v7cc h3 {
  margin: 0 0 18px;
  line-height: 1.25;
}

.generator-page .corpus-status-v7cc dl {
  margin: 0;
  padding-top: 0;
  border-top: 0;
}

/* ==========================================================================
   ARCHIVES — OUTILS ET CONTRÔLES / DÉFINITION UNIQUE
   ========================================================================== */

.archive-page .archive-tools-v6l {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) max-content max-content max-content;
  gap: 18px 28px;
  align-items: start;
  margin-top: 18px;
  padding: 22px;
  overflow: visible;
  background: var(--bg);
  background-image: none;
}

.archive-page .archive-tools-v6l > .field {
  min-width: 0;
  display: grid;
  grid-template-rows: 16px 42px;
  gap: 8px;
  align-content: start;
}

.archive-page .archive-tools-v6l > .field > span:first-child {
  height: 16px;
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .12em;
  line-height: 16px;
  text-transform: uppercase;
}

.archive-page .archive-filter-row-v7y {
  min-width: 0;
  height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 0;
  align-items: stretch;
}

.archive-page #archive_filter {
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--fg);
  border-radius: 0;
  outline: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 300;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.archive-page #archive_filter:focus {
  box-shadow: inset 0 0 0 1px var(--fg);
}

.archive-page #archive_filter::-webkit-search-cancel-button,
.archive-page #archive_filter::-webkit-search-decoration,
.archive-page #archive_filter::-webkit-search-results-button,
.archive-page #archive_filter::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.archive-page #archive_filter::-ms-clear,
.archive-page #archive_filter::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

.archive-page .archive-filter-reset-v7y {
  width: 30px;
  min-width: 30px;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  background-color: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.archive-page .archive-filter-reset-v7y:hover,
.archive-page .archive-filter-reset-v7y:focus-visible,
.archive-page .archive-filter-reset-v7y:active {
  border: 0;
  outline: 0;
  background: transparent;
  background-color: transparent;
  color: var(--fg);
  box-shadow: none;
}

.archive-page .archive-view-field,
.archive-page .archive-sort-field-v7v {
  width: max-content;
}

.archive-page .archive-sort-field-v7v[hidden] {
  display: none;
}

.archive-page #archive_view_switch.archive-view-switch,
.archive-page #archive_color_sort.archive-view-switch {
  height: 42px;
  min-height: 42px;
  display: inline-grid;
  gap: 0;
  border: 1px solid var(--fg);
  background: var(--bg);
  box-shadow: none;
}

.archive-page #archive_view_switch.archive-view-switch {
  grid-template-columns: repeat(3, auto);
}

.archive-page #archive_color_sort.archive-view-switch {
  grid-template-columns: repeat(2, auto);
}

.archive-page .archive-filter-status {
  height: 42px;
  min-height: 42px;
  align-self: end;
  display: flex;
  align-items: center;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  white-space: nowrap;
}

html[data-theme="light"] body .archive-page .archive-tools-v6l,
html[data-theme="light"] body .archive-page #archive_filter,
html[data-theme="light"] body .archive-page #archive_view_switch.archive-view-switch,
html[data-theme="light"] body .archive-page #archive_color_sort.archive-view-switch {
  background: #fff;
  color: #050505;
  border-color: #050505;
}

html:not([data-theme="light"]) body .archive-page .archive-tools-v6l,
html:not([data-theme="light"]) body .archive-page #archive_filter,
html:not([data-theme="light"]) body .archive-page #archive_view_switch.archive-view-switch,
html:not([data-theme="light"]) body .archive-page #archive_color_sort.archive-view-switch {
  background: #000;
  color: #fff;
  border-color: #fff;
}

@media (max-width: 1050px) {
  .archive-page .archive-tools-v6l {
    grid-template-columns: minmax(260px, 1fr) max-content max-content;
  }

  .archive-page .archive-filter-status {
    grid-column: 1 / -1;
    height: auto;
    min-height: 0;
    margin: 0;
  }
}

@media (max-width: 760px) {
  .archive-page .archive-tools-v6l {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .archive-page .archive-tools-v6l > .field,
  .archive-page .archive-view-field,
  .archive-page .archive-sort-field-v7v {
    width: 100%;
  }

  .archive-page #archive_view_switch.archive-view-switch,
  .archive-page #archive_color_sort.archive-view-switch {
    width: 100%;
  }

  .archive-page .archive-filter-status {
    grid-column: auto;
  }
}

html[data-theme="light"] body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y,
html[data-theme="light"] body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y:hover,
html[data-theme="light"] body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y:focus-visible,
html[data-theme="light"] body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y:active {
  background: transparent;
  background-color: transparent;
  background-image: none;
  color: #777;
  border: 0;
  outline: 0;
  box-shadow: none;
}

html[data-theme="light"] body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y:hover,
html[data-theme="light"] body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y:focus-visible {
  color: #050505;
}

html:not([data-theme="light"]) body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y,
html:not([data-theme="light"]) body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y:hover,
html:not([data-theme="light"]) body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y:focus-visible,
html:not([data-theme="light"]) body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y:active {
  background: transparent;
  background-color: transparent;
  background-image: none;
  color: #777;
  border: 0;
  outline: 0;
  box-shadow: none;
}

html:not([data-theme="light"]) body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y:hover,
html:not([data-theme="light"]) body .archive-page
button#archive_filter_reset.archive-filter-reset-v7y:focus-visible {
  color: #fff;
}

/* ==========================================================================
   ARCHIVES — TRAITS DU THÈME SOMBRE
   Les contours structurels utilisent la même valeur que les autres panneaux.
   L'état sélectionné conserve sa bordure intérieure blanche de 2 px.
   ========================================================================== */

html:not([data-theme="light"]) body .archive-page .archive-tools-v6l {
  border-color: var(--line);
}

html:not([data-theme="light"]) body .archive-page #archive_filter,
html:not([data-theme="light"]) body .archive-page
#archive_view_switch.archive-view-switch,
html:not([data-theme="light"]) body .archive-page
#archive_color_sort.archive-view-switch {
  border-color: var(--line);
}

html:not([data-theme="light"]) body .archive-page #archive_filter:focus {
  border-color: #fff;
  box-shadow: none;
}

html[data-theme="light"] body .archive-page #archive_filter:focus {
  border-color: #050505;
  box-shadow: none;
}

/* ==========================================================================
   GÉNÉRER — CHAMP TEXTE / FOCUS
   ========================================================================== */

html[data-theme="light"] body .generator-page input[type="text"]:focus,
html[data-theme="light"] body .generator-page input[type="text"]:focus-visible {
  border-color: #050505;
  outline: 0;
  box-shadow: inset 0 0 0 1px #050505;
}

html:not([data-theme="light"]) body .generator-page input[type="text"]:focus,
html:not([data-theme="light"]) body .generator-page input[type="text"]:focus-visible {
  border-color: #fff;
  outline: 0;
  box-shadow: inset 0 0 0 1px #fff;
}

/* ==========================================================================
   ADMINISTRATION — DÉFINITION UNIQUE / PHASE 1
   ========================================================================== */

.admin-page {
  display: grid;
  gap: 22px;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 28px;
  align-items: end;
}

.admin-hero h1,
.admin-card h2,
.admin-audit h2,
.admin-login h2,
.admin-alert h2 {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
}

.admin-hero h1 {
  font-size: clamp(26px, 4vw, 54px);
  letter-spacing: -.04em;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  border: 1px solid var(--line);
}

.admin-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  color: var(--fg);
  font-size: 10px;
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
}

.admin-nav a:first-child {
  border-left: 0;
}

.admin-nav a:hover,
.admin-nav a:focus-visible,
.admin-nav a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px var(--fg);
}

.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.admin-stat {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-stat span,
.admin-stat em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-stat strong {
  font-size: clamp(24px, 3vw, 46px);
  font-weight: 400;
  line-height: 1;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-card {
  display: grid;
  align-content: start;
  gap: 18px;
}

.admin-card-wide {
  grid-column: 1 / -1;
}

.admin-data {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 1fr);
  gap: 8px 18px;
  margin: 0;
}

.admin-data dt {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-data dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.admin-actions .button-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--fg);
  color: var(--fg);
  text-decoration: none;
  text-transform: uppercase;
}

.admin-actions .button-link:hover,
.admin-actions .button-link:focus-visible {
  box-shadow: inset 0 0 0 1px var(--fg);
}

.admin-details {
  border-top: 1px solid var(--line);
}

.admin-details summary {
  padding: 14px 0;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.admin-details-content {
  padding: 0 0 18px;
}

.admin-section-head {
  display: grid;
  grid-template-columns: minmax(220px, .5fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 18px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-login {
  max-width: 560px;
  display: grid;
  gap: 18px;
}

.admin-alert {
  display: grid;
  gap: 14px;
}

html[data-theme="light"] body .admin-page .panel {
  background: #fff;
  color: #050505;
}

html:not([data-theme="light"]) body .admin-page .panel {
  background: #000;
  color: #fff;
}

@media (max-width: 900px) {
  .admin-hero {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    justify-content: flex-start;
  }

  .admin-status-grid,
  .admin-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .admin-status-grid,
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .admin-card-wide {
    grid-column: auto;
  }

  .admin-section-head,
  .admin-data {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-nav a {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.admin-check{ display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-family: var(--mono); font-size: 12px; font-weight: 700; }.admin-check input{ width: 16px; height: 16px; }@supports not selector(:has(*)) {.admin-check input:checked + span{ background: var(--fg); color: var(--bg); }}.admin-check{ justify-content: space-between; }.admin-check em{ margin-left: auto; font-style: normal; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.58; }.admin-v8-mini{
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.3;
}.admin-v8-mini dt{
  color: var(--muted);
}.admin-v8-mini dd{
  margin: 0;
  color: var(--fg);
  overflow-wrap: anywhere;
}.admin-v8-source-group{
  display: grid;
  gap: 10px;
  margin-top: 8px;
}.admin-v8-source-group h3{
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}.admin-v8-source-list{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}.admin-v8-source-card{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent);
  cursor: pointer;
}.admin-v8-source-card.is-active{
  border-color: var(--fg);
}.admin-v8-source-card.is-disabled{
  opacity: 0.45;
  cursor: not-allowed;
}.admin-v8-source-card strong,
.admin-v8-source-card em{
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}.admin-v8-source-card em{
  color: var(--muted);
  margin-top: 3px;
}html[data-theme="light"] .admin-v8-source-card{
  background: #fff;
  color: #050505;
}@media (max-width: 980px) {.admin-v8-source-list{
    grid-template-columns: 1fr;
  }}@media (max-width: 620px) {.admin-v8-mini{
    grid-template-columns: 1fr;
  }}.admin-v8-corpus-list{
  display: grid;
  gap: 8px;
}.admin-v8-corpus-card{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent);
  cursor: pointer;
}.admin-v8-corpus-card.is-active{
  border-color: var(--fg);
}.admin-v8-corpus-card strong,
.admin-v8-corpus-card em{
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}.admin-v8-corpus-card em{
  color: var(--muted);
  margin-top: 3px;
}.admin-v8-thumb-grid{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}.admin-v8-thumb-grid figure{
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  background: var(--panel);
}.admin-v8-thumb-grid img{
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #fff;
}.admin-v8-thumb-grid figcaption{
  min-height: 38px;
  padding: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}html[data-theme="light"] .admin-v8-corpus-card,
html[data-theme="light"] .admin-v8-thumb-grid figure{
  background: #fff;
  color: #050505;
}@media (max-width: 980px) {.admin-v8-thumb-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }}@media (max-width: 620px) {.admin-v8-thumb-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }}.admin-v8-archive-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}.admin-v8-archive-card{
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
}.admin-v8-archive-card.is-broken{
  border-style: dashed;
}.admin-v8-archive-card img,
.admin-v8-missing-thumb{
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--fg) 16%, transparent);
}.admin-v8-missing-thumb{
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}.admin-v8-archive-card dl{
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 4px 8px;
}.admin-v8-archive-card dt,
.admin-v8-archive-card dd{
  font-size: 10px;
}.admin-v8-archive-card .admin-check{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}.admin-v8-archive-card .admin-check em{
  color: var(--muted);
  font-style: normal;
}.admin-v8-filter-form .form-grid{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}html[data-theme="light"] .admin-v8-archive-card,
html[data-theme="light"] .admin-v8-missing-thumb{
  background: #fff;
  color: #050505;
  border-color: #050505;
}@media (max-width: 1180px) {.admin-v8-archive-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }}@media (max-width: 820px) {.admin-v8-archive-grid,
  .admin-v8-filter-form .form-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }}@media (max-width: 560px) {.admin-v8-archive-grid,
  .admin-v8-filter-form .form-grid{
    grid-template-columns: 1fr;
  }}

/* ==========================================================================
   ADMINISTRATION — EN-TÊTE GLOBAL ET NAVIGATION COMMUNE / PHASE 2
   ========================================================================== */

.admin-global-hero {
  grid-template-columns: minmax(320px, 1fr) minmax(520px, auto);
  grid-template-areas:
    "copy nav"
    "status status";
  gap: 26px 34px;
  align-items: end;
}

.admin-global-hero .admin-hero-copy { grid-area: copy; }
.admin-global-hero .admin-global-navigation { grid-area: nav; }

.admin-global-status {
  grid-area: status;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.admin-global-status > div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-global-status dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-global-status dd {
  margin: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-global-status .is-alert {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-global-navigation {
  display: grid;
  gap: 8px;
  align-self: end;
}

.admin-section-nav {
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  margin: -1px 0 18px;
  justify-content: flex-start;
  background: var(--panel);
}

.admin-section-nav a {
  min-height: 44px;
  justify-content: center;
  padding-inline: 16px;
}

.admin-logout-form {
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

.admin-logout-form button {
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-logout-form button:hover,
.admin-logout-form button:focus-visible {
  background: var(--fg);
  color: var(--bg);
}


.admin-global-nav a {
  justify-content: center;
  border-top: 1px solid var(--line);
}


.admin-form {
  display: grid;
  gap: 20px;
}

.admin-collect-page .generator {
  display: grid;
  gap: 18px;
}

@media (max-width: 1120px) {
  .admin-global-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "nav"
      "status";
  }

  .admin-global-nav {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-section-nav {
    width: 100%;
  }

  .admin-section-nav a {
    flex: 1 1 140px;
  }

  .admin-global-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-global-status > div:last-child {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   ADMINISTRATION — CELLULES FERMÉES / NAVIGATION ET ÉTAT GLOBAL
   ========================================================================== */

.admin-global-nav {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-content: stretch;
  gap: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.admin-global-nav a {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-global-status {
  width: 100%;
  gap: 0;
  align-items: stretch;
  border: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.admin-global-status > div {
  margin: 0;
  box-sizing: border-box;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 1120px) {
  .admin-global-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-global-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

/* ========================================================================== 
   ADMINISTRATION — PRIORITÉS ET ÉTATS ACTIONNABLES
   ========================================================================== */
.admin-global-status a {
  color: inherit;
  text-decoration: none;
}

.admin-global-status dd:hover a,
.admin-global-status dd:focus-within a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-attention {
  display: grid;
  gap: 18px;
}

.admin-attention .admin-section-head {
  align-items: end;
}

.admin-attention-list {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.admin-attention-item {
  display: grid;
  grid-template-columns: 12px minmax(180px, .7fr) minmax(240px, 1.3fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-attention-item:hover,
.admin-attention-item:focus-visible {
  background: var(--fg);
  color: var(--bg);
  outline: 0;
}

.admin-attention-item strong,
.admin-attention-item span,
.admin-attention-item em {
  min-width: 0;
}

.admin-attention-item span {
  color: var(--muted);
}

.admin-attention-item:hover span,
.admin-attention-item:focus-visible span {
  color: inherit;
}

.admin-attention-item em {
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-state-mark {
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  border: 1px solid currentColor;
}

.admin-attention-item.is-blocking .admin-state-mark {
  background: currentColor;
}

.admin-attention-item.is-warning .admin-state-mark {
  background: linear-gradient(135deg, currentColor 0 45%, transparent 45% 55%, currentColor 55% 100%);
}

.admin-attention-empty {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.admin-attention-empty .admin-state-mark.is-ok {
  background: transparent;
}

@media (max-width: 760px) {
  .admin-attention-item {
    grid-template-columns: 12px 1fr auto;
  }

  .admin-attention-item > span:nth-child(3) {
    grid-column: 2 / -1;
  }
}

/* Admin — diagnostic du pipeline image */
.admin-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.admin-card-heading h2 { margin-bottom: 6px; }
.admin-card-intro,
.admin-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  opacity: 0.62;
}
.admin-note { margin-top: 14px; }
.admin-status-label {
  flex: 0 0 auto;
  border: 1px solid currentColor;
  padding: 6px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}
.admin-status-label.is-error {
  color: var(--bg);
  background: var(--fg);
}
@media (max-width: 720px) {
  .admin-card-heading { display: block; }
  .admin-status-label { display: inline-block; margin-top: 12px; }
}

/* Admin archives — trace technique enrichie */
.admin-v8-archive-card dl dd.is-ok::before,
.admin-v8-archive-card dl dd.is-alert::before {
  content: "";
  display: inline-block;
  width: .55rem;
  height: .55rem;
  margin-right: .45rem;
  border: 1px solid currentColor;
  vertical-align: .02rem;
}
.admin-v8-archive-card dl dd.is-ok::before { background: currentColor; }
.admin-v8-archive-card dl dd.is-alert { font-weight: 700; }
.admin-v8-archive-card dl dd.is-alert::before { background: transparent; }

/* Admin — maintenance sécurisée du stockage */
.admin-status-label.is-warning {
  background: repeating-linear-gradient(135deg, transparent 0 4px, currentColor 4px 5px);
}
.admin-maintenance-message {
  margin: 0 0 18px;
  border: 1px solid currentColor;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 11px;
}
.admin-maintenance-message.is-error { font-weight: 700; }
.admin-maintenance-message.is-warning { border-style: dashed; }
.admin-maintenance-details { margin-top: 18px; }
.admin-maintenance-details summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-maintenance-details[open] summary { margin-bottom: 14px; }
.admin-maintenance-form {
  margin-top: 22px;
  border-top: 1px solid currentColor;
  padding-top: 18px;
}
.admin-maintenance-form label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
}
.admin-maintenance-controls {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto;
  gap: 10px;
  align-items: stretch;
}
.admin-maintenance-controls input,
.admin-danger-button {
  min-height: 40px;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: 700 11px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.admin-maintenance-controls input { padding: 0 10px; text-transform: none; }
.admin-danger-button { cursor: pointer; padding: 0 14px; }
.admin-danger-button:hover,
.admin-danger-button:focus-visible { color: var(--bg); background: var(--fg); }
@media (max-width: 720px) {
  .admin-maintenance-controls { grid-template-columns: 1fr; }
}

/* ========================================================================== 
   ADMINISTRATION — ARCHIVE ÉPHÉMÈRE / SIMULATION
   ========================================================================== */
.admin-ephemeral-warning {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}
.admin-ephemeral-warning h2 { margin-bottom: 0; }
.admin-ephemeral-warning > p { margin: 0; }
.admin-presence-value {
  display: inline-block;
  min-width: 48px;
  padding: 3px 6px;
  border: 1px solid currentColor;
  text-align: center;
}
@media (max-width: 720px) {
  .admin-ephemeral-warning { grid-template-columns: 1fr; }
}

/* Admin — prévisualisation visuelle de l’érosion */
.admin-erosion-preview {
  overflow: hidden;
}
.admin-erosion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.admin-erosion-item {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.admin-erosion-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--bg);
}
.admin-erosion-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-erosion-mask {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--erosion-cols), 1fr);
  grid-template-rows: repeat(var(--erosion-rows), 1fr);
  pointer-events: none;
}
.admin-erosion-mask i {
  display: block;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
  box-shadow: 0 0 0 .35px var(--line);
}
.admin-erosion-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: baseline;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.admin-erosion-meta code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-erosion-meta strong {
  font-family: var(--mono);
  font-size: 14px;
}
.admin-erosion-meta span {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .62;
}
.admin-erosion-item.is-residual .admin-erosion-meta,
.admin-erosion-item.is-disappeared .admin-erosion-meta {
  font-weight: 700;
}
@media (max-width: 980px) {
  .admin-erosion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .admin-erosion-grid { grid-template-columns: 1fr; }
}

/* Admin — démonstration forcée des cinq états d’érosion */
.admin-erosion-grid-demo {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.admin-erosion-grid-demo .admin-erosion-item.is-disappeared .admin-erosion-image img {
  visibility: hidden;
}
@media (max-width: 1120px) {
  .admin-erosion-grid-demo { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .admin-erosion-grid-demo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .admin-erosion-grid-demo { grid-template-columns: 1fr; }
}

/* Admin — archive éphémère : mémoire des disparitions et grille rectifiée */
.admin-erosion-mask {
  isolation: isolate;
}
.admin-erosion-mask i {
  position: relative;
  z-index: 1;
  box-shadow: none;
}
.admin-erosion-mask::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--fg) 18%, transparent) 0 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--fg) 18%, transparent) 0 1px, transparent 1px);
  background-size:
    calc(100% / var(--erosion-cols)) 100%,
    100% calc(100% / var(--erosion-rows));
  background-position: 0 0;
  background-repeat: repeat;
  opacity: .18;
}
@media (max-width: 980px) {
  .admin-status-grid-ephemeral {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .admin-status-grid-ephemeral {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================== 
   V10 — Archive éphémère active / grille unique / pile mono par plateforme
   ========================================================================== */

:root {
  --mono: "IBM Plex Mono", ui-monospace, Consolas, "Liberation Mono", "Courier New", monospace;
}

html.dfp-platform-apple {
  --mono: "SFMono-Regular", "SF Mono", ui-monospace, Menlo, Monaco, monospace;
}

/* Une seule grille globale, portée exclusivement par le pseudo-élément fixe. */
html,
body,
html[data-theme="light"],
html[data-theme="light"] body {
  background-image: none !important;
  background-attachment: scroll !important;
}

body::after {
  content: none !important;
  display: none !important;
}

body::before {
  position: fixed !important;
  inset: 0 !important;
  background-position: 0 0 !important;
  background-repeat: repeat !important;
  transform: none !important;
  will-change: auto !important;
}

.brand > small {
  display: none !important;
}

/* Érosion publique : perte réelle de cellules, sans altération du fichier. */
.ephemeral-public-thumb {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.ephemeral-public-thumb > img {
  position: relative;
  z-index: 0;
}

.ephemeral-public-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--erosion-cols, 10), minmax(0, 1fr));
  grid-template-rows: repeat(var(--erosion-rows, 10), minmax(0, 1fr));
  pointer-events: none;
}

.ephemeral-public-mask > i {
  display: block;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}

.ephemeral-public-mask::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      to right,
      rgba(255,255,255,0.055) 0,
      rgba(255,255,255,0.055) 0.5px,
      transparent 0.5px,
      transparent calc(100% / var(--erosion-cols, 10))
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.055) 0,
      rgba(255,255,255,0.055) 0.5px,
      transparent 0.5px,
      transparent calc(100% / var(--erosion-rows, 10))
    );
}

html[data-theme="light"] .ephemeral-public-mask > i {
  background: #fff;
}

html[data-theme="light"] .ephemeral-public-mask::after {
  background-image:
    repeating-linear-gradient(
      to right,
      rgba(0,0,0,0.07) 0,
      rgba(0,0,0,0.07) 0.5px,
      transparent 0.5px,
      transparent calc(100% / var(--erosion-cols, 10))
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,0.07) 0,
      rgba(0,0,0,0.07) 0.5px,
      transparent 0.5px,
      transparent calc(100% / var(--erosion-rows, 10))
    );
}

.archive-card-v6l.is-presence-disappeared .ephemeral-public-thumb > img {
  visibility: hidden;
}

.archive-card-v6l.is-presence-residual .card-meta-v6l,
.archive-card-v6l.is-presence-disappeared .card-meta-v6l {
  opacity: 0.72;
}


/* Archive éphémère — effacement serveur et nuancier uni */
.archive-grid-v6l.is-colorgrid .ephemeral-public-mask {
  display: none !important;
}
.archive-grid-v6l.is-colorgrid .archive-card-v6l,
.archive-grid-v6l.is-colorgrid .archive-thumb-v6l {
  background-color: var(--avg-color, var(--bg)) !important;
  background-color: color-mix(in srgb, var(--avg-color, var(--bg)) var(--presence-percent, 100%), var(--bg)) !important;
  background-image: none !important;
}
.archive-grid-v6l.is-colorgrid .archive-card-v6l::before,
.archive-grid-v6l.is-colorgrid .archive-card-v6l::after,
.archive-grid-v6l.is-colorgrid .archive-thumb-v6l::before,
.archive-grid-v6l.is-colorgrid .archive-thumb-v6l::after {
  content: none !important;
  display: none !important;
  background-image: none !important;
}
.archive-ephemeral-note {
  max-width: 78ch;
  margin-top: 10px;
}
.admin-check-danger {
  margin-top: 10px;
}
.admin-danger-zone {
  align-self: start;
}

/* Archives / champ de filtre / focus explicite en thème clair */
html[data-theme="light"] body .archive-page #archive_filter:focus,
html[data-theme="light"] body .archive-page #archive_filter:focus-visible {
  border-color: #050505;
  outline: 0;
  box-shadow: inset 0 0 0 1px #050505;
}

/* Archive éphémère / état de la tâche serveur */
.admin-schedule-alert {
  margin: 18px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--fg);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.admin-run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.admin-run-actions form {
  margin: 0;
}


/* Correctif admin / archive éphémère : grille sans bordures pendantes */
.admin-status-grid-ephemeral {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .admin-status-grid-ephemeral {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-status-grid-ephemeral > .admin-stat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .admin-status-grid-ephemeral {
    grid-template-columns: 1fr;
  }

  .admin-status-grid-ephemeral > .admin-stat:last-child:nth-child(odd) {
    grid-column: auto;
  }
}


/* Protocol identifier / identical rendering in progress and result views */
.progress-topbar h1.protocol-id-title,
.result-header-v6k h1.protocol-id-title {
  margin: 0;
  max-width: 100%;
  font-family: var(--mono);
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.055em;
  text-transform: none;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

/* Process phases / every label remains visible in both themes */
.phase-item strong,
.phase-item em {
  display: block;
  visibility: visible;
  opacity: 1;
}
.phase-item strong { color: inherit !important; }
.phase-item.is-active { color: var(--fg) !important; }
.phase-item.is-active strong,
.phase-item.is-active em { color: var(--fg) !important; }
.phase-item.is-done strong,
.phase-item.is-done em { color: inherit !important; }
html[data-theme="light"] .phase-item { color: #555 !important; }
html[data-theme="light"] .phase-item.is-active,
html[data-theme="light"] .phase-item.is-active strong,
html[data-theme="light"] .phase-item.is-active em { color: #050505 !important; }
html:not([data-theme="light"]) .phase-item { color: #8f8f8f !important; }
html:not([data-theme="light"]) .phase-item.is-active,
html:not([data-theme="light"]) .phase-item.is-active strong,
html:not([data-theme="light"]) .phase-item.is-active em { color: #fff !important; }

@media (max-width: 560px) {
  .progress-topbar h1.protocol-id-title,
  .result-header-v6k h1.protocol-id-title {
    font-size: clamp(23px, 8vw, 38px);
    letter-spacing: -0.04em;
  }
}

/* ========================================================================== 
   ADMINISTRATION / BOUTONS ET CONTRASTES PAR THEME
   ========================================================================== */

html:not([data-theme="light"]) body .admin-page .admin-actions .button-link:not(.secondary),
html:not([data-theme="light"]) body .admin-page button[type="submit"]:not(.secondary):not(.admin-danger-button),
html:not([data-theme="light"]) body .admin-page input[type="submit"]:not(.secondary) {
  background: #fff;
  color: #050505;
  border-color: #fff;
}

html:not([data-theme="light"]) body .admin-page .admin-actions .button-link:not(.secondary):hover,
html:not([data-theme="light"]) body .admin-page .admin-actions .button-link:not(.secondary):focus-visible,
html:not([data-theme="light"]) body .admin-page button[type="submit"]:not(.secondary):not(.admin-danger-button):hover,
html:not([data-theme="light"]) body .admin-page button[type="submit"]:not(.secondary):not(.admin-danger-button):focus-visible,
html:not([data-theme="light"]) body .admin-page input[type="submit"]:not(.secondary):hover,
html:not([data-theme="light"]) body .admin-page input[type="submit"]:not(.secondary):focus-visible {
  background: #000;
  color: #fff;
  border-color: #fff;
  box-shadow: inset 0 0 0 1px #fff;
}

html:not([data-theme="light"]) body .admin-page .admin-actions .button-link.secondary,
html:not([data-theme="light"]) body .admin-page button.secondary {
  background: transparent;
  color: #fff;
  border-color: var(--line);
}

html:not([data-theme="light"]) body .admin-page .admin-actions .button-link.secondary:hover,
html:not([data-theme="light"]) body .admin-page .admin-actions .button-link.secondary:focus-visible,
html:not([data-theme="light"]) body .admin-page button.secondary:hover,
html:not([data-theme="light"]) body .admin-page button.secondary:focus-visible {
  background: #fff;
  color: #050505;
  border-color: #fff;
}

html[data-theme="light"] body .admin-page .admin-actions .button-link:not(.secondary),
html[data-theme="light"] body .admin-page button[type="submit"]:not(.secondary):not(.admin-danger-button),
html[data-theme="light"] body .admin-page input[type="submit"]:not(.secondary) {
  background: #050505;
  color: #fff;
  border-color: #050505;
}

html[data-theme="light"] body .admin-page .admin-actions .button-link.secondary,
html[data-theme="light"] body .admin-page button.secondary {
  background: transparent;
  color: #050505;
  border-color: #050505;
}

html[data-theme="light"] body .admin-page input:focus-visible,
html[data-theme="light"] body .admin-page select:focus-visible,
html[data-theme="light"] body .admin-page textarea:focus-visible,
html[data-theme="light"] body .admin-page button:focus-visible,
html[data-theme="light"] body .admin-page a:focus-visible {
  outline: 1px solid #050505;
  outline-offset: 2px;
}

html:not([data-theme="light"]) body .admin-page input:focus-visible,
html:not([data-theme="light"]) body .admin-page select:focus-visible,
html:not([data-theme="light"]) body .admin-page textarea:focus-visible,
html:not([data-theme="light"]) body .admin-page button:focus-visible,
html:not([data-theme="light"]) body .admin-page a:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 2px;
}

.admin-page button:disabled,
.admin-page input[type="submit"]:disabled,
.admin-page .button-link[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .42;
}

/* ========================================================================== 
   ADMINISTRATION / CONSOLIDATION FINALE THEMES ET GRILLES
   ========================================================================== */

/* Boutons admin : texte toujours explicite dans Safari et dans les deux thèmes. */
html:not([data-theme="light"]) .admin-page .admin-actions a.button-link:not(.secondary),
html:not([data-theme="light"]) .admin-page .admin-actions button:not(.secondary):not(.admin-danger-button) {
  background: #fff !important;
  color: #050505 !important;
  -webkit-text-fill-color: #050505 !important;
  border-color: #fff !important;
  opacity: 1 !important;
}

html:not([data-theme="light"]) .admin-page .admin-actions a.button-link:not(.secondary):hover,
html:not([data-theme="light"]) .admin-page .admin-actions a.button-link:not(.secondary):focus-visible,
html:not([data-theme="light"]) .admin-page .admin-actions button:not(.secondary):not(.admin-danger-button):hover,
html:not([data-theme="light"]) .admin-page .admin-actions button:not(.secondary):not(.admin-danger-button):focus-visible {
  background: #050505 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #fff !important;
}

html:not([data-theme="light"]) .admin-page .admin-actions a.button-link.secondary,
html:not([data-theme="light"]) .admin-page .admin-actions button.secondary {
  background: transparent !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: var(--line) !important;
}

html[data-theme="light"] .admin-page .admin-actions a.button-link:not(.secondary),
html[data-theme="light"] .admin-page .admin-actions button:not(.secondary):not(.admin-danger-button) {
  background: #050505 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #050505 !important;
}

html[data-theme="light"] .admin-page .admin-actions a.button-link.secondary,
html[data-theme="light"] .admin-page .admin-actions button.secondary {
  background: transparent !important;
  color: #050505 !important;
  -webkit-text-fill-color: #050505 !important;
  border-color: #050505 !important;
}

/* Toutes les grilles de statistiques impaires ferment proprement leur dernière ligne. */
@media (max-width: 900px) and (min-width: 601px) {
  .admin-status-grid:not(.admin-status-grid-ephemeral) > .admin-stat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Suppression de tout trait parasite sous une grille terminée. */
.admin-status-grid {
  overflow: hidden;
}

.admin-status-grid > .admin-stat {
  min-width: 0;
}

/* ========================================================================== 
   ADMINISTRATION / CORRECTIF FINAL SURVOLS CLAIRS ET CADRES DE GRILLES
   ========================================================================== */

/* Thème clair : inversion nette au survol des boutons principaux noirs. */
html[data-theme="light"] .admin-page .admin-actions a.button-link:not(.secondary):hover,
html[data-theme="light"] .admin-page .admin-actions a.button-link:not(.secondary):focus-visible,
html[data-theme="light"] .admin-page .admin-actions button:not(.secondary):not(.admin-danger-button):hover,
html[data-theme="light"] .admin-page .admin-actions button:not(.secondary):not(.admin-danger-button):focus-visible,
html[data-theme="light"] .admin-page button[type="submit"]:not(.secondary):not(.admin-danger-button):hover,
html[data-theme="light"] .admin-page button[type="submit"]:not(.secondary):not(.admin-danger-button):focus-visible,
html[data-theme="light"] .admin-page input[type="submit"]:not(.secondary):hover,
html[data-theme="light"] .admin-page input[type="submit"]:not(.secondary):focus-visible {
  background: #fff !important;
  color: #050505 !important;
  -webkit-text-fill-color: #050505 !important;
  border-color: #050505 !important;
  box-shadow: inset 0 0 0 1px #050505;
}

/* Thème clair : survol inverse des boutons secondaires. */
html[data-theme="light"] .admin-page .admin-actions a.button-link.secondary:hover,
html[data-theme="light"] .admin-page .admin-actions a.button-link.secondary:focus-visible,
html[data-theme="light"] .admin-page .admin-actions button.secondary:hover,
html[data-theme="light"] .admin-page .admin-actions button.secondary:focus-visible {
  background: #050505 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #050505 !important;
}

/* Le cadre extérieur est dessiné à l'intérieur de la grille : aucun trait ne peut dépasser. */
.admin-page .admin-status-grid {
  border: 0 !important;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: clip;
  contain: paint;
}

/* Neutralise tout débordement vertical résiduel lié au calcul des bordures Safari. */
.admin-page .admin-status-grid > .admin-stat {
  position: relative;
  margin: 0 !important;
}

/* Les panels imbriqués ne réintroduisent pas leur propre bordure dans ces grilles. */
.admin-page .admin-status-grid > .panel,
.admin-page .admin-global-status > .panel {
  border: 0 !important;
}

/* Safari : aucun pseudo-élément ou trait de cellule ne doit sortir de la grille. */

/* ========================================================================== 
   ADMINISTRATION / STRUCTURE DEFINITIVE DES GRILLES ET SURVOLS
   ========================================================================== */

/* Les grilles ne portent plus de cadre propre. Chaque cellule dessine son cadre,
   ce qui évite les traits suspendus sur Safari et les lignes qui dépassent. */
.admin-page .admin-status-grid,
.admin-page .admin-global-status {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: visible !important;
  contain: none !important;
}

.admin-page .admin-status-grid > .admin-stat,
.admin-page .admin-global-status > * {
  box-sizing: border-box;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  background: var(--bg) !important;
  margin: 0 -1px -1px 0 !important;
  min-width: 0;
}

/* Aucune pseudo-bordure structurelle. */
.admin-page .admin-status-grid::before,
.admin-page .admin-status-grid::after,
.admin-page .admin-global-status::before,
.admin-page .admin-global-status::after {
  content: none !important;
  display: none !important;
}

/* Dernière cellule impaire : ligne complète, sans trait vertical résiduel. */
@media (max-width: 900px) and (min-width: 601px) {
  .admin-page .admin-status-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Survol clair explicite, y compris Safari. */
html[data-theme="light"] .admin-page .button-link:not(.secondary):hover,
html[data-theme="light"] .admin-page .button-link:not(.secondary):focus-visible,
html[data-theme="light"] .admin-page button:not(.secondary):not(.admin-danger-button):hover,
html[data-theme="light"] .admin-page button:not(.secondary):not(.admin-danger-button):focus-visible,
html[data-theme="light"] .admin-page input[type="submit"]:hover,
html[data-theme="light"] .admin-page input[type="submit"]:focus-visible {
  background: #fff !important;
  color: #050505 !important;
  -webkit-text-fill-color: #050505 !important;
  border-color: #050505 !important;
  box-shadow: inset 0 0 0 1px #050505 !important;
}

html[data-theme="light"] .admin-page .button-link.secondary:hover,
html[data-theme="light"] .admin-page .button-link.secondary:focus-visible,
html[data-theme="light"] .admin-page button.secondary:hover,
html[data-theme="light"] .admin-page button.secondary:focus-visible {
  background: #050505 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #050505 !important;
}

/* Admin / actualisation des synthèses */
.admin-global-refresh {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding-top: .65rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-global-refresh a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.admin-global-refresh a:hover,
.admin-global-refresh a:focus-visible {
  opacity: .55;
}
.admin-global-refresh span {
  opacity: .5;
}


/* Archive publique / traces récentes des générations disparues */
.archive-ephemeral-public-note { max-width: 78ch; margin-top: 8px; }
/* View / simplification validée */
.result-page-v6k .result-header-v6k {
  align-items: center;
}

.result-page-v6k .result-main-figure {
  padding: clamp(18px, 2.2vw, 28px);
}

.result-image-navigation {
  display: grid;
  grid-template-columns: clamp(36px, 5vw, 56px) minmax(0, 1fr) clamp(36px, 5vw, 56px);
  align-items: center;
  gap: clamp(10px, 1.5vw, 18px);
  width: 100%;
}

.result-image-navigation .result-image-wrap {
  min-width: 0;
  width: 100%;
  border: 0;
}

.result-image-arrow-slot {
  display: grid;
  place-items: center;
  align-self: stretch;
}

.result-image-arrow {
  display: grid;
  place-items: center;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 10px 6px;
  border: 0 !important;
  outline: 0;
  box-shadow: none !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--fg) 42%, var(--bg));
  text-decoration: none;
  font-family: var(--mono);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
  opacity: 1;
  transition: color 120ms linear, opacity 120ms linear;
}

.result-image-arrow:hover,
.result-image-arrow:focus-visible {
  border: 0 !important;
  background: transparent !important;
  color: var(--fg);
  outline: none;
}

.result-image-arrow.is-disabled {
  color: color-mix(in srgb, var(--fg) 14%, var(--bg));
  opacity: 1;
  cursor: default;
  pointer-events: none;
}

.result-cartel-v6k dl {
  align-items: start;
}

.process-trace-collapsible {
  padding: 0;
  overflow: hidden;
}

.process-trace-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.52fr) minmax(260px, 1fr) 24px;
  align-items: center;
  gap: 24px;
  padding: clamp(18px, 2.2vw, 28px);
  cursor: pointer;
  list-style: none;
}

.process-trace-summary::-webkit-details-marker {
  display: none;
}

.process-trace-summary-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.process-trace-summary-description {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
}

.process-trace-summary-marker {
  position: relative;
  width: 18px;
  height: 18px;
  justify-self: end;
  cursor: pointer;
}

.process-trace-summary-marker::before,
.process-trace-summary-marker::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 14px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.process-trace-summary-marker::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: opacity 120ms linear;
}

.process-trace-collapsible[open] .process-trace-summary {
  border-bottom: 0 !important;
}

.process-trace-collapsible[open] .process-trace-summary-marker::after {
  opacity: 0;
}

.process-trace-summary:hover,
.process-trace-summary:focus-visible {
  background: transparent !important;
  outline: none;
}

.process-trace-content {
  padding: 0 clamp(18px, 2.2vw, 28px) clamp(18px, 2.2vw, 28px);
}

/* Nuancier / une disparition reste une case vide, sans symbole. */

@media (max-width: 760px) {
  .result-image-navigation {
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    gap: 6px;
  }

  .result-page-v6k .result-main-figure {
    padding: 14px 10px;
  }

  .result-image-arrow {
    width: 26px;
    min-width: 26px;
    min-height: 48px;
    padding: 0;
    font-size: 28px;
  }

  .process-trace-summary {
    grid-template-columns: 1fr 22px;
    gap: 12px;
  }

  .process-trace-summary-description {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .process-trace-summary-marker {
    grid-column: 2;
    grid-row: 1;
  }
}

/* View / correction finale des flèches et des compteurs mobiles */
html[data-theme="light"] .result-image-arrow:not(.is-disabled) {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
}

html[data-theme="light"] .result-image-arrow:not(.is-disabled):hover,
html[data-theme="light"] .result-image-arrow:not(.is-disabled):focus-visible {
  color: #050505 !important;
  -webkit-text-fill-color: #050505 !important;
  background: transparent !important;
}

html:not([data-theme="light"]) .result-image-arrow:not(.is-disabled) {
  color: #777 !important;
  -webkit-text-fill-color: #777 !important;
}

html:not([data-theme="light"]) .result-image-arrow:not(.is-disabled):hover,
html:not([data-theme="light"]) .result-image-arrow:not(.is-disabled):focus-visible {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: transparent !important;
}

html[data-theme="light"] .result-image-arrow.is-disabled {
  color: #d2d2d2 !important;
  -webkit-text-fill-color: #d2d2d2 !important;
}

html:not([data-theme="light"]) .result-image-arrow.is-disabled {
  color: #2f2f2f !important;
  -webkit-text-fill-color: #2f2f2f !important;
}

/* View / métriques responsives sans bordures résiduelles */
.result-page .result-metrics-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line) !important;
  overflow: hidden;
}

.result-page .result-metrics-strip > article,
.result-page .result-metrics-strip > article:nth-child(2n),
.result-page .result-metrics-strip > article:nth-child(5),
.result-page .result-metrics-strip > article:last-child {
  grid-column: auto;
  min-width: 0;
  border: 0 !important;
  background: var(--panel);
}

@media (max-width: 760px) {
  .result-page .result-metrics-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .result-page .result-metrics-strip > article,
  .result-page .result-metrics-strip > article:nth-child(2n),
  .result-page .result-metrics-strip > article:nth-child(5),
  .result-page .result-metrics-strip > article:last-child {
    grid-column: auto;
    min-height: 74px;
    padding: 10px 8px;
    border: 0 !important;
  }

  .result-page .result-metrics-strip span {
    margin-bottom: 8px;
    font-size: 7px;
    line-height: 1.15;
    letter-spacing: 0.05em;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .result-page .result-metrics-strip strong {
    font-size: clamp(20px, 6.8vw, 28px);
    line-height: 1;
  }
}

@media (max-width: 520px) {
  .result-page .result-metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-page .result-metrics-strip > article:nth-child(5) {
    grid-column: 1 / -1;
  }
}

/* View / uniformisation stricte du fond des cinq métriques */
html:not([data-theme="light"]) body .result-page .result-metrics-strip > article,
html:not([data-theme="light"]) body .result-page .result-metrics-strip > article:nth-child(2n),
html:not([data-theme="light"]) body .result-page .result-metrics-strip > article:nth-child(5),
html:not([data-theme="light"]) body .result-page .result-metrics-strip > article:last-child {
  background: #000 !important;
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
}

html[data-theme="light"] body .result-page .result-metrics-strip > article,
html[data-theme="light"] body .result-page .result-metrics-strip > article:nth-child(2n),
html[data-theme="light"] body .result-page .result-metrics-strip > article:nth-child(5),
html[data-theme="light"] body .result-page .result-metrics-strip > article:last-child {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  color: #050505 !important;
}

/* Archive publique / pagination et vues serveur (reset.34) */
.archive-filter-form {
  min-width: 0;
  flex: 1 1 360px;
}
.archive-filter-form .archive-filter-row-v7y {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: stretch;
}
.archive-filter-submit,
.archive-page .archive-view-switch a,
.archive-page .archive-sort-switch-v7v a {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.archive-filter-submit {
  border-left: 1px solid currentColor;
  border-right: 1px solid currentColor;
}
.archive-page .archive-view-switch a + a,
.archive-page .archive-sort-switch-v7v a + a {
  border-left: 1px solid currentColor;
}
.archive-page .archive-view-switch a.is-active,
.archive-page .archive-sort-switch-v7v a.is-active,
.archive-filter-submit:hover,
.archive-filter-submit:focus-visible,
.archive-page .archive-view-switch a:hover,
.archive-page .archive-view-switch a:focus-visible,
.archive-page .archive-sort-switch-v7v a:hover,
.archive-page .archive-sort-switch-v7v a:focus-visible {
  background: var(--fg);
  color: var(--bg);
  -webkit-text-fill-color: var(--bg);
}
.archive-keyword-list-v7v a {
  display: inline-flex;
  align-items: baseline;
  gap: .35em;
  color: inherit;
  text-decoration: none;
}
.archive-keyword-list-v7v a:hover,
.archive-keyword-list-v7v a:focus-visible {
  text-decoration: underline;
  text-underline-offset: .2em;
}
.archive-pagination {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 22px 0 0;
  border: 1px solid var(--line);
  min-height: 52px;
  font-size: 10px;
  text-transform: uppercase;
}
.archive-pagination a,
.archive-pagination span,
.archive-pagination em {
  color: inherit;
  text-decoration: none;
  font-style: normal;
}
.archive-pagination-direction {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 18px;
}
.archive-pagination-direction:last-child {
  justify-content: flex-end;
}
.archive-pagination-direction:hover,
.archive-pagination-direction:focus-visible {
  background: var(--fg);
  color: var(--bg);
  -webkit-text-fill-color: var(--bg);
}
.archive-pagination-direction.is-disabled {
  opacity: .28;
}
.archive-pagination-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.archive-pagination-pages a,
.archive-pagination-pages span,
.archive-pagination-pages em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 0 6px;
}
.archive-pagination-pages span[aria-current="page"],
.archive-pagination-pages a:hover,
.archive-pagination-pages a:focus-visible {
  background: var(--fg);
  color: var(--bg);
  -webkit-text-fill-color: var(--bg);
}
@media (max-width: 760px) {
  .archive-filter-form { flex-basis: 100%; }
  .archive-filter-form .archive-filter-row-v7y {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .archive-filter-submit { display: none; }
  .archive-pagination {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .archive-pagination-pages {
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 10px;
    border-bottom: 1px solid var(--line);
  }
  .archive-pagination-direction {
    grid-row: 2;
    min-height: 48px;
  }
  .archive-pagination-direction:last-child { border-left: 1px solid var(--line); }
}

/* Archive publique / barre de contrôle consolidée (reset.35) */
.archive-page .archive-tools-v6l {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  align-items: end;
  gap: 22px;
  padding: 18px 20px;
}

.archive-page .archive-filter-form,
.archive-page .archive-filter-form .field,
.archive-page .archive-filter-row-v7y {
  min-width: 0;
  width: 100%;
}


.archive-page #archive_filter {
  display: block;
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 42px 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.archive-page #archive_filter:hover {
  border-color: var(--fg);
}

.archive-page #archive_filter:focus,
.archive-page #archive_filter:focus-visible {
  border-color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--fg);
}

.archive-page .archive-filter-reset-v7y {
  position: absolute;
  inset-block: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  -webkit-text-fill-color: currentColor !important;
  text-decoration: none;
  box-shadow: none !important;
}


.archive-page .archive-view-field,
.archive-page .archive-sort-field-v7v {
  width: auto;
  min-width: 0;
}

.archive-page #archive_view_switch.archive-view-switch,
.archive-page #archive_color_sort.archive-view-switch {
  display: inline-grid;
  height: 42px;
  min-height: 42px;
  gap: 1px;
  padding: 1px;
  border: 0;
  background: var(--line);
  overflow: hidden;
}

.archive-page #archive_view_switch.archive-view-switch {
  grid-template-columns: repeat(3, minmax(72px, auto));
}

.archive-page #archive_color_sort.archive-view-switch {
  grid-template-columns: repeat(2, minmax(82px, auto));
}

.archive-page #archive_view_switch.archive-view-switch a,
.archive-page #archive_color_sort.archive-view-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 0 !important;
  outline: 0;
  background: var(--panel) !important;
  color: var(--fg) !important;
  -webkit-text-fill-color: currentColor !important;
  text-decoration: none;
  box-shadow: none !important;
}

.archive-page #archive_view_switch.archive-view-switch a.is-active,
.archive-page #archive_color_sort.archive-view-switch a.is-active,
.archive-page #archive_view_switch.archive-view-switch a:hover,
.archive-page #archive_color_sort.archive-view-switch a:hover,
.archive-page #archive_view_switch.archive-view-switch a:focus-visible,
.archive-page #archive_color_sort.archive-view-switch a:focus-visible {
  background: var(--fg) !important;
  color: var(--bg) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: none !important;
}

.archive-page .archive-filter-status {
  height: 42px;
  min-height: 42px;
  margin: 0;
  align-self: end;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.archive-pagination-direction {
  justify-content: center;
  padding: 0;
  font-size: 18px;
}

.archive-pagination-direction:first-child,
.archive-pagination-direction:last-child {
  width: 52px;
}

.archive-pagination-direction.is-disabled {
  pointer-events: none;
}

@media (max-width: 1050px) {
  .archive-page .archive-tools-v6l {
    grid-template-columns: minmax(240px, 1fr) auto auto;
  }
  .archive-page .archive-filter-status {
    grid-column: 1 / -1;
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .archive-page .archive-tools-v6l {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .archive-page .archive-view-field,
  .archive-page .archive-sort-field-v7v,
  .archive-page #archive_view_switch.archive-view-switch,
  .archive-page #archive_color_sort.archive-view-switch {
    width: 100%;
  }
  .archive-page #archive_view_switch.archive-view-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .archive-page #archive_color_sort.archive-view-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .archive-pagination-direction:first-child,
  .archive-pagination-direction:last-child {
    width: auto;
  }
}


/* Archive publique / filtre et pagination alignés sur view (reset.36) */
.archive-page .archive-filter-row-v7y {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.archive-page #archive_filter {
  border: 0 !important;
  padding-right: 44px;
  background: transparent;
}

.archive-page #archive_filter:focus,
.archive-page #archive_filter:focus-visible {
  box-shadow: inset 0 0 0 1px var(--fg);
}

.archive-page .archive-filter-reset-v7y {
  position: absolute !important;
  top: 1px !important;
  right: 1px !important;
  bottom: 1px !important;
  z-index: 2;
  width: 40px !important;
  height: auto !important;
  min-width: 40px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: var(--panel) !important;
  color: var(--muted) !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 18px;
  line-height: 1;
}

.archive-page .archive-filter-reset-v7y:hover,
.archive-page .archive-filter-reset-v7y:focus-visible {
  background: var(--panel) !important;
  color: var(--fg) !important;
  -webkit-text-fill-color: currentColor !important;
}

.archive-pagination-direction,
.archive-pagination-direction:first-child,
.archive-pagination-direction:last-child {
  width: 52px;
  min-width: 52px;
  min-height: 50px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.archive-pagination-direction:hover,
.archive-pagination-direction:focus-visible {
  background: transparent !important;
  color: var(--fg) !important;
  -webkit-text-fill-color: currentColor !important;
}

.archive-pagination-direction.is-disabled {
  opacity: .2;
}

@media (max-width: 760px) {
  .archive-pagination-direction,
  .archive-pagination-direction:first-child,
  .archive-pagination-direction:last-child {
    width: auto;
    min-width: 0;
    border: 0 !important;
  }
}

/* Archives publiques / contrôles et pagination (reset.37) */
.archive-page .archive-filter-row-v7y {
  position: relative;
  display: block;
  overflow: visible;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color .12s ease, box-shadow .12s ease;
}

.archive-page .archive-filter-row-v7y:focus-within {
  border-color: var(--fg);
  box-shadow: inset 0 -2px 0 var(--fg);
}

.archive-page #archive_filter {
  height: 42px;
  padding-right: 42px;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.archive-page .archive-filter-reset-v7y {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: var(--muted) !important;
  -webkit-text-fill-color: currentColor !important;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
}

.archive-page .archive-filter-reset-v7y.is-empty {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.archive-page .archive-filter-reset-v7y:hover,
.archive-page .archive-filter-reset-v7y:focus-visible {
  color: var(--fg) !important;
  -webkit-text-fill-color: currentColor !important;
  background: transparent !important;
}

.archive-page #archive_view_switch.archive-view-switch,
.archive-page #archive_color_sort.archive-view-switch {
  display: inline-grid;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  overflow: visible;
}

.archive-page #archive_view_switch.archive-view-switch a,
.archive-page #archive_color_sort.archive-view-switch a {
  position: relative;
  min-height: 40px;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  background: var(--panel) !important;
  color: var(--fg) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: none !important;
}

.archive-page #archive_view_switch.archive-view-switch a:last-child,
.archive-page #archive_color_sort.archive-view-switch a:last-child {
  border-right: 0 !important;
}

.archive-page #archive_view_switch.archive-view-switch a:hover,
.archive-page #archive_color_sort.archive-view-switch a:hover,
.archive-page #archive_view_switch.archive-view-switch a:focus-visible,
.archive-page #archive_color_sort.archive-view-switch a:focus-visible {
  background: var(--panel) !important;
  color: var(--fg) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: inset 0 0 0 1px var(--fg) !important;
}

.archive-page #archive_view_switch.archive-view-switch a.is-active,
.archive-page #archive_color_sort.archive-view-switch a.is-active {
  background: var(--panel) !important;
  color: var(--fg) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: inset 0 0 0 1px var(--fg) !important;
}

.archive-page .archive-pagination {
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 0;
}

.archive-page .archive-pagination-direction,
.archive-page .archive-pagination-direction:first-child,
.archive-page .archive-pagination-direction:last-child {
  width: 52px;
  min-width: 52px;
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 30px;
  line-height: 1;
  box-shadow: none !important;
  transition: color .12s ease, opacity .12s ease;
}

.archive-page .archive-pagination-direction:first-child {
  justify-self: start;
  justify-content: flex-start;
  padding-left: 12px;
}

.archive-page .archive-pagination-direction:last-child {
  justify-self: end;
  justify-content: flex-end;
  padding-right: 12px;
}

.archive-page .archive-pagination-direction:hover,
.archive-page .archive-pagination-direction:focus-visible {
  color: var(--fg) !important;
  -webkit-text-fill-color: currentColor !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1;
}

.archive-page .archive-pagination-direction.is-disabled {
  opacity: .2;
  pointer-events: none;
}

@media (max-width: 760px) {
  .archive-page .archive-pagination {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
  }
  .archive-page .archive-pagination-pages {
    grid-column: 2;
    grid-row: 1;
    border-bottom: 0;
    padding: 8px 0;
  }
  .archive-page .archive-pagination-direction,
  .archive-page .archive-pagination-direction:first-child,
  .archive-page .archive-pagination-direction:last-child {
    grid-row: 1;
    width: 52px;
    min-width: 52px;
    min-height: 50px;
  }
  .archive-page .archive-pagination-direction:first-child { grid-column: 1; }
  .archive-page .archive-pagination-direction:last-child {
    grid-column: 3;
    border-left: 0 !important;
  }
}

/* Archives publiques / sélection claire et focus sombre (reset.38) */
html[data-theme="light"] .archive-page #archive_view_switch.archive-view-switch a.is-active,
html[data-theme="light"] .archive-page #archive_color_sort.archive-view-switch a.is-active,
html[data-theme="light"] .archive-page #archive_view_switch.archive-view-switch a:hover,
html[data-theme="light"] .archive-page #archive_color_sort.archive-view-switch a:hover,
html[data-theme="light"] .archive-page #archive_view_switch.archive-view-switch a:focus-visible,
html[data-theme="light"] .archive-page #archive_color_sort.archive-view-switch a:focus-visible {
  box-shadow:
    inset 1px 1px 0 #050505,
    inset -1px 0 0 #050505 !important;
}

html:not([data-theme="light"]) .archive-page .archive-filter-row-v7y:focus-within {
  border-color: var(--fg);
  box-shadow: none !important;
}

/* Archives publiques / états de contrôle unifiés (reset.39) */
.archive-page .archive-filter-row-v7y:focus-within {
  border-color: var(--fg) !important;
  box-shadow: inset 0 0 0 1px var(--fg) !important;
}

.archive-page #archive_view_switch.archive-view-switch a,
.archive-page #archive_color_sort.archive-view-switch a {
  font-size: 11px !important;
  font-weight: 400 !important;
  letter-spacing: .04em;
}

.archive-page #archive_view_switch.archive-view-switch a.is-active,
.archive-page #archive_color_sort.archive-view-switch a.is-active,
.archive-page #archive_view_switch.archive-view-switch a:hover,
.archive-page #archive_color_sort.archive-view-switch a:hover,
.archive-page #archive_view_switch.archive-view-switch a:focus-visible,
.archive-page #archive_color_sort.archive-view-switch a:focus-visible {
  box-shadow: inset 0 0 0 1px var(--fg) !important;
}

html[data-theme="light"] .archive-page #archive_view_switch.archive-view-switch a.is-active,
html[data-theme="light"] .archive-page #archive_color_sort.archive-view-switch a.is-active,
html[data-theme="light"] .archive-page #archive_view_switch.archive-view-switch a:hover,
html[data-theme="light"] .archive-page #archive_color_sort.archive-view-switch a:hover,
html[data-theme="light"] .archive-page #archive_view_switch.archive-view-switch a:focus-visible,
html[data-theme="light"] .archive-page #archive_color_sort.archive-view-switch a:focus-visible {
  box-shadow: inset 0 0 0 1px #050505 !important;
}

html:not([data-theme="light"]) .archive-page .archive-filter-row-v7y:focus-within {
  border-color: var(--fg) !important;
  box-shadow: inset 0 0 0 1px var(--fg) !important;
}

/* V10 reset.42 / lancement public */
.public-process-message {
  margin-bottom: 18px;
}
.public-process-message .eyebrow {
  margin-bottom: 8px;
}
.public-process-message p:last-child {
  margin-bottom: 0;
}
/* Liens artiste et fond de pagination publique (reset.43) */
.artist-link,
.artist-link:visited {
  color: inherit;
  text-decoration: none;
}

.artist-link:hover,
.artist-link:focus-visible {
  color: inherit;
  text-decoration: none;
  opacity: .68;
}

.archive-page .archive-pagination {
  background: var(--bg) !important;
}

.archive-page .archive-pagination-pages,
.archive-page .archive-pagination-direction {
  background: var(--bg) !important;
}

/* Archive / vue Index sur téléphone (reset.45) */
@media (max-width: 720px) {
  .archive-page .archive-grid-v6l.is-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .archive-page .archive-grid-v6l.is-compact .archive-card-v6l,
  .archive-page .archive-grid-v6l.is-compact .archive-thumb-v6l {
    min-width: 0;
    width: 100%;
  }
}

/* Archive / 15 fiches sur 3 colonnes complètes (reset.117) */
.archive-page .archive-grid-v6l:not(.is-compact):not(.is-colorgrid) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-page .archive-grid-v6l.is-compact {
  grid-template-columns: repeat(var(--archive-index-columns, 4), minmax(0, 1fr));
}

@media (max-width: 720px) {
  .archive-page .archive-grid-v6l:not(.is-compact):not(.is-colorgrid) {
    grid-template-columns: 1fr;
  }
}


/* reset.46 / trace minimale des disparitions */
.admin-disappearance-stats .admin-stat-date {
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1;
}
.admin-disappearance-filter { margin-top: 28px; }
.admin-disappearance-register { margin-top: 28px; }
.admin-disappearance-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
}
.admin-disappearance-entry {
  min-width: 0;
  padding: 24px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}
.admin-disappearance-entry > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid currentColor;
}
.admin-disappearance-entry h3 {
  margin: 0;
  font-size: clamp(19px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -.03em;
}
.admin-disappearance-entry > header span,
.admin-disappearance-entry dt,
.admin-disappearance-entry > footer a {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.admin-disappearance-entry dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 20px 0 0;
}
.admin-disappearance-entry dl > div { min-width: 0; }
.admin-disappearance-entry dl > .is-wide { grid-column: 1 / -1; }
.admin-disappearance-entry dt { margin-bottom: 5px; opacity: .6; }
.admin-disappearance-entry dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.admin-disappearance-entry > footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid currentColor;
}
.admin-disappearance-entry > footer a { text-decoration: none; }
.admin-empty-state { padding: 42px 0; }
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding-top: 24px;
}
.admin-pagination a {
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
  opacity: .55;
}
.admin-pagination a:hover,
.admin-pagination a:focus-visible { opacity: 1; }
@media (max-width: 760px) {
  .admin-disappearance-list { grid-template-columns: 1fr; }
  .admin-disappearance-entry { padding: 18px; }
}
@media (max-width: 480px) {
  .admin-disappearance-entry dl { grid-template-columns: 1fr; }
  .admin-disappearance-entry dl > .is-wide { grid-column: auto; }
}

/* reset.54 / consolidation archive éphémère */
.admin-form-group-title{margin:22px 0 8px;font:inherit;letter-spacing:.12em;text-transform:uppercase}
.admin-integrity-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-top:1px solid var(--line);border-left:1px solid var(--line);margin:18px 0}
.admin-integrity-grid>div{min-height:92px;padding:14px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;flex-direction:column;justify-content:space-between}
.admin-integrity-grid span{font-size:.72em;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.admin-integrity-grid strong{font-size:2rem;font-weight:400}
.admin-status-label.is-warning{background:var(--fg);color:var(--bg)}
.admin-status-label.is-error{outline:2px solid currentColor;outline-offset:-3px}
@media(max-width:900px){.admin-integrity-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.admin-integrity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Archive éphémère / nettoyage contrôlé des références orphelines */
.admin-integrity-card .admin-danger-button{min-height:40px}
.admin-integrity-card .admin-danger-button:hover,
.admin-integrity-card .admin-danger-button:focus-visible{background:var(--fg);color:var(--bg);border-color:var(--fg)}

/* reset.77 / registre public des disparitions sans fiche individuelle */
.archive-page #archive_view_switch.archive-view-switch {
  grid-template-columns: repeat(4, minmax(72px, auto));
}

.archive-disappeared-register {
  padding: 0;
  overflow: hidden;
}

.archive-disappeared-register-intro {
  padding: clamp(18px, 2.4vw, 28px);
  border-bottom: 1px solid var(--line);
}

.archive-disappeared-register-intro h2 {
  margin: 7px 0 12px;
}

.archive-disappeared-register-intro p:last-child {
  max-width: 78ch;
  margin-bottom: 0;
}

.archive-disappeared-head,
.archive-disappeared-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.1fr) minmax(170px, 1.35fr) repeat(3, minmax(105px, .72fr));
  gap: clamp(12px, 2vw, 28px);
  align-items: center;
}

.archive-disappeared-head {
  min-height: 40px;
  padding: 0 clamp(18px, 2.4vw, 28px);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

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

.archive-disappeared-list li + li {
  border-top: 1px solid var(--line);
}

.archive-disappeared-row {
  min-height: 54px;
  padding: 9px clamp(18px, 2.4vw, 28px);
  color: var(--muted);
}

.archive-disappeared-list strong {
  color: inherit;
  font-weight: 500;
  white-space: nowrap;
}

.archive-disappeared-list span,
.archive-disappeared-list time {
  min-width: 0;
  overflow-wrap: anywhere;
}

html:not([data-theme="light"]) .archive-disappeared-register {
  border-color: var(--line-soft);
}

html:not([data-theme="light"]) .archive-disappeared-register-intro,
html:not([data-theme="light"]) .archive-disappeared-head {
  border-bottom-color: var(--line-soft);
}

html:not([data-theme="light"]) .archive-disappeared-list li + li {
  border-top-color: var(--line-soft);
}

@media (max-width: 980px) {
  .archive-disappeared-head { display: none; }

  .archive-disappeared-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px 24px;
    min-height: 0;
    padding-top: 17px;
    padding-bottom: 17px;
  }

  .archive-disappeared-row > *::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: inherit;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .58;
  }
}

@media (max-width: 760px) {
  .archive-page #archive_view_switch.archive-view-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
  }
}

/* reset.84 / barre Archives mobile sans chevauchement */
@media (max-width: 760px) {
  .archive-page .archive-tools-v6l > .field {
    grid-template-rows: 16px auto;
    height: auto;
  }

  .archive-page #archive_view_switch.archive-view-switch,
  .archive-page #archive_color_sort.archive-view-switch {
    height: auto;
    min-height: 0;
  }

  .archive-page #archive_view_switch.archive-view-switch a,
  .archive-page #archive_color_sort.archive-view-switch a {
    min-height: 48px;
    border-right: 0 !important;
  }

  .archive-page #archive_view_switch.archive-view-switch a:nth-child(even),
  .archive-page #archive_color_sort.archive-view-switch a:nth-child(2) {
    border-left: 1px solid var(--line) !important;
  }

  .archive-page #archive_view_switch.archive-view-switch a:nth-child(n + 3) {
    border-top: 1px solid var(--line) !important;
  }

  .archive-page .archive-filter-status {
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 540px) {
  .archive-disappeared-row {
    grid-template-columns: 1fr;
  }
}

/* reset.97 / dégradé réellement visible sur tout le header */
html:not([data-theme="light"]) .site-header {
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 5, 0) 0%,
    rgba(5, 5, 5, .72) 44%,
    rgba(5, 5, 5, 1) 78%,
    rgba(5, 5, 5, 1) 100%
  );
}

:root[data-theme="light"] .site-header {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, .72) 44%,
    rgba(255, 255, 255, 1) 78%,
    rgba(255, 255, 255, 1) 100%
  );
}

.site-header nav,
.site-header nav::before,
.site-header nav a,
.site-header nav .theme-toggle,
html:not([data-theme="light"]) .site-header nav,
html:not([data-theme="light"]) .site-header nav::before,
html:not([data-theme="light"]) .site-header nav a,
html:not([data-theme="light"]) .site-header nav .theme-toggle,
html[data-theme="light"] .site-header nav,
html[data-theme="light"] .site-header nav::before,
html[data-theme="light"] .site-header nav a,
html[data-theme="light"] .site-header nav .theme-toggle {
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}

.site-header nav::before {
  content: none;
  display: none;
}

/* reset.91 / retrait immédiat, compteurs publics et page indisponible */
.creator-delete-panel {
  margin: 0 0 var(--result-gap);
  border: 1px solid var(--fg);
  background: var(--bg);
}

html[data-theme="light"] .creator-delete-panel {
  border-width: 2px;
  border-color: #050505;
}

.creator-delete-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 50px;
  list-style: none;
  padding: 14px clamp(16px, 2.2vw, 24px);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 120ms linear, color 120ms linear;
}

.creator-delete-countdown {
  min-width: 5ch;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  text-align: right;
  white-space: nowrap;
}

.creator-delete-panel > summary::-webkit-details-marker {
  display: none;
}

.creator-delete-panel:not([open]) > summary {
  background: transparent;
  color: var(--fg);
}

.creator-delete-panel:not([open]) > summary:hover,
.creator-delete-panel:not([open]) > summary:focus-visible,
.creator-delete-panel[open] > summary {
  background: var(--fg);
  color: var(--bg);
}

.creator-delete-panel > summary:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
}

.creator-delete-confirmation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 18px clamp(16px, 2.2vw, 24px) 22px;
  border-top: 1px solid var(--line);
}

.creator-delete-confirmation p {
  max-width: 76ch;
  margin: 0;
}

.creator-delete-confirmation p + p {
  margin-top: 8px;
}

.creator-delete-submit {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  white-space: nowrap;
}

.creator-delete-submit:hover,
.creator-delete-submit:focus-visible {
  background: var(--fg);
  color: var(--bg);
}

.creator-delete-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
}

.creator-delete-notice .eyebrow,
.creator-delete-notice p {
  margin: 0;
  color: inherit;
}

.generator-page .creator-delete-notice {
  margin: 0 0 clamp(32px, 4vw, 52px);
  border-color: var(--fg);
  background: var(--bg);
  color: var(--fg);
}

.entry-unavailable-page {
  display: grid;
  align-content: start;
  min-height: max(420px, calc(100vh - 170px));
}

.entry-unavailable-panel {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

.entry-unavailable-head {
  display: grid;
  gap: 12px;
  padding: clamp(28px, 4.5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.entry-unavailable-head .eyebrow {
  margin: 0;
}

.entry-unavailable-head h1 {
  max-width: 14ch;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(38px, 6.5vw, 86px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.055em;
}

.entry-unavailable-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: clamp(22px, 3vw, 38px) clamp(28px, 4.5vw, 64px);
}

.entry-unavailable-body > p {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
}

.entry-unavailable-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 720px) {
  .creator-delete-confirmation,
  .entry-unavailable-body {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .creator-delete-confirmation form,
  .creator-delete-submit,
  .entry-unavailable-actions,
  .entry-unavailable-actions .button-link {
    width: 100%;
  }

  .entry-unavailable-actions .button-link {
    justify-content: center;
  }

  .entry-unavailable-actions {
    justify-content: stretch;
  }

  .creator-delete-notice {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ==========================================================================
   ADMINISTRATION / ADAPTATION MOBILE FONCTIONNELLE / RESET.102
   ========================================================================== */

/* Les enfants des grilles peuvent se réduire sans élargir la page entière. */
.admin-page,
.admin-page > *,
.admin-global-hero > *,
.admin-global-navigation,
.admin-dashboard-grid > *,
.admin-card,
.admin-card-heading > *,
.admin-section-head > *,
.admin-data > *,
.admin-global-status > * {
  min-width: 0;
  max-width: 100%;
}

.admin-page input,
.admin-page select,
.admin-page textarea,
.admin-page button,
.admin-page .button-link {
  min-width: 0;
  max-width: 100%;
}

.admin-table-wrap,
.admin-page .table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  .admin-page {
    width: calc(100vw - 28px);
    max-width: 100%;
    gap: 16px;
    overflow-x: clip;
  }

  .admin-global-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "nav"
      "status";
    gap: 18px;
  }

  .admin-hero h1 {
    max-width: 100%;
    font-size: clamp(28px, 10vw, 44px);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .admin-hero-copy > p:not(.eyebrow),
  .admin-card-intro,
  .admin-note,
  .admin-maintenance-message,
  .admin-page p,
  .admin-page li,
  .admin-page a,
  .admin-page dt,
  .admin-page dd,
  .admin-page code,
  .admin-page pre,
  .admin-page summary {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .admin-page .field {
    min-width: 0 !important;
    max-width: 100%;
  }

  .admin-page pre {
    overflow-x: auto;
    white-space: pre-wrap;
  }

  .admin-dashboard-grid,
  .admin-section-head,
  .admin-data {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-data {
    gap: 4px;
  }

  .admin-data dd {
    margin-bottom: 8px;
  }

  .admin-global-nav,
  .admin-section-nav {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-global-nav a,
  .admin-section-nav a {
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 8px 6px;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-global-status dd {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-actions {
    align-items: stretch;
  }

  .admin-actions .button-link,
  .admin-actions button,
  .admin-actions input[type="submit"] {
    flex: 1 1 180px;
    min-height: 44px;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-attention-item {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .admin-attention-item > span:nth-child(3),
  .admin-attention-item > em {
    grid-column: 2;
  }

  .admin-attention-item em {
    white-space: normal;
  }

  .admin-table-wrap .admin-table,
  .admin-page .table-wrap .admin-table {
    width: max-content;
    min-width: 100%;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .admin-global-status,
  .admin-status-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-global-status > div,
  .admin-global-status > div:last-child {
    grid-column: auto;
  }

  .admin-global-nav,
  .admin-section-nav {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* En-tête admin / cellule dédiée au sélecteur de thème / RESET.103 */
@media (max-width: 760px) {
  .site-header nav.site-nav-admin {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 34px;
  }

  .site-header nav.site-nav-admin .theme-toggle {
    width: 100%;
    justify-self: stretch;
  }
}

/* Générer public / étape 5 influence de la matrice / RESET.104 */
.generator-page .public-matrix-influence-v104 .section-head {
  margin-bottom: clamp(18px, 2vw, 28px);
}

.generator-page .matrix-influence-choice-grid-v104 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
}

.generator-page .matrix-influence-choice-grid-v104 .setting-choice-card-v7ai {
  min-height: 58px;
  place-items: center;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  text-align: center;
}

.generator-page .matrix-influence-choice-grid-v104 .setting-choice-card-v7ai:last-child {
  border-right: 0;
}

.generator-page .matrix-influence-choice-grid-v104 .setting-choice-card-v7ai strong {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
}

.generator-page .matrix-influence-choice-grid-v104 .setting-choice-card-v7ai.is-active {
  box-shadow: inset 0 0 0 1px var(--fg);
}

@media (max-width: 560px) {
  .generator-page .matrix-influence-choice-grid-v104 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .generator-page .matrix-influence-choice-grid-v104 .setting-choice-card-v7ai {
    min-height: 52px;
    padding: 7px 6px;
  }
}

/* Administration / comparateur temporaire d’influence matrice / RESET.106 */
.admin-global-nav {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.admin-matrix-compare-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.admin-matrix-compare-form .field {
  margin: 0;
}

.admin-matrix-compare-form input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font: inherit;
}

.admin-matrix-compare-form .admin-actions {
  margin: 0;
}

.admin-matrix-compare-form button {
  min-height: 44px;
  padding-inline: 18px;
  border: 1px solid var(--fg);
  font: inherit;
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.admin-matrix-compare-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--line);
  overflow: hidden;
}

.admin-matrix-compare-summary > div {
  padding: 9px 11px;
  border: 0;
  border-right: 1px solid var(--line);
}

.admin-matrix-compare-summary > div:last-child {
  border-right: 0;
}

.admin-matrix-compare-summary dt {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.admin-matrix-compare-summary dd {
  margin: 4px 0 0;
  font-size: 11px;
}

.admin-matrix-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.admin-matrix-compare-grid figure {
  min-width: 0;
  margin: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-matrix-compare-grid figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-matrix-compare-grid figcaption strong {
  font-size: 13px;
  font-weight: 500;
}

.admin-matrix-compare-grid figcaption span {
  color: var(--muted);
  text-align: right;
}

.admin-matrix-compare-image {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 14px;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

html[data-theme="light"] .admin-matrix-compare-image {
  background-image:
    linear-gradient(rgba(0,0,0,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.055) 1px, transparent 1px);
}

.admin-matrix-compare-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 1120px) {
  .admin-global-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .generator-page .source-family-grid-v7ai.is-admin-v108 {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-matrix-compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .admin-global-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-matrix-compare-form,
  .admin-matrix-compare-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-matrix-compare-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-matrix-compare-summary > div:last-child {
    border-bottom: 0;
  }

  .admin-matrix-compare-form .admin-actions button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .admin-global-nav {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* reset.113 / contraste des mots-clés et cadre stable des modes Archives */
.archive-page #archive_view_switch.archive-view-switch a::after,
.archive-page #archive_color_sort.archive-view-switch a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  box-sizing: border-box;
  border: 1px solid transparent;
  pointer-events: none;
}

.archive-page #archive_view_switch.archive-view-switch a.is-active,
.archive-page #archive_color_sort.archive-view-switch a.is-active,
.archive-page #archive_view_switch.archive-view-switch a:hover,
.archive-page #archive_color_sort.archive-view-switch a:hover,
.archive-page #archive_view_switch.archive-view-switch a:focus-visible,
.archive-page #archive_color_sort.archive-view-switch a:focus-visible {
  z-index: 1;
  box-shadow: none !important;
}

.archive-page #archive_view_switch.archive-view-switch a.is-active::after,
.archive-page #archive_color_sort.archive-view-switch a.is-active::after,
.archive-page #archive_view_switch.archive-view-switch a:hover::after,
.archive-page #archive_color_sort.archive-view-switch a:hover::after,
.archive-page #archive_view_switch.archive-view-switch a:focus-visible::after,
.archive-page #archive_color_sort.archive-view-switch a:focus-visible::after {
  border-color: var(--fg);
}

/* reset.114 / prévisualisation protégée pendant le droit d’effacement */
.result-image-wrap.is-creator-preview-protected {
  isolation: isolate;
}

.result-image-wrap.is-creator-preview-protected img {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.creator-preview-guard {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: block;
  background: transparent;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
