/* Fichier généré : ne pas éditer. Preset style_0.css. SHA-256 f02895d353b7391638d9944373d9041a07f9c1f139c37ec4ad11fe3139b5f318. */
/* SMF — contrat CSS commun. Sources et déploiement : docs/css-framework.md.
 * Tous les sélecteurs applicatifs résident ici. Les presets ne définissent que :root.
 * Les valeurs ci-dessous sont le repli historique ; style_0.css en est le preset complet.
 * Éditer les sources, puis : php bin/build-css.php --style=0
 */

:root {
    --site-header-height: 64px;
    /* Palette générale */
    --color-text-primary: #1f2937;
    --color-text-secondary: #4b5563;
    --color-text-muted: #6b7280;
    --color-text-subtle: #777777;
    --color-text-on-dark: #ffffff;
    --color-text-navigation: #d1d5db;
    --color-text-code: #e5e7eb;
    --color-text-console: #4ade80;
    --color-text-success: #166534;
    --color-text-error: #b91c1c;
    --color-action-primary: #2563eb;
    --color-action-current: #0033a2;
    --color-surface-page: #f8fafc;
    --color-surface-default: #ffffff;
    --color-surface-subtle: #f3f4f6;
    --color-surface-dark: #111827;
    --color-surface-console: #020617;
    --color-surface-error: #fef2f2;
    --color-surface-success: #b0f1a3;
    --color-border-default: #d1d5db;
    --color-border-subtle: #e5e7eb;
    --color-border-strong: #4b5563;
    --color-border-input: #9ca3af;
    --color-border-success: #166534;
    --color-border-error: #fecaca;
    /* États métier du workflow */
    --workflow-node-state-border-locked: #d1d5db;
    --workflow-node-state-surface-locked: #f5f5f5;
    --workflow-node-state-border-disabled: #9ca3af;
    --workflow-node-state-surface-disabled: #f3f4f6;
    --workflow-node-state-border-ready: #2563eb;
    --workflow-node-state-surface-ready: #eff6ff;
    --workflow-node-state-fieldset-ready: #e0efff;
    --workflow-node-state-border-active: #7c3aed;
    --workflow-node-state-surface-active: #f5f3ff;
    --workflow-node-state-border-awaiting-validation: #d97706;
    --workflow-node-state-surface-awaiting-validation: #fffbeb;
    --workflow-node-state-border-validated: #d1d5db;
    --workflow-node-state-surface-validated: #ffffff;
    --workflow-node-state-border-error: #b91c1c;
    --workflow-node-state-surface-error: #fef2f2;
    --workflow-node-state-border-cancelled: #4b5563;
    --workflow-node-state-surface-cancelled: #f3f4f6;
    /* Dimensions et typographie */
    --sidebar-width: 400px;
    --border-radius: 6px;
    --font-family-body: Arial, sans-serif;
    --font-family-code: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --font-size-body: 1rem;
    --line-height-body: normal;
    --font-size-workflow: .9rem;
    --font-size-worker: .75rem;
    --font-size-technical: .7rem;
    --font-size-status: .85rem;
    --font-size-resource: .85rem;
    --font-size-edition-status: .7rem;
    --font-size-news-meta: .7em;
    /* Disposition, densité et contrôles */
    --page-padding: 40px;
    --header-padding: 0 32px;
    --header-columns: 1fr auto 1fr;
    --navigation-gap: 24px;
    --header-title-size: 1.25rem;
    --panel-border-width: 1px;
    --workflow-border-width: 2px;
    --dashboard-card-padding: 20px;
    --dashboard-list-gap: 18px;
    --dashboard-list-margin: 24px;
    --workflow-node-padding: .5rem;
    --workflow-grid-gap: .5rem;
    --workflow-group-padding: .8rem;
    --form-display: grid;
    --form-gap: 16px;
    --form-control-padding: 10px 12px;
    --form-control-background: Field;
    --form-control-scheme: normal;
    --button-padding: 10px 16px;
    --button-background: ButtonFace;
    --button-text: ButtonText;
    --button-hover-filter: none;
    --focus-color: #e49b19;
    /* Surfaces, ombres et retours */
    --surface-header: var(--color-surface-dark);
    --surface-sidebar: var(--color-surface-default);
    --header-shadow: none;
    --panel-shadow: none;
    --workflow-shadow: 2px 2px 5px 0px #dcdcdc;
    --workflow-hover-shadow: 0 2px 8px rgba(0, 0, 0, .14);
    --progress-current-shadow: 0 0 0 4px rgb(37 99 235 / 18%);
    --color-progress: #2364aa;
    --color-progress-subtle: #e8f1fb;
    --news-grouping-border: #527db5;
    --comfyui-table-border: #ccc;
    --color-export-success: #f0fdf4;
    --workflow-filter-border: #a8bac8;
    --workflow-filter-surface: #fff;
    --workflow-filter-text: #253c4d;
    --workflow-filter-active: #155d88;
    --workflow-filter-radius: .4rem;
    --error-page-padding: 40px;
    --three-candidate-border: #ccc;
    --three-official-border: #ccc;
    /* Paramètres du documentaire et du catalogue 3D */
    --docs-panel-radius: 16px;
    --docs-panel-shadow: 0 8px 30px rgba(29, 50, 75, .05);
    --docs-node-filter: drop-shadow(0 3px 5px rgba(34, 62, 88, .12));
    --docs-dag-background: radial-gradient(circle at 50% 45%, #f7fbff 0, #edf5fb 100%);
    --docs-code-background: #17283a;
    --docs-code-text: #eaf2f8;
    --docs-title-size: clamp(2rem, 3vw, 3rem);
    --three-panel-radius: 18px;
    --three-panel-shadow: 0 12px 36px rgba(30, 55, 80, .06);
    --three-viewer-background: radial-gradient(circle at 50% 42%, #fff 0%, #eff6fb 70%, #e2ecf5 100%);
    --three-status-shadow: 0 6px 20px rgba(28, 47, 64, .1);
    --three-choice-radius: 10px;
    --three-code-background: #17283a;
    --three-code-text: #d8f1ff;
    /* Palette du documentaire */
    --docs-text: #1e2c3e;
    --docs-description: #64748b;
    --docs-accent: #2869a4;
    --docs-tabs-border: #dce4ed;
    --docs-muted: #62748a;
    --docs-tab-active-text: #135e98;
    --docs-tab-active-border: #1787c1;
    --docs-tab-count: #869ab0;
    --docs-surface: #fff;
    --docs-border: #dce5ed;
    --docs-index-heading: #667991;
    --docs-index-text: #33475e;
    --docs-index-active-surface: #e8f4fb;
    --docs-index-active-text: #075f98;
    --docs-eyebrow: #1687ad;
    --docs-link: #0870a9;
    --docs-controls-text: #74869a;
    --docs-control-border: #cfdae6;
    --docs-control-text: #255a7f;
    --docs-edge: #9bb3c6;
    --docs-scope-formation-border: #b8d3e7;
    --docs-scope-matiere-border: #c8b9e8;
    --docs-scope-chapitre-border: #a5d6bc;
    --docs-scope-illustration-border: #e8c19f;
    --docs-scope-formation-text: #3684ae;
    --docs-scope-matiere-text: #8365a9;
    --docs-scope-chapitre-text: #398465;
    --docs-scope-illustration-text: #ad7845;
    --docs-node-text: #1e3045;
    --docs-node-id: #8090a1;
    --docs-legend: #60748a;
    --docs-note: #798a9d;
    --docs-error: #a43737;
    --docs-scope-cadrage: #635baf;
    /* Palette du catalogue 3D */
    --three-text: #1e2c3e;
    --three-link: #17638f;
    --three-eyebrow: #147a9c;
    --three-description: #587087;
    --three-surface: #fff;
    --three-border: #dce5ed;
    --three-list-heading: #6b7d8f;
    --three-choice-border: #d8e2ec;
    --three-choice-surface: #f8fafc;
    --three-choice-text: #20364b;
    --three-choice-hover-border: #6eb1cf;
    --three-choice-hover-surface: #eff8fb;
    --three-choice-active-border: #1384ae;
    --three-choice-active-surface: #e9f6fb;
    --three-choice-code: #7a8d9e;
    --three-detail-eyebrow: #1788aa;
    --three-detail-description: #63778a;
    --three-status-text: #7f3030;
    --three-controls-border: #e7edf2;
    --three-controls-text: #798b9e;
    --three-control-border: #c9d9e5;
    --three-control-text: #20648c;
    --three-code-label: #73879a;
    --three-note: #718598;
    --three-status-surface: rgba(255, 255, 255, .94);
    --three-status-surface: rgba(255, 255, 255, .94);
    /* Contrastes des actions et contrôles natifs */
    --button-primary-background: var(--color-action-primary);
    --button-primary-text: var(--color-text-on-dark);
    --fieldset-border-width: 2px;
    --fieldset-border-color: #c0c0c0;
    --fieldset-radius: 0;
    --color-control-text: FieldText;
    --workflow-filter-inverse: #fff;
    --color-success-inverse: #fff;
    --button-danger-background: var(--color-text-error);
    --button-danger-text: var(--color-text-on-dark);
    --color-progress-contrast: var(--color-text-on-dark);
    --color-current-contrast: var(--color-text-on-dark);
    --control-border-width: 1px;
}

:root {
    color: var(--color-text-primary);
    background: var(--color-surface-page);
    font-family: var(--font-family-body);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
}

/* Coque, navigation, formations, édition et médias */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

table th {
    padding: 0 5px;
    text-align: left;
}

table td {
    padding: 0 5px;
}

table.worker-jobs {
    font-size: var(--font-size-worker);
    border-collapse: collapse;
}

table.worker-jobs th {
    padding: 5px;
}

table.worker-jobs tr {
    border-top: 1px solid var(--color-border-input);
}

.worker-heading {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.worker-ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.worker-ul li {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 700;
}

h2 a {
    color: var(--color-text-primary);
    text-decoration: none;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    display: grid;
    align-items: center;
    grid-template-columns: var(--header-columns);
    column-gap: var(--navigation-gap);
    min-height: var(--site-header-height);
    padding: var(--header-padding);
    background: var(--surface-header);
    box-shadow: var(--header-shadow);
    color: var(--color-text-on-dark);
}

.site-title {
    color: inherit;
    font-size: var(--header-title-size);
    font-weight: 700;
    text-decoration: none;
}

.main-navigation {
    display: flex;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    gap: var(--navigation-gap);
    grid-column: 2;
}

.main-navigation a {
    color: var(--color-text-navigation);
    text-decoration: none;
}

.main-navigation a:hover,
.main-navigation a[aria-current="page"] {
    color: var(--color-text-on-dark);
}

.application-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: calc(100vh - var(--site-header-height));
    margin-top: var(--site-header-height);
}

.application-shell-wide {
    grid-template-columns: minmax(0, 1fr);
}

.application-shell-wide .main-content {
    grid-column: 1;
}

.sidebar {
    position: fixed;
    inset: var(--site-header-height) auto 0 0;
    width: var(--sidebar-width);
    overflow-y: auto;
    padding: 0 10px;
    background: var(--surface-sidebar);
    border-right: 1px solid var(--color-border-subtle);
}

.sidebar ul.formation-tree {
    padding: 0;
}

.sidebar ul.formation-tree ul {
    padding-left: 35px;
}

.formation-tree {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.5rem;
    color: var(--color-text-subtle);
}

.formation-tree a {
    color: inherit;
    text-decoration: none;
}

.formation-tree a:hover {
    text-decoration: underline;
}

.new-formation,
.new-news,
.new-avatar,
.new-ambience,
.new-decor {
    color: var(--color-action-primary);
    text-decoration: none;
}

.new-formation:hover,
.new-news:hover,
.new-avatar:hover,
.new-ambience:hover,
.new-decor:hover {
    text-decoration: underline;
}

.main-content {
    grid-column: 2;
    min-width: 0;
    padding: var(--page-padding);
}

.media-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 16px;
}

.media-table a {
    color: var(--color-action-primary);
}

.media-table-wrapper {
    overflow-x: auto;
    border: var(--panel-border-width) solid var(--color-border-subtle);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
}

.media-table {
    width: 100%;
    border-collapse: collapse;
}

.media-table th,
.media-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border-subtle);
    text-align: left;
    vertical-align: top;
}

