:root {
    --color-primary: #111111;
    --color-secondary: #7d6cff;
    --color-cta: #7d6cff;
    --bg: #f6f5fb;
    --surface: #ffffff;
    --text: #17191c;
    --muted: #6b7280;
    --line: #e6e8ee;
    --danger: #9f1239;
    --ok: #166534;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.04);
    --sidebar: 228px;
    --sidebar-bg: #f1ebf8;
    --chip-line: #e6e2f0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

@media (min-width: 981px) {
    html, body {
        height: 100%;
        overflow: hidden;
    }
}

a { color: inherit; }

button, input, select, textarea { font: inherit; }

.app {
    height: 100vh;
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.sidebar {
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 0.85rem 0.65rem 0.85rem;
    min-height: 0;
    overflow: auto;
}

.sidebar nav.nav-main { flex: 1; }
.sidebar nav.nav-foot {
    margin-top: 0.35rem;
    padding-top: 0.45rem;
    border-top: 1px solid color-mix(in srgb, var(--color-cta) 14%, #e4deef);
}

.nav-label {
    margin: 1rem 0.7rem 0.35rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9aa3af;
    font-weight: 700;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: #5c6472;
    border-radius: 12px;
    padding: 0.62rem 0.8rem;
    margin: 0.1rem 0.2rem;
    font-size: 0.92rem;
    font-weight: 500;
}

.sidebar nav a .icon { color: #8b93a2; }

.sidebar nav a:hover {
    background: color-mix(in srgb, var(--color-cta) 9%, white);
    color: #2a303a;
}

.sidebar nav a.active {
    background: var(--color-cta);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 8px 16px color-mix(in srgb, var(--color-cta) 28%, transparent);
}

.sidebar nav a.active .icon { color: #fff; }

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon { width: 18px; height: 18px; flex: none; }

.sidebar-foot {
    margin: 0.35rem 0 0;
    padding: 0.55rem 0.85rem 0.15rem;
    color: #9aa1b0;
    font-size: 0.72rem;
}

.workspace {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    background: var(--bg);
    scroll-padding-top: 0.75rem;
}

.topbar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 72px;
    padding: 0.7rem 1.15rem;
    background: #fff;
    border-bottom: 1px solid #eeeaf4;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: none;
    background: color-mix(in srgb, var(--color-cta) 14%, white);
    color: var(--color-cta);
}

.brand-mark svg { width: 20px; height: 20px; }

.brand-logo {
    height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    flex: none;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.brand-copy strong {
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    color: #17191c;
}

.brand-copy small {
    margin-top: 0.12rem;
    color: #8b919c;
    font-size: 0.74rem;
    font-weight: 500;
    white-space: nowrap;
}

.topbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-left: auto;
    min-width: 0;
    max-width: 100%;
}

.topbar-switchers {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.topbar-switchers::-webkit-scrollbar { display: none; }

.chip-form { margin: 0; display: flex; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    height: 36px;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--chip-line);
    background: #fff;
    color: #2c313a;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1;
    flex: none;
}

.chip .icon { width: 16px; height: 16px; color: #7d8594; flex: none; }

.chip-soft {
    background: color-mix(in srgb, var(--color-cta) 12%, white);
    border-color: transparent;
    color: var(--color-cta);
}

.chip-soft .icon { color: var(--color-cta); }
.chip-soft:hover { background: color-mix(in srgb, var(--color-cta) 18%, white); }

.chip:hover { filter: none; background: #faf9fd; }

.chip:focus-visible,
.switcher.is-open > .chip {
    border-color: color-mix(in srgb, var(--color-cta) 45%, var(--chip-line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-cta) 16%, transparent);
    filter: none;
}

.chip-caret {
    width: 14px;
    height: 14px;
    color: #9aa1ad;
    flex: none;
    transition: transform 0.15s ease;
}

.switcher { position: relative; }
.switcher.is-open .chip-caret { transform: rotate(180deg); }

.switcher-panel {
    position: fixed;
    z-index: 40;
    min-width: 220px;
    max-width: min(320px, calc(100vw - 24px));
    max-height: 320px;
    overflow: auto;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid #eceaf2;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.12);
}

.switcher-kicker {
    margin: 0.35rem 0.7rem 0.25rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9aa1ad;
    font-weight: 700;
}

.switcher-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.7rem;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font-weight: 600;
}

.switcher-option span { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.switcher-option strong { font-weight: 600; }
.switcher-option small { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.switcher-option .icon { width: 16px; height: 16px; color: var(--color-cta); flex: none; }

.switcher-option:hover { filter: none; background: #f6f5fb; }
.switcher-option.is-current { background: color-mix(in srgb, var(--color-cta) 12%, white); }
.switcher-option.is-current:hover { filter: none; background: color-mix(in srgb, var(--color-cta) 18%, white); }

.topbar-context {
    margin: 0;
    font-weight: 600;
}

.company-switcher {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.company-switcher label {
    color: var(--muted);
    font-size: 0.88rem;
}

.company-switcher select { min-width: 240px; }

.dossier-switch { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.dossier-switch .back-link { margin: 0; }
.dossier-switch select { min-width: 180px; }

.module-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.module-links .card { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 0.35rem; }
.module-links span { color: var(--muted); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li + li { margin-top: 0.45rem; }
.project-create { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.view-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.view-tabs a {
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    background: #fff;
    font-weight: 600;
}
.view-tabs a.is-current { background: var(--color-cta); border-color: var(--color-cta); color: #fff; }
.welcome-steps { margin: 0.8rem 0 1rem; padding-left: 1.1rem; }
.welcome-steps li + li { margin-top: 0.45rem; }
.search-bar input { width: 100%; }
.search-bar ~ .empty { margin-top: 1rem; }
.table-wrap tr[hidden] { display: none; }

.account-menu {
    position: relative;
}

.account-menu > summary {
    list-style: none;
    cursor: pointer;
}

.account-menu > summary::-webkit-details-marker { display: none; }

.topbar .user-chip {
    padding-left: 0.22rem;
    padding-right: 0.65rem;
    gap: 0.5rem;
}

.topbar .user-chip strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

.account-menu[open] > summary,
.topbar .user-chip:hover { background: #faf9fd; }

.menu-caret { width: 16px; height: 16px; color: var(--muted); flex: none; }

.account-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    width: 220px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12);
    padding: 0.35rem;
    z-index: 30;
}

.account-panel a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    font-size: 0.92rem;
}

.account-panel a:hover { background: #f4f6f8; }
.account-panel a.logout { color: var(--danger); }

.row-action { text-align: right; width: 1%; white-space: nowrap; }
.row-action .button { padding: 0.45rem 0.85rem; }
.row-actions { display: inline-flex; gap: 0.45rem; align-items: center; }
.row-actions form { margin: 0; }

.user-chip strong, .user-chip small { display: block; line-height: 1.2; }
.user-chip small { color: var(--muted); font-size: 0.75rem; }

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--color-cta);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    flex: none;
}

.avatar.soft {
    background: color-mix(in srgb, var(--color-primary) 12%, white);
    color: var(--color-primary);
}

.page { padding: 1.6rem 1.7rem 3rem; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover { color: var(--text); }
.back-link .icon { width: 16px; height: 16px; }

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

.page-head, .row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.15rem;
}

.eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-secondary);
    font-weight: 700;
}

h1 { font-size: 1.7rem; letter-spacing: -0.03em; margin: 0; }
h2 { font-size: 1.02rem; margin: 0 0 0.35rem; }
.lead, .muted { color: var(--muted); }
.lead { margin: 0.35rem 0 0; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.15rem 1.2rem;
    box-shadow: var(--shadow);
}

.card + .card, .stack > * + * { margin-top: 1rem; }
.company-grid > .card,
.module-grid > .card,
.module-links > .card,
.tile-grid > .card,
.cabinet-grid > .card,
.stats > .card { margin-top: 0; }

.stats, .tile-grid, .company-grid, .module-grid {
    display: grid;
    gap: 1rem;
}

.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1rem; }
.module-grid, .tile-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.company-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; }

.stat strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.55rem;
    letter-spacing: -0.03em;
}

a.stat { text-decoration: none; color: inherit; }
a.stat:hover { border-color: color-mix(in srgb, var(--color-cta) 45%, var(--line)); }

.steps {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 1.15rem 0.4rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    position: relative;
}

.steps::before {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    top: 2.05rem;
    height: 3px;
    background: #e4e7ee;
    border-radius: 99px;
}

.steps li { flex: 1; min-width: 0; text-align: center; position: relative; z-index: 1; }
.steps a { display: block; text-decoration: none; }

.step-index {
    width: 30px;
    height: 30px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #d5dae3;
    color: #9aa3af;
    font-size: 0.82rem;
    font-weight: 700;
}

.step-label {
    display: block;
    margin-top: 0.55rem;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
    color: #9aa3af;
}

.steps .is-current .step-index {
    background: var(--color-cta);
    border-color: var(--color-cta);
    color: #fff;
}

.steps .is-current .step-label { color: var(--color-cta); }

.steps .is-done .step-index {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.steps .is-done .step-label { color: #166534; }
.step-check { width: 16px; height: 16px; display: block; }

.step-panel { margin-top: 1rem; }
.step-panel > * + * { margin-top: 1rem; }
.steps a:hover .step-label { color: var(--text); }

.stat span, .tile-kicker {
    color: var(--muted);
    font-size: 0.8rem;
}

.module, .company-card, .tile, .cabinet-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
    min-height: 140px;
}

.module { justify-content: space-between; }
.module p, .company-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.company-card {
    min-width: 0;
    height: auto;
    align-self: stretch;
    min-height: 168px;
}
.company-card h2 { overflow-wrap: anywhere; }
.company-card .company-meta { min-height: 2.7em; }
.company-card .actions { margin-top: auto; }

.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge.soon { color: var(--color-secondary); background: color-mix(in srgb, var(--color-secondary) 14%, white); }
.badge.role-super { background: #111111; color: #fff; }
.badge.role-admin { color: var(--color-cta); background: color-mix(in srgb, var(--color-cta) 14%, white); }
.badge.role-lead { color: #0f6b4c; background: #e7f6ef; }
.badge.role-off { background: #fff1f2; color: var(--danger); }

.access-scope {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 12rem;
    max-width: 22rem;
}

.access-kind {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.access-wide {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.access-empty {
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
}

.access-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.access-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.28rem 0.55rem 0.28rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #f8f9fb;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
}

.access-tag .icon {
    width: 13px;
    height: 13px;
    flex: none;
}

.access-tag span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.access-tag.is-company {
    background: color-mix(in srgb, var(--color-cta) 8%, white);
    border-color: color-mix(in srgb, var(--color-cta) 18%, var(--line));
    color: color-mix(in srgb, var(--color-cta) 72%, #111);
}

.access-tag.is-company .icon { color: var(--color-cta); }

.access-tag.is-dossier {
    background: #eef8f3;
    border-color: #d5ebdf;
    color: #0f6b4c;
}

.access-tag.is-dossier .icon { color: #1a8a5c; }

.cabinet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 240px));
    gap: 0.75rem;
}

.cabinet-card {
    min-height: 0;
    padding: 0.8rem;
    gap: 0.7rem;
}

.cabinet-card h2 { margin: 0; font-size: 0.95rem; }
.cabinet-main img { height: 28px; width: auto; max-width: 72px; object-fit: contain; }
.cabinet-card .swatches { margin: 0; }
.cabinet-card .button { align-self: center; padding: 0.4rem 0.75rem; }

.year-board {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: stretch;
}

.year-composer,
.year-card {
    width: 176px;
    min-height: 168px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.year-composer {
    justify-content: space-between;
    padding: 0.95rem;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--color-cta) 8%, white), #fff 42%);
}

.year-composer input { margin: 0; }
.year-composer .field { margin: 0; }
.year-composer button { width: 100%; }

.year-card {
    position: relative;
    overflow: hidden;
    padding: 0.95rem 1rem 1rem 1.15rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
}

.year-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-cta);
}

.year-card strong {
    font-size: 2.15rem;
    letter-spacing: -0.05em;
    line-height: 1;
    margin-top: auto;
}
.year-card-kicker {
    margin: 0;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.year-card:hover {
    border-color: color-mix(in srgb, var(--color-cta) 40%, var(--line));
    transform: translateY(-2px);
}

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

.company-card-top, .cabinet-main {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.swatches { display: flex; gap: 0.35rem; margin-top: auto; }
.cabinet-card .swatch { width: 14px; height: 14px; }
.swatch {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
textarea,
select {
    color: inherit;
    background: #fff;
    border: 1px solid #d9dee7;
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    width: 100%;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid color-mix(in srgb, var(--color-cta) 35%, white);
    border-color: var(--color-cta);
}

input[type="color"] {
    width: 64px;
    height: 40px;
    padding: 0.15rem;
    border: 1px solid #d9dee7;
    border-radius: 10px;
    background: #fff;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.field label { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.field div[id$="_help"] { color: var(--muted); font-size: 0.82rem; }
.form-card { max-width: 680px; }
.card + .company-grid,
.card + .empty { margin-top: 1rem; }
.errors { margin: 0.2rem 0 0; padding-left: 1rem; color: var(--danger); font-size: 0.85rem; }

.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 0.6rem 0.95rem;
    background: var(--color-cta);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.button:hover, button:hover { filter: brightness(0.94); }
button:disabled {
    background: #e6e8ee;
    color: #8b93a1;
    cursor: not-allowed;
}
button:disabled:hover { filter: none; }

.question-card { border-left-width: 4px; }
.question-card.is-done { border-left-color: #16a34a; }
.question-card.is-busy { opacity: 0.72; }
.question-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
.question-status { margin: 0.55rem 0 0; font-size: 0.85rem; color: var(--ok); }
.question-status.is-error { color: var(--danger); }
button.question-unknown {
    background: #6b7280;
    color: #fff;
}
button.question-unknown:hover { filter: brightness(0.94); }
button.question-unknown.is-current { background: #16a34a; }

.index-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--line);
    border-left-width: 6px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}
.index-kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.index-value { margin: 0.15rem 0 0; font-size: 1.7rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.index-note, .index-comment, .index-meaning { margin: 0.45rem 0 0; max-width: 46rem; }
.index-meaning { font-size: 0.92rem; }
.index-note { color: var(--muted); font-size: 0.88rem; }
.index-comment { font-size: 0.95rem; }
.index-scale {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    justify-content: flex-end;
    max-width: 36rem;
}
.index-scale li {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.28rem 0.6rem;
    background: #fff;
    color: #9aa3af;
    font-size: 0.72rem;
    font-weight: 700;
}
.index-hero.is-defavorable { background: #fff1f2; border-left-color: #e11d48; }
.index-hero.is-defavorable .index-kicker, .index-hero.is-defavorable .index-value { color: #9f1239; }
.index-hero.is-incertain { background: #fff7ed; border-left-color: #ea580c; }
.index-hero.is-incertain .index-kicker, .index-hero.is-incertain .index-value { color: #9a3412; }
.index-hero.is-favorable_sous_reserves { background: #fffbeb; border-left-color: #d97706; }
.index-hero.is-favorable_sous_reserves .index-kicker, .index-hero.is-favorable_sous_reserves .index-value { color: #92400e; }
.index-hero.is-favorable { background: #f0fdf4; border-left-color: #16a34a; }
.index-hero.is-favorable .index-kicker, .index-hero.is-favorable .index-value { color: #166534; }
.index-hero.is-tres_favorable { background: #ecfdf5; border-left-color: #047857; }
.index-hero.is-tres_favorable .index-kicker, .index-hero.is-tres_favorable .index-value { color: #065f46; }
.index-hero.is-defavorable .is-current { background: #e11d48; color: #fff; border-color: #e11d48; }
.index-hero.is-incertain .is-current { background: #ea580c; color: #fff; border-color: #ea580c; }
.index-hero.is-favorable_sous_reserves .is-current { background: #d97706; color: #fff; border-color: #d97706; }
.index-hero.is-favorable .is-current { background: #16a34a; color: #fff; border-color: #16a34a; }
.index-hero.is-tres_favorable .is-current { background: #047857; color: #fff; border-color: #047857; }

.diag-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: #f3f4f6;
    color: #4b5563;
    white-space: nowrap;
}
.diag-badge.is-idle { background: #f3f4f6; color: #6b7280; }
.diag-badge.is-wait { background: #fffbeb; color: #92400e; }
.diag-badge.is-run { background: #eef2ff; color: #4338ca; }
.diag-badge.is-fail, .diag-badge.is-defavorable { background: #fff1f2; color: #9f1239; }
.diag-badge.is-incertain { background: #fff7ed; color: #9a3412; }
.diag-badge.is-favorable_sous_reserves { background: #fffbeb; color: #92400e; }
.diag-badge.is-favorable { background: #f0fdf4; color: #166534; }
.diag-badge.is-tres_favorable { background: #ecfdf5; color: #065f46; }
.diag-badge-row {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}
.diag-status-labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.diag-home-list {
    list-style: none;
    margin: 0.85rem 0 0.85rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.diag-home-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    color: inherit;
    text-decoration: none;
}
.diag-home-name { min-width: 0; font-weight: 650; }
.diag-home-link:hover .diag-home-name { text-decoration: underline; }

.synthesis-block + .synthesis-block { margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.synthesis-block > p { margin: 0; }
.cite-list { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 0.75rem; }
.cite {
    margin: 0;
    padding: 0.75rem 0.85rem 0.8rem;
    border-radius: 12px;
    background: #f7f6fb;
    border-left: 3px solid var(--color-cta);
}
.cite figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.cite-doc { font-weight: 700; }
.cite-page {
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
    background: #fff;
    color: #3b2f9e;
    font-size: 0.72rem;
    font-weight: 700;
}
.cite blockquote {
    margin: 0.45rem 0 0;
    color: #374151;
    font-size: 0.9rem;
}
.cite img, .visual-grid img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    margin-top: 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
}
.visual-board { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.visual-board h3 { margin: 0; font-size: 0.95rem; }
.visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.visual-grid figure { margin: 0; }
.visual-grid img { margin-top: 0; height: 160px; }
.visual-grid figcaption { margin-top: 0.35rem; color: var(--muted); font-size: 0.75rem; font-weight: 650; }
.diag-status {
    margin-bottom: 1rem;
    align-items: center;
    max-width: none;
}
.diag-status-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}
.diag-status-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}
.diag-status-actions form { margin: 0; }
.diag-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 1rem;
}
.diag-toolbar form { margin: 0; }
[data-controller="run"] > * + * { margin-top: 1rem; }
.export-menu { position: relative; }
.export-menu > summary {
    list-style: none;
    cursor: pointer;
    gap: 0.35rem;
}
.export-menu > summary::-webkit-details-marker { display: none; }
.export-menu[open] > summary { background: #f6f7fb; }
.export-menu[open] > summary .chip-caret { transform: rotate(180deg); }
.export-menu-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 0.35rem);
    min-width: 11rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12);
    padding: 0.35rem;
    z-index: 6;
}
.export-menu-panel a {
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
}
.export-menu-panel a:hover { background: #f4f6f8; }
.synthesis { scroll-margin-top: 1rem; }
.next-step {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.next-step h2 { margin: 0 0 0.2rem; }
.next-step p { margin: 0; }
.piece-list { list-style: none; margin: 0.7rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.piece {
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfbfd;
}
.piece-top { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.piece-name { font-weight: 650; color: inherit; text-decoration: none; min-width: 0; }
.piece-name:hover { color: var(--color-cta); }
.piece-labels { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.piece-label {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}
.piece-label.is-type {
    background: color-mix(in srgb, var(--color-cta) 10%, white);
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--color-cta) 28%, white);
}
.piece-label.is-ok { background: #ecfdf3; color: #166534; }
.piece-label.is-warn { background: #fff7ed; color: #9a3412; }
.piece-label.is-progress { background: #e0f2fe; color: #075985; }
.piece-label.is-bad { background: #fff1f2; color: #9f1239; }
.piece-label.is-muted { background: #f3f4f6; color: #6b7280; }
.piece-summary {
    margin: 0.45rem 0 0;
    padding: 0.28rem 0.55rem;
    background: #fff9e6;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.piece-foot { margin: 0.8rem 0 0; }
.diag-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
.diag-actions form { margin: 0; }
.run-bar { margin: 0.7rem 0 0; }
.run-bar p { margin: 0 0 0.4rem; font-size: 0.85rem; font-weight: 650; color: var(--color-cta); }
.run-track {
    height: 6px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--color-cta) 16%, white);
    overflow: hidden;
}
.run-track span {
    display: block;
    height: 100%;
    width: 38%;
    border-radius: inherit;
    background: var(--color-cta);
    animation: run-slide 1.15s ease-in-out infinite;
}
@keyframes run-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(340%); }
}
.step-panel .doc-hint { margin: 0.55rem 0 0; }
.button.secondary:hover, button.secondary:hover,
.button.ghost:hover, button.ghost:hover, a.ghost:hover { filter: none; }

.button.secondary, button.secondary {
    background: #fff;
    color: var(--danger);
    border: 1px solid #fecdd3;
}

.button.ghost, button.ghost, a.ghost {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
}

.page-head .actions { flex: none; }
.page-head .actions .button { white-space: nowrap; }
.actions { display: flex; gap: 0.55rem; align-items: center; margin-top: auto; }
.actions form { margin: 0; }

.flash { padding: 0.75rem 0.9rem; border-radius: 12px; margin-bottom: 1rem; }
.flash.success { background: #ecfdf3; color: var(--ok); }
.flash.error { background: #fff1f2; color: var(--danger); }

.folder.is-dragover { border-color: var(--color-cta); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-cta) 18%, transparent); }
.folder.is-busy { opacity: 0.72; }
.folder-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 100%;
    margin-top: 0.85rem;
    padding: 1.1rem 1rem;
    border: 1.5px dashed color-mix(in srgb, var(--color-cta) 45%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, var(--color-cta) 6%, white);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.folder-drop small { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.folder.is-dragover .folder-drop { background: color-mix(in srgb, var(--color-cta) 14%, white); border-color: var(--color-cta); }
.folder-drop-status { margin: 0.55rem 0 0; font-size: 0.85rem; color: var(--muted); }
.folder.is-error .folder-drop-status { color: var(--danger); }
.horizon { margin-top: 1.15rem; }
.horizon h3 { font-size: 0.95rem; margin: 0; }
.horizon .doc-hint { margin-top: 0.2rem; }
.doc-list { list-style: none; margin: 0.85rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.doc-card {
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: 14px;
    padding: 0.9rem 1rem 1rem;
    background: #fff;
}
.doc-card.is-ready { border-left-color: #16a34a; }
.doc-card.is-pending, .doc-card.is-extracting { border-left-color: var(--color-cta); }
.doc-card.is-failed { border-left-color: var(--danger); }
.doc-card.is-unreadable { border-left-color: #d97706; }
.doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.doc-title { display: flex; align-items: center; gap: 0.2rem; min-width: 0; }
.doc-name { font-weight: 700; text-decoration: none; }
.doc-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
}
.doc-download:hover { background: #f3f4f6; color: var(--text); }
.doc-download .icon { width: 16px; height: 16px; }
.doc-name:hover { color: var(--color-cta); }
.doc-error, .doc-hint, .doc-fiche { margin: 0.35rem 0 0; font-size: 0.85rem; }
.doc-class .doc-hint {
    margin: 0.35rem 0 0.7rem;
    padding: 0.28rem 0.55rem;
    background: #fff9e6;
    border-radius: 6px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.doc-error { color: var(--danger); }
.doc-hint, .doc-fiche { color: var(--muted); }
.doc-fiche { margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }

.status-rail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0;
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
}
.status-step {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}
.status-step + .status-step::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    margin: 0 0.45rem 0 0.15rem;
    border-radius: 2px;
    background: #d9dee7;
}
.status-step .mark {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #e5e7eb;
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #d1d5db;
}
.status-step.is-done { color: var(--ok); }
.status-step.is-done .mark { background: #16a34a; box-shadow: none; }
.status-rail.is-ready .status-step + .status-step::before { background: #86efac; }
.status-step.is-current { color: var(--text); }
.status-step.is-current .mark {
    background: var(--color-cta);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-cta) 22%, white);
}
.status-rail.is-extracting .status-step.is-current .mark,
.status-rail.is-pending .status-step.is-current .mark {
    animation: doc-pulse 1.2s ease-in-out infinite;
}
.status-step.is-bad { color: var(--danger); }
.status-step.is-bad .mark { background: var(--danger); box-shadow: none; }
.status-step.is-warn { color: #b45309; }
.status-step.is-warn .mark { background: #d97706; box-shadow: none; }

.doc-class { margin-top: 0.9rem; }
.doc-class-label {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.doc-class-label.is-review { color: #b45309; }
.type-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
button.type-chip {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.38rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
}
button.type-chip:hover { filter: none; background: #f6f7fb; }
button.type-chip.is-current {
    background: color-mix(in srgb, var(--color-cta) 14%, white);
    color: #3b2f9e;
    border-color: color-mix(in srgb, var(--color-cta) 55%, white);
}

@keyframes doc-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-cta) 40%, transparent); }
    70% { box-shadow: 0 0 0 7px transparent; }
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem 0.45rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.75rem; color: var(--muted); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.choices { display: flex; flex-direction: column; gap: 0.4rem; }
.choice { display: flex; gap: 0.5rem; align-items: center; }

.login-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) 1.1fr;
    background: var(--bg);
}

.login-aside {
    background: #fff;
    color: var(--text);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--line);
}

.login-aside img { height: 52px; width: auto; }
.login-aside h1 { font-size: 2.3rem; letter-spacing: -0.04em; max-width: 14ch; margin: 2rem 0 0.6rem; }
.login-aside p { color: var(--muted); max-width: 34ch; }

.login-main { display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(440px, 100%); }
.login-card h1 { margin-bottom: 0.35rem; }

.empty {
    border: 1px dashed #d5dae3;
    border-radius: 16px;
    padding: 2rem 1.2rem;
    text-align: center;
    color: var(--muted);
    background: #fff;
}

.picker { position: relative; }

button.picker-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #fff;
    color: var(--text);
    border: 1px solid #d9dee7;
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    text-align: left;
    font-weight: 400;
}

button.picker-toggle:hover { filter: none; background: #fff; }
.picker.is-open button.picker-toggle {
    border-color: var(--color-cta);
    outline: 2px solid color-mix(in srgb, var(--color-cta) 35%, white);
}

.picker-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.picker-toggle .is-placeholder { color: var(--muted); }
.picker-caret { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform 0.15s ease; }
.picker.is-open .picker-caret { transform: rotate(180deg); }

.picker-panel {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.12);
    overflow: hidden;
}

.picker-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.65rem;
    border: 1px solid color-mix(in srgb, var(--color-cta) 55%, #d9dee7);
    border-radius: 10px;
    padding: 0 0.7rem;
    color: var(--muted);
}

.picker-search svg { width: 16px; height: 16px; flex: none; }
.picker-search input {
    border: 0;
    outline: none;
    padding: 0.55rem 0;
    background: transparent;
}

.picker-search input:focus { outline: none; border: 0; }

.picker-options { max-height: 240px; overflow: auto; padding: 0.15rem 0.35rem 0.35rem; }

.picker-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
}

.picker-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--color-cta);
}

.picker-option.is-selected {
    background: color-mix(in srgb, var(--color-cta) 12%, white);
}

.picker-option:hover { background: #f6f7fb; }
.picker-option.is-selected:hover { background: color-mix(in srgb, var(--color-cta) 16%, white); }

.picker-empty, .picker-foot {
    margin: 0;
    padding: 0.7rem 0.85rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}

.picker-foot { border-top: 1px solid var(--line); }

.dossier-home .page-head { align-items: center; margin-bottom: 1.35rem; }
.dossier-home .eyebrow { color: #8b919c; letter-spacing: 0.14em; }
.dossier-home h1 { font-size: 1.85rem; font-weight: 700; line-height: 1.15; }
.dossier-home .lead { margin-top: 0.45rem; font-size: 0.92rem; }

.title-line { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.16rem 0.62rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.pill-live, .pill-ok { background: #e7f6ee; color: #178a45; }
.pill-warn { background: #fff4e5; color: #c2410c; }
.pill-progress { background: color-mix(in srgb, var(--color-cta) 14%, white); color: var(--color-cta); }
.pill-bad { background: #fff1f2; color: var(--danger); }
.pill-muted { background: #f3f4f6; color: #6b7280; }

.kpi-grid, .step-grid, .home-split {
    display: grid;
    gap: 1rem;
}
.kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1.55rem; }
.step-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-split { grid-template-columns: 1.35fr 0.85fr; margin-top: 1rem; }

.section-label {
    margin: 0 0 0.75rem;
    font-size: 1.02rem;
    font-weight: 700;
}

.kpi-card, .step-card, .panel {
    background: #fff;
    border: 1px solid #eceaf2;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.kpi-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 168px;
    padding: 1.15rem 1.25rem 1.15rem;
}
a.kpi-card-link {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.kpi-card-link:hover {
    border-color: #d7d3e2;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
}
.kpi-action {
    margin-left: auto;
    color: #6b7280;
    font-size: 0.88rem;
    font-weight: 600;
}
a.kpi-card-link:hover .kpi-action { color: #111827; }
.kpi-icon, .step-ico {
    display: grid;
    place-items: center;
    flex: none;
    background: #f3f4f7;
    color: #6b7280;
}
.kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f4f2f8;
    color: #6d6578;
}
.kpi-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
}
.kpi-icon .icon, .step-ico .icon { width: 18px; height: 18px; }
.kpi-label { margin: 0; color: #6b7280; font-size: 0.92rem; font-weight: 600; }
.kpi-value {
    margin: 0.9rem 0 0;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}
.kpi-soon {
    margin: 0.9rem 0 0;
    color: #9aa1b0;
    font-size: 1.05rem;
    font-weight: 600;
}
.kpi-card .button {
    margin-left: auto;
    flex: none;
    padding: 0.48rem 0.8rem;
    gap: 0.35rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
}
.kpi-card .button .icon { width: 15px; height: 15px; }

.step-card, .panel {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 1.05rem 1.1rem 0.95rem;
}
.step-card-top { display: flex; align-items: center; gap: 0.7rem; }
.step-card-heading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: nowrap;
    min-width: 0;
}
.step-card-heading h3 { white-space: nowrap; }
.step-counter {
    flex: none;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.step-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f4f2f8;
    color: #6d6578;
}
.step-card h3, .panel h2 { margin: 0; font-size: 0.98rem; font-weight: 700; }
.coming {
    flex: 1;
    display: grid;
    place-items: center;
    margin: 0.85rem 0 0.7rem;
    min-height: 88px;
    border-radius: 12px;
    background: #f7f7fa;
    color: #9aa1b0;
    font-weight: 600;
    font-size: 0.92rem;
}
.step-card .step-foot { margin-top: auto; }
.cir-home-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}
.cir-home-card h3 { margin-top: 0.85rem; }
.cir-home-summary {
    margin: 0.15rem 0 0;
    color: #9aa1b0;
    font-size: 0.86rem;
    font-weight: 600;
}
.cir-home-posts {
    list-style: none;
    margin: 0.85rem 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.62rem;
}
.cir-home-posts li {
    display: grid;
    grid-template-columns: 0.65rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
}
.cir-home-label {
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 650;
}
.cir-home-dot {
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 999px;
}
.cir-home-dot.is-ok { background: #22c55e; }
.cir-home-dot.is-warn { background: #f59e0b; }
.cir-home-dot.is-idle { box-shadow: inset 0 0 0 1.5px #d1d5db; }
.step-foot, .panel-link {
    color: var(--color-cta);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}
.step-foot:hover, .panel-link:hover { text-decoration: underline; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.panel .coming { margin-bottom: 0; }

.panel-todo { min-height: 0; align-self: start; }
.panel-todo .panel-head { flex-wrap: wrap; }
.todo-heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}
.todo-count {
    display: inline-grid;
    place-items: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.38rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-cta) 14%, white);
    color: var(--color-cta);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}
.todo-empty {
    margin: 1rem 0 0.2rem;
    color: #9aa1b0;
    font-size: 0.92rem;
    font-weight: 600;
}
.todo-group + .todo-group {
    margin-top: 0.35rem;
    padding-top: 0.15rem;
}
.todo-group-label {
    margin: 0.9rem 0 0.1rem;
    color: #9aa1b0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.todo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 -0.35rem;
    padding: 0.62rem 0.35rem;
    border-radius: 12px;
    color: #1f2430;
    text-decoration: none;
}
.todo-item + .todo-item { box-shadow: inset 0 1px 0 #f1eef6; }
.todo-link:hover { background: #f7f6fb; }
.todo-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-cta) 12%, white);
    color: var(--color-cta);
}
.todo-ico .icon { width: 16px; height: 16px; }
.todo-label {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
}
.todo-sep { color: #9aa1b0; font-weight: 500; }
.todo-more {
    display: inline-block;
    margin: 0.1rem 0 0.2rem calc(34px + 0.75rem);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-cta);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.todo-more:hover { text-decoration: underline; }
.todo-more[hidden] { display: none; }

.panel-docs { min-height: 0; }
.docs-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.85rem 0 0;
    min-height: 120px;
    padding: 1rem;
    border-radius: 12px;
    background: #f7f7fa;
    color: #9aa1b0;
    text-align: center;
}
.docs-empty p { margin: 0; font-weight: 600; font-size: 0.92rem; }
.recent-docs {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.recent-doc {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f0eef5;
}
.recent-doc:last-child { border-bottom: 0; }
.recent-doc-ext {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #f3f4f7;
    color: #6b7280;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.recent-doc-body { flex: 1; min-width: 0; }
.recent-doc-top {
    display: flex;
    justify-content: space-between;
    gap: 0.55rem;
    align-items: flex-start;
}
.recent-doc-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.recent-doc-meta {
    margin: 0.2rem 0 0;
    color: #9aa1b0;
    font-size: 0.8rem;
}
.recent-docs-add {
    margin-top: 0.55rem;
    align-self: flex-start;
    padding: 0.48rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
}

dialog.modal {
    width: min(480px, calc(100vw - 2rem));
    padding: 0;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(16, 24, 40, 0.18);
}
dialog.modal::backdrop { background: rgba(23, 25, 28, 0.42); }
.modal form { padding: 1.15rem 1.25rem 1.15rem; }
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.icon-button {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 10px;
    background: transparent;
    color: #6b7280;
    border: 0;
}
.icon-button:hover { background: #f3f4f6; filter: none; color: var(--text); }
.icon-button .icon { width: 16px; height: 16px; }

.tech-status {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem 1.25rem;
    margin-top: 0.85rem;
    padding: 0.95rem 1.1rem;
    border-radius: 14px;
    border: 1px solid transparent;
}
.tech-status-main { display: grid; gap: 0.2rem; min-width: 0; flex: 1 1 16rem; }
.tech-status-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.75rem;
}
.tech-status-label {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.tech-status-detail { color: inherit; opacity: 0.88; font-size: 0.92rem; }
.tech-status-count {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: 0.9rem;
}
.tech-status-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.tech-status-warn { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.tech-status-live { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.tech-status-idle { background: #f3f4f6; border-color: #e5e7eb; color: #4b5563; }

.tech-kickoff {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}
.tech-kickoff h2 { margin: 0; }
.tech-kickoff p { margin: 0; color: var(--muted); max-width: 52ch; }

.tech-progress {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0.85rem 0 1.1rem;
}
.tech-progress-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: #eeeef3;
    overflow: hidden;
}
.tech-progress-track span {
    display: block;
    height: 100%;
    background: var(--color-cta);
    border-radius: inherit;
}
.tech-progress p {
    margin: 0;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 650;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.tech-accordion { display: grid; gap: 0.65rem; }
.tech-acc {
    border: 1px solid #ebeaf0;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    scroll-margin-top: 0.75rem;
}
.tech-acc.is-excluded { opacity: 0.72; }
.tech-acc-summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem 1rem;
    padding: 0.95rem 1.05rem;
    cursor: pointer;
}
.tech-acc-summary::-webkit-details-marker { display: none; }
.tech-acc-title { display: grid; gap: 0.25rem; min-width: 0; flex: 1 1 12rem; }
.tech-acc-name { font-weight: 750; font-size: 1.02rem; }
.tech-acc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: center;
}
.tech-acc-aside {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.5rem;
    max-width: min(100%, 34rem);
    cursor: default;
}
.tech-hint {
    font-size: 0.8rem;
    font-weight: 650;
    color: #c2410c;
}
.tech-meta-quiet {
    font-size: 0.8rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.tech-acc-body {
    padding: 0 1.05rem 1.05rem;
    border-top: 1px solid #f0eef5;
}
.tech-sections { display: grid; gap: 0.45rem; margin-top: 0.75rem; }
.tech-section-block {
    border: 1px solid #f0eef5;
    border-radius: 12px;
    background: #fafafa;
    overflow: hidden;
    scroll-margin-top: 0.75rem;
}
.tech-section-head {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
}
.tech-section-head::-webkit-details-marker { display: none; }
.tech-section-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 10rem;
}
.tech-section-name {
    font-weight: 700;
    font-size: 0.94rem;
}
.tech-section-aside {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    cursor: default;
    flex: 0 1 auto;
}
.tech-section-toggle {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid #9ca3af;
    border-bottom: 2px solid #9ca3af;
    transform: rotate(45deg);
    flex: 0 0 auto;
    margin-left: 0.15rem;
    transition: transform 0.15s ease;
}
.tech-section-block[open] > .tech-section-head .tech-section-toggle {
    transform: rotate(225deg);
    margin-top: 0.15rem;
}
.tech-section-body {
    padding: 0 0.85rem 0.85rem;
    display: grid;
    gap: 0.65rem;
}
.tech-mini-btn {
    padding: 0.28rem 0.55rem !important;
    font-size: 0.78rem !important;
    font-weight: 650 !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
    border-radius: 8px !important;
}
.tech-mini-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}
.tech-mini-link:hover { color: var(--text); text-decoration: underline; }
.tech-inline-note {
    margin: 0;
    color: #c2410c;
    font-size: 0.88rem;
    font-weight: 600;
}
.tech-questions {
    display: grid;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: #fffaf5;
    border: 1px solid #f3e0c8;
}
.tech-questions-label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #9a3412;
}
.tech-question {
    display: grid;
    gap: 0.3rem;
}
.tech-question label {
    font-size: 0.88rem;
    font-weight: 550;
    color: #444;
}
.tech-question-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem;
    align-items: end;
}
.tech-edit { display: grid; gap: 0.5rem; }
.tech-edit-form { display: grid; gap: 0.5rem; }
.tech-edit textarea {
    width: 100%;
    min-height: 5.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    font: inherit;
    resize: vertical;
    background: #fff;
}
.tech-question textarea {
    width: 100%;
    min-height: 2.6rem;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    font: inherit;
    font-size: 0.9rem;
    resize: vertical;
    background: #fff;
}
.tech-answer-btn {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8rem !important;
    font-weight: 650 !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
}
.tech-edit-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.75rem;
}
.tech-complete-hint {
    font-size: 0.8rem;
    font-weight: 650;
    color: #c2410c;
}
.diag-badge.is-ok { background: #f0fdf4; color: #166534; }
.diag-badge.is-warn { background: #fff4e5; color: #c2410c; }
.diag-badge.is-live { background: #eef2ff; color: #4338ca; }
.diag-badge.is-idle { background: #f3f4f6; color: #4b5563; }

@media (max-width: 1180px) {
    .step-grid, .home-split { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .app {
        height: auto;
        overflow: visible;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
    }
    .topbar, .sidebar, .workspace { min-width: 0; max-width: 100%; }
    .workspace { overflow: visible; }
    .sidebar { height: auto; overflow: hidden; }
    .sidebar nav { display: flex; gap: 0.35rem; overflow-x: auto; scrollbar-width: none; }
    .sidebar nav::-webkit-scrollbar { display: none; }
    .sidebar nav.nav-main { flex: none; }
    .sidebar nav.nav-foot { margin-top: 0; padding-top: 0; border-top: 0; }
    .nav-label, .sidebar-foot, .brand-copy small { display: none; }
    .steps li { min-width: 7.5rem; }
    .steps { overflow-x: auto; }
    .sidebar nav a { white-space: nowrap; margin: 0; }
    .topbar { flex-wrap: wrap; height: auto; align-items: flex-start; }
    .brand { flex: 1 1 100%; }
    .topbar-tools {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }
    .topbar-switchers { flex: 1 1 auto; justify-content: flex-start; }
    .topbar .user-chip strong { display: none; }
    .stats, .kpi-grid { grid-template-columns: 1fr; }
    .module-links { grid-template-columns: 1fr; }
    .login-wrap { grid-template-columns: 1fr; }
    .login-aside { min-height: 220px; }
    .user-chip small, .user-chip strong { display: none; }
    .soa-kpis, .soa-charts { grid-template-columns: 1fr; }
}

.soa-overview h2 { margin-bottom: 0.15rem; }
.soa-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 0.95rem 0 0.35rem;
}
.soa-kpi {
    background: #f7f6fb;
    border-radius: 14px;
    padding: 0.8rem 0.9rem 0.85rem;
}
.soa-kpi span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}
.soa-kpi strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.7rem;
    letter-spacing: -0.04em;
    line-height: 1;
}
.soa-overview .doc-hint { margin-top: 0.7rem; }
.soa-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
    gap: 1.25rem;
    margin-top: 1.15rem;
}
.soa-overview h3 {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}
.soa-bars { list-style: none; margin: 0.7rem 0 0; padding: 0; }
.soa-bars li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.28rem 0.6rem;
    align-items: baseline;
}
.soa-bars li + li { margin-top: 0.7rem; }
.soa-bar-label {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.88rem;
    font-weight: 600;
}
.soa-track {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    height: 10px;
    border-radius: 999px;
    background: #efeef5;
    overflow: hidden;
}
.soa-track > span { display: block; height: 100%; flex: none; }
.soa-track .is-pub, .soa-legend .is-pub, .soa-mix .is-pub { background: var(--color-cta); }
.soa-track .is-pat, .soa-legend .is-pat, .soa-mix .is-pat { background: #312e81; }
.soa-bars strong {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.soa-legend, .soa-mix ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}
.soa-legend i, .soa-mix i {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.35rem;
    border-radius: 99px;
    vertical-align: 0.05em;
}
.soa-mix-body {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.85rem;
}
.soa-donut {
    width: 118px;
    height: 118px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
}
.soa-donut span {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}
.soa-mix ul { flex-direction: column; gap: 0.4rem; margin: 0; }
.soa-mix li { white-space: nowrap; }
.soa-mix li strong { color: var(--text); font-variant-numeric: tabular-nums; }
.soa-years-block { margin-top: 1.2rem; }
.soa-years {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    height: 132px;
    margin-top: 0.75rem;
}
.soa-year {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.soa-year em {
    margin-bottom: 0.2rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 700;
}
.soa-year-track {
    flex: 1;
    width: 100%;
    max-width: 26px;
    display: flex;
    align-items: flex-end;
    border-radius: 8px;
    background: #f4f3f8;
    overflow: hidden;
}
.soa-year-track span {
    display: block;
    width: 100%;
    min-height: 4px;
    border-radius: 8px 8px 0 0;
    background: var(--color-cta);
}
.soa-year small {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
}

/* Calcul CIR */
.cir-banner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.95rem 1.1rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: #fff8e7;
    border: 1px solid #f0d58a;
    color: #7a4e00;
}
.cir-banner-title {
    margin: 0 0 0.35rem;
    font-weight: 700;
    font-size: 0.95rem;
}
.cir-banner ul {
    margin: 0;
    padding-left: 1.1rem;
}
.cir-banner li + li { margin-top: 0.2rem; }
.cir-line-note {
    margin-top: 0.3rem;
    color: #9a3412;
    font-size: 0.82rem;
    line-height: 1.35;
}
.cir-kpi { margin-bottom: 1.35rem; }
.cir-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.2rem 1.25rem 1.35rem;
    margin-bottom: 1.15rem;
}
.cir-panel-head { margin-bottom: 1rem; }
.cir-panel-head h2 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.cir-panel-head .muted { margin: 0; }
.cir-source-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.cir-source-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1rem 1.05rem;
    background: #faf9fd;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.cir-source-card h3 { margin: 0; font-size: 1rem; }
.cir-source-card p { margin: 0; color: var(--muted); flex: 1; }
.cir-source-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}
.cir-import-form { margin: 0; }
.cir-file-btn { cursor: pointer; }
.cir-file-btn input { display: none; }
.cir-add, .cir-settings, .cir-advanced {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: #fff;
}
.cir-add > summary,
.cir-settings > summary,
.cir-advanced > summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.cir-add > summary::-webkit-details-marker,
.cir-settings > summary::-webkit-details-marker,
.cir-advanced > summary::-webkit-details-marker { display: none; }
.cir-add-form { margin-top: 1rem; }
.cir-section { margin-top: 1.35rem; }
.cir-project-form select {
    width: auto;
    min-width: 12rem;
    max-width: 18rem;
    padding: 0.35rem 0.55rem;
    font-size: 0.88rem;
}
.cir-section h3 {
    margin: 0 0 0.55rem;
    font-size: 0.98rem;
}
.cir-lines th.num,
.cir-lines td.num {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}
.cir-lines .money {
    display: inline-block;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: #f3f1fb;
    color: #241c3a;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 0.92rem;
    letter-spacing: -0.02em;
    line-height: 1.35;
}
.field-help {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}
.cir-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.55rem 1rem;
    margin-top: 0.75rem;
}
.cir-checks label,
.cir-check-block {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    color: var(--text);
}
.cir-check-block span { display: flex; flex-direction: column; gap: 0.15rem; }
.cir-recap-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}
.cir-recap-grid > div {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
    background: #faf9fd;
}
.cir-recap-value {
    margin: 0.2rem 0 0;
    font-size: 1.25rem;
    font-weight: 700;
}
.cir-period-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem 1rem 1rem;
    margin: 0 0 0.85rem;
}
.cir-period-card legend {
    padding: 0 0.35rem;
    font-weight: 700;
}
.cir-schedule-form h3 {
    margin: 1.25rem 0 0.65rem;
    font-size: 1rem;
}
@media (max-width: 900px) {
    .cir-source-grid,
    .cir-recap-grid { grid-template-columns: 1fr; }
}

/* Exercice / barÃÂÃÂ¨me ÃÂÃÂ pleine largeur */
.form-card-wide,
.cir-year-page .card,
.cir-year-page .form-card {
    max-width: none;
    width: 100%;
}
.cir-year-page .grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.cir-year-page .cir-schedule-form .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cir-year-page .cir-period-card .grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.cir-year-page .cir-banner,
.cir-year-page .page-head {
    width: 100%;
}
@media (max-width: 1100px) {
    .cir-year-page .cir-schedule-form .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 700px) {
    .cir-year-page .cir-schedule-form .grid {
        grid-template-columns: 1fr;
    }
}
