/* Lumière Verte · Espace dossiers CEE — charte reprise du site (bleu marine → vert, Montserrat + Inter, biseaux). */
:root {
  --navy: #0b2e5b; --teal: #05695a; --green: #0a9a3e;
  --gradient: linear-gradient(90deg, #0b2e5b 0%, #05695a 55%, #0a9a3e 100%);
  --bg: #F4F7FA; --surface: #FFFFFF; --sunk: #EAF0F7; --line: #D6DEE8;
  --fg: #0F1D2E; --muted: #4F5D6E; --heading: #0B2E5B;
  --accent: #0A9A3E; --accent-soft: #E7F5EC;
  --teal-ink: #05695A; --teal-soft: #DDF0EC;
  --info: #0B2E5B; --info-soft: #E3EBF5;
  --danger: #B42318; --danger-soft: #FBE3E0;
  --warn: #9A5806; --warn-soft: #FCEBD2;
  --ok: #0A7F34; --ok-soft: #E1F3E7;
  --scrim: rgb(5 21 43 / .45);
  --cut: 10px;
  --f-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06162D; --surface: #0B2242; --sunk: #081B36; --line: #1D3A60;
    --fg: #E6EDF5; --muted: #9FB0C4; --heading: #FFFFFF;
    --accent: #34C46A; --accent-soft: #0E3A2A;
    --teal-ink: #4FD1BA; --teal-soft: #0C3536;
    --info: #9DBDE6; --info-soft: #132F55;
    --danger: #F2776C; --danger-soft: #3D1A1F;
    --warn: #E9A653; --warn-soft: #36280F;
    --ok: #4CD07E; --ok-soft: #0F3524;
    --scrim: rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14.5px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; min-height: 100vh; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; line-height: 1.2; color: var(--heading); }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.02rem; font-weight: 700; }