.media-table th {
    background: var(--color-surface-subtle);
}

.media-table tbody tr:last-child td {
    border-bottom: 0;
}

.media-icon {
    width: 64px;
    font-size: 1.2rem;
}

.media-download {
    margin-left: 10px;
    font-size: .875rem;
}

.media-preview {
    margin-top: 8px;
}

.media-preview summary {
    cursor: pointer;
    color: var(--color-text-secondary);
}

.media-preview img,
.media-preview video {
    display: block;
    max-width: min(480px, 100%);
    max-height: 300px;
    margin-top: 10px;
}

.media-preview audio {
    width: min(480px, 100%);
    margin-top: 10px;
}

.media-preview iframe {
    display: block;
    width: min(640px, 100%);
    height: 360px;
    margin-top: 10px;
    border: var(--panel-border-width) solid var(--color-border-default);
}

.edition-node-group[id],
.edition-chapter-details[id],
#delete-chapter-confirmation,
#chapter-insertion {
    scroll-margin-top: calc(var(--site-header-height) + 24px);
}

#accueil {
    display: block;
}

#dashboard-news {
    margin-top: 48px;
}

.dashboard-heading,
.dashboard-heading-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-heading h1 {
    margin-top: 0;
}

.dashboard-heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.workflow-global-intro {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .75rem 1.5rem;
}

.workflow-global-intro > p {
    margin: 0;
}

.workflow-step-filter {
    flex: 1 1 100%;
    min-width: 0;
}

.workflow-step-filter-buttons {
    display: grid;
    gap: .4rem;
    margin-top: .5rem;
}

.workflow-step-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.workflow-step-filter-buttons button {
    cursor: pointer;
    padding: .4rem .65rem;
    border: var(--panel-border-width) solid var(--workflow-filter-border);
    border-radius: var(--workflow-filter-radius);
    background: var(--workflow-filter-surface);
    color: var(--workflow-filter-text);
}

.workflow-step-filter-buttons button[aria-pressed="true"] {
    background: var(--workflow-filter-active);
    border-color: var(--workflow-filter-active);
    color: var(--workflow-filter-inverse);
}

.workflow-step-filter-buttons button:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

.workflow-level,
.workflow-group {
    margin: 0.5rem 0;
}

.workflow-group h2,
.workflow-group h3 {
    margin: 0;
}

.workflow-group {
    padding: var(--workflow-group-padding);
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
    background: var(--color-surface-subtle);
}

.workflow-chapter {
    background: var(--color-surface-default);
}

.qcm-question > summary,
.video-chain > details > summary {
    cursor: pointer;
    font-weight: 700;
}

.video-chain > details {
    margin: 1rem 0;
}

.video-chain > details > summary {
    padding: .5rem 0;
}

.video-chain video {
    display: block;
    width: min(960px, 100%);
    max-height: 70vh;
    margin: 1rem 0;
    background: var(--color-surface-dark);
}

.video-timeline ol {
    display: grid;
    gap: .5rem;
    margin-bottom: 0;
}

.video-resource-list {
    display: grid;
    gap: 1rem;
}

.video-resource-previews {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-top: .5rem;
}

.video-resource-previews img {
    width: 150px;
    max-height: 110px;
    object-fit: contain;
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
}

.video-resource-previews audio {
    width: min(420px, 100%);
}

.voice-profile-summary {
    margin: .75rem 0;
    padding: .75rem;
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
}

.voice-profile-summary audio,
.voice-selection audio {
    width: min(640px, 100%);
}

@media (max-width: 900px) {
    .dashboard-heading {
        display: block;
    }

    .dashboard-heading-actions {
        margin-top: 16px;
        justify-content: flex-start;
    }
}

.formation-edit-link {
    margin-left: 8px;
}

.edition-tree,
.edition-tree ul {
    margin: 0 0 20px 0;
    padding-left: 24px;
    list-style: none;
}

.edition-tree {
    padding-left: 0;
}

.edition-tree li {
    margin: 5px 0;
}

.edition-tree a {
    color: var(--color-text-primary);
    text-decoration: none;
}

.edition-title {
    font-weight: bold;
}

.edition-chapter-details > summary {
    cursor: pointer;
}

.edition-thumbnail {
    display: block;
    margin-top: 6px;
    width: 125px;
    height: 125px;
    padding: 8px;
}

img.edition-thumbnail {
    object-fit: contain;
}

.edition-structural-actions {
    display: inline-flex;
    gap: 8px;
    margin-left: 8px;
    font-size: 0.875rem;
}

.main-content > h1,
.page-view h1,
.generation-view h1 {
    margin-top: 0;
}

.prompt-description {
    margin: 0 0 20px 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

.settings-llm-role-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 24px;
}

.settings-llm-role-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 9rem;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: var(--panel-border-width) solid var(--color-border-subtle);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
    color: var(--color-text-primary);
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.settings-llm-role-link:hover,
.settings-llm-role-link:focus-visible {
    background: var(--color-surface-subtle);
}

.settings-llm-role-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.settings-llm-role-icon {
    font-size: 2rem;
    line-height: 1;
}

.settings-llm-role {
    margin: 0 0 18px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--color-border-subtle);
    scroll-margin-top: calc(var(--site-header-height) + 24px);
}

.pool-table-wrapper {
    overflow-x: auto;
}

.pool-table {
    width: 100%;
    border-collapse: collapse;
}

.pool-table th,
.pool-table td {
    text-align: left;
    vertical-align: top;
}

.pool-table input[type="number"] {
    min-width: 5rem;
    max-width: 9rem;
}

