/*!
 * Espace Finance Maison Montagut, feuille de style v1.3.0 (2026-10-30)
 * Charte montagut.com : noir et blanc, capitales espacées pour la marque et la navigation,
 * gris chiné (couleur de maille) en surface secondaire, angles vifs.
 * Aucun style en ligne : compatible avec la CSP stricte de l'application.
 */

@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
    --ink: #000;
    --text: #1a1a1a;
    --muted: #6b6b68;
    --paper: #fff;
    --chine: #eeeeec;
    --chine-deep: #e3e3e0;
    --rule: #d9d9d6;
    --rule-strong: #b5b5b1;
    --sapin: #2e5a43;
    --sapin-bg: #edf3ef;
    --camel: #8a5a1e;
    --camel-bg: #f7f1e7;
    --prune: #6e2a3e;
    --prune-bg: #f6eff1;
    --ardoise: #3e5568;
    --ardoise-bg: #eef2f5;

    /* code couleur unique de l'interface */
    --ok: var(--sapin);        --ok-bg: var(--sapin-bg);
    --warning: var(--camel);   --warning-bg: var(--camel-bg);
    --error: var(--prune);     --error-bg: var(--prune-bg);
    --info: var(--ardoise);    --info-bg: var(--ardoise-bg);
    --muted-c: #8f8f8a;        --muted-bg: #f4f4f2;

    --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
    --sans: "Jost", "Futura", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
    --caps: .16em;

    --wrap: 1200px;
    --gutter: clamp(18px, 4vw, 40px);
    --gap: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
    margin: 0; background: var(--paper); color: var(--text);
    font: 400 15px/1.6 var(--sans); font-feature-settings: "lnum", "tnum";
    -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
img, svg { display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
strong { font-weight: 500; color: var(--ink); }
code { font: 13px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--chine); padding: 1px 5px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0; line-height: 1.15; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--ink); color: var(--paper); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon--large { width: 30px; height: 30px; stroke-width: 1.2; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.link { font-size: 14px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); }
.link:hover { text-decoration-color: var(--ink); }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 10; }
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ En-tête */
.masthead { background: var(--paper); border-bottom: 1px solid var(--ink); }
.masthead__bar { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.wordmark { display: flex; flex-direction: column; text-decoration: none; margin-right: auto; }
.wordmark__name { font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); }
.wordmark__app { font-size: 13px; color: var(--muted); margin-top: 6px; letter-spacing: .02em; }
.account-menu { display: flex; align-items: center; gap: 6px; }
.account-menu__user { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 6px 10px 6px 6px; }
.account-menu__user:hover, .account-menu__user.is-active { background: var(--chine); }
.account-menu__name { font-size: 14px; }
.account-menu__logout { display: grid; place-items: center; width: 40px; height: 40px; color: var(--muted); }
.account-menu__logout:hover { color: var(--ink); background: var(--chine); }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--chine-deep); color: var(--ink); font-size: 12px; font-weight: 500; letter-spacing: .04em; flex: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); width: 42px; height: 42px; place-items: center; cursor: pointer; color: var(--ink); }

.mainnav { border-top: 1px solid var(--rule); }
.mainnav__list { display: flex; flex-wrap: wrap; gap: 0 34px; list-style: none; margin: 0 auto; }
.mainnav__list a { display: block; padding: 15px 0 14px; font-size: 12.5px; font-weight: 500; letter-spacing: var(--caps); text-transform: uppercase; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mainnav__list a:hover { color: var(--ink); }
.mainnav__list a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.mainnav__sep { width: 1px; background: var(--rule); margin: 12px 0; }

/* ------------------------------------------------------------------ Page */
.page { flex: 1; padding-top: 44px; padding-bottom: 72px; }
.page:focus { outline: none; }
.colophon { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 22px; padding-bottom: 28px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); }