h3 { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); display: flex; align-items: center; gap: 8px; }
h3::before { content: ""; width: 14px; height: 8px; background: currentColor; clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%); flex: none; }
p { margin: 0; }
a { color: var(--heading); text-decoration-color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mono, .ref { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .02em; }
.ref { color: var(--teal-ink); }
.num { font-variant-numeric: tabular-nums; }

/* En-tête */
.top-wrap { background: var(--surface); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
.top-wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--gradient); }
.top { max-width: 1360px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.logo { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo-stack { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.logo-mark { width: 54px; height: 33px; display: block; }
.logo-text { font-family: var(--f-display); font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--heading); white-space: nowrap; line-height: 1; }
.logo-text .v { color: var(--accent); font-weight: 600; }
.logo-side { display: grid; gap: 3px; padding-left: 14px; border-left: 2px solid var(--accent); font-family: var(--f-display); text-transform: uppercase; line-height: 1.15; }
.logo-side .l1 { font-size: 13px; font-weight: 800; letter-spacing: .6px; color: var(--heading); }
.logo-side .l2 { font-size: 10px; font-weight: 600; letter-spacing: .5px; color: var(--accent); }
.tabs { display: flex; gap: 2px; overflow-x: auto; max-width: 100%; }
.tab { border: 0; background: transparent; padding: 8px 12px; font-family: var(--f-display); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; display: flex; gap: 6px; align-items: center; border-bottom: 3px solid transparent; }
.tab:hover { color: var(--heading); }
.tab[aria-selected="true"] { color: var(--heading); border-bottom-color: var(--accent); }
.tab .count { font-family: var(--f-body); font-size: .72rem; letter-spacing: 0; background: var(--sunk); padding: 0 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.tab .count.alert { background: var(--danger); color: #fff; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 340px; justify-content: flex-end; align-items: center; min-width: 0; }
#q { flex: 1 1 200px; max-width: 300px; }
.who { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); white-space: nowrap; }

.app { max-width: 1360px; margin: 0 auto; padding: 18px 16px 64px; display: grid; gap: 20px; }
.status-line { font-size: .8rem; color: var(--muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

input, select, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 8px 10px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
input[type="checkbox"] { width: auto; }
input[readonly] { background: var(--sunk); color: var(--heading); font-weight: 600; cursor: not-allowed; }
input[readonly]:focus { box-shadow: none; border-color: var(--line); }
textarea { resize: vertical; min-height: 72px; }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 16px; font-family: var(--f-display); font-weight: 700; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; color: var(--heading); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--heading); }
.btn.primary { background: var(--gradient); color: #fff; border: 0; padding: 9px 22px; clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.small { padding: 4px 10px; font-size: .68rem; }
.btn.primary.small { padding: 5px 16px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--heading); background: var(--sunk); }
.btn.danger { color: var(--danger); }
.btn.danger[data-armed] { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.full { width: 100%; justify-content: center; }

.banner { padding: 10px 14px; background: var(--warn-soft); color: var(--warn); font-size: .9rem; border-left: 4px solid var(--warn); }
.banner.err { background: var(--danger-soft); color: var(--danger); border-left-color: var(--danger); }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .73rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sunk); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.teal { background: var(--teal-soft); color: var(--teal-ink); }
.chip.strong { background: var(--heading); color: var(--surface); }
.chip.fiche { font-family: var(--f-mono); font-weight: 500; background: var(--surface); border: 1px solid var(--line); color: var(--heading); border-radius: 3px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* Tableau de bord */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; display: grid; gap: 2px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient); }
.stat b { font-family: var(--f-display); font-size: 1.55rem; font-weight: 800; color: var(--heading); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { font-size: .82rem; color: var(--muted); }
.stat.alert b { color: var(--danger); }
.stat.alert::before { background: var(--danger); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 16px 18px; display: grid; gap: 12px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .body { min-width: 0; cursor: pointer; }
.item .body:hover strong { text-decoration: underline; text-decoration-color: var(--accent); }
.item strong { font-weight: 600; }
.item .line2 { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.empty { padding: 18px; text-align: center; color: var(--muted); font-size: .9rem; border: 1px dashed var(--line); display: grid; gap: 10px; justify-items: center; }
.empty.big { padding: 44px 18px; background: var(--surface); }
.empty.big h2 { font-size: 1.2rem; }

/* Dossiers */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .grow { flex: 1; }
.toolbar select { width: auto; max-width: 100%; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--sunk); padding: 3px; gap: 2px; border-radius: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; font-size: .82rem; font-weight: 500; color: var(--muted); border-radius: 2px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--heading); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.kanban-wrap { overflow-x: auto; padding-bottom: 6px; }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 12px; }
.col { background: var(--sunk); padding: 0 8px 8px; display: grid; gap: 8px; align-content: start; min-width: 0; min-height: 140px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; border-top: 3px solid var(--line); margin: 0 -8px; }
.step-n { font-family: var(--f-display); font-weight: 800; font-size: .72rem; color: #fff; background: var(--gradient); width: 26px; height: 20px; display: grid; place-items: center; clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); flex: none; }
.col-head .t { font-family: var(--f-display); font-weight: 700; font-size: .78rem; color: var(--heading); line-height: 1.2; }
.col-head .n { margin-left: auto; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.col .sum { font-size: .76rem; color: var(--muted); padding: 0 4px; font-variant-numeric: tabular-nums; }
.card { display: grid; gap: 4px; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line); padding: 10px 12px; min-width: 0; }
.card:hover { border-color: var(--accent); }
.card.has-err { border-left-color: var(--danger); }
.card.has-warn { border-left-color: var(--warn); }
.card.is-ok { border-left-color: var(--ok); }
.card .top-line { display: flex; justify-content: space-between; gap: 6px; align-items: center; flex-wrap: wrap; }
.card strong { font-weight: 600; overflow-wrap: anywhere; color: var(--heading); }
.card .sub { font-size: .83rem; color: var(--muted); overflow-wrap: anywhere; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; display: block; }
.bar i { display: block; height: 100%; background: var(--gradient); }
.col .none { font-size: .82rem; color: var(--muted); padding: 6px 4px; }
@media (max-width: 640px) { .kanban { grid-template-columns: 1fr; } }

.tbl { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-family: var(--f-display); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--heading); font-weight: 700; white-space: nowrap; background: var(--sunk); }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--sunk); }
td.r, th.r { text-align: right; }

/* Panneau latéral */
#scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 19; }
#drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(660px, 100%); background: var(--surface); z-index: 20; overflow-y: auto; padding: 18px 22px 40px; display: grid; gap: 22px; align-content: start; box-shadow: -16px 0 48px rgb(5 21 43 / .2); }
#drawer::before { content: ""; position: fixed; top: 0; bottom: 0; width: 4px; margin-left: -22px; background: linear-gradient(180deg, var(--navy), var(--green)); }
.d-head { display: flex; align-items: flex-start; gap: 12px; }
.d-head > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
.d-head h2 { font-size: 1.35rem; font-weight: 800; overflow-wrap: anywhere; }
.d-eyebrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px 18px; margin: 0; }
.facts div { display: grid; gap: 1px; min-width: 0; }
.facts dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; background: var(--sunk); padding: 12px 14px; font-size: .9rem; overflow-wrap: anywhere; }
.linkish { border: 0; background: none; padding: 0; color: var(--heading); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-align: left; }
section.block { display: grid; gap: 10px; }