.serp-account-stats dl {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) 1fr;
    gap: .35rem 1rem;
}

.serp-account-stats dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.settings-llm-role h4 {
    margin-bottom: 8px;
}

.settings-prompt {
    margin-top: 16px;
    scroll-margin-top: calc(var(--site-header-height) + 24px);
}

.generation-context {
    border-color: var(--color-border-input);
    border-style: solid;
    border-width: var(--panel-border-width);
    border-radius: var(--border-radius);
    color: var(--color-text-secondary);
    background-color: var(--workflow-node-state-fieldset-ready);
}

.context-list {
    display: grid;
    gap: 8px;
}

.context-list div {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
}

.context-list dt {
    font-weight: 700;
}

.context-list dd {
    margin: 0;
}

.cadre {
    padding: 24px;
    border: var(--panel-border-width) solid var(--color-border-subtle);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
    margin: 0 0 20px 0;
}

.cadre.fit-content {
    width: fit-content;
}

.cadre.inline {
    display: inline-block;
    margin: 10px 10px 0 0;
}

.cadre > h1,
.cadre > h2 {
    margin-top: 0;
}

.agent-raw-output {
    overflow: auto;
    margin: 0;
    padding: 20px;
    border-radius: var(--border-radius);
    background: var(--color-surface-dark);
    color: var(--color-text-code);
    font-family: var(--font-family-code);
    line-height: 1.5;
    white-space: pre;
}

.job-request-payload {
    white-space: pre-wrap;
    margin: .4rem 0 1rem;
    padding: .75rem;
    font-size: var(--font-size-technical);
    line-height: 1.35;
}

.agent-reference-output {
    max-width: 100%;
    max-height: 700px;
    overflow: auto;
    margin: 0 0 24px;
    padding: 16px;
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
    font-family: var(--font-family-code);
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.image-candidate {
    display: grid;
    min-height: 260px;
    margin: 0 0 24px;
    overflow: hidden;
    place-items: center;
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
    color: var(--color-text-muted);
}

.image-candidate img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
}

.actors figure {
    display: inline-block;
    vertical-align: top;
    text-align: center;
    font-style: italic;
}

.workflow-package-details {
    display: inline-block;
    font-weight: normal;
    color: var(--color-text-muted);
}

.workflow-package-details ul {
    font-style: italic;
    margin: 0 0 1rem 0;
}

.workflow-node,
.workflow-group {
    box-shadow: var(--workflow-shadow);
}

/* Le cadrage réutilisable possède ses quatre catégories visibles à l’accueil. */

.news-cadrage-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.news-cadrage-categories > * {
    min-width: 0;
    padding: 1rem;
}

.news-cadrage-categories p {
    overflow-wrap: anywhere;
}

.dashboard-metrics.news-cadrage-categories {
    display: flex;
}

.dashboard-metrics.news-cadrage-categories > * {
    flex: 1 1 0;
    border-radius: var(--border-radius);
    background: var(--color-surface-subtle);
}

@media (max-width: 700px) {
    .dashboard-metrics.news-cadrage-categories {
        flex-direction: column;
    }
}

.news-cadrage-settings {
    margin-block: 1rem;
}

.news-flash-choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 12px;
}

.news-flash-choices > p {
    grid-column: 1 / -1;
}

/* Formulaires, paramètres et édition structurée */

.ui-form {
    display: var(--form-display);
    gap: var(--form-gap);
    margin: 0 0 24px;
}

[data-login-form][hidden],
[data-redeem-form][hidden] {
    display: none;
}

.ui-form.fit-content {
    width: fit-content;
}

.ui-form.form-spacing-none {
    margin: 0;
}

label {
    display: block;
    font-weight: 700;
}

.ui-form div {
    margin-bottom: 8px;
}

.ui-form input,
.ui-form select,
.ui-form textarea {
    width: 100%;
    padding: var(--form-control-padding);
    border: var(--control-border-width) solid var(--color-border-input);
    border-radius: var(--border-radius);
    color: var(--color-text-primary);
    background: var(--form-control-background);
    color-scheme: var(--form-control-scheme);
    font: inherit;
}

.ui-form textarea.console-textarea {
    display: block;
    width: 100%;
    margin: 0 0 16px;
    padding: 16px;
    border: var(--panel-border-width) solid var(--color-border-success);
    border-radius: var(--border-radius);
    background: var(--color-surface-console);
    color: var(--color-text-console);
    font: 0.875rem/1.5 monospace;
    resize: vertical;
}

.ui-form input[type="checkbox"],
.ui-form input[type="radio"] {
    width: auto;
}

.ui-form small {
    display: block;
    margin-top: 6px;
    color: var(--color-text-muted);
    font-weight: 400;
}

.ui-form small.news-parameter-hint {
    display: inline;
    margin: 0 0 0 .4em;
}

/* Présentation historique des formulaires courts à contrôles non étirés. */

.ui-form.form-presentation-content-width {
    display: block;
}

.ui-form.form-presentation-content-width input,
.ui-form.form-presentation-content-width select,
.ui-form.form-presentation-content-width textarea {
    width: auto;
}

.dashboard-heading-actions .ui-form {
    margin: 0;
}

.form-context-dashboard-control {
    display: flex;
    align-items: center;
    align-self: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 0;
}

.form-context-dashboard-control label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
}

.form-context-dashboard-control input[type="time"] {
    width: auto;
    padding: .4rem .5rem;
}

.structured-editor {
    display: grid;
    gap: 1rem;
    margin: 1rem 0;
}

.generation-form-block {
    display: grid;
    gap: .75rem;
    margin: 1rem 0;
    padding: 1rem;
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
}

.generation-form-block h2 {
    margin: 0;
}

.structured-card label,
.video-chain form label {
    display: grid;
    gap: .35rem;
    margin: .75rem 0;
}

.structured-card input,
.structured-card textarea,
.structured-card select,
.video-chain textarea,
.video-chain input,
.video-chain select {
    width: 100%;
}

.markdown-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: .75rem;
}

.markdown-preview {
    min-width: 0;
    min-height: 16rem;
    padding: 1rem;
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
}

[data-math-content] .math-display {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overflow-wrap: normal;
}

[data-math-content] .katex-display {
    margin: .75em 0;
}

.form-context-workflow-node {
    display: grid;
    gap: .8rem;
}

.form-context-workflow-node textarea,
.form-context-workflow-node input {
    width: 100%;
}

.form-context-illustration-style,
.illustration-style-editor {
    margin: 0 0 20px;
}

.form-context-illustration-style label,
.illustration-style-editor label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 700;
}

.form-context-illustration-style select,
.illustration-style-editor select,
.illustration-style-editor input[type="text"] {
    width: 100%;
    padding: 10px;
}

.illustration-style-editor {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-subtle);
}

.prompt-style-help {
    display: block;
    margin: -8px 0 16px;
    color: var(--color-text-secondary);
}

.form-context-settings .settings-section {
    margin: 0 0 12px;
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
}

.form-context-settings .settings-section > summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 700;
}

.form-context-settings .settings-section-icon {
    display: inline-block;
    margin-right: 8px;
    font-size: 2rem;
    line-height: 1;
    vertical-align: middle;
}

.form-context-settings .settings-section[open] > summary {
    border-bottom: 1px solid var(--color-border-subtle);
}

.form-context-settings .settings-section-single[open] {
    padding: 0 16px 16px;
}

.form-context-settings .settings-section-single[open] > summary {
    margin: 0 -16px;
}

.form-context-settings .settings-subsection[open] {
    padding: 0 16px 16px;
}

.form-context-settings .settings-subsection > summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 700;
}

.form-context-settings .settings-subsection[open] > summary {
    margin: 0 -16px;
}

.form-context-settings label {
    display: block;
    margin: 10px 0;
}

.form-context-settings label .settings-label {
    display: inline-block;
    width: 30%;
    padding: 0 10px 0 0;
    text-align: right;
    vertical-align: top;
}

.form-context-settings label input,
.form-context-settings label select,
.form-context-settings label textarea {
    width: 50%;
    padding: 10px;
    text-align: left;
}

.form-context-settings label input[type="checkbox"] {
    width: auto;
}

.form-context-settings .settings-prompt label .settings-label {
    display: block;
    width: auto;
    text-align: left;
}

.form-context-settings .settings-prompt textarea {
    width: 100%;
    box-sizing: border-box;
}

