/*
 * ANR Tool — couche visuelle de référence.
 * Chargée après app.css pour garantir un rendu Visual Studio flat et monochrome.
 */
.theme-light,
.theme-light *{
    font-family: "Segoe UI", Arial, sans-serif !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.theme-light :is(h1,h2,h3,h4,h5,h6,strong,b,label,th){
    font-weight: 600 !important;
}

/* Densité et échelle typographique communes. */
.anr-header{ height: 58px !important; gap: 10px !important; padding: 0 24px !important; }
.anr-content{ min-height: calc(100vh - 58px) !important; }
.anr-brand{ width: 126px !important; }
.anr-brand img{ width: 106px !important; }
.header-icon-button{ width: 28px !important; height: 28px !important; border-radius: 3px !important; font-size: 15px !important; }
.active-project{ min-width: 200px !important; padding-left: 16px !important; gap: 2px 10px !important; }
.active-project .eyebrow{ font-size: 8px !important; }
.project-name{ font-size: 10px !important; }
.project-save-state{ font-size: 8px !important; }
.header-action{ padding: 6px 8px !important; border-radius: 3px !important; font-size: 10px !important; }
.language-selector{ min-height: 28px !important; font-size: 10px !important; }
.avatar{ width: 27px !important; height: 27px !important; font-size: 9px !important; }
.user-copy strong{ font-size: 10px !important; }
.user-copy small{ font-size: 8px !important; }
.sidebar-topbar{ min-height: 35px !important; padding: 7px 12px 0 !important; }
.sidebar-tree-caption{ font-size: 8px !important; }
.sidebar-resize-hint{ font-size: 7px !important; }
.global-tree-nav{ padding: 9px 7px 10px !important; }
.global-tree-line{ min-height: 23px !important; padding: 3px 5px !important; grid-template-columns: 13px 17px minmax(0,1fr) auto !important; gap: 4px !important; border-radius: 3px !important; }
.global-tree-copy strong{ font-size: 9px !important; line-height: 1.2 !important; }
.global-tree-copy small{ font-size: 8px !important; line-height: 1.2 !important; }
.global-tree-toggle{ width: 13px !important; font-size: 10px !important; }
.global-tree-icon{ width: 17px !important; height: 17px !important; }
.global-tree-icon svg{ width: 15px !important; height: 15px !important; }
.page-heading-title{ display:flex !important; align-items:center !important; gap:8px !important; }
.page-title-icon{ width:24px !important; height:24px !important; flex:0 0 24px !important; }
.page-title-icon svg{ width:22px !important; height:22px !important; stroke-width:1.45 !important; }
.section-title-icon{ width:18px !important; height:18px !important; flex:0 0 18px !important; }
.section-title-icon svg{ width:17px !important; height:17px !important; }
.content-list-icon{ width:28px !important; height:28px !important; flex:0 0 28px !important; }
.content-list-icon svg{ width:24px !important; height:24px !important; stroke-width:1.45 !important; }

/* Généralités : même fiche flat et même grille documentaire que les pages métier. */
.theme-light .generalities-v1-card{
    min-height:calc(100vh - 148px) !important;
    padding:17px 20px 20px !important;
}
.theme-light .generalities-v1-heading{
    align-items:flex-start !important;
    padding-bottom:9px !important;
}
.theme-light .generalities-v1-heading > div:first-child{ min-width:0; }
.theme-light .generalities-v1-heading h2{ margin-top:3px !important; font-size:18px !important; }
.theme-light .generalities-v1-heading p{ margin:4px 0 0; color:#555 !important; font-size:9px !important; }
.theme-light .generalities-v1-content{ display:grid; }
.theme-light .generalities-v1-section{
    min-width:0;
    padding:13px 0 15px;
    border-bottom:1px solid #d9d9d9;
}
.theme-light .generalities-v1-section:last-child{ padding-bottom:0; border-bottom:0; }
.theme-light .generalities-documentation-section{ padding-top:15px; }
.theme-light .generalities-v1-section-heading{
    min-height:30px;
    margin-bottom:9px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
}
.theme-light .generalities-v1-section-heading h3{
    margin:0;
    color:#1767ed !important;
    font-size:11px !important;
    font-weight:600 !important;
}
.theme-light .generalities-v1-section-heading small{
    display:block;
    margin-top:2px;
    color:#5b5b5b !important;
    font-size:8px !important;
}
.theme-light .generalities-v1-fields{
    min-width:0;
    display:grid;
    gap:10px 13px;
    align-items:start;
}
.theme-light .generalities-project-fields{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.theme-light .generalities-people-fields{ grid-template-columns:repeat(5,minmax(0,1fr)); }
.theme-light .generalities-revision-fields{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.theme-light .generalities-v1-fields .documentation-field{ margin:0 !important; }
.theme-light .generalities-v1-fields textarea{
    min-height:74px !important;
    height:74px;
    resize:vertical !important;
}
.theme-light .generalities-revision-comment{ grid-column:1 / -1; }
.theme-light .generalities-revision-comment textarea{ min-height:58px !important; height:58px; }
.theme-light .generalities-v1-fields input[readonly]{ color:#666 !important; background:#f2f2f2 !important; }
.theme-light .generalities-brand-editor{ display:grid; grid-template-columns:180px minmax(0,1fr); gap:16px; align-items:center; }
.theme-light .generalities-brand-preview{ width:180px; height:86px; padding:8px; display:grid; place-items:center; border:1px solid #c8c8c8; background:#fff; }
.theme-light .generalities-brand-preview img{ width:100%; height:100%; object-fit:contain; }
.theme-light .generalities-brand-preview.empty{ align-content:center; gap:4px; color:#6a6a6a; background:#f5f5f5; }
.theme-light .generalities-brand-preview.empty span{ color:#1767ed; font-size:16px; font-weight:700; letter-spacing:.12em; }
.theme-light .generalities-brand-preview.empty small{ font-size:8px; }
.theme-light .generalities-brand-controls{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.theme-light .generalities-brand-controls > div{ flex:1 0 100%; display:grid; gap:2px; }
.theme-light .generalities-brand-controls small{ color:#5b5b5b; font-size:8px; }
.theme-light .generalities-brand-controls input[type=file]{ max-width:420px; min-height:34px; padding:4px; border:1px solid #b8cde2; background:#fff; font-size:9px; }
.theme-light .generalities-brand-message{ flex:1 0 100%; color:#176241; font-size:8px; }

@container (max-width:1050px){
    .theme-light .generalities-people-fields{ grid-template-columns:repeat(3,minmax(0,1fr)); }
    .theme-light .generalities-revision-fields{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container (max-width:480px){
    .theme-light .generalities-project-fields,
    .theme-light .generalities-people-fields,
    .theme-light .generalities-revision-fields{ grid-template-columns:1fr; }
    .theme-light .generalities-revision-comment{ grid-column:auto; }
    .theme-light .generalities-brand-editor{ grid-template-columns:1fr; }
}
.global-tree-add{ font-size: 12px !important; }
.sidebar-footer{ padding: 12px 16px 16px !important; gap: 9px !important; }
.sidebar-help{ margin: 0 !important; padding: 9px 10px !important; gap: 8px !important; border-radius: 3px !important; }
.help-icon{ width: 18px !important; height: 18px !important; font-size: 9px !important; }
.sidebar-help strong{ font-size: 9px !important; }
.sidebar-help small,
.version-label{ font-size: 8px !important; }
.anr-page{ padding: 25px 30px 45px !important; }
.anr-page h1{ margin: 0 !important; font-size: 22px !important; line-height: 1.15 !important; letter-spacing: 0 !important; }
.anr-page h2{ font-size: 15px !important; line-height: 1.2 !important; letter-spacing: 0 !important; }
.anr-page h3{ font-size: 11px !important; line-height: 1.25 !important; letter-spacing: 0 !important; }
.reference-page-heading{ margin-bottom: 8px !important; }
.reference-page-heading p{ margin-top: 4px !important; font-size: 9px !important; line-height: 1.35 !important; }
.reference-refresh{ width: auto !important; height: 28px !important; min-height: 28px !important; padding: 0 9px !important; border-radius: 3px !important; font-size: 9px !important; }
.panel{ border-radius: 3px !important; }
.reference-context{ min-height: 70px !important; padding: 10px 13px !important; border-radius: 3px !important; }
.context-block{ min-height: 41px !important; padding: 0 13px !important; gap: 8px !important; }
.context-block-icon{ width: 24px !important; height: 24px !important; border-radius: 3px !important; font-size: 14px !important; }
.dashboard-page .context-block small{ font-size: 9px !important; }
.dashboard-page .context-block strong{ font-size: 10px !important; }
.dashboard-page .context-block span:last-child{ font-size: 8px !important; }
.dashboard-page .context-block em{ font-size: 8px !important; }
.reference-stat-grid{ margin-top: 9px !important; gap: 7px !important; }
.dashboard-reference-main .reference-stat{ min-height: 63px !important; padding: 8px !important; }
.reference-stat .stat-icon{ width: 24px !important; height: 24px !important; border-radius: 3px !important; font-size: 14px !important; }
.reference-stat strong{ font-size: 17px !important; }
.reference-stat small{ font-size: 9px !important; }
.reference-stat em{ font-size: 8px !important; }
.reference-panels-grid{ margin-top: 9px !important; gap: 7px !important; }
.dashboard-reference-main .reference-panel{ padding: 9px 10px !important; }
.reference-panel-heading{ margin-bottom: 7px !important; }
.reference-panel-heading h3{ font-size: 11px !important; }
.reference-panel-subtitle{ font-size: 8px !important; }
.reference-outline-button{ height: 24px !important; min-height: 24px !important; padding: 0 7px !important; border-radius: 3px !important; font-size: 9px !important; }
.risk-level-donut{ width: 79px !important; height: 79px !important; flex-basis: 79px !important; }
.reassessment-ring{ width: 70px !important; height: 70px !important; border-width: 7px !important; }
.reassessment-ring span{ font-size: 16px !important; }
.dashboard-synthesis-panel{ margin-top: 9px !important; padding: 10px 11px !important; }
.synthesis-overview{ gap: 6px !important; }
.synthesis-overview > div{ min-height: 44px !important; padding: 6px 8px !important; grid-template-columns: 26px 1fr !important; column-gap: 5px !important; border-radius: 3px !important; }
.synthesis-overview strong{ font-size: 17px !important; }
.synthesis-overview span{ font-size: 9px !important; }
.synthesis-overview small{ font-size: 7px !important; }
.synthesis-table-head{ min-height: 20px !important; font-size: 7px !important; font-weight: 600 !important; }
.synthesis-table-row{ min-height: 25px !important; font-size: 8px !important; }
.synthesis-table-row b{ font-size: 8px !important; }
.synthesis-table-row em,
.synthesis-status{ font-size: 7px !important; font-weight: 600 !important; }
.project-preview-card{ padding: 10px 12px !important; }
.machine-preview{ height: 126px !important; border-radius: 3px !important; }
.project-preview-card dl{ margin-top: 12px !important; gap: 7px 5px !important; }
.project-preview-card dt,
.project-preview-card dd{ font-size: 8px !important; }

/* Palette claire : blanc et gris très clair. */
.theme-light{ color: #202020 !important; background: #f3f3f3 !important; }
.theme-light :is(.anr-header,.sidebar-footer){ color: #303030 !important; background: #e8e8e8 !important; border-color: #d0d0d0 !important; }
.theme-light :is(.anr-sidebar,.anr-main){ color: #404040 !important; background: #f3f3f3 !important; border-color: #d4d4d4 !important; }
.theme-light :is(.panel,.reference-context,.reference-stat,.reference-panel,.project-preview-card,.dashboard-synthesis-panel){ color: #202020 !important; background: #ffffff !important; border-color: #d4d4d4 !important; }
.theme-light :is(.context-block,.synthesis-overview > div,.sidebar-help,.machine-preview,.reference-stat .stat-icon,.context-block-icon,.reference-activity .activity-bullet,.avatar,.synthesis-status){ color: #333333 !important; background: #f0f0f0 !important; border-color: #d4d4d4 !important; }
.theme-light :is(.reference-refresh,.reference-outline-button,.project-edit-button,.header-action,.button-primary,.button-secondary,.button-outline){ color: #333333 !important; background: #ececec !important; border-color: #bcbcbc !important; }
.theme-light :is(.reference-refresh,.reference-outline-button,.project-edit-button,.header-action,.button-primary,.button-secondary,.button-outline):hover{ color: #111111 !important; background: #dddddd !important; border-color: #9b9b9b !important; }
.theme-light :is(.synthesis-table-row b,.synthesis-table-row strong i,.text-green,.text-orange,.synthesis-warning,.synthesis-blue,.synthesis-green,.project-status-pill,.context-block em,.context-block em.validated){ color: #444444 !important; }
.theme-light :is(.project-status-pill,.context-block em,.context-block em.validated,.synthesis-managed,.synthesis-pending){ background: #e8e8e8 !important; }
.theme-light .reassessment-ring{ border-color: #d8d8d8 !important; border-top-color: #777777 !important; border-right-color: #777777 !important; }
.theme-light .reassessment-ring span{ color: #333333 !important; }

/* Les couleurs sont désormais explicitement maîtrisées par les règles ci-dessous. */
.theme-light .anr-main,
.theme-light .global-tree-nav,
.theme-light .sidebar-help{ filter: none !important; }

/* Header neutralisé séparément afin de préserver la netteté des logos. */
.theme-light :is(.header-icon-button,.module-cubes,.eyebrow,.project-save-state,.chevron,.language-selector,.language-code,.header-action,.user-chip,.user-copy,.user-copy small,.header-divider,.sidebar-tree-caption,.sidebar-resize-hint){ color: #4f4f4f !important; border-color: #bcbcbc !important; }
.theme-light :is(.header-icon-button,.language-selector,.language-code,.header-action,.avatar){ background: #eeeeee !important; }
.theme-light .module-cubes i{ background: #777777 !important; }
.theme-light .header-divider{ background: #c4c4c4 !important; }

.module-selector-button{ width: auto !important; min-width: 174px !important; height: 38px !important; padding: 5px 9px !important; display: grid !important; grid-template-columns: 25px minmax(0,1fr) 12px !important; align-items: center !important; gap: 8px !important; }

.theme-light .anr-sidebar,
.theme-light .global-tree-nav,
.theme-light .global-tree-project-actions,
.theme-light .sidebar-footer{ background: #ffffff !important; }

/* Contraste typographique renforcé. */
.theme-light .anr-main{ color: #181818 !important; }
.theme-light .anr-main :is(h1,h2,h3,h4,h5,h6,strong,b,dd,label){ color: #151515 !important; }
.theme-light .anr-main .safety-report .report-section-heading > b,
.theme-light .anr-main .safety-report .report-page-number{ color:#fff !important; }
.theme-light .anr-main :is(p,small,dt,time,.reference-page-heading p,.reference-panel-subtitle,.documentation-help){ color: #4b4b4b !important; }
.theme-light .anr-sidebar :is(.global-tree-line,.global-tree-copy strong){ color: #252525 !important; }
.theme-light .anr-sidebar .global-tree-copy small{ color: #555555 !important; }

.theme-light .anr-main .project-welcome-open strong{ color: #ffffff !important; }
.theme-light .anr-main .project-welcome-open small{ color: rgba(255,255,255,.82) !important; }
.theme-light .anr-main .documentation-camera-state.is-error strong{ color: #ff6262 !important; }
.theme-light :is(input,select,textarea){ color: #181818 !important; }

/* Icônes de l'arborescence : une couleur par famille métier. */
.theme-light .global-tree-icon.icon-project{ color: #a66f00 !important; }
.theme-light .global-tree-icon.icon-dashboard{ color: #2563b8 !important; }
.theme-light .global-tree-icon.icon-document{ color: #526273 !important; }
.theme-light .global-tree-icon.icon-export,
.theme-light .global-tree-icon.icon-report{ color: #326c91 !important; }
.theme-light .global-tree-icon.icon-criteria{ color: #7040b8 !important; }
.theme-light .global-tree-icon.icon-measure{ color: #087f72 !important; }
.theme-light .global-tree-icon.icon-machine,
.theme-light .global-tree-icon.icon-element,
.theme-light .global-tree-icon.icon-gear{ color: #0875a8 !important; }
.theme-light .global-tree-icon.icon-hazard{ color: #c62828 !important; }
.theme-light .global-tree-icon.icon-zone{ color: #7b32b5 !important; }
.theme-light .global-tree-icon.icon-access{ color: #9252c7 !important; }
.theme-light .global-tree-icon.icon-mode{ color: #a85b00 !important; }
.theme-light .global-tree-icon.icon-risk-scenario{ color: #006d9c !important; }
.theme-light .global-tree-icon.icon-risk{ color: #c34b22 !important; }
.theme-light .global-tree-icon.icon-reassessment{ color: #24835b !important; }
.theme-light .global-tree-icon.icon-residual-risk{ color: #a45f00 !important; }
.theme-light .global-tree-icon.icon-observation{ color: #087a85 !important; }
.theme-light .global-tree-icon.icon-documents,
.theme-light .global-tree-icon.icon-attachment{ color: #536b7e !important; }
.theme-light .global-tree-add{ color: #2563b8 !important; }

/* Graphiques et indicateurs du tableau de bord. */
.theme-light .risk-level-donut{ background: var(--risk-donut-gradient, conic-gradient(var(--risk-unassessed) 0% 100%)) !important; }
.theme-light .risk-level-donut::before{ background: #ffffff !important; }
.theme-light .legend-insignificant{ background: var(--risk-0-light) !important; }
.theme-light .legend-low{ background: var(--risk-1-light) !important; }
.theme-light .legend-limited{ background: var(--risk-2-light) !important; }
.theme-light .legend-medium{ background: var(--risk-3-light) !important; }
.theme-light .legend-high{ background: var(--risk-4-light) !important; }
.theme-light .legend-extreme{ background: var(--risk-5-light) !important; }
.theme-light .legend-unassessed{ background: var(--risk-unassessed) !important; }
.theme-light .reassessment-ring{ border-color: #d7dde4 !important; border-top-color: var(--progress-light) !important; border-right-color: var(--progress-light) !important; }
.theme-light .reassessment-ring span{ color: var(--progress-light) !important; }

.theme-light .stat-danger .stat-icon{ color: #c62828 !important; background: #fdeaea !important; }
.theme-light .stat-success .stat-icon{ color: #18794e !important; background: #e5f4eb !important; }
.theme-light .stat-warning .stat-icon{ color: #a96300 !important; background: #fff1d6 !important; }
.theme-light .stat-blue .stat-icon{ color: #2563b8 !important; background: #e6effa !important; }
.theme-light .stat-purple .stat-icon{ color: #7040b8 !important; background: #f0e9fa !important; }
.theme-light .stat-orange .stat-icon{ color: #b55416 !important; background: #fcebdd !important; }

.theme-light .reference-activity .activity-bullet.green{ color: #18794e !important; background: #e5f4eb !important; }
.theme-light .reference-activity .activity-bullet.orange{ color: #a96300 !important; background: #fff1d6 !important; }
.theme-light .reference-activity .activity-bullet.blue{ color: #2563b8 !important; background: #e6effa !important; }
.theme-light .reference-activity .activity-bullet.purple{ color: #7040b8 !important; background: #f0e9fa !important; }

.theme-light .synthesis-overview > div:nth-child(1) > strong{ color: #18794e !important; }
.theme-light .synthesis-overview > div:nth-child(2) > strong{ color: #a96300 !important; }
.theme-light .synthesis-overview > div:nth-child(3) > strong{ color: #087f72 !important; }
.theme-light .synthesis-overview > div:nth-child(4) > strong{ color: #2563b8 !important; }

/* Les classes désignent le critère ; les couleurs proviennent exclusivement de la méthode active. */
.criterion-s{ --criterion-light: var(--s-light); --criterion-light-surface: var(--s-light-surface); --criterion-dark: var(--s-dark); --criterion-dark-surface: var(--s-dark-surface); }
.criterion-peved{ --criterion-light: var(--peved-light); --criterion-light-surface: var(--peved-light-surface); --criterion-dark: var(--peved-dark); --criterion-dark-surface: var(--peved-dark-surface); }
.criterion-nbpe{ --criterion-light: var(--nbpe-light); --criterion-light-surface: var(--nbpe-light-surface); --criterion-dark: var(--nbpe-dark); --criterion-dark-surface: var(--nbpe-dark-surface); }
.criterion-o{ --criterion-light: var(--o-light); --criterion-light-surface: var(--o-light-surface); --criterion-dark: var(--o-dark); --criterion-dark-surface: var(--o-dark-surface); }
.criterion-f{ --criterion-light: var(--f-light); --criterion-light-surface: var(--f-light-surface); --criterion-dark: var(--f-dark); --criterion-dark-surface: var(--f-dark-surface); }
.criterion-pev{ --criterion-light: var(--pev-light); --criterion-light-surface: var(--pev-light-surface); --criterion-dark: var(--pev-dark); --criterion-dark-surface: var(--pev-dark-surface); }

.theme-light .method-criterion :is(.criterion-code,.criterion-score,.cascade-field-label b,.cascade-quick-code),
.theme-light .criterion-pev .cascade-quick-code,
.theme-light .measure-influence-field.method-criterion > b{ color: var(--criterion-light) !important; background: var(--criterion-light-surface) !important; }

/* Éditeur de critère unique : CD, AC, MO, R et MSR partagent le rendu validé. */
.theme-light .criterion-editor-grid{
    min-width:0;
    display:grid !important;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr)) !important;
    gap:8px !important;
    align-items:start;
}
.theme-light .criterion-editor-field{
    min-width:0;
    min-height:0 !important;
    margin:0;
    padding:9px !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:7px !important;
    align-content:start;
    border:1px solid #d2d2d2 !important;
    border-radius:0 !important;
    color:#252525;
    background:#fff !important;
}
.theme-light .criterion-editor-field:hover,
.theme-light .criterion-editor-field:focus-within{
    position:relative;
    z-index:90;
}
.theme-light .criterion-editor-field > .criterion-editor-title{
    grid-column:1 !important;
    display:flex;
    align-items:baseline;
    gap:5px;
    color:#1767ed !important;
    font-size:10px !important;
    font-weight:400 !important;
    line-height:1.3;
}
.theme-light .criterion-editor-title em{
    color:#666;
    font-size:8px;
    font-style:normal;
}
.theme-light .criterion-editor-field > .criterion-editor-score{
    grid-column:1 !important;
    min-width:44px;
    width:max-content;
    min-height:28px;
    padding:5px 10px !important;
    display:grid;
    place-items:center;
    font-size:11px !important;
    font-weight:600 !important;
}
.theme-light .criterion-editor-field > .criterion-select-with-help{
    grid-column:1 !important;
    width:100%;
    grid-template-columns:minmax(0,1fr) 27px;
    gap:7px;
}
.theme-light .criterion-editor-field .criterion-select{
    width:100% !important;
    height:36px !important;
    min-height:36px !important;
    padding:0 10px !important;
    border:1px solid #aaa !important;
    border-radius:3px !important;
    color:#181818 !important;
    background:#fff !important;
    font-size:11px !important;
    font-weight:600 !important;
}
.theme-light .criterion-editor-field .criterion-help-trigger{
    width:27px;
    height:27px;
    font-size:11px;
}
.theme-light .criterion-editor-field > .criterion-effect{
    grid-column:1 !important;
    margin:0;
    padding:6px 0 0;
    border-top:1px solid #e3e3e3;
    font-size:8px;
}
.theme-light .criterion-editor-note{
    grid-column:1;
    min-width:0;
    margin:0;
    display:grid;
    gap:5px;
}
.theme-light .criterion-editor-note > span{
    color:#1767ed;
    font-size:9px;
    font-weight:400;
}
.theme-light .criterion-editor-note textarea{
    width:100%;
    min-width:0;
    min-height:58px !important;
    height:58px;
    padding:7px 8px;
    box-sizing:border-box;
    border:1px solid #b8b8b8;
    border-radius:3px;
    color:#181818;
    background:#fff;
    font:inherit;
    font-size:10px;
    line-height:1.35;
    resize:vertical;
}
.theme-light .criterion-editor-section .evaluation-title{
    min-height:32px !important;
}
.theme-light .criterion-editor-section{
    overflow:visible !important;
}
.theme-light .criterion-editor-section > .criterion-editor-grid{
    padding:8px;
}
.theme-light .hazardous-case-v1-card .criterion-editor-grid-three{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
.theme-light .risk-v1-evaluation-grid.criterion-editor-grid{
    margin-top:9px;
    grid-template-columns:minmax(0,1fr) !important;
}
.theme-light .operating-mode-v2-evaluation .criterion-editor-grid{
    padding-top:10px;
    border-top:1px solid #e2e2e2;
}
.theme-light .msr-v1-criteria .criterion-editor-field{
    min-height:0 !important;
    padding:8px !important;
    grid-template-columns:minmax(0,1fr) !important;
}
.theme-light .msr-v1-criteria .criterion-editor-field > :is(.criterion-editor-title,.criterion-editor-score,.criterion-select-with-help,.criterion-effect){
    grid-column:1 !important;
}
.theme-light .method-help-heading{
    display:block;
    margin:0 0 3px;
    color:#666 !important;
    font-size:7px !important;
    font-weight:600;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.theme-light .criterion-definition-help{
    width:min(390px,calc(100vw - 40px));
    padding:11px 12px;
}
.theme-light .criterion-definition-help > strong{
    margin-bottom:7px;
    font-size:10px;
}

.theme-light .anr-main .risk-scenario-pev.has-value > strong,
.theme-light .anr-main .risk-scenario-pev.has-value .scenario-pev-select{
    color: var(--pev-light) !important;
    background: var(--pev-light-surface) !important;
    border-color: var(--pev-light) !important;
}

/* Sur la fiche CD, seule la valeur calculée porte la couleur de la méthode. */
.theme-light .hazardous-case-v1-card .method-criterion .criterion-code{
    color: #4d5661 !important;
    background: #eef1f4 !important;
    border-color: #cfd5dc !important;
}

.theme-light .anr-main :is(.delta-improved,.comparison-improved){ color: #18794e !important; }

/* Indicateur global des opérations longues. */
.application-loading-overlay{
    position:fixed;
    inset:0;
    z-index:4500;
    display:grid;
    place-items:center;
    pointer-events:auto;
    color:#041b46;
    background:rgba(245,245,245,.76);
}
.application-loading-indicator{
    max-width:min(420px,80vw);
    display:grid;
    justify-items:center;
    gap:14px;
    text-align:center;
}
.application-loading-indicator strong{
    color:#041b46 !important;
    font-size:12px !important;
    font-weight:600 !important;
    line-height:1.4;
}
.application-loading-mark{
    width:82px;
    height:82px;
    position:relative;
    display:grid;
    place-items:center;
    background:#fff;
    border:1px solid #c7c7c7;
}
.application-loading-mark::before{
    content:"";
    width:68px;
    height:68px;
    position:absolute;
    inset:6px;
    border:3px solid #d8d8d8;
    border-top-color:#1683ff;
    border-right-color:#041b46;
    border-radius:50%;
    animation:application-loading-spin .9s linear infinite;
}
.application-loading-mark img{
    width:38px;
    height:38px;
    position:relative;
    z-index:1;
    display:block;
}
@keyframes application-loading-spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){
    .application-loading-mark::before{ animation:none; }
}
.theme-light .anr-main :is(.delta-degraded,.comparison-degraded){ color: #b4232b !important; }
.theme-light .anr-main :is(.delta-stable,.comparison-stable){ color: #5e6268 !important; }

.theme-light .method-scale{ color: var(--scale-light) !important; background: var(--scale-light-surface) !important; border-color: var(--scale-light) !important; }

@media (max-width:720px) {
    .anr-header{ height: 54px !important; padding: 0 15px !important; }
    .anr-content{ min-height: calc(100vh - 54px) !important; }
    .anr-page{ padding: 18px 12px 32px !important; }
    .anr-page h1{ font-size: 19px !important; }
    .anr-page h2{ font-size: 14px !important; }
}

/* Le zoom historique de l'interface ne doit pas étendre le menu hors écran. */
@media (min-width:900px) {
    .anr-shell{
        height: 66.6667vh !important;
        min-height: 0 !important;
    }
    .anr-content{
        height: calc(66.6667vh - 58px) !important;
        min-height: 0 !important;
    }
}

/* Footer réduit à l'information de version ; l'aide est désormais dans le header. */
.sidebar-footer{
    min-height: 30px;
    padding: 8px 16px 10px !important;
    gap: 0 !important;
    align-content: center;
}

/* Barre d’état continue : le footer du menu prolonge celui du panneau principal. */
.theme-light .sidebar-footer,
.sidebar-footer{
    min-height: var(--workspace-footer-height) !important;
    padding: 0 9px !important;
    border-top-color: #041b46 !important;
    color: #fff !important;
    background: #041b46 !important;
}

/* Harmonisation transversale des formulaires et des fiches métier. */
.theme-light .anr-page{
    --form-control-height: 34px;
    container-type: inline-size;
}

.theme-light :is(
    .documentation-field > input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
    .documentation-field > select,
    .generalities-fields label > input:not([type="checkbox"]):not([type="radio"]),
    .generalities-fields label > select,
    .criterion-select,
    .mt-catalog-search input
){
    width: 100% !important;
    height: var(--form-control-height) !important;
    min-height: var(--form-control-height) !important;
    align-self: start !important;
    box-sizing: border-box !important;
    padding: 0 9px !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
}

.theme-light :is(
    .documentation-field > textarea,
    .generalities-fields label > textarea,
    .criterion-remark,
    .cascade-pev-remark textarea,
    .after-measure-description textarea
){
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 8px 9px !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    resize: vertical !important;
}

.theme-light :is(.documentation-field,.generalities-fields label){
    min-width: 0;
    margin-top: 0 !important;
    align-content: start;
    gap: 6px !important;
    font-size: 11px !important;
    line-height: 1.3;
}

.theme-light :is(.technical-measure-title-text,.technical-measure-media-title){
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}

.theme-light :is(
    .technical-measure-v1-fields,
    .zone-v1-fields,
    .access-v1-fields,
    .operating-mode-v1-fields,
    .generalities-fields,
    .follow-up-fields
){
    align-items: start;
    align-content: start;
}

/* Les contrôles simples ne s'étirent plus à la hauteur d'un textarea voisin. */
.theme-light :is(
    .technical-measure-v1-fields,
    .zone-v1-fields,
    .access-v1-fields,
    .operating-mode-v1-fields
) .documentation-field > :is(input,select){
    align-self: start !important;
}

/* Hauteurs documentaires cohérentes par usage. */
.theme-light .machine-element-v1-fields textarea{ min-height: 80px !important; }
.theme-light .hazardous-case-v1-fields textarea{ min-height: 56px !important; height: 56px; }
.theme-light .access-v1-fields textarea{ min-height: 64px !important; height: 64px; }
.theme-light .operating-mode-v1-fields textarea{ min-height: 72px !important; }
.theme-light .generalities-fields textarea{ min-height: 76px !important; }
.theme-light .follow-up-fields textarea{ min-height: 96px !important; }
.theme-light .follow-up-fields .observation-description{ min-height: 180px !important; }
.theme-light .technical-measure-v1-fields > .field-wide textarea{ min-height: 132px !important; }
.theme-light .criterion-remark{ min-height: 60px !important; height: 60px; }
.theme-light .cascade-pev-remark textarea{ min-height: 56px !important; }
.theme-light .after-measure-description textarea{ min-height: 64px !important; }

/* Actions : même hauteur, pas de retour à la ligne à l'intérieur d'un bouton. */
.theme-light .anr-page .button{
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 11px !important;
    flex: 0 0 auto;
    border-radius: 3px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    white-space: nowrap;
}

.theme-light .entity-heading-actions{
    align-items: flex-start;
    flex-wrap: nowrap;
}

.theme-light .entity-delete-control{
    align-content: start;
}

.theme-light .technical-measure-v1-card{
    min-height: 0 !important;
    container-type: inline-size;
}

.theme-light .technical-measure-v1-heading{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) max-content;
    align-items: flex-start !important;
    gap:16px !important;
}

.theme-light .technical-measure-v1-heading > div:first-child{
    min-width: 0;
}

.theme-light .technical-measure-v1-heading h2{
    margin-top: 4px !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere;
}

.theme-light .entity-heading-dependencies{
    max-width:100%;
    margin:5px 0 0 !important;
    color:#626262 !important;
    font-size:9px !important;
    font-weight:400 !important;
    line-height:1.35 !important;
    overflow-wrap:anywhere;
}

.theme-light .technical-measure-v1-heading .entity-heading-actions{
    min-width:max-content;
    margin-left:0;
    justify-self:end;
}

/* Fiche MO : composition flat, compacte et alignée sur les autres fiches métier. */
.theme-light .operating-mode-v1-card{
    padding:17px 20px 20px !important;
}
.theme-light .operating-mode-v1-card .technical-measure-v1-heading p{
    margin:4px 0 0;
    color:#5b5b5b;
    font-size:9px;
}
.theme-light .operating-mode-v2-layout{
    padding:14px 0 16px;
    display:grid;
    grid-template-columns:minmax(270px,.8fr) minmax(460px,1.2fr);
    gap:20px;
    align-items:stretch;
    border-bottom:1px solid #d9d9d9;
}
.theme-light .operating-mode-v2-section{
    min-width:0;
    padding:0;
}
.theme-light .operating-mode-v2-evaluation{
    padding-left:19px;
    border-left:1px solid #d9d9d9;
}
.theme-light .operating-mode-v2-section-heading{
    min-height:34px;
    margin-bottom:10px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}
.theme-light .operating-mode-v2-section-heading h3{
    margin:0;
    display:flex;
    align-items:center;
    gap:6px;
    color:#1767ed !important;
    font-size:11px !important;
    font-weight:600 !important;
}
.theme-light .operating-mode-v2-section-heading small{
    display:block;
    margin-top:3px;
    color:#5b5b5b;
    font-size:8px;
    line-height:1.35;
}
.theme-light .operating-mode-v2-criterion-icon{
    width:18px;
    height:18px;
    display:grid;
    place-items:center;
    color:var(--f-light);
    background:var(--f-light-surface);
    font-size:8px;
    font-weight:700;
}
.theme-light .operating-mode-v1-fields{
    display:grid;
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px !important;
}
.theme-light .operating-mode-v1-fields .documentation-field{
    margin:0 !important;
}
.theme-light .operating-mode-v1-fields textarea{
    min-height:92px !important;
    height:92px;
}
.theme-light .operating-mode-v2-evaluation .editable-criterion-row{
    min-height:0;
    padding:10px 0 0 !important;
    display:grid;
    grid-template-columns:36px minmax(130px,.7fr) minmax(180px,1fr) minmax(180px,1fr) !important;
    gap:10px;
    align-items:start;
    border-top:1px solid #e2e2e2;
    border-bottom:0;
}
.theme-light .operating-mode-v2-evaluation .criterion-code{
    width:30px;
    height:30px;
    border-radius:2px !important;
}
.theme-light .operating-mode-v2-evaluation .criterion-name{
    gap:3px;
}
.theme-light .operating-mode-v2-evaluation .criterion-name strong{
    color:#252525;
    font-size:10px;
}
.theme-light .operating-mode-v2-evaluation .criterion-name small,
.theme-light .operating-mode-v2-evaluation :is(.criterion-value,.criterion-note) > small{
    color:#666;
    font-size:8px;
}
.theme-light .operating-mode-v2-evaluation .criterion-value{
    gap:5px;
}
.theme-light .operating-mode-v2-evaluation .criterion-score{
    min-height:24px;
    padding:5px 8px;
    border-radius:2px !important;
    font-size:9px;
}
.theme-light .operating-mode-v2-evaluation .criterion-remark{
    min-height:68px !important;
    height:68px;
}
.theme-light .operating-mode-v1-card > .hazardous-case-documentation{
    margin-top:14px !important;
}

@container (max-width:1050px){
    .theme-light .operating-mode-v2-layout{
        grid-template-columns:minmax(0,1fr);
        gap:14px;
    }
    .theme-light .operating-mode-v2-evaluation{
        padding:14px 0 0;
        border-left:0;
        border-top:1px solid #d9d9d9;
    }
}

@container (max-width:760px){
    .theme-light .operating-mode-v2-evaluation .editable-criterion-row{
        grid-template-columns:36px minmax(140px,.8fr) minmax(180px,1fr) !important;
    }
    .theme-light .operating-mode-v2-evaluation .criterion-note{
        grid-column:2 / -1;
    }
}

@container (max-width:480px){
    .theme-light .operating-mode-v2-section-heading{
        display:grid;
        grid-template-columns:minmax(0,1fr);
    }
    .theme-light .operating-mode-v2-evaluation .editable-criterion-row{
        grid-template-columns:32px minmax(0,1fr) !important;
    }
    .theme-light .operating-mode-v2-evaluation :is(.criterion-value,.criterion-note){
        grid-column:2;
    }
}

/* Les évaluations AC/MO restent lisibles lorsque le menu est élargi. */
@container (max-width: 900px){
    .theme-light .technical-measure-v1-heading{
        display: grid !important;
        grid-template-columns: minmax(0,1fr) !important;
        gap: 10px !important;
    }

    .theme-light .technical-measure-v1-heading .entity-heading-actions{
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        justify-self:start !important;
    }

    .theme-light :is(.access-v1-evaluation,.operating-mode-v1-evaluation) .editable-criterion-row{
        grid-template-columns: 42px minmax(150px,.75fr) minmax(190px,1fr) !important;
        align-items: start;
    }

    .theme-light :is(.access-v1-evaluation,.operating-mode-v1-evaluation) .criterion-note{
        grid-column: 2 / -1;
    }

    .theme-light .measure-section-heading{
        display: grid;
        grid-template-columns: minmax(0,1fr);
        gap: 9px;
    }

    .theme-light .follow-up-create-actions{
        justify-content: flex-start;
    }
}

@container (max-width: 620px){
    .theme-light :is(.technical-measure-v1-grid,.generalities-grid,.follow-up-editor-grid){
        grid-template-columns: minmax(0,1fr) !important;
    }

    .theme-light .mt-transfer-footer{
        grid-template-columns: minmax(0,1fr) !important;
    }

    .theme-light .mt-transfer-footer > *{
        min-width: 0 !important;
    }

    .theme-light :is(.access-v1-evaluation,.operating-mode-v1-evaluation) .editable-criterion-row{
        grid-template-columns: 36px minmax(0,1fr) !important;
    }

    .theme-light :is(.access-v1-evaluation,.operating-mode-v1-evaluation) :is(.criterion-value,.criterion-note){
        grid-column: 2;
    }
}

/* Parcours risques harmonisé avec les fiches ED/ZD/MO/MT validées. */
.theme-light .risk-summary-metrics{ color:#cfcfcf; border-color:#cfcfcf; background:#fafafa; }
.theme-light .risk-summary-metrics > span{ border-color:#d8d8d8; }
.theme-light .risk-summary-metrics strong{ color:#202020; }
.theme-light .risk-summary-metrics small{ color:#666; }
.theme-light .risk-tree-group,
.theme-light .risk-tree-item,
.theme-light .risk-tree-measure,
.theme-light .measure-risk-summary-item,
.theme-light .measure-inventory-grid a{ border-radius:0 !important; box-shadow:none !important; }
.theme-light .risk-tree-item,
.theme-light .risk-tree-measure,
.theme-light .measure-risk-summary-item,
.theme-light .measure-inventory-grid a{ background:#fff; }
.theme-light .risk-tree-item:hover,
.theme-light .risk-tree-measure:hover,
.theme-light .measure-risk-summary-item:hover,
.theme-light .measure-inventory-grid a:hover{ background:#f3f3f3; }
.theme-light .risk-tree-icon{ border:0; border-radius:0; color:#0078d4; background:transparent; }
.theme-light .risk-tree-measure-icon{ color:#0078d4; }
.theme-light .risk-summary-score{ border-color:var(--scale-light) !important; }
.theme-light .risk-evaluation-pending{ color:#795800; border-color:#d6b45c; background:#fff8e6; }
.theme-light .child-status{ color:#555; border-color:#bdbdbd; background:#f5f5f5; }
.theme-light .child-status.ready{ color:#245b3a; border-color:#7fad8e; background:#eff8f2; }
.theme-light .risk-summary-empty strong{ color:#202020; }
.theme-light .risk-summary-empty span{ color:#666; }
.theme-light .risk-inherited-criteria{ color:#d4d4d4; border-color:#d4d4d4; background:#fafafa; }
.theme-light .risk-inherited-grid .cascade-criterion-field{ color:#333; border-color:#d2d2d2; background:#fff; }
.theme-light .risk-inherited-grid .cascade-criterion-field:hover{ border-color:#8b8b8b; background:#f5f5f5; }
.theme-light .risk-inherited-grid .cascade-field-label{ color:#444; }
.theme-light .risk-inherited-grid .cascade-readonly-value{ color:#202020; }
.theme-light .risk-inherited-grid .cascade-criterion-field > small{ color:#666; }
.theme-light .follow-up-reference.msr{ color:#315a7d; border-color:#8aa3b8; background:#edf3f7; }
.theme-light .follow-up-detail-page,
.theme-light .reassessment-editor,
.theme-light .risk-detail-editor{ min-height:0 !important; box-shadow:none !important; }
.theme-light .follow-up-parent-context.machine-element-detail-context{ border:0; border-left:4px solid #0078d4; background:#f0f6ff; }
.theme-light .follow-up-parent-context > em{ color:#5f5f5f; }
.theme-light .follow-up-media.is-expanded{ color:#252525; background:#fff; }

/* Titres métier compacts des fiches R / MSR / RR / OBS. */
.theme-light :is(
    .risk-v1-section > .technical-measure-title-text,
    .risk-v1-section-heading > .technical-measure-title-text,
    .follow-up-section-title
){
    color:#1767ed !important;
    font-family:inherit !important;
    font-size:11px !important;
    font-weight:400 !important;
}

.theme-light .risk-v1-result.pending{
    color:#333 !important;
}

.theme-light .risk-v1-result.pending :is(.risk-v1-ris-score,.risk-v1-plr-score){ border-color:#c8c8c8 !important; border-left-color:#8a8a8a !important; background:#f3f3f3 !important; }
.theme-light .risk-v1-result.pending :is(strong,b,span,small){ color:#555 !important; }

/* Cas dangereux : critères et documentation visibles en parallèle. */
.theme-light .hazardous-case-workspace{
    margin-top:10px;
    display:grid;
    grid-template-columns:minmax(0,1.8fr) minmax(330px,.8fr);
    gap:12px;
    align-items:start;
}

.theme-light .hazardous-case-workspace > .machine-element-evaluation-card{
    min-width:0;
    margin-top:0;
    display:block;
}

.theme-light .hazardous-case-workspace > .hazardous-case-documentation{
    min-width:0;
    margin-top:0;
    padding-top:0;
    border-top:0;
}

.theme-light .hazardous-case-workspace .hazardous-case-document-frame{
    height:190px;
}

.theme-light .hazardous-case-workspace .hazardous-case-document-tabs .case-document-tab{
    min-width:132px;
}

@container (max-width:900px){
    .theme-light .hazardous-case-workspace{
        grid-template-columns:minmax(0,1fr);
    }

    .theme-light .hazardous-case-workspace .hazardous-case-document-frame{
        height:210px;
    }
}

/* Tableau de bord : pilotage compact, sans doublons ni activité simulée. */
.theme-light .dashboard-context-line{
    min-height:48px;
    padding:0 14px;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:center;
}

.theme-light .dashboard-context-line > span{
    min-width:0;
    padding:0 14px;
    display:grid;
    grid-template-columns:20px auto minmax(0,1fr);
    align-items:center;
    gap:7px;
    border-left:1px solid #e1e1e1;
}

.theme-light .dashboard-context-line > span:first-child{ padding-left:0; border-left:0; }
.theme-light .dashboard-context-line .global-tree-icon{ width:16px; height:16px; color:#666; }
.theme-light .dashboard-context-line small{ color:#666; font-size:9px; }
.theme-light .dashboard-context-line strong{ overflow:hidden; color:#202020; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }

.theme-light .dashboard-project-status{ color:#a65300 !important; border-color:#d4d4d4 !important; background:#fff !important; }
.theme-light .dashboard-project-status.complete{ color:#14724c !important; }
.theme-light .dashboard-status-summary{ background:#fff9ef; }
.theme-light .dashboard-project-status.complete .dashboard-status-summary{ background:#f2faf5; }
.theme-light .dashboard-status-icon{ background:#fff; }
.theme-light .dashboard-status-copy > small{ color:#8a5a27; }
.theme-light .dashboard-project-status.complete .dashboard-status-copy > small{ color:#39735a; }
.theme-light .dashboard-status-copy h2{ color:#202020; }
.theme-light .dashboard-status-copy p{ color:#555; }
.theme-light .dashboard-status-progress{ border-color:#dfc7a9; }
.theme-light .dashboard-status-progress strong{ color:#202020; }
.theme-light .dashboard-status-progress span{ color:#666; }
.theme-light .dashboard-workflow{ border-color:#d8d8d8; background:#fff; }
.theme-light .dashboard-workflow-stage{ border-color:#e0e0e0; }
.theme-light .dashboard-workflow-stage:hover{ background:#f4f4f4; }
.theme-light .dashboard-workflow-stage > b{ color:#666; border-color:#bdbdbd; background:#f4f4f4; }
.theme-light .dashboard-workflow-stage strong{ color:#333; }
.theme-light .dashboard-workflow-stage small{ color:#707070; }
.theme-light .dashboard-workflow-stage.complete > b{ color:#fff; border-color:#16865c; background:#16865c; }
.theme-light .dashboard-workflow-stage.complete strong{ color:#17613e; }
.theme-light .dashboard-workflow-stage.current{ box-shadow:inset 0 -3px 0 #d26b16; background:#fffaf1; }
.theme-light .dashboard-workflow-stage.current > b{ color:#9a4b00; border-color:#d26b16; background:#fff1df; }
.theme-light .dashboard-workflow-stage.future{ color:#777; background:#fafafa; }
.theme-light .dashboard-primary-action{ background:#f5f5f5; }
.theme-light .dashboard-primary-action > span b{ color:#a65300; }
.theme-light .dashboard-project-status.complete .dashboard-primary-action > span b{ color:#14724c; }
.theme-light .dashboard-primary-action > span strong{ color:#303030; }

.theme-light .dashboard-kpi-grid{
    margin-top:10px;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:9px;
}

.theme-light .dashboard-kpi{
    min-width:0;
    min-height:74px;
    padding:11px 12px;
    display:grid;
    grid-template-columns:30px minmax(0,1fr);
    align-items:center;
    gap:10px;
    border:1px solid #d4d4d4;
    background:#fff;
}

.theme-light .dashboard-kpi > .global-tree-icon{ width:25px; height:25px; }
.theme-light .dashboard-kpi:nth-child(1) > .global-tree-icon{ color:#7a4ca0; }
.theme-light .dashboard-kpi:nth-child(2) > .global-tree-icon{ color:#d26b16; }
.theme-light .dashboard-kpi:nth-child(3) > .global-tree-icon{ color:#16865c; }
.theme-light .dashboard-kpi:nth-child(4) > .global-tree-icon{ color:#007f78; }
.theme-light .dashboard-kpi > span{ min-width:0; display:grid; grid-template-columns:auto 1fr; gap:2px 8px; align-items:baseline; }
.theme-light .dashboard-kpi strong{ color:#202020; font-size:20px; line-height:1; }
.theme-light .dashboard-kpi b{ color:#333; font-size:10px; }
.theme-light .dashboard-kpi small{ grid-column:1 / -1; overflow:hidden; color:#666; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }

.theme-light .dashboard-focus-grid{
    margin-top:10px;
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);
    gap:10px;
}

.theme-light .dashboard-focus-grid > .reference-panel{ min-width:0; padding:12px 14px; }
.theme-light .dashboard-risk-distribution .risk-distribution{ min-height:132px; }
.theme-light .dashboard-risk-distribution .risk-donut{ width:96px; height:96px; flex-basis:96px; border-width:14px; }

.theme-light .dashboard-completeness-total.pending{ color:#a65300; }
.theme-light .dashboard-completeness-total.complete{ color:#16865c; }
.theme-light .dashboard-completeness-total small{ color:#666; }
.theme-light .dashboard-completeness-empty{ color:#16865c; }
.theme-light .dashboard-completeness-empty strong{ color:#252525; }
.theme-light .dashboard-completeness-empty small{ color:#666; }

/* Logo vectoriel : conserver son rapport largeur/hauteur dans l'en-tête compact. */
.theme-light .anr-brand img{
    width:120px !important;
    height:auto !important;
    max-height:36px !important;
    object-fit:contain !important;
    object-position:left center !important;
    border-radius:0 !important;
}
.theme-light .dashboard-check-groups,
.theme-light .dashboard-check-group{ border-color:#e5e5e5; }
.theme-light .dashboard-check-group > summary{ color:#333; }
.theme-light .dashboard-check-group > summary:hover{ background:#f3f3f3; }
.theme-light .dashboard-check-group > summary .global-tree-icon,
.theme-light .dashboard-check-group > summary > b{ color:#b85e00; }
.theme-light .dashboard-check-group > summary strong{ color:#252525; }
.theme-light .dashboard-check-group > summary small,
.theme-light .dashboard-check-group > summary > i{ color:#666; }
.theme-light .dashboard-check-items{ background:#fafafa; scrollbar-color:#aaa #f4f4f4; }
.theme-light .dashboard-check-item{ color:#333; border-color:#e7e7e7; }
.theme-light .dashboard-check-item:hover{ background:#f0f6fc; }
.theme-light .dashboard-check-marker{ color:#a65300; border-color:#d2a36e; background:#fff7e8; }
.theme-light .dashboard-check-item strong{ color:#252525; }
.theme-light .dashboard-check-item small,
.theme-light .dashboard-check-item > i{ color:#666; }

.theme-light .dashboard-priority-panel{ margin-top:10px; padding:12px 14px; }
.theme-light .dashboard-priority-panel .reference-panel-heading{ margin-bottom:4px; }
.theme-light .dashboard-priority-panel .reference-panel-heading > a{ color:#1767ed; font-size:9px; text-decoration:none; }
.theme-light .dashboard-risk-table-head,
.theme-light .dashboard-risk-row{
    display:grid;
    grid-template-columns:minmax(125px,.8fr) minmax(220px,1.6fr) minmax(115px,.75fr) 92px 112px 12px;
    gap:10px;
    align-items:center;
}

.theme-light .dashboard-risk-table-head{
    min-height:27px;
    color:#666;
    font-size:8px;
    text-transform:uppercase;
}

.theme-light .dashboard-risk-row{
    min-height:48px;
    border-top:1px solid #e5e5e5;
    color:#444;
    font-size:9px;
    text-decoration:none;
}

.theme-light .dashboard-risk-row:hover{ background:#f3f3f3; }
.theme-light .dashboard-risk-row > span:first-child{ min-width:0; display:grid; gap:2px; }
.theme-light .dashboard-risk-row > span:first-child strong{ color:#1767ed; font-size:10px; }
.theme-light .dashboard-risk-row > span:first-child small{ overflow:hidden; color:#555; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.theme-light .dashboard-risk-score{ min-height:34px; padding:5px 7px; display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:7px; border-left:3px solid var(--scale-light); background:var(--scale-light-surface); font-style:normal; }
.theme-light .dashboard-risk-score b{ color:#202020; font-size:14px; }
.theme-light .dashboard-risk-score small{ overflow:hidden; color:#333; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.theme-light .dashboard-risk-score.pending{ border-left-color:#8a8a8a; background:#f0f0f0; }
.theme-light .dashboard-residual-score{ color:#16865c; font-size:11px; font-weight:700; }
.theme-light .dashboard-risk-status{ width:max-content; padding:4px 6px; color:#555; border:1px solid #c8c8c8; background:#f5f5f5; font-size:8px; }
.theme-light .dashboard-risk-status.pending{ color:#8a4b00; border-color:#d7b783; background:#fff7e8; }
.theme-light .dashboard-risk-status.complete{ color:#17613e; border-color:#9fc5ad; background:#eff8f2; }
.theme-light .dashboard-risk-row > i{ color:#666; font-size:15px; font-style:normal; }
.theme-light .dashboard-empty-state{ min-height:110px; display:flex; align-items:center; justify-content:center; gap:10px; color:#666; }
.theme-light .dashboard-empty-state .global-tree-icon{ width:24px; height:24px; color:#7a4ca0; }
.theme-light .dashboard-empty-state span{ display:grid; gap:2px; }
.theme-light .dashboard-empty-state strong{ color:#252525; font-size:11px; }
.theme-light .dashboard-empty-state small{ font-size:9px; }
.theme-light .dashboard-empty-state > a{ margin-left:12px; color:#1767ed; font-size:9px; }

@container (max-width:1000px){
    .theme-light .dashboard-kpi-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    .theme-light .dashboard-focus-grid{ grid-template-columns:minmax(0,1fr); }
}

@container (max-width:720px){
    .theme-light .dashboard-context-line{ grid-template-columns:minmax(0,1fr); padding:7px 12px; }
    .theme-light .dashboard-context-line > span{ min-height:30px; padding:0; border-left:0; border-top:1px solid #e5e5e5; }
    .theme-light .dashboard-context-line > span:first-child{ border-top:0; }
    .theme-light .dashboard-risk-table-head{ display:none; }
    .theme-light .dashboard-risk-row{ grid-template-columns:minmax(0,1fr) 112px 12px; padding:7px 0; }
    .theme-light .dashboard-risk-row > :nth-child(2),
    .theme-light .dashboard-risk-row > :nth-child(4){ display:none; }
}

@container (max-width:480px){
    .theme-light .dashboard-kpi-grid{ grid-template-columns:minmax(0,1fr); }
}

/* État métier de l’arborescence : action humaine encore requise. */
.theme-light .global-tree-copy strong:has(.tree-action-required){
    position:relative;
    padding-right:10px;
}

.theme-light .tree-action-required{
    width:6px;
    height:6px;
    position:absolute;
    top:50%;
    right:1px;
    display:block;
    border-radius:50%;
    background:#d17b00;
    transform:translateY(-50%);
}

/* Le focus de navigation Blazor annonce le titre sans le présenter comme un contrôle sélectionné. */
.theme-light .anr-page h1:focus{
    outline:none;
    box-shadow:none;
}