.stepper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.stepper > * { border: 0; background: var(--sunk); color: var(--muted); padding: 8px 4px 7px; font-size: .68rem; font-weight: 600; line-height: 1.2; display: grid; gap: 3px; justify-items: center; text-align: center; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.stepper b { font-family: var(--f-display); font-size: .8rem; }
.stepper .done { background: var(--teal-soft); color: var(--teal-ink); }
.stepper [aria-pressed="true"], .stepper .current { background: var(--gradient); color: #fff; }
.stepper span { cursor: default; }
@media (max-width: 520px) { .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.abandon-line { display: flex; justify-content: flex-end; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .82rem; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 8px 10px; font-size: .88rem; background: var(--sunk); }
.checks .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: #fff; }
.checks .err { background: var(--danger-soft); } .checks .err .ic { background: var(--danger); }
.checks .warn { background: var(--warn-soft); } .checks .warn .ic { background: var(--warn); }
.checks .ok .ic { background: var(--ok); }
.checks .todo .ic { background: var(--muted); }
.verdict { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-family: var(--f-display); font-weight: 700; font-size: .9rem; }
.verdict.err { background: var(--danger-soft); color: var(--danger); }
.verdict.warn { background: var(--warn-soft); color: var(--warn); }
.verdict.ok { background: var(--ok-soft); color: var(--ok); }
.verdict.todo { background: var(--sunk); color: var(--heading); }

.pieces { display: grid; border: 1px solid var(--line); }
.piece { display: grid; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.piece:first-child { border-top: 0; }
.piece-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; }
.piece .pl { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; min-width: 0; }
.piece .seg button { padding: 3px 9px; font-size: .74rem; }
.piece .seg button[aria-pressed="true"][data-v="valide"] { background: var(--ok); color: #fff; }
.piece .seg button[aria-pressed="true"][data-v="recu"] { background: var(--info-soft); color: var(--info); }
.piece .seg button[aria-pressed="true"][data-v="manquant"] { background: var(--warn-soft); color: var(--warn); }
.piece .seg button[aria-pressed="true"][data-v="refuse"] { background: var(--danger); color: #fff; }
.piece.na .pl { color: var(--muted); text-decoration: line-through; }
.files { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.file { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; background: var(--sunk); padding: 3px 4px 3px 10px; max-width: 100%; }
.file button.open { border: 0; background: none; padding: 0; color: var(--heading); text-decoration: underline; text-decoration-color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.file .x { border: 0; background: none; color: var(--muted); padding: 0 6px; }
.file .x:hover { color: var(--danger); }
.upload { position: relative; overflow: hidden; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.motif { font-size: .84rem; padding: 6px 10px; background: var(--danger-soft); color: var(--danger); }
.comment-in { font-size: .84rem; padding: 6px 8px; }

.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: .72rem; font-weight: 700; color: var(--heading); text-transform: uppercase; letter-spacing: .07em; font-family: var(--f-display); }
.form label input, .form label select, .form label textarea { font-family: var(--f-body); text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .92rem; }
.form label.inline { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-weight: 500; font-size: .88rem; }
.form .req::after { content: "*"; color: var(--accent); }
/* champ obligatoire : l'astérisque reste collée au titre, le champ passe dessous */
.form label.req { display: flex; flex-wrap: wrap; align-content: start; column-gap: 3px; row-gap: 4px; }
.form label.req::after { order: 1; }
.form label.req > * { order: 2; flex-basis: 100%; }
.form label.req > .lbl { order: 0; flex-basis: auto; }
.hint { font-size: .8rem; color: var(--muted); font-family: var(--f-body); text-transform: none; letter-spacing: 0; font-weight: 400; }
.form fieldset { border: 0; padding: 0; margin: 6px 0 0; display: grid; gap: 12px; min-width: 0; }
.form legend { padding: 0; margin-bottom: 10px; }
.sub-box { background: var(--sunk); padding: 12px; display: grid; gap: 12px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .row2, .row3 { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: -40px; background: var(--surface); padding: 10px 0; }
.compose { background: var(--sunk); padding: 14px; }
.avis-list { display: grid; gap: 8px; }
.avis-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
@media (max-width: 520px) { .avis-row { grid-template-columns: minmax(0, 1fr) auto; } .avis-row input:first-child { grid-column: 1 / -1; } }
.avis-total { font-size: .86rem; font-weight: 600; color: var(--heading); }
.piece-hint { font-size: .8rem; color: var(--muted); }
/* checklist d'éligibilité */
.checks .elig-item label { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; cursor: pointer; grid-column: 1 / -1; }
.checks .elig-item:has(label) { grid-template-columns: 1fr; }
.checks .elig-item input[type="checkbox"] { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.checks .elig-item input:disabled + span { opacity: .85; }
.checks .elig-item.ok { background: var(--ok-soft); }
.elig-qui { font-size: .76rem; }
.form .checks .elig-item label { display: grid; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-weight: 400; font-size: .88rem; color: var(--fg); }
/* dimensionnement de l'équipement */
.dim { margin-top: 8px; font-size: .85rem; font-weight: 400; line-height: 1.45; color: var(--fg); }
.dim .chip { margin-right: 4px; }
/* analyse IA des pièces */
.ia { font-size: .86rem; border-left: 3px solid var(--line); padding: 6px 10px; background: var(--surface); display: grid; gap: 8px; }
.ia summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; list-style: none; }
.ia summary::-webkit-details-marker { display: none; }
.ia summary::after { content: "Détails ▾"; margin-left: auto; font-size: .76rem; color: var(--muted); }
.ia[open] summary::after { content: "Masquer ▴"; }
.ia-ok { border-left-color: var(--ok); } .ia-warn { border-left-color: var(--warn); } .ia-danger { border-left-color: var(--danger); }
.ia-encours { color: var(--muted); display: flex; gap: 8px; align-items: center; }
.ia-alerte { color: var(--danger); font-weight: 600; margin: 0; }
.ia-extraits { font-size: .82rem; }
/* calcul du volume : champs manquants et message */
.form .manque { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
#calc-result.warn, .calc-msg.warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.calc-msg { font-size: .86rem; padding: 10px 12px; background: var(--ok-soft); color: var(--ok); }
.compose .form-actions { position: static; background: none; padding: 0; }

.tl { list-style: none; margin: 0; padding: 0; display: grid; }
.tl li { position: relative; padding: 0 0 16px 20px; border-left: 2px solid var(--line); margin-left: 5px; display: grid; gap: 4px; min-width: 0; }
.tl li:last-child { border-left-color: transparent; }
.tl li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.tl li.ext::before { border-color: var(--warn); }
.tl .when { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); }
.tl .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.tl .next { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .86rem; }
.tl .done { text-decoration: line-through; color: var(--muted); }

/* Écrans de connexion */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(ellipse at 85% 15%, rgb(10 154 62 / .18), transparent 55%), var(--bg); }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); padding: 32px 28px; display: grid; gap: 18px; position: relative; box-shadow: 0 18px 50px rgb(7 29 59 / .12); }
.auth-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gradient); }
.auth-card .logo { justify-content: center; }
.auth-card p { color: var(--muted); }
.auth-switch { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .85rem; }
.auth-switch button { border: 0; background: none; padding: 0; color: var(--heading); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.setup code { font-family: var(--f-mono); font-size: .8rem; background: var(--sunk); padding: 1px 5px; }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 30; background: var(--heading); color: var(--surface); padding: 10px 18px; font-size: .9rem; font-weight: 500; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgb(0 0 0 / .25); border-left: 4px solid var(--accent); }
#toast.err { background: var(--danger); color: #fff; border-left-color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  #drawer:not([hidden]) { animation: slide .18s ease-out; }
  @keyframes slide { from { transform: translateX(24px); opacity: .6; } }
}
@media (max-width: 600px) { .logo-side .l2 { display: none; } .who .email { display: none; } }