button,
.button {
    display: inline-block;
    padding: var(--button-padding);
    border: var(--panel-border-width) solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    background: var(--button-background);
    color: var(--button-text);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

table .button {
    padding: 0 5px;
}

table button {
    padding: 2px 10px;
}

.button-primary {
    background: var(--button-primary-background);
    color: var(--button-primary-text);
}

.button-secondary {
    border-color: var(--color-border-strong);
    background: var(--color-surface-default);
    color: var(--color-text-primary);
}

.button-danger {
    border-color: var(--button-danger-background);
    background: var(--button-danger-background);
    color: var(--button-danger-text);
}

textarea.cadre {
    font-family: var(--font-family-code);
    line-height: 1.5;
    white-space: pre-wrap;
}

.agent-output {
    width: 100%;
    height: 500px;
}

.page-view.settings-page .actions button {
    float: right;
}

/* Tableaux de bord, cartes Formation, News et ressources */

.dashboard-card > header,
.dashboard-card-actions {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-card h2 {
    margin-top: 0;
}

.dashboard-card-actions {
    align-items: center;
    justify-content: flex-end;
}

.dashboard-card-actions .ui-form {
    margin: 0;
}

.dashboard-setting-status {
    color: var(--color-text-muted);
}

.dashboard-setting-status[data-error] {
    color: var(--color-text-error);
}

.dashboard-list {
    display: grid;
    gap: var(--dashboard-list-gap);
    margin-top: var(--dashboard-list-margin);
}

.dashboard-card {
    padding: var(--dashboard-card-padding);
    box-shadow: var(--panel-shadow);
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
}

.dashboard-card header p {
    margin-bottom: 0;
    color: var(--color-text-secondary);
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0 0;
}

.dashboard-metrics > div {
    padding: 12px;
    border-radius: var(--border-radius);
    background: var(--color-surface-subtle);
}

.dashboard-metrics dt {
    font-weight: 700;
}

.dashboard-metrics dd {
    margin: 6px 0 0;
    color: var(--color-text-secondary);
}

.dashboard-progress {
    display: block;
    margin-top: 12px;
}

.dashboard-progress-percent {
    display: block;
    margin-bottom: 4px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dashboard-progress progress {
    display: block;
    width: 100%;
    height: 7px;
    accent-color: var(--color-progress);
}

.news-dashboard-sources {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.news-dashboard-sources a {
    overflow-wrap: anywhere;
}

.news-dashboard-drafts {
    margin-top: var(--dashboard-list-margin);
}

.news-batch-controls,
.news-batch-controls form,
.news-batch-controls label {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.news-batch-controls {
    flex-wrap: wrap;
    margin: 1rem 0;
}

.news-batch-controls form {
    margin: 0;
}

.news-batch-controls label {
    cursor: pointer;
}

.workflow-node-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--workflow-grid-gap);
    margin: 0.5rem 0;
    align-items: start;
}

.workflow-actors .workflow-node-grid {
    grid-template-columns: 1fr;
}

.workflow-actors nav[aria-label="Acteurs disponibles"] {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin: .75rem 0;
}

.workflow-node {
    min-width: 0;
    padding: var(--workflow-node-padding);
    border: var(--workflow-border-width) solid var(--workflow-node-state-border-locked);
    border-radius: var(--border-radius);
    background: var(--workflow-node-state-surface-locked);
    font-size: var(--font-size-workflow);
}

.workflow-node-clickable {
    cursor: pointer;
}

.workflow-node-clickable:hover {
    box-shadow: var(--workflow-hover-shadow);
}

.workflow-node-clickable:focus-visible {
    outline: 3px solid var(--color-border-input);
    outline-offset: 2px;
}

.cadrage-candidate-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: .75rem;
}

.cadrage-candidate-card > div {
    padding: .75rem;
    border: var(--panel-border-width) solid var(--color-border-subtle);
    border-radius: var(--border-radius);
    background: var(--color-surface-subtle);
}

.cadrage-candidate-card dt {
    font-weight: 700;
}

.cadrage-candidate-card dd {
    margin: .35rem 0 0;
}

.structured-card {
    padding: 1rem;
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
}

.structured-card > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.structured-card > header h3 {
    margin: 0;
}

.structured-drag-handle {
    display: inline-block;
    padding: .1rem .35rem;
    border-radius: var(--border-radius);
    cursor: grab;
    color: var(--color-text-muted);
    user-select: none;
}

.workflow-node p {
    margin: 3px 0;
}

.workflow-node .button {
    padding: 5px 10px;
}

:is(.workflow-node, .workflow-job-stage) > header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: .8rem;
}

.workflow-node-auto-validation {
    flex-basis: 100%;
}

.workflow-node h3,
.workflow-node h4 {
    margin: 0;
}

.verification-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.verification-panel {
    margin-top: 20px;
    padding: 16px;
    border: var(--panel-border-width) solid var(--color-border-default);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
}

.verification-counts > div {
    min-width: 220px;
}

.verification-finding {
    border-left: 4px solid var(--color-border-strong);
}

.verification-finding blockquote {
    margin: 12px 0;
    padding: 8px 12px;
    border-left: 3px solid var(--color-border-default);
    background: var(--color-surface-subtle);
    white-space: pre-wrap;
}

.news-card {
    padding: 10px;
}

.news-card label {
    display: inline;
    font-weight: bold;
}

.news-card .news-id,
.news-card .news-langue {
    color: var(--color-text-subtle);
    font-style: italic;
}

.news-card .news-infos {
    color: var(--color-text-subtle);
    font-size: var(--font-size-news-meta);
}

.news-card .news-word-count-short {
    font-weight: 600;
    color: var(--color-text-error);
}

.news-card .news-sources {
    display: block;
    clear: both;
}

.news-card .news-sources ul {
    margin: 0;
    padding: 0 0 0 10px;
}

.news-card li.news-source {
    margin: 0 0 5px;
    list-style: none;
}

.news-card .news-contenu-html h1 {
    margin: 10px 0;
}

.news-card .news-image {
    float: left;
    height: 250px;
    margin: 0 20px 20px 0;
}

.news-illustration-preview {
    display: block;
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
}

@media (max-width: 900px) {
    .dashboard-card > header {
        display: block;
    }

    .dashboard-card-actions {
        margin-top: 16px;
        justify-content: flex-start;
    }

    .dashboard-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .structured-card > header {
        align-items: flex-start;
        flex-direction: column;
    }
}

.news-graph {
    display: grid;
    gap: 1.25rem;
    width: 100%;
}

.news-graph-wide {
    min-width: 0;
}

.news-graph-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.news-graph-source,
.news-graph-article {
    min-width: 0;
    overflow-wrap: anywhere;
}

.news-graph-source h3,
.news-graph-articles h2 {
    font-size: 1.1rem;
}

.news-graph-sources {
    display: grid;
    gap: 1rem;
}

.news-graph-articles {
    min-width: 0;
}

.news-graph-flash > .workflow-node {
    margin-top: 1rem;
}

.news-flash-tts-progress {
    margin: .75rem 0;
}

.news-flash-tts-progress > .workflow-node {
    margin-top: .75rem;
}

.news-graph-article > header {
    margin-bottom: .75rem;
}

.news-graph-article > header h3 {
    margin-top: 0;
}

.news-graph-article-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.news-graph-article-text-only {
    grid-template-columns: minmax(0, 1fr);
}

.news-graph-grouping {
    border-inline-start: .3rem solid var(--news-grouping-border);
}

.news-graph-results {
    padding-inline-start: 1rem;
    max-height: 28rem;
    overflow: auto;
}

.news-graph-source-progress:not(:empty) {
    border-top: 1px solid var(--workflow-node-state-border-locked);
    margin-top: .75rem;
    padding-top: .5rem;
}

.news-graph-excluded {
    opacity: .65;
}

.news-graph input,
.news-graph textarea,
.news-graph select {
    max-width: 100%;
    box-sizing: border-box;
}

:is(.workflow-update, .news-graph-update):empty {
    display: none;
}

:is(.workflow-node, .workflow-job-stage) > header > :is(h2, h3, h4) {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

:is(.workflow-node, .workflow-job-stage) > header > .workflow-node-state {
    flex: 0 0 auto;
    max-width: 50%;
    margin-inline-start: auto;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
}

.workflow-job-edit > summary {
    margin-top: .5rem;
}

.news-events-review-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.news-graph .workflow-node.workflow-node-news-events {
    border: 0;
    box-shadow: none;
    background: transparent;
    margin-bottom: .5rem;
}

.news-graph .generation-context {
    min-width: 0;
}

@media (max-width: 1200px) {
    .news-graph-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .news-graph-article-steps {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .news-graph-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-graph-sources > header {
        flex-wrap: wrap;
    }

    .news-graph-sources > header > h2 {
        flex-basis: 100%;
    }

    .news-graph-sources > header > .workflow-node-state {
        max-width: 100%;
        margin-inline-start: 0;
        text-align: start;
    }
}

.resource-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.resource-dashboard-group {
    display: contents;
}

.resource-metric-card {
    min-width: 0;
}

.resource-metric-card h2 {
    margin-top: 0;
}

.resource-metric-values {
    display: grid;
    gap: .45rem;
}

.resource-metric-values > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.resource-metric-values dt {
    overflow-wrap: anywhere;
}

.resource-metric-values dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.resource-metric-progress > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .25rem 1rem;
}

.resource-metric-progress dd {
    display: contents;
}

.resource-metric-progress dd > span {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.resource-metric-progress progress {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    height: .65rem;
    accent-color: var(--color-progress);
}

.resource-metric-note,
.resource-metric-card small {
    color: var(--color-text-muted);
    font-size: var(--font-size-resource);
}

.resource-metric-table {
    overflow-x: auto;
}

.resource-metric-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-resource);
}

.resource-metric-table th,
.resource-metric-table td {
    padding: .4rem;
    text-align: left;
    vertical-align: top;
}

/* Sous-étapes et résultats partagés par les cartes de suivi. */

.workflow-job-stage + .workflow-job-stage {
    margin-top: .75rem;
    padding-top: .5rem;
    border-top: 1px solid var(--color-border-subtle);
}

.workflow-result-list {
    margin-block: .75rem;
}

.workflow-result-list dt {
    font-weight: 700;
}

.workflow-result-list dd {
    margin-inline-start: 0;
    margin-block-end: .5rem;
}

.comfyui-library .comfyui-categories {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-block: 1rem;
}

.comfyui-table-scroll {
    overflow-x: auto;
}

.comfyui-table-scroll table {
    width: 100%;
    border-collapse: collapse;
}

.comfyui-table-scroll th,
.comfyui-table-scroll td {
    padding: .75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--comfyui-table-border);
}