.hero { max-width: 820px; margin-bottom: 44px; }
.hero__date { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.hero__title { font-size: clamp(34px, 5vw, 52px); font-weight: 400; line-height: 1.06; letter-spacing: -.005em; margin-bottom: 18px; }
.hero__lead { font-size: 17px; max-width: 64ch; color: var(--text); }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.page-head__title { font-size: clamp(32px, 4vw, 42px); font-weight: 400; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.page-head__lead { max-width: 72ch; margin-top: 10px; color: var(--muted); }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { font-size: 13px; margin-bottom: 8px; color: var(--muted); }
.crumb a { color: var(--muted); }

.grid { display: grid; gap: var(--gap); }
.grid--dashboard { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.stack { display: grid; gap: var(--gap); }

.section { margin-top: 56px; }
.section:first-child { margin-top: 0; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section__head--stack { display: block; }
.section__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section__title { font-size: 28px; font-weight: 500; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.section__title .pill { font-family: var(--sans); }
.section__lead { max-width: 78ch; color: var(--muted); margin-top: 8px; }

.panel { background: var(--paper); border: 1px solid var(--rule); padding: 28px; }
.panel--feature { background: var(--chine); border-color: var(--chine); }
.panel--narrow { max-width: 620px; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.panel__title { font-size: 23px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.panel__head .panel__title { margin-bottom: 0; }
.panel--error { border-color: var(--prune); border-left-width: 4px; margin-bottom: 32px; }
.panel--error .panel__title { color: var(--prune); }
.panel--progress { display: flex; gap: 28px; align-items: center; margin-bottom: 32px; background: var(--chine); border-color: var(--chine); }
.empty { color: var(--muted); padding: 22px 0; font-style: normal; }
.footnote { margin-top: 48px; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ Boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 46px; padding: 12px 24px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
    font: 500 12.5px/1 var(--sans); letter-spacing: var(--caps); text-transform: uppercase; text-decoration: none;
    cursor: pointer; transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .3; cursor: not-allowed; background: var(--ink); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--large { min-height: 56px; padding-inline: 34px; font-size: 13px; }
.btn--small { min-height: 36px; padding: 8px 14px; font-size: 11.5px; }
.btn--block { width: 100%; }
.btn .icon { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: none; position: relative; }
.icon-btn:hover { color: var(--ink); background: var(--chine); }
.icon-btn--danger:hover { color: var(--prune); background: var(--prune-bg); }
.icon-btn--file:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.actions { white-space: nowrap; text-align: right; }
.actions form { display: inline; }
.actions > * { vertical-align: middle; }

/* ------------------------------------------------------------------ Messages */
.notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin-bottom: 24px; border: 1px solid var(--rule); border-left: 3px solid var(--ink); background: var(--paper); }
.notice p { flex: 1; margin: 0; }
.notice > .icon { margin-top: 2px; }
.notice--success { border-left-color: var(--sapin); background: var(--sapin-bg); }
.notice--success > .icon { color: var(--sapin); }
.notice--error { border-left-color: var(--prune); background: var(--prune-bg); }
.notice--error > .icon { color: var(--prune); }
.notice--warning { border-left-color: var(--camel); background: var(--camel-bg); }
.notice--warning > .icon { color: var(--camel); }
.notice__close { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--muted); }
.notice__close:hover { color: var(--ink); }

.status { display: inline-flex; align-items: center; gap: 7px; font: 500 13px/1.2 var(--sans); color: var(--text); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }
.status--queued { color: var(--camel); }
.status--running { color: var(--ink); }
.status--running::before { animation: pulse 1.2s ease-in-out infinite; }
.status--succeeded { color: var(--sapin); }
.status--failed { color: var(--prune); }
.status--off { color: var(--muted); }
.page-head__title .status { font-size: 14px; }
@keyframes pulse { 50% { opacity: .2; } }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); border: 1px solid var(--rule); padding: 3px 9px; }
.tag .icon { width: 13px; height: 13px; }

/* ------------------------------------------------------------------ Formulaires */
.form { display: grid; gap: 18px; }
.form__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .field > legend { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.optional { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="search"], .field input[type="date"], .field select, .password input {
    width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: 0; background: var(--paper);
    font: inherit; color: var(--text); appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field input:focus, .field select:focus, .password input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field input::placeholder { color: #9a9a96; }
.field__help { font-size: 13px; color: var(--muted); margin: 0; }
.field__errors { list-style: none; margin: 0; padding: 0; color: var(--prune); font-size: 13.5px; }
.field--error input, .field--error select { border-color: var(--prune); }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; }
.check input, .choice input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 12px 14px; border: 1px solid var(--rule); }
.choice:has(input:checked) { border-color: var(--ink); }
.choice:has(input:disabled) { opacity: .6; cursor: default; }
.password { position: relative; }
.password input { padding-right: 48px; }
.password__toggle { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 44px; border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.password__toggle:hover, .password__toggle[aria-pressed="true"] { color: var(--ink); }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.meter__bar { height: 3px; background: var(--rule); position: relative; overflow: hidden; }
.meter__bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--meter, 0%); background: var(--meter-color, var(--prune)); transition: width .2s; }

.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 20px; background: var(--chine); margin-bottom: 28px; }
.toolbar .field { min-width: 150px; }
.toolbar .field--grow { flex: 1; min-width: 220px; }
.toolbar__actions { display: flex; align-items: center; gap: 16px; }

/* ------------------------------------------------------------------ Tableaux */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 0 12px 10px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.table td { padding: 15px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table--compact td { padding-block: 10px; }
.table tbody tr:hover td { background: #fafaf9; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { padding-block: 9px; }
.table__note { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.table__key { font-family: var(--serif); font-size: 21px; line-height: 1; text-decoration: none; color: var(--ink); }
.table__key:hover { text-decoration: underline; }
.table tr.is-muted td { color: var(--muted); }
.person { display: flex; align-items: center; gap: 12px; }

.file { display: flex; gap: 12px; align-items: flex-start; }
.file__icon { margin-top: 2px; color: var(--muted); }
.file__body { display: grid; gap: 2px; min-width: 0; }
.file__name { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.file__summary { font-size: 13.5px; color: var(--muted); }
.file__warning { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--camel); }
.file__warning .icon { width: 14px; height: 14px; margin-top: 3px; }

.pager { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 28px; font-size: 14px; }
.pager__state { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.filters__item { padding: 8px 14px; border: 1px solid var(--rule); font-size: 13.5px; text-decoration: none; color: var(--muted); }
.filters__item span { color: var(--ink); margin-left: 4px; }
.filters__item[aria-current] { border-color: var(--ink); color: var(--ink); }
.kind { font-size: 13px; color: var(--muted); white-space: nowrap; }
.kind.is-alert { color: var(--prune); }

/* ------------------------------------------------------------------ Tableau de bord */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist__item { display: grid; grid-template-columns: 30px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule); }
.checklist__item:first-child { border-top: 0; padding-top: 4px; }
.checklist__mark { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--rule-strong); color: var(--muted); }
.checklist__mark .icon { width: 15px; height: 15px; stroke-width: 2; }
.is-ok .checklist__mark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.is-missing .checklist__mark { border-color: var(--prune); color: var(--prune); background: var(--prune-bg); }
.is-warn .checklist__mark { border-color: var(--camel); color: var(--camel); background: var(--camel-bg); }
.checklist__label { font-weight: 500; color: var(--ink); text-decoration: none; }
.checklist__label:hover { text-decoration: underline; }
.checklist__detail { font-size: 14px; color: var(--muted); margin: 2px 0 0; }
.checklist__detail strong { color: var(--camel); font-weight: 400; }
.is-missing .checklist__detail { color: var(--prune); }

/* 12 mailles : un point par mois de paie */
.stitches { display: flex; gap: 4px; list-style: none; margin: 10px 0 0; padding: 0; }
.stitch { width: 26px; height: 30px; display: grid; place-items: center; font-size: 10.5px; border: 1px solid var(--rule); color: var(--muted); position: relative; }
.stitch--done { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.stitch--missing { border-color: var(--prune); border-style: dashed; color: var(--prune); }
.stitch--future { background: var(--chine); border-color: var(--chine); }

.launch { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--ink); }
.launch .btn { justify-self: start; }
.launch__hint { font-size: 13.5px; color: var(--camel); margin: 0; }

.deliverable__name { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; margin-bottom: 6px; }
.deliverable__name .icon { margin-top: 3px; }
.deliverable__meta { font-size: 14px; color: var(--muted); }
.deliverable__alerts { display: flex; gap: 8px; align-items: center; color: var(--camel); font-size: 14px; }
.deliverable__alerts a { color: var(--camel); }
.panel--feature .btn { margin-top: 20px; }

.figures { margin: 22px 0 18px; display: grid; gap: 16px; }
.figure dt { font-size: 13px; color: var(--muted); }
.figure dd { margin: 0; }
.figure__value { font-family: var(--serif); font-size: 34px; line-height: 1.1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.figure__value--muted { font-size: 26px; color: var(--muted); }
.figure__delta { font-size: 13.5px; font-weight: 500; }
.figure__delta.is-up { color: var(--sapin); }
.figure__delta.is-down { color: var(--prune); }

/* ------------------------------------------------------------------ Génération */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.summary__item { padding: 20px 24px 22px 0; display: grid; gap: 4px; align-content: start; }
.summary__item + .summary__item { padding-left: 24px; border-left: 1px solid var(--rule); }
.summary__label { font-size: 13px; color: var(--muted); }
.summary__value { font-family: var(--serif); font-size: 30px; line-height: 1.1; color: var(--ink); }
.summary__value--muted { color: var(--muted); }
.summary__value--small { font-size: 22px; }

.alerts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.alert { display: grid; grid-template-columns: 22px 130px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.alert .icon { margin-top: 2px; }
.alert--erreur .icon { color: var(--prune); }
.alert--attention .icon { color: var(--camel); }
.alert--info .icon { color: var(--muted); }
.alert__theme { color: var(--muted); font-size: 13.5px; }
.alert--erreur .alert__text { color: var(--prune); }

.option { border: 1px solid var(--rule); padding: 24px; display: grid; gap: 14px; align-content: start; }
.option__title { font-size: 21px; display: flex; gap: 10px; align-items: center; }
.option__text { color: var(--muted); font-size: 14.5px; }
.option .btn { justify-self: start; }

.trace { margin-top: 16px; }
.trace summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.trace pre { max-height: 360px; overflow: auto; background: var(--chine); padding: 14px; font-size: 12px; white-space: pre-wrap; }

/* métier à tisser : indicateur d'attente */
.loom { display: flex; gap: 5px; align-items: flex-end; height: 44px; flex: none; }
.loom span { width: 5px; height: 100%; background: var(--ink); transform-origin: bottom; animation: loom 1.1s ease-in-out infinite; }
.loom span:nth-child(2) { animation-delay: .12s; }
.loom span:nth-child(3) { animation-delay: .24s; }
.loom span:nth-child(4) { animation-delay: .36s; }
.loom span:nth-child(5) { animation-delay: .48s; }
@keyframes loom { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* ------------------------------------------------------------------ Fichiers */
.tabs { display: flex; gap: 32px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin: -12px 0 40px; position: sticky; top: 0; background: var(--paper); z-index: 2; }
.tabs a { padding: 14px 0 13px; font-size: 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.tabs span { color: var(--ink); margin-left: 4px; font-size: 13px; }

.dropzone { position: relative; margin: 20px 0; }
.dropzone__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone__zone { display: grid; justify-items: center; gap: 6px; padding: 30px 20px; border: 1px dashed var(--rule-strong); text-align: center; cursor: pointer; transition: background-color .15s, border-color .15s; }
.dropzone__zone .icon { color: var(--muted); margin-bottom: 4px; }
.dropzone__label { font-weight: 500; color: var(--ink); }
.dropzone__hint { font-size: 13px; color: var(--muted); }
.dropzone:hover .dropzone__zone, .dropzone.is-dragover .dropzone__zone { border-color: var(--ink); border-style: solid; background: var(--chine); }
.dropzone:focus-within .dropzone__zone { outline: 2px solid var(--ink); outline-offset: 2px; }
.dropzone.is-busy { pointer-events: none; opacity: .55; }

.queue { list-style: none; margin: 0 0 24px; padding: 0; border: 1px solid var(--rule); }
.queue__item { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--rule); }
.queue__item:first-child { border-top: 0; }
.queue__name { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.queue__msg { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.queue__state { font-size: 13px; color: var(--muted); white-space: nowrap; }
.queue__bar { grid-column: 2 / -1; height: 2px; background: var(--rule); position: relative; overflow: hidden; }
.queue__bar span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); transition: width .2s; }
.queue__item.is-checking .queue__bar span { width: 30% !important; animation: slide 1.2s ease-in-out infinite; }
.queue__item.is-done .queue__bar, .queue__item.is-error .queue__bar { display: none; }
.queue__item.is-done > .icon { color: var(--sapin); }
.queue__item.is-done .queue__state { color: var(--sapin); }
.queue__item.is-error > .icon, .queue__item.is-error .queue__state, .queue__item.is-error .queue__msg { color: var(--prune); }
.queue__warn { color: var(--camel); }
.queue__footer { display: flex; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid var(--rule); background: var(--chine); }
@keyframes slide { from { left: -30%; } to { left: 100%; } }

.years { display: flex; gap: 4px; }
.years a { padding: 5px 12px; font-size: 14px; text-decoration: none; color: var(--muted); border: 1px solid transparent; }
.years a[aria-current] { border-color: var(--ink); color: var(--ink); }

.months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; list-style: none; margin: 0 0 20px; padding: 0; border-left: 1px solid var(--rule); border-top: 1px solid var(--rule); }
.month { display: grid; gap: 4px; align-content: start; min-height: 150px; padding: 16px 14px 12px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); position: relative; }
.month::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; }
.month--done::before { background: var(--ink); }
.month--missing::before { background: var(--prune); }
.month--future { background: #fafaf9; }
.month__name { font-family: var(--serif); font-size: 21px; color: var(--ink); }
.month--future .month__name { color: var(--muted); }
.month__detail { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.month--missing .month__detail { color: var(--prune); }
.month--future .month__detail { color: var(--muted); }
.month__meta { font-size: 12.5px; color: var(--muted); }
.month__actions { display: flex; gap: 0; margin: 6px 0 0 -9px; }
.month__actions form { display: inline; }

.doc { display: grid; gap: 14px; align-content: start; }
.doc--frozen { margin-top: var(--gap); background: var(--chine); border-color: var(--chine); }
.doc__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.doc__title { font-size: 23px; }
.doc__desc { color: var(--muted); font-size: 14.5px; margin: 0; }
.doc__current { border-top: 1px solid var(--ink); padding-top: 16px; display: grid; gap: 10px; }
.doc__meta { font-size: 13.5px; color: var(--muted); margin: 0; }
.doc__actions { display: flex; gap: 10px; }
.doc__missing { display: flex; gap: 8px; align-items: center; color: var(--prune); margin: 0; }
.doc__missing--optional { color: var(--muted, #6B6B68); align-items: flex-start; } /* v1.2.0 : fichier facultatif (budgets) */
.doc .dropzone { margin: 4px 0 0; }
.doc .dropzone__zone { padding: 20px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule-strong); }

.versions { margin-top: 20px; }
.versions summary { cursor: pointer; font-size: 14px; color: var(--muted); padding: 6px 0; list-style-position: inside; }
.versions summary:hover { color: var(--ink); }
.versions[open] summary { margin-bottom: 10px; color: var(--ink); }

/* ------------------------------------------------------------------ Accès IP */
.state-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.state-panel__body { display: flex; gap: 18px; align-items: flex-start; }
.state-panel__body .icon { color: var(--muted); }
.state-panel.is-on { border-color: var(--ink); border-left-width: 4px; }
.state-panel.is-on .icon { color: var(--ink); }
.state-panel .panel__title { margin-bottom: 6px; }

/* ------------------------------------------------------------------ Connexion */
.is-gate { background: var(--paper); }
.gate { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.gate__brand { background: var(--chine); padding: clamp(32px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; }
.gate__wordmark { font-family: var(--serif); font-size: clamp(40px, 6vw, 76px); line-height: 1.02; letter-spacing: .22em; text-transform: uppercase; color: var(--ink); margin-bottom: 28px; }
.gate__tagline { font-size: 15px; letter-spacing: var(--caps); text-transform: uppercase; color: var(--ink); padding-top: 22px; border-top: 1px solid var(--ink); max-width: 360px; margin-bottom: 14px; }
.gate__note { color: var(--muted); max-width: 42ch; }
.gate__panel { display: flex; align-items: center; justify-content: center; padding: 48px var(--gutter); }
.gate__inner { width: 100%; max-width: 380px; }
.gate__title { font-size: 36px; font-weight: 400; margin-bottom: 18px; }
.gate__lead { color: var(--muted); margin-bottom: 22px; }
.gate__code { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.gate__aside { margin-top: 22px; font-size: 14px; text-align: center; }
.gate .form { margin-bottom: 4px; }

/* ------------------------------------------------------------------ Dialogue de confirmation */
.dialog { border: 0; padding: 0; max-width: min(460px, calc(100vw - 32px)); background: var(--paper); color: var(--text); }
.dialog::backdrop { background: rgba(0, 0, 0, .5); }
.dialog__inner { padding: 30px; border-top: 3px solid var(--ink); }
.dialog__title { font-size: 26px; margin-bottom: 12px; }
.dialog__text { color: var(--text); margin-bottom: 24px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dialog[open] { animation: rise .18s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------------ Adaptatif */
/* ================================================================== v1.1 : parcours, codes couleur, 2FA */

/* pastilles, étiquettes et légende */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted-c); flex: none; }
.dot--ok { background: var(--ok); }
.dot--warning { background: var(--warning); }
.dot--error { background: var(--error); }
.dot--info { background: var(--info); }
.dot--muted { background: #c9c9c4; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--muted-bg); color: var(--muted); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--warning { background: var(--warning-bg); color: var(--warning); }
.pill--error { background: var(--error-bg); color: var(--error); }
.pill--info { background: var(--info-bg); color: var(--info); }
.pill.is-pulsing::before { animation: pulse 1.2s ease-in-out infinite; }
.page-head__title .pill { font-family: var(--sans); font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 14px 0 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }

/* accueil */
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; margin-bottom: 36px; }
.welcome__date { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.welcome__title { font-size: clamp(36px, 5vw, 54px); font-weight: 400; line-height: 1.04; margin-bottom: 14px; }
.welcome__lead { font-size: 18px; max-width: 54ch; }
.latest { border: 1px solid var(--rule); border-top: 3px solid var(--ink); padding: 22px 24px; background: var(--paper); }
.latest__title { font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: var(--caps); text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.latest__name { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; margin-bottom: 4px; }
.latest__name .icon { margin-top: 3px; }
.latest__meta { font-size: 13.5px; color: var(--muted); }
.latest__figure { font-family: var(--serif); font-size: 32px; line-height: 1.1; color: var(--ink); margin: 16px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.latest__caption { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.latest__link { display: block; margin-top: 12px; font-size: 13.5px; text-align: center; color: var(--muted); }
.latest__empty { color: var(--muted); font-size: 14.5px; }
.delta { font-family: var(--sans); font-size: 13px; font-weight: 500; }
.delta.is-up { color: var(--ok); }
.delta.is-down { color: var(--error); }

/* étapes 1-2-3 */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; counter-reset: none; }
.step a { display: flex; gap: 14px; align-items: center; height: 100%; padding: 16px 18px; border: 1px solid var(--rule); border-left: 4px solid var(--muted-c); background: var(--paper); text-decoration: none; transition: border-color .15s, background-color .15s; }
.step a:hover { background: #fafaf9; }
.step__num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; font-family: var(--serif); font-size: 19px; color: var(--paper); background: var(--muted-c); }
.step__body { display: grid; gap: 2px; min-width: 0; }
.step__title { font-weight: 500; color: var(--ink); }
.step__state { font-size: 13.5px; color: var(--muted); }
.step--ok a { border-left-color: var(--ok); } .step--ok .step__num { background: var(--ok); } .step--ok .step__state { color: var(--ok); }
.step--warning a { border-left-color: var(--warning); } .step--warning .step__num { background: var(--warning); } .step--warning .step__state { color: var(--warning); }
.step--error a { border-left-color: var(--error); } .step--error .step__num { background: var(--error); } .step--error .step__state { color: var(--error); }
.step--info a { border-left-color: var(--info); } .step--info .step__num { background: var(--info); } .step--info .step__state { color: var(--info); }
.step--action a { border-left-color: var(--ink); background: var(--ink); } .step--action .step__num { background: var(--paper); color: var(--ink); }
.step--action .step__title, .step--action .step__state { color: var(--paper); }
.step--action a:hover { background: #1f1f1f; }

/* sections numérotées */
.stage { margin-top: 48px; scroll-margin-top: 20px; }
.stage__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.stage__title { font-size: 28px; display: flex; align-items: center; gap: 14px; }
.stage__num { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--ink); border-radius: 50%; font-size: 17px; flex: none; }

/* tuiles de fichiers */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; border: 1px solid var(--rule); border-top: 4px solid var(--muted-c); background: var(--paper); }
.tile--ok { border-top-color: var(--ok); }
.tile--warning { border-top-color: var(--warning); }
.tile--error { border-top-color: var(--error); background: var(--error-bg); }
.tile--muted { border-top-color: #d6d6d2; }
.tile__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px 0; }
.tile__title { font-size: 20px; line-height: 1.2; }
.tile__tag { font-size: 12px; color: var(--muted); padding: 2px 18px 0; margin: 0; }
.tile__body { flex: 1; padding: 10px 18px 14px; font-size: 14px; color: var(--text); }
.tile__body p { margin: 0 0 4px; overflow-wrap: anywhere; }
.tile--warning .tile__body p + p { color: var(--warning); }
.tile--error .tile__body { color: var(--error); }
.tile__action { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 18px; border-top: 1px solid var(--rule); font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: none; }
.tile__action:hover { background: var(--chine); }
.tile__action .icon { width: 16px; height: 16px; }
.tile .stitches { margin-top: 10px; }

/* vérifications */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 16px; border-left: 4px solid var(--muted-c); background: var(--muted-bg); }
.check .icon { margin-top: 2px; }
.check--error { border-left-color: var(--error); background: var(--error-bg); } .check--error .icon, .check--error .check__title { color: var(--error); }
.check--warning { border-left-color: var(--warning); background: var(--warning-bg); } .check--warning .icon, .check--warning .check__title { color: var(--warning); }
.check--info { border-left-color: var(--info); background: var(--info-bg); } .check--info .icon { color: var(--info); }
.check__title { font-weight: 500; color: var(--ink); margin: 0; overflow-wrap: anywhere; }
.check__detail { font-size: 14px; margin: 2px 0 0; color: var(--text); }
.check__link { font-size: 13.5px; font-weight: 500; color: var(--ink); white-space: nowrap; align-self: center; }
.checks__group { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .04em; margin: 22px 0 10px; }
.checks__group span { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--muted-bg); }
.checks__group--error { color: var(--error); } .checks__group--warning { color: var(--warning); } .checks__group--info { color: var(--info); }
.all-clear { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 14px 16px; background: var(--ok-bg); color: var(--ok); border-left: 4px solid var(--ok); }

/* lancement */
.launch-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: end; padding: 26px 28px; border: 2px solid var(--ink); background: var(--paper); }
.launch-panel.is-disabled { border-color: var(--rule-strong); }
.launch-panel__fields { display: grid; gap: 14px; }
.launch-panel__action { display: grid; gap: 10px; justify-items: end; text-align: right; max-width: 320px; }
.launch-panel__hint { font-size: 13.5px; color: var(--muted); margin: 0; }
.check-option { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14.5px; }
.check-option input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.check-option small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* bandeaux d'état (génération) */
.band { display: flex; flex-wrap: wrap; gap: 16px 22px; align-items: center; padding: 20px 24px; margin-bottom: 28px; border-left: 4px solid var(--ink); background: var(--chine); }
.band__body { flex: 1; min-width: 240px; }
.band__title { font-family: var(--serif); font-size: 24px; color: var(--ink); margin: 0 0 2px; display: flex; gap: 10px; align-items: center; }
.band__text { margin: 0; }
.band--ok { border-left-color: var(--ok); background: var(--ok-bg); } .band--ok > .icon, .band--ok .band__title { color: var(--ok); }
.band--info { border-left-color: var(--info); background: var(--info-bg); } .band--info .band__title { color: var(--info); }
.band--info .loom span { background: var(--info); }
.band--error { display: block; border-left-color: var(--error); background: var(--error-bg); } .band--error .band__title { color: var(--error); margin-bottom: 8px; }

/* fichiers : onglets à pastille, zone de dépôt, avertissements d'information */
.tabs a { display: inline-flex; align-items: center; gap: 8px; }
.dropzone__zone { gap: 8px; padding: 34px 20px; border: 1.5px dashed var(--ink); background: repeating-linear-gradient(135deg, #f7f7f5 0 10px, #f2f2ef 10px 20px); }
.dropzone__zone .icon { width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: var(--ink); color: var(--paper); stroke-width: 1.8; margin-bottom: 6px; }
.dropzone__label { font-size: 16px; }
.dropzone__label::after { content: " : glissez-déposez ou cliquez"; font-weight: 400; color: var(--muted); }
.dropzone:hover .dropzone__zone, .dropzone.is-dragover .dropzone__zone { background: var(--info-bg); border-color: var(--info); border-style: solid; }
.dropzone:hover .dropzone__zone .icon, .dropzone.is-dragover .dropzone__zone .icon { background: var(--info); }
.file__warning--info { color: var(--info); }

/* en-tête et connexion : logo */
.wordmark__logo { display: block; height: 34px; width: auto; mix-blend-mode: multiply; }
.gate__logo { display: block; width: min(340px, 80%); height: auto; mix-blend-mode: multiply; margin-bottom: 30px; }
.gate__step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--info); background: var(--info-bg); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.gate__step .icon { width: 16px; height: 16px; }
.gate--wide { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
.gate--wide .gate__inner { max-width: 640px; }
.gate--wide .gate__wordmark { font-size: clamp(26px, 3.2vw, 44px); letter-spacing: .18em; }
.gate--wide .gate__logo { width: min(240px, 80%); }
.gate__aside--split { display: flex; justify-content: space-between; gap: 16px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* champ de code à 6 chiffres */
.otp { font: 500 30px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace !important; letter-spacing: .5em; text-align: center; min-height: 64px !important; padding: 10px 0 10px .5em !important; border: 1.5px solid var(--ink) !important; }
.otp::placeholder { color: #c9c9c4; }
.otp.is-backup { font-size: 22px !important; letter-spacing: .2em; padding-left: .2em !important; }
.otp--small { font-size: 20px !important; min-height: 46px !important; letter-spacing: .35em; max-width: 220px; }

/* activation */
.setup { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 22px; }
.setup__step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--rule); }
.setup__step:last-child { border-bottom: 0; }
.setup__num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 19px; }
.setup__title { font-family: var(--sans); font-size: 16px; font-weight: 500; margin: 6px 0 6px; }
.setup__text { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.setup__text--small { font-size: 12.5px; }
.setup__qr { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; margin-top: 10px; }
.setup__manual { flex: 1; min-width: 220px; }
.setup__form { grid-template-columns: minmax(0, 260px) auto; align-items: end; gap: 12px; }
.setup__grow { min-width: 0; }
.qr { width: 196px; height: 196px; padding: 10px; background: #fff; border: 1px solid var(--rule); flex: none; }
.qr svg { width: 100%; height: 100%; }
.secret { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.secret code { font-size: 15px; letter-spacing: .08em; padding: 8px 10px; background: var(--chine); word-break: break-all; }

/* codes de secours */
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0 0 16px; padding: 18px; background: var(--chine); counter-reset: code; }
.backup-codes li { display: flex; gap: 10px; align-items: baseline; counter-increment: code; }
.backup-codes li::before { content: counter(code); font-size: 11px; color: var(--muted); width: 14px; text-align: right; }
.backup-codes code { background: none; padding: 0; font-size: 17px; letter-spacing: .1em; color: var(--ink); }
.backup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.btn.is-locked { opacity: .3; pointer-events: none; }
.gate .check-option { margin-bottom: 16px; }

/* Mon compte : sécurité */
.panel--security { border-left: 4px solid var(--ok); margin-bottom: var(--gap); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 48px; margin: 0 0 18px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; color: var(--ink); }
.facts dd.is-warning { color: var(--warning); }
.security-actions { display: grid; gap: 10px; justify-items: start; }
.disclosure { width: 100%; border: 1px solid var(--rule); }
.disclosure summary { cursor: pointer; padding: 12px 16px; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.disclosure[open] summary { border-bottom: 1px solid var(--rule); }
.form--inline { padding: 16px; grid-template-columns: minmax(0, 1fr); }
.form--inline .btn { justify-self: start; }

@media (max-width: 1080px) {
    .months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .grid--dashboard, .grid--2 { grid-template-columns: 1fr; }
    .welcome { grid-template-columns: 1fr; }
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gate--wide { grid-template-columns: 1fr; }
    .gate { grid-template-columns: 1fr; }
    .gate__brand { min-height: auto; padding-block: 40px; }
    .gate__wordmark { font-size: 40px; margin-bottom: 18px; }
}
@media (max-width: 760px) {
    :root { --gap: 24px; }
    .masthead__bar { min-height: 68px; gap: 12px; }
    .wordmark__name { font-size: 16px; letter-spacing: .18em; white-space: nowrap; }
    .account-menu__name { display: none; }
    .nav-toggle { display: grid; }
    .mainnav { display: none; }
    .mainnav.is-open { display: block; }
    .mainnav__list { flex-direction: column; gap: 0; }
    .mainnav__list a { border-bottom: 1px solid var(--rule); border-left: 2px solid transparent; padding-left: 12px; }
    .mainnav__list a[aria-current] { border-bottom-color: var(--rule); border-left-color: var(--ink); }
    .mainnav__sep { display: none; }
    .page { padding-top: 28px; }
    .panel { padding: 20px; }
    .months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .alert { grid-template-columns: 22px 1fr; }
    .steps, .tiles { grid-template-columns: 1fr; }
    .launch-panel { grid-template-columns: 1fr; }
    .launch-panel__action { justify-items: stretch; text-align: left; max-width: none; }
    .check { grid-template-columns: 22px minmax(0, 1fr); }
    .check__link { grid-column: 2; }
    .setup__form { grid-template-columns: 1fr; }
    .backup-codes { grid-template-columns: 1fr; }
    .alert__theme { grid-column: 2; }
    .alert__text { grid-column: 2; }
    .summary__item + .summary__item { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
    .tabs { gap: 22px; flex-wrap: nowrap; overflow-x: auto; margin-top: 0; scrollbar-width: none; }
    .tabs a { white-space: nowrap; }
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { border-bottom: 1px solid var(--rule); padding: 12px 0; }
    .table td, .table--compact td { border: 0; padding: 2px 0 !important; }
    .table .num { text-align: left; }
    .table .actions { text-align: left; margin-left: -9px; padding-top: 6px !important; }
    .table tbody tr:hover td { background: none; }
    .toolbar .field { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
    .masthead, .colophon, .launch, .launch-panel, .dropzone, .queue, .actions, .page-head__actions { display: none !important; }
    .is-gate .gate__brand, .is-gate .backup-actions, .is-gate .check-option, .is-gate #continue, .is-gate .gate__step { display: none !important; }
    .is-gate .gate { display: block; min-height: 0; }
    .backup-codes { background: none; border: 1px solid #000; }
}

/* ================================================================== v1.3 : reporting hebdo */

/* archives du dossier de dépôt (étape 1) */
.archives { display: grid; gap: 10px; }
.archive { border: 1px solid var(--rule); border-left: 4px solid var(--rule-strong); background: var(--paper); transition: border-color .15s, background-color .15s; }
.archive:has(input:checked) { border-color: var(--ink); border-left-color: var(--ink); background: #fafaf9; }
.archive.is-disabled { background: var(--muted-bg); border-left-color: var(--error); }
.archive__choice { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 18px; cursor: pointer; }
.archive.is-disabled .archive__choice { cursor: default; }
.archive__choice input { width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--ink); }
.archive__body { display: grid; gap: 3px; min-width: 0; }
.archive__week { font-family: var(--serif); font-size: 22px; line-height: 1.15; color: var(--ink); }
.archive__name { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; font-size: 14px; }
.archive__name .icon { width: 16px; height: 16px; color: var(--muted); }
.archive__meta { font-size: 13px; color: var(--muted); }
.archive__content { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.archive__content span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--muted-bg); color: var(--muted); }
.archive__content span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.archive__content .is-ok { background: var(--ok-bg); color: var(--ok); }
.archive__content .is-missing { background: var(--error-bg); color: var(--error); }
.archive__problem { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--warning); margin-top: 4px; }
.archive.is-disabled .archive__problem { color: var(--error); }
.archive__problem .icon { width: 14px; height: 14px; margin-top: 3px; }
.archive__run { margin: 0; padding: 0 18px 14px 52px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.archive__more { padding: 0 18px 14px 52px; }
.archive__more summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.archive__more .choices { margin-top: 10px; }

/* tuiles compactes, bilan rapide */
.tiles--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile__ok { display: flex; gap: 8px; align-items: center; color: var(--ok); }
.tile__ok .icon { width: 15px; height: 15px; stroke-width: 2; }
.tile__tools { display: flex; align-items: center; gap: 2px; padding: 6px 12px; border-top: 1px solid var(--rule); min-height: 49px; }
.mini-results { list-style: none; margin: 14px 0 18px; padding: 0; border-top: 1px solid var(--rule); }
.mini-results li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }

/* univers à générer */
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.universe-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.universe-choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--rule); cursor: pointer; }
.universe-choice:has(input:checked) { border-color: var(--ink); background: #fafaf9; }
.universe-choice input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.universe-choice strong { display: block; font-weight: 500; }
.universe-choice small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.universe-choice.is-missing { cursor: not-allowed; background: var(--error-bg); border-color: transparent; }
.universe-choice.is-missing small { color: var(--error); }
.universe-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.universe-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--muted-bg); color: var(--muted); }
.universe-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.universe-dot--ok { background: var(--ok-bg); color: var(--ok); }
.universe-dot--warning { background: var(--warning-bg); color: var(--warning); }
.universe-dot--error { background: var(--error-bg); color: var(--error); }

/* avancement d'une génération */
.progress-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.progress-list__step { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--rule); border-left: 4px solid var(--rule-strong); background: var(--paper); }
.progress-list__mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; font-size: 13px; color: var(--muted); border: 1px solid var(--rule-strong); }
.progress-list__mark .icon { width: 15px; height: 15px; stroke-width: 2; }
.progress-list__body { display: grid; gap: 1px; min-width: 0; }
.progress-list__label { font-weight: 500; color: var(--ink); font-size: 14px; }
.progress-list__state { font-size: 12.5px; color: var(--muted); }
.progress-list__spin { width: 14px; height: 14px; border: 2px solid var(--info); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.progress-list__step.is-running { border-left-color: var(--info); background: var(--info-bg); }
.progress-list__step.is-running .progress-list__mark { border-color: var(--info); }
.progress-list__step.is-running .progress-list__state { color: var(--info); }
.progress-list__step.is-ok { border-left-color: var(--ok); }
.progress-list__step.is-ok .progress-list__mark { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.progress-list__step.is-warning { border-left-color: var(--warning); }
.progress-list__step.is-warning .progress-list__mark { background: var(--warning); border-color: var(--warning); color: var(--paper); }
.progress-list__step.is-warning .progress-list__state { color: var(--warning); }
.progress-list__step.is-error { border-left-color: var(--error); background: var(--error-bg); }
.progress-list__step.is-error .progress-list__mark { background: var(--error); border-color: var(--error); color: var(--paper); }
.progress-list__step.is-error .progress-list__state { color: var(--error); }
.progress-list__step.is-skipped { opacity: .6; }
details > .progress-list { margin-top: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* bandeaux de résultat */
.band--warning { border-left-color: var(--warning); background: var(--warning-bg); } .band--warning > .icon, .band--warning .band__title { color: var(--warning); }
.band--error:not([role]) { display: flex; }
.band--muted { border-left-color: var(--muted-c); }
.band__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* classeurs par univers */
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.result { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--rule); border-top: 4px solid var(--muted-c); padding: 18px 20px 0; background: var(--paper); }
.result--ok { border-top-color: var(--ok); }
.result--warning { border-top-color: var(--warning); }
.result--error { border-top-color: var(--error); }
.result__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.result__title { font-size: 24px; }
.result__desc { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.result__file { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; margin: 6px 0 0; font-size: 14.5px; }
.result__file .icon { margin-top: 2px; }
.result__meta { font-size: 13px; color: var(--muted); margin: 0; }
.result__ca summary { cursor: pointer; font-size: 13.5px; color: var(--muted); padding: 4px 0; }
.result__ca[open] summary { color: var(--ink); margin-bottom: 6px; }
.result__action { display: flex; align-items: center; gap: 8px; margin: auto -20px 0; padding: 12px 20px; border-top: 1px solid var(--rule); font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: none; }
.result__action:hover { background: var(--chine); }
.result__action.is-danger { color: var(--error); }
.result__action .icon { width: 16px; height: 16px; }
.table--figures td { font-size: 13.5px; }
.table .num.is-gap { color: var(--error); font-weight: 500; }

/* contrôles */
.check--ok { border-left-color: var(--ok); background: var(--ok-bg); } .check--ok .icon { color: var(--ok); }
.checks--top { margin-bottom: 32px; }
.control-group + .control-group { margin-top: 8px; }
.control-group .versions { margin-top: 10px; }
.control-group .versions .checks { margin-top: 4px; }

/* référentiel */
.folder { border: 1px solid var(--rule); margin-bottom: 10px; background: var(--paper); }
.folder[open] { border-color: var(--rule-strong); }
.folder__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.folder__head::-webkit-details-marker { display: none; }
.folder__head .icon { color: var(--muted); }
.folder__name { font-family: var(--serif); font-size: 21px; color: var(--ink); }
.folder__meta { font-size: 13px; color: var(--muted); margin-left: auto; }
.folder .table-wrap { padding: 0 18px 8px; border-top: 1px solid var(--rule); }
.imports { margin-top: 18px; }
.imports li { align-items: center; }
.btn--file { position: relative; cursor: pointer; }
.btn--file:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.queue--float { margin: 10px 0 0; flex-basis: 100%; }
.facts--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 32px; margin: 0; padding: 18px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.facts--grid dd { overflow-wrap: anywhere; }
.footnote--tight { margin-top: 14px; }
.page-head .facts { margin: 0; }

@media (max-width: 1080px) {
    .tiles--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .results, .tiles--compact { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .tiles--4 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .universe-choices { grid-template-columns: 1fr; }
    .archive__choice { grid-template-columns: 20px minmax(0, 1fr); }
    .archive__state { grid-column: 2; }
    .archive__run, .archive__more { padding-left: 18px; }
    .folder__meta { margin-left: 0; flex-basis: 100%; }
    .folder .table-wrap { padding: 0 14px 8px; }
    .band__actions { width: 100%; }
}

/* ================================================================== v1.3 : reporting hebdo en un clic (Direction) */
.welcome--compact { grid-template-columns: 1fr; margin-bottom: 24px; }
.week-card { border: 1px solid var(--rule); border-top: 4px solid var(--ink); background: var(--paper); padding: 26px 28px; display: grid; gap: 18px; }
.week-card--ok { border-top-color: var(--ok); }
.week-card--warning { border-top-color: var(--warning); }
.week-card--error { border-top-color: var(--error); }
.week-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.week-card__kicker { font-size: 12.5px; font-weight: 500; letter-spacing: var(--caps); text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.week-card__title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 400; }
.week-card__meta { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.week-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.week-card__note { font-size: 13px; color: var(--muted); margin: 0; }
.week-card__error { display: flex; gap: 8px; align-items: flex-start; color: var(--error); margin: 0; }
.week-card__error .icon { margin-top: 3px; }
.week-card__launch { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 18px; border-top: 1px solid var(--rule); }
.week-card__hint { flex: 1; min-width: 220px; font-size: 13.5px; color: var(--muted); margin: 0; }
.week-card .progress-list { margin-bottom: 0; }
.deliverables { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.deliverable { display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 14px; border: 1px solid var(--rule); border-left: 4px solid var(--muted-c); }
.deliverable--ok { border-left-color: var(--ok); }
.deliverable--warning { border-left-color: var(--warning); }
.deliverable--error { border-left-color: var(--error); background: var(--error-bg); }
.deliverable__label { font-weight: 500; color: var(--ink); margin-right: auto; }
.deliverable__none { width: 36px; text-align: center; color: var(--muted); }
.choice__note { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.disclosure .form--inline { gap: 18px; }
@media (max-width: 760px) {
    .week-card { padding: 20px; }
    .week-card__actions .btn { width: 100%; }
}