.comfyui-table-scroll td:nth-child(3) {
    min-width: 15rem;
}

.comfyui-table-scroll td:nth-child(4) {
    min-width: 16rem;
}

.comfyui-library pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.comfyui-test-image {
    max-width: 100%;
    max-height: 30rem;
}

/* États métier, progression et retours de génération */

p[role="status"] {
    color: var(--color-action-primary);
}

.worker-status {
    margin: 0;
    color: var(--color-text-secondary);
}

.formation-tree .is-current {
    color: var(--color-action-current);
    font-weight: bold;
}

.media-error {
    color: var(--color-text-error);
}

.workflow-progress {
    margin: 0 0 32px;
}

.workflow-progress-list {
    position: relative;
    display: flex;
    min-width: 560px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.workflow-progress-list::before {
    position: absolute;
    z-index: 0;
    top: 14px;
    right: 3%;
    left: 3%;
    height: 2px;
    background: var(--color-border-default);
    content: "";
}

.workflow-progress-step {
    z-index: 1;
    display: flex;
    flex: 1;
    justify-content: center;
}

.workflow-progress-dot {
    position: relative;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 2px solid var(--color-border-input);
    border-radius: var(--border-radius);
    background: var(--color-surface-default);
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
}

.workflow-progress-step.is-done .workflow-progress-dot {
    border-color: var(--color-border-success);
    background: var(--color-text-success);
    color: var(--color-success-inverse);
}

.workflow-progress-step.is-current .workflow-progress-dot {
    border-color: var(--color-action-current);
    background: var(--color-action-current);
    color: var(--color-current-contrast);
    box-shadow: var(--progress-current-shadow);
}

.workflow-progress-step.is-ready .workflow-progress-dot {
    border-color: var(--color-progress);
    background: var(--color-progress-subtle);
}

.workflow-progress-step.is-active .workflow-progress-dot {
    border-color: var(--color-progress);
    background: var(--color-progress);
    color: var(--color-progress-contrast);
}

.workflow-progress-step.is-waiting .workflow-progress-dot {
    opacity: .62;
}

.workflow-progress-step.is-disabled .workflow-progress-dot {
    border-style: dashed;
    border-color: var(--color-border-default);
    color: var(--color-text-muted);
}

.workflow-progress-dot::after {
    position: absolute;
    z-index: 2;
    bottom: calc(100% + 10px);
    left: 50%;
    width: max-content;
    max-width: 210px;
    padding: 6px 8px;
    transform: translateX(-50%);
    border-radius: var(--border-radius);
    background: var(--color-surface-dark);
    color: var(--color-text-on-dark);
    content: attr(data-tooltip);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease-in-out;
}

.workflow-progress-dot:hover::after,
.workflow-progress-dot:focus-visible::after {
    opacity: 1;
}

.workflow-progress-dot:focus-visible {
    outline: 3px solid var(--color-action-primary);
    outline-offset: 3px;
}

.workflow-node-selected,
.workflow-node:target {
    outline: 4px solid color-mix(in srgb, var(--color-action-primary) 72%, transparent);
    outline-offset: 3px;
    scroll-margin-top: 1rem;
}

.workflow-node-state-locked {
    border: var(--workflow-border-width) solid var(--workflow-node-state-border-locked);
    background: var(--workflow-node-state-surface-locked);
    color: var(--color-text-muted);
}

.workflow-node-state-disabled {
    border: var(--workflow-border-width) solid var(--workflow-node-state-border-disabled);
    background: var(--workflow-node-state-surface-disabled);
}

.workflow-node-state-ready {
    border: var(--workflow-border-width) solid var(--workflow-node-state-border-ready);
    background: var(--workflow-node-state-surface-ready);
}

.workflow-node-state-active {
    border: var(--workflow-border-width) solid var(--workflow-node-state-border-active);
    background: var(--workflow-node-state-surface-active);
}

.workflow-node-state-awaiting-validation {
    border: var(--workflow-border-width) solid var(--workflow-node-state-border-awaiting-validation);
    background: var(--workflow-node-state-surface-awaiting-validation);
}

.workflow-node-state-validated {
    border: var(--workflow-border-width) solid var(--workflow-node-state-border-validated);
    background: var(--workflow-node-state-surface-validated);
}

.workflow-node-state-error {
    border: var(--workflow-border-width) solid var(--workflow-node-state-border-error);
    background: var(--workflow-node-state-surface-error);
}

.workflow-node-state-cancelled {
    border: var(--workflow-border-width) solid var(--workflow-node-state-border-cancelled);
    background: var(--workflow-node-state-surface-cancelled);
}

/* Les prérequis se résolvent ou le worker traite effectivement la cible. */

.workflow-node-state-pulsing {
    transform-origin: center;
    animation: generation-pulse 2s ease-in-out infinite;
}

.workflow-node-state {
    padding: .2rem .45rem;
    border-radius: var(--border-radius);
    background: var(--color-surface-subtle);
    color: var(--color-text-secondary);
    font-size: var(--font-size-status);
    white-space: nowrap;
}

.workflow-badge-state-validated,
.workflow-node-state-validated > header > .workflow-node-state {
    background: var(--color-surface-success);
}

.workflow-node.news-graph-source-excluded {
    border-color: var(--workflow-node-state-border-disabled);
    background: var(--workflow-node-state-surface-disabled);
    color: var(--color-text-muted);
    filter: grayscale(1);
}

.news-graph-source-excluded :is(a, p[role="status"], .workflow-node-state) {
    color: var(--color-text-muted);
}

.news-graph-source-excluded header > .workflow-node-state {
    background: var(--color-border-subtle);
}

.workflow-node-update-pending {
    margin-bottom: 0;
    padding: .65rem .8rem;
    border: var(--panel-border-width) solid var(--workflow-node-state-border-awaiting-validation);
    border-radius: var(--border-radius);
    background: var(--workflow-node-state-surface-awaiting-validation);
    color: var(--color-text-secondary);
    font-size: .9rem;
}

.workflow-node .is-disabled {
    pointer-events: none;
    opacity: .55;
}

.image-chain-indicator {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--color-text-muted);
}

.image-chain-indicator [aria-current="step"] {
    color: var(--color-action-current);
}

.structured-drag-handle:active {
    cursor: grabbing;
}

.structured-drag-handle.is-disabled {
    cursor: default;
    opacity: .45;
}

.structured-card.is-dragging {
    opacity: .45;
}

.structured-card.is-drag-target {
    outline: 2px solid var(--color-action-primary);
    outline-offset: 2px;
}

.video-phase-indicator {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    padding: 0;
    list-style: none;
}

.video-phase-indicator li {
    padding: .75rem;
    border: var(--workflow-border-width) solid var(--workflow-node-state-border-locked);
    border-radius: var(--border-radius);
    background: var(--workflow-node-state-surface-locked);
    text-align: center;
}

.video-phase-indicator .is-current {
    border-color: var(--workflow-node-state-border-active);
    background: var(--workflow-node-state-surface-active);
    font-weight: 700;
}

.video-phase-indicator .is-complete {
    border-color: var(--color-border-success);
    background: var(--color-surface-success);
}

.edition-status {
    display: inline-block;
    font-size: var(--font-size-edition-status);
}

.edition-current,
.edition-disabled,
.edition-blocked {
    margin-left: 6px;
    font-size: 0.875rem;
}

.edition-current {
    color: var(--color-action-primary);
    font-weight: 700;
}

.edition-disabled,
.edition-blocked {
    color: var(--color-text-secondary);
}

.edition-stage.is-disabled {
    opacity: 0.72;
}

.settings-step.is-unavailable {
    color: var(--color-text-muted);
}

.settings-step.is-unavailable label,
.button:disabled {
    cursor: not-allowed;
}

.button:disabled {
    opacity: 0.55;
}

.success-message {
    color: var(--color-text-success);
    font-weight: 700;
}

.error-message {
    color: var(--color-text-error);
    font-weight: 700;
}

.export-success {
    margin: 0 0 24px;
    padding: 12px 16px;
    border: var(--panel-border-width) solid var(--color-border-success);
    border-radius: var(--border-radius);
    background: var(--color-export-success);
    color: var(--color-text-success);
}

.export-success p {
    margin: 0;
}

.export-success p + p {
    margin-top: 8px;
}

.button-primary.is-generating,
.button-danger.is-generating {
    transform-origin: center;
    animation: generation-pulse 2s ease-in-out infinite;
}

@keyframes generation-pulse {
    0% {
        filter: hue-rotate(0deg);
        scale: 1;
    }

    50% {
        filter: hue-rotate(180deg);
        scale: .95;
    }

    100% {
        filter: hue-rotate(360deg);
        scale: 1;
    }
}

.generation-error {
    margin: 0 0 24px;
    padding: 12px 16px;
    border: var(--panel-border-width) solid var(--color-border-error);
    border-radius: var(--border-radius);
    background: var(--color-surface-error);
    color: var(--color-text-error);
    white-space: pre-wrap;
}

.regeneration-impact {
    margin: 0 0 24px;
    padding: 16px;
    border: var(--panel-border-width) solid var(--color-text-error);
    border-radius: var(--border-radius);
    background: var(--color-surface-error);
}

.generation-progress {
    margin: -12px 0 24px;
    color: var(--color-text-secondary);
}

@media (max-width: 650px) {
    .video-phase-indicator {
        grid-template-columns: 1fr;
    }
}

/* Documentation et graphes SVG */

.docs-page {
    max-width: none;
    padding: 30px clamp(20px, 3vw, 48px) 72px;
    color: var(--docs-text);
}

.docs-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.docs-heading h1 {
    margin: 0;
    font-size: var(--docs-title-size);
    letter-spacing: -.04em;
}

.docs-heading p {
    margin: 0 0 5px;
    color: var(--docs-description);
}

.docs-heading .docs-eyebrow {
    margin-bottom: 6px;
    color: var(--docs-accent);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.docs-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--docs-tabs-border);
}

.docs-tabs a {
    padding: 12px 16px;
    color: var(--docs-muted);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 3px solid transparent;
}

.docs-tabs a[aria-current="page"] {
    color: var(--docs-tab-active-text);
    border-color: var(--docs-tab-active-border);
}

.docs-tabs span {
    margin-left: 6px;
    color: var(--docs-tab-count);
    font-size: .75rem;
}

.docs-layout {
    display: grid;
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.docs-index,
.docs-schema,
.docs-article {
    background: var(--docs-surface);
    border: var(--panel-border-width) solid var(--docs-border);
    border-radius: var(--docs-panel-radius);
    box-shadow: var(--docs-panel-shadow);
}

.docs-index {
    padding: 20px 12px;
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
}

.docs-index h2 {
    margin: 0 10px 12px;
    font-size: .75rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--docs-index-heading);
}

.docs-index small {
    float: right;
}

.docs-index ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-index a {
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--docs-index-text);
    text-decoration: none;
    font-size: .9rem;
}

.docs-index a:hover,
.docs-index a[aria-current="page"] {
    background: var(--docs-index-active-surface);
    color: var(--docs-index-active-text);
}

.docs-schema {
    overflow: hidden;
}

.docs-schema-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    padding: 26px 28px 18px;
}

.docs-schema-heading span,
.docs-article-top span {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    color: var(--docs-eyebrow);
}

.docs-schema-heading h2 {
    margin: 6px 0;
    font-size: 1.6rem;
    letter-spacing: -.025em;
}

.docs-schema-heading p {
    margin: 0;
    color: var(--docs-muted);
}

.docs-schema-heading a,
.docs-article-top a {
    white-space: nowrap;
    color: var(--docs-link);
    text-decoration: none;
    font-weight: 700;
    font-size: .85rem;
}

.docs-dag-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 28px;
    color: var(--docs-controls-text);
    font-size: .75rem;
}

.docs-dag-controls button {
    padding: 7px 12px;
    border: var(--panel-border-width) solid var(--docs-control-border);
    border-radius: 7px;
    background: var(--docs-surface);
    color: var(--docs-control-text);
    cursor: pointer;
}

.docs-dag {
    height: min(65vh, 680px);
    min-height: 450px;
    background: var(--docs-dag-background);
    overflow: hidden;
}

.docs-dag svg {
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: grab;
}

.docs-dag svg:active {
    cursor: grabbing;
}

.docs-dag-edge {
    fill: none;
    stroke: var(--docs-edge);
    stroke-width: 2;
    marker-end: url(#docs-dag-arrow);
}

.docs-dag-edge-conditional {
    stroke-dasharray: 7 5;
}

.docs-dag-edge:hover {
    stroke: var(--docs-accent);
    stroke-width: 4;
}

#docs-dag-arrow path {
    fill: var(--docs-edge);
}

.docs-dag-node rect {
    fill: var(--docs-surface);
    stroke: var(--docs-scope-formation-border);
    stroke-width: 1.5;
    filter: var(--docs-node-filter);
}

.docs-dag-node.scope-matiere rect {
    stroke: var(--docs-scope-matiere-border);
}

.docs-dag-node.scope-chapitre rect {
    stroke: var(--docs-scope-chapitre-border);
}

.docs-dag-node.scope-illustration rect {
    stroke: var(--docs-scope-illustration-border);
}

.docs-dag-node.scope-source rect {
    stroke: var(--docs-scope-matiere-border);
}

.docs-dag-node.scope-evenement rect {
    stroke: var(--docs-scope-chapitre-border);
}

.docs-dag-node.scope-collection rect {
    stroke: var(--docs-scope-illustration-border);
}

.docs-dag-node text {
    font-family: system-ui, sans-serif;
    pointer-events: none;
}

.docs-dag-scope {
    fill: var(--docs-scope-formation-text);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.1px;
}

.scope-matiere .docs-dag-scope {
    fill: var(--docs-scope-matiere-text);
}

.scope-chapitre .docs-dag-scope {
    fill: var(--docs-scope-chapitre-text);
}

.scope-illustration .docs-dag-scope {
    fill: var(--docs-scope-illustration-text);
}

.scope-source .docs-dag-scope {
    fill: var(--docs-scope-matiere-text);
}

.scope-evenement .docs-dag-scope {
    fill: var(--docs-scope-chapitre-text);
}

.scope-collection .docs-dag-scope {
    fill: var(--docs-scope-illustration-text);
}

.docs-dag-label {
    fill: var(--docs-node-text);
    font-size: 16px;
    font-weight: 700;
}

.docs-dag-id {
    fill: var(--docs-node-id);
    font-size: 9px;
    letter-spacing: .3px;
}

.docs-dag-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 18px 28px 5px;
    color: var(--docs-legend);
    font-size: .82rem;
}

.docs-dag-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.docs-dag-legend i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 2px solid var(--docs-scope-formation-border);
}

.docs-dag-legend .scope-matiere {
    border-color: var(--docs-scope-matiere-border);
}

.docs-dag-legend .scope-chapitre {
    border-color: var(--docs-scope-chapitre-border);
}

.docs-dag-legend .scope-illustration {
    border-color: var(--docs-scope-illustration-border);
}

.docs-dag-legend .scope-source {
    border-color: var(--docs-scope-matiere-border);
}

.docs-dag-legend .scope-evenement {
    border-color: var(--docs-scope-chapitre-border);
}

.docs-dag-legend .scope-collection {
    border-color: var(--docs-scope-illustration-border);
}

.docs-dag-legend .docs-dag-conditional-key {
    width: 25px;
    height: 0;
    border: 0;
    border-top: 2px dashed var(--docs-edge);
    border-radius: 0;
}

.docs-schema-note {
    margin: 0;
    padding: 10px 28px 24px;
    color: var(--docs-note);
    font-size: .8rem;
}

.docs-schema-context {
    padding: 0 28px 24px;
    color: var(--docs-legend);
    font-size: .85rem;
    line-height: 1.6;
}

.docs-schema-context h3 {
    margin: 0;
    color: var(--docs-index-text);
    font-size: .95rem;
}

.docs-schema-context p {
    margin: 8px 0 0;
}

.docs-article {
    padding: 26px clamp(24px, 4vw, 64px);
    overflow-wrap: anywhere;
    line-height: 1.65;
}

.docs-article-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 24px;
}

.docs-article h1 {
    font-size: 2rem;
    line-height: 1.2;
}

.docs-article h2 {
    margin-top: 2rem;
}

.user-guide {
    max-width: 82ch;
    margin-inline: auto;
}

.user-guide li + li {
    margin-top: .5rem;
}

.docs-article pre {
    padding: 18px;
    overflow-x: auto;
    background: var(--docs-code-background);
    color: var(--docs-code-text);
    border-radius: 9px;
}

.docs-article table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.docs-article th,
.docs-article td {
    padding: 8px 12px;
    border: var(--panel-border-width) solid var(--docs-border);
}

.docs-article a {
    color: var(--docs-link);
}

.docs-dag-error {
    padding: 30px;
    color: var(--docs-error);
}

@media (max-width: 850px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-index {
        position: static;
        max-height: 190px;
    }

    .docs-heading,
    .docs-schema-heading {
        align-items: start;
        flex-direction: column;
    }
}

.docs-dag-node.scope-cadrage rect {
    stroke: var(--docs-scope-cadrage);
}

.docs-dag-legend .scope-cadrage {
    background: var(--docs-scope-cadrage);
}

/* Catalogue des primitives Three.js */

.three-catalog-page {
    max-width: 1500px;
    margin: 0 auto;
    color: var(--three-text);
}

.three-catalog-heading {
    max-width: 780px;
    margin-bottom: 28px;
}

.three-catalog-back {
    display: inline-block;
    margin-bottom: 28px;
    color: var(--three-link);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}

.three-catalog-back:hover {
    text-decoration: underline;
}

.three-catalog-eyebrow {
    margin: 0 0 8px;
    color: var(--three-eyebrow);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.three-catalog-heading h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -.045em;
}

.three-catalog-heading > p:last-child {
    margin: 0;
    color: var(--three-description);
    line-height: 1.55;
}

.three-catalog-layout {
    display: grid;
    grid-template-columns: minmax(275px, 340px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.three-catalog-list,
.three-catalog-detail {
    background: var(--three-surface);
    border: var(--panel-border-width) solid var(--three-border);
    border-radius: var(--three-panel-radius);
    box-shadow: var(--three-panel-shadow);
}

.three-catalog-list {
    display: grid;
    gap: 24px;
    padding: 22px;
}

.three-catalog-list h2 {
    margin: 0 0 12px;
    color: var(--three-list-heading);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.three-catalog-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.three-catalog-choice {
    display: grid;
    gap: 4px;
    min-height: 62px;
    padding: 10px 12px;
    border: var(--panel-border-width) solid var(--three-choice-border);
    border-radius: var(--three-choice-radius);
    background: var(--three-choice-surface);
    color: var(--three-choice-text);
    cursor: pointer;
    text-align: left;
}

.three-catalog-choice:hover {
    border-color: var(--three-choice-hover-border);
    background: var(--three-choice-hover-surface);
}

.three-catalog-choice[aria-pressed="true"] {
    border-color: var(--three-choice-active-border);
    background: var(--three-choice-active-surface);
    box-shadow: inset 0 0 0 1px var(--three-choice-active-border);
}

.three-catalog-choice span {
    font-size: .88rem;
    font-weight: 700;
}

.three-catalog-choice small {
    color: var(--three-choice-code);
    font-family: ui-monospace, monospace;
    font-size: .69rem;
}

.three-catalog-detail {
    overflow: hidden;
}

.three-catalog-detail-heading {
    padding: 22px 28px 18px;
}

.three-catalog-detail-heading > p:first-child {
    margin: 0 0 6px;
    color: var(--three-detail-eyebrow);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.three-catalog-detail-heading h2 {
    margin: 0 0 6px;
    font-size: 1.65rem;
}

.three-catalog-detail-heading > p:last-child {
    margin: 0;
    color: var(--three-detail-description);
    line-height: 1.5;
}

.three-catalog-viewer {
    position: relative;
    height: clamp(350px, 38vw, 500px);
    overflow: hidden;
    background: var(--three-viewer-background);
}

.three-catalog-viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
}

.three-catalog-viewer canvas:active {
    cursor: grabbing;
}

.three-catalog-status {
    position: absolute;
    inset: auto 20px 20px;
    margin: 0;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--three-status-surface);
    color: var(--three-status-text);
    font-size: .85rem;
    box-shadow: var(--three-status-shadow);
}

.three-catalog-status[hidden] {
    display: none;
}

.three-catalog-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 28px;
    border-bottom: 1px solid var(--three-controls-border);
}

.three-catalog-controls p {
    margin: 0;
    color: var(--three-controls-text);
    font-size: .8rem;
}

.three-catalog-controls button {
    padding: 7px 12px;
    border: var(--panel-border-width) solid var(--three-control-border);
    border-radius: 7px;
    background: var(--three-surface);
    color: var(--three-control-text);
    cursor: pointer;
    font-weight: 700;
}

.three-catalog-controls button:hover {
    background: var(--three-choice-hover-surface);
}

.three-catalog-code {
    display: grid;
    gap: 9px;
    padding: 23px 28px 8px;
}

.three-catalog-code span {
    color: var(--three-code-label);
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.three-catalog-code code {
    display: block;
    overflow-x: auto;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--three-code-background);
    color: var(--three-code-text);
    font-size: .84rem;
}

.three-catalog-note {
    margin: 0;
    padding: 14px 28px 26px;
    color: var(--three-note);
    font-size: .83rem;
    line-height: 1.5;
}

@media (max-width: 850px) {
    .three-catalog-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .three-catalog-choices {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .three-catalog-list {
        order: 2;
    }

    .three-catalog-detail {
        order: 1;
    }
}

@media (max-width: 600px) {
    .three-catalog-page {
        margin: 0;
    }

    .three-catalog-heading {
        padding: 20px;
    }

    .three-catalog-layout {
        gap: 16px;
    }

    .three-catalog-detail-heading,
    .three-catalog-controls,
    .three-catalog-code {
        padding-left: 18px;
        padding-right: 18px;
    }

    .three-catalog-viewer {
        height: 340px;
    }

    .three-catalog-list,
    .three-catalog-detail {
        border-radius: 12px;
    }
}

/* Présentations de médias partagées par les vues d’édition et de revue. */

.illustration-three-preview {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border: var(--panel-border-width) solid var(--three-official-border);
}

.illustration-three-candidate {
    border-color: var(--three-candidate-border);
}

.formation-video-preview {
    width: 100%;
    max-width: 960px;
}

.application-submitted-text {
    display: block;
    width: 100%;
}

body > .page-view {
    padding: var(--error-page-padding);
}

/* Contrôles natifs hors des formulaires structurés. */

:where(input, select, textarea) {
    color-scheme: var(--form-control-scheme);
    color: var(--color-control-text);
    background-color: var(--form-control-background);
}

fieldset {
    border-width: var(--fieldset-border-width);
    border-color: var(--fieldset-border-color);
    border-radius: var(--fieldset-radius);
}

/* Navigation au clavier, petits écrans et préférences d’accessibilité. */

a {
    color: var(--color-action-primary);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
}

button:hover:not(:disabled),
.button:hover:not(:disabled) {
    filter: var(--button-hover-filter);
}

button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .site-header {
        position: sticky;
        display: flex;
        flex-wrap: wrap;
        gap: .75rem;
        padding: .75rem 1rem;
    }

    .main-navigation {
        flex-wrap: wrap;
        gap: .65rem 1rem;
    }

    .application-shell {
        margin-top: 0;
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        position: static;
        width: auto;
        max-height: 18rem;
        border-right: 0;
        border-bottom: 1px solid var(--color-border-subtle);
    }

    .main-content {
        grid-column: 1;
        padding: 20px;
    }

    .workflow-progress {
        overflow-x: auto;
        padding-block: 1rem;
    }

    .form-context-settings label .settings-label {
        display: block;
        width: 100%;
        text-align: left;
    }

    .form-context-settings label :is(input, select, textarea) {
        max-width: 100%;
        width: 100%;
    }

    .form-context-settings label input[type="checkbox"] {
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .workflow-node-state-pulsing,
    .button-primary.is-generating,
    .button-danger.is-generating {
        animation: none;
    }

    .workflow-progress-dot::after {
        transition: none;
    }
}

@media print {
    .site-header,
    .sidebar {
        display: none;
    }

    .application-shell {
        display: block;
        margin: 0;
    }

    .main-content {
        padding: 0;
    }

    .workflow-node,
    .workflow-group {
        break-inside: avoid;
        box-shadow: none;
    }
}

/* Préférence d’apparence du compte : mêmes composants et variables que l’application. */

.account-appearance {
    max-width: 46rem;
    margin-block: 1.5rem 2rem;
}

.account-appearance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

/* Atelier documentaire autonome : il utilise les vrais composants applicatifs. */

.style-preview-sidebar-heading {
    padding-block: 1.5rem .5rem;
}

.style-preview-sidebar-heading h2 {
    margin-block: .5rem;
}

.style-preview-workflow {
    margin-block: 1.5rem;
}

.style-preview-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.style-preview-dag {
    display: block;
    width: 100%;
    max-height: 150px;
}

.style-preview-caption {
    color: var(--color-text-secondary);
    font-size: .875rem;
}

@media (max-width: 750px) {
    .style-preview-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Apparence choisie à la fabrication de la release. */
/* Preset 0 — présentation historique SMF. Valeurs complètes, sans import. */
:root {
    --site-header-height: 64px;
    /* Palette générale */
    --color-text-primary: #1f2937;
    --color-text-secondary: #4b5563;
    --color-text-muted: #6b7280;
    --color-text-subtle: #777777;
    --color-text-on-dark: #ffffff;
    --color-text-navigation: #d1d5db;
    --color-text-code: #e5e7eb;
    --color-text-console: #4ade80;
    --color-text-success: #166534;
    --color-text-error: #b91c1c;
    --color-action-primary: #2563eb;
    --color-action-current: #0033a2;
    --color-surface-page: #f8fafc;
    --color-surface-default: #ffffff;
    --color-surface-subtle: #f3f4f6;
    --color-surface-dark: #111827;
    --color-surface-console: #020617;
    --color-surface-error: #fef2f2;
    --color-surface-success: #b0f1a3;
    --color-border-default: #d1d5db;
    --color-border-subtle: #e5e7eb;
    --color-border-strong: #4b5563;
    --color-border-input: #9ca3af;
    --color-border-success: #166534;
    --color-border-error: #fecaca;
    /* États métier du workflow */
    --workflow-node-state-border-locked: #d1d5db;
    --workflow-node-state-surface-locked: #f5f5f5;
    --workflow-node-state-border-disabled: #9ca3af;
    --workflow-node-state-surface-disabled: #f3f4f6;
    --workflow-node-state-border-ready: #2563eb;
    --workflow-node-state-surface-ready: #eff6ff;
    --workflow-node-state-fieldset-ready: #e0efff;
    --workflow-node-state-border-active: #7c3aed;
    --workflow-node-state-surface-active: #f5f3ff;
    --workflow-node-state-border-awaiting-validation: #d97706;
    --workflow-node-state-surface-awaiting-validation: #fffbeb;
    --workflow-node-state-border-validated: #d1d5db;
    --workflow-node-state-surface-validated: #ffffff;
    --workflow-node-state-border-error: #b91c1c;
    --workflow-node-state-surface-error: #fef2f2;
    --workflow-node-state-border-cancelled: #4b5563;
    --workflow-node-state-surface-cancelled: #f3f4f6;
    /* Dimensions et typographie */
    --sidebar-width: 400px;
    --border-radius: 6px;
    --font-family-body: Arial, sans-serif;
    --font-family-code: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --font-size-body: 1rem;
    --line-height-body: normal;
    --font-size-workflow: .9rem;
    --font-size-worker: .75rem;
    --font-size-technical: .7rem;
    --font-size-status: .85rem;
    --font-size-resource: .85rem;
    --font-size-edition-status: .7rem;
    --font-size-news-meta: .7em;
    /* Disposition, densité et contrôles */
    --page-padding: 40px;
    --header-padding: 0 32px;
    --header-columns: 1fr auto 1fr;
    --navigation-gap: 24px;
    --header-title-size: 1.25rem;
    --panel-border-width: 1px;
    --workflow-border-width: 2px;
    --dashboard-card-padding: 20px;
    --dashboard-list-gap: 18px;
    --dashboard-list-margin: 24px;
    --workflow-node-padding: .5rem;
    --workflow-grid-gap: .5rem;
    --workflow-group-padding: .8rem;
    --form-display: grid;
    --form-gap: 16px;
    --form-control-padding: 10px 12px;
    --form-control-background: Field;
    --form-control-scheme: normal;
    --button-padding: 10px 16px;
    --button-background: ButtonFace;
    --button-text: ButtonText;
    --button-hover-filter: none;
    --focus-color: #e49b19;
    /* Surfaces, ombres et retours */
    --surface-header: var(--color-surface-dark);
    --surface-sidebar: var(--color-surface-default);
    --header-shadow: none;
    --panel-shadow: none;
    --workflow-shadow: 2px 2px 5px 0px #dcdcdc;
    --workflow-hover-shadow: 0 2px 8px rgba(0, 0, 0, .14);
    --progress-current-shadow: 0 0 0 4px rgb(37 99 235 / 18%);
    --color-progress: #2364aa;
    --color-progress-subtle: #e8f1fb;
    --news-grouping-border: #527db5;
    --comfyui-table-border: #ccc;
    --color-export-success: #f0fdf4;
    --workflow-filter-border: #a8bac8;
    --workflow-filter-surface: #fff;
    --workflow-filter-text: #253c4d;
    --workflow-filter-active: #155d88;
    --workflow-filter-radius: .4rem;
    --error-page-padding: 40px;
    --three-candidate-border: #ccc;
    --three-official-border: #ccc;
    /* Paramètres du documentaire et du catalogue 3D */
    --docs-panel-radius: 16px;
    --docs-panel-shadow: 0 8px 30px rgba(29, 50, 75, .05);
    --docs-node-filter: drop-shadow(0 3px 5px rgba(34, 62, 88, .12));
    --docs-dag-background: radial-gradient(circle at 50% 45%, #f7fbff 0, #edf5fb 100%);
    --docs-code-background: #17283a;
    --docs-code-text: #eaf2f8;
    --docs-title-size: clamp(2rem, 3vw, 3rem);
    --three-panel-radius: 18px;
    --three-panel-shadow: 0 12px 36px rgba(30, 55, 80, .06);
    --three-viewer-background: radial-gradient(circle at 50% 42%, #fff 0%, #eff6fb 70%, #e2ecf5 100%);
    --three-status-shadow: 0 6px 20px rgba(28, 47, 64, .1);
    --three-choice-radius: 10px;
    --three-code-background: #17283a;
    --three-code-text: #d8f1ff;
    /* Palette du documentaire */
    --docs-text: #1e2c3e;
    --docs-description: #64748b;
    --docs-accent: #2869a4;
    --docs-tabs-border: #dce4ed;
    --docs-muted: #62748a;
    --docs-tab-active-text: #135e98;
    --docs-tab-active-border: #1787c1;
    --docs-tab-count: #869ab0;
    --docs-surface: #fff;
    --docs-border: #dce5ed;
    --docs-index-heading: #667991;
    --docs-index-text: #33475e;
    --docs-index-active-surface: #e8f4fb;
    --docs-index-active-text: #075f98;
    --docs-eyebrow: #1687ad;
    --docs-link: #0870a9;
    --docs-controls-text: #74869a;
    --docs-control-border: #cfdae6;
    --docs-control-text: #255a7f;
    --docs-edge: #9bb3c6;
    --docs-scope-formation-border: #b8d3e7;
    --docs-scope-matiere-border: #c8b9e8;
    --docs-scope-chapitre-border: #a5d6bc;
    --docs-scope-illustration-border: #e8c19f;
    --docs-scope-formation-text: #3684ae;
    --docs-scope-matiere-text: #8365a9;
    --docs-scope-chapitre-text: #398465;
    --docs-scope-illustration-text: #ad7845;
    --docs-node-text: #1e3045;
    --docs-node-id: #8090a1;
    --docs-legend: #60748a;
    --docs-note: #798a9d;
    --docs-error: #a43737;
    --docs-scope-cadrage: #635baf;
    /* Palette du catalogue 3D */
    --three-text: #1e2c3e;
    --three-link: #17638f;
    --three-eyebrow: #147a9c;
    --three-description: #587087;
    --three-surface: #fff;
    --three-border: #dce5ed;
    --three-list-heading: #6b7d8f;
    --three-choice-border: #d8e2ec;
    --three-choice-surface: #f8fafc;
    --three-choice-text: #20364b;
    --three-choice-hover-border: #6eb1cf;
    --three-choice-hover-surface: #eff8fb;
    --three-choice-active-border: #1384ae;
    --three-choice-active-surface: #e9f6fb;
    --three-choice-code: #7a8d9e;
    --three-detail-eyebrow: #1788aa;
    --three-detail-description: #63778a;
    --three-status-text: #7f3030;
    --three-controls-border: #e7edf2;
    --three-controls-text: #798b9e;
    --three-control-border: #c9d9e5;
    --three-control-text: #20648c;
    --three-code-label: #73879a;
    --three-note: #718598;
    --three-status-surface: rgba(255, 255, 255, .94);
    /* Contrastes des actions et contrôles natifs */
    --button-primary-background: var(--color-action-primary);
    --button-primary-text: var(--color-text-on-dark);
    --fieldset-border-width: 2px;
    --fieldset-border-color: #c0c0c0;
    --fieldset-radius: 0;
    --color-control-text: FieldText;
    --workflow-filter-inverse: #fff;
    --color-success-inverse: #fff;
    --button-danger-background: var(--color-text-error);
    --button-danger-text: var(--color-text-on-dark);
    --color-progress-contrast: var(--color-text-on-dark);
    --color-current-contrast: var(--color-text-on-dark);
    --control-border-width: 1px;
}
