/* Managed by the devserver playbook (roles/teamconsole).
 *
 * The one stylesheet of the team consoles. No framework, nothing fetched from
 * anywhere else: the pages' Content-Security-Policy allows styles and images
 * from this host only, and no script at all — which is why the two things that
 * look like behaviour here (the sticky grid, the one-click cells) are
 * plain CSS and HTML forms.
 *
 * The brand is two variables, --accent and --on-accent, set by /brand.css from
 * the console's `brand:` in the inventory. Everything coloured derives from
 * them; the neutrals below are the same for every console.
 */
:root {
  --accent: #2f5d50; --on-accent: #fff;
  --bg: #f6f5f2; --card: #fff; --fg: #1d1c1a; --muted: #5f5d58; --line: #e3e0d9; --soft: #f1efea;
  --ok: #1f7a45; --ok-bg: #e6f4ea; --warn: #8a5a00; --warn-bg: #fdf1d6; --err: #b3261e; --err-bg: #fbe9e7;
  --tint: color-mix(in srgb, var(--accent) 7%, white);
  --tint-strong: color-mix(in srgb, var(--accent) 14%, white);
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, white); outline-offset: 2px; border-radius: 4px; }
code, pre { font: .88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            background: var(--soft); border-radius: 6px; }
code { padding: .08rem .35rem; }
pre { padding: .7rem .9rem; overflow: auto; white-space: pre-wrap; margin: .6rem 0 0; }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.12rem; margin: 2.2rem 0 .7rem; }
h3 { font-size: 1rem; margin: 0; }
ol { padding-left: 1.25rem; margin: .5rem 0; }
ol li { margin: .2rem 0; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .err { color: var(--err); }

/* ── the bar at the top: the brand, who is signed in ─────────────────────── */
.top { background: var(--card); border-top: 4px solid var(--accent); border-bottom: 1px solid var(--line); }
.top-in { max-width: 84rem; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center;
          gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--fg); margin-right: auto; }
.brand img { height: 34px; width: auto; display: block; }
.brand span { font-weight: 600; padding-left: .9rem; border-left: 1px solid var(--line); color: var(--muted); }
.who { text-align: right; line-height: 1.3; }
.who strong { display: block; }
nav.tabs { display: flex; flex-wrap: wrap; gap: .25rem; }
nav.tabs a { padding: .4rem .75rem; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; }
nav.tabs a:hover { background: var(--soft); color: var(--fg); }
nav.tabs a[aria-current] { background: var(--tint-strong); color: var(--accent); }
nav.tabs a.admin { margin-left: .6rem; padding-left: 1.1rem; border-left: 1px solid var(--line); border-radius: 0 8px 8px 0; }
nav.tabs .dot { color: var(--warn); font-size: .8em; }

main { max-width: 54rem; margin: 0 auto; padding: 1.8rem 1.25rem 5rem; }
main.wide { max-width: 84rem; }
.lead { margin: .3rem 0 1.3rem; color: var(--muted); }

/* ── buttons ─────────────────────────────────────────────────────────────── */
form { margin: 0; }
/* summary.btn: the buttons that open a pop-up (« Valider et lancer », « Répondre »…) are a <details>' summary. */
button, a.btn, summary.btn { font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
                padding: .55rem 1rem; border-radius: 9px; border: 1.5px solid var(--accent);
                background: var(--accent); color: var(--on-accent); transition: filter .12s, background .12s; }
button:hover:not(:disabled), a.btn:hover, summary.btn:hover { filter: brightness(.92); }
button.ghost, a.btn.ghost, summary.btn.ghost { background: transparent; color: var(--accent); }
button.ghost:hover:not(:disabled), a.btn.ghost:hover, summary.btn.ghost:hover { background: var(--tint); filter: none; }
button.quiet, summary.btn.quiet { background: transparent; border-color: var(--line); color: var(--muted); font-weight: 500; }
button.quiet:hover:not(:disabled), summary.btn.quiet:hover { background: var(--soft); filter: none; }
summary.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.big, a.btn.big { padding: .8rem 1.4rem; font-size: 1.02rem; }
button:disabled { background: var(--soft); border-color: var(--line); color: #8d8a84; cursor: not-allowed; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .9rem; }

/* ── cards, notices, badges ──────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 1.1rem 1.25rem; margin: .8rem 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.notice { border-radius: var(--radius); padding: .8rem 1.1rem; margin: .8rem 0; border: 1px solid transparent; }
.notice.good { background: var(--ok-bg); border-color: #bfe3cb; color: #14532d; }
.notice.bad { background: var(--err-bg); border-color: #f2c4bf; color: #7f1d1d; }
.notice.wait { background: var(--warn-bg); border-color: #f1dca4; color: #6b4500; }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; line-height: 1; padding: .32rem .6rem;
         border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.badge.done { background: var(--ok-bg); color: var(--ok); }
.badge.todo { background: var(--warn-bg); color: var(--warn); }
.badge.no { background: var(--err-bg); color: var(--err); }
.badge.idle { background: var(--soft); color: var(--muted); }

/* ── sign-in, refusal, error: one centred card ───────────────────────────── */
.center { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
          background: linear-gradient(180deg, var(--tint) 0, var(--bg) 22rem); }
.center .card { width: 100%; max-width: 26rem; text-align: center; padding: 2.2rem 2rem; margin: 0;
                border-top: 4px solid var(--accent); box-shadow: 0 8px 30px rgba(0, 0, 0, .06); }
.center img.logo { height: 56px; width: auto; max-width: 100%; margin: 0 auto 1.3rem; display: block; }
.center h1 { margin-bottom: .4rem; }
.center p { margin: .5rem 0; }
.center .actions { margin-top: 1.5rem; }
.center .btn.big { width: 100%; }

/* ── the three steps ─────────────────────────────────────────────────────── */
.step { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0 1rem; border-left: 4px solid var(--warn-bg); }
.step.is-done { border-left-color: var(--ok); }
.step .num { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
             font-weight: 700; background: var(--soft); color: var(--muted); }
.step.is-done .num { background: var(--ok-bg); color: var(--ok); }
.step .head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; min-height: 2.4rem; }
.step .body { grid-column: 2; }
.access { list-style: none; padding: 0; margin: .5rem 0 0; }
.access li { padding: .2rem 0; }
.access .why { display: block; margin: .15rem 0 .35rem; color: #7f1d1d; }

/* « Déconnecter GitHub »: a <details> is the confirmation step — no script. */
details.confirm { flex-basis: 100%; }
details.confirm summary { display: inline-block; list-style: none; cursor: pointer; font-weight: 500;
                          padding: .55rem 1rem; border-radius: 9px; border: 1.5px solid var(--line); color: var(--muted); }
details.confirm summary::-webkit-details-marker { display: none; }
details.confirm summary:hover { background: var(--soft); }
details.confirm[open] summary { background: var(--soft); }
.confirm-box { margin-top: .6rem; padding: .8rem 1rem; border: 1px solid #f2c4bf; border-radius: var(--radius);
               background: var(--err-bg); color: #7f1d1d; }
.confirm-box p { margin: 0 0 .6rem; }
button.danger { background: var(--err); border-color: var(--err); color: #fff; }

/* ── an application ──────────────────────────────────────────────────────── */
.apps { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); }
.apps .card { margin: 0; display: flex; flex-direction: column; }
.app-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.app-head h3 { font-size: 1.08rem; }
.app .links { margin: .2rem 0 .5rem; }
.app .row { margin-top: auto; padding-top: .9rem; }
ul.commits { list-style: none; padding: 0; margin: .6rem 0 0; font-size: .86rem; }
ul.commits li { padding: .28rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }

/* ── the grid: who has which application ─────────────────────────────────── */
.grid-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
             overflow: auto; max-height: 68vh; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .92rem; }
th, td { padding: .6rem .75rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
table.grid thead th { position: sticky; top: 0; z-index: 2; background: var(--soft); color: var(--fg);
                      font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.grid .who-col { position: sticky; left: 0; z-index: 1; background: var(--card); min-width: 14rem;
                      border-right: 1px solid var(--line); }
table.grid thead .who-col { z-index: 3; background: var(--soft); }
table.grid th.app-col { text-align: center; min-width: 5.4rem; padding-left: .4rem; padding-right: .4rem; font-size: .95rem; }
table.grid th.app-col small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; }
table.grid th.app-col.is-off { color: #8d8a84; }
table.grid td.cell { padding: 0; text-align: center; }
table.grid td.cell.is-on { background: var(--tint); }
table.grid td.cell .cell-in { display: flex; flex-direction: column; align-items: center; justify-content: center;
                              gap: .25rem; min-height: 3.6rem; padding: .4rem .35rem; }
table.grid td.cell.is-off .cell-in { background: repeating-linear-gradient(
    135deg, transparent 0 6px, rgba(0, 0, 0, .025) 6px 12px); }
/* Each cell is its own button: one click gives or takes back that one app. */
button.cell-btn { padding: .3rem .6rem; font-size: .8rem; border-radius: 999px; white-space: nowrap;
                  background: transparent; color: var(--accent); border-color: var(--line); font-weight: 600; }
button.cell-btn:hover:not(:disabled) { background: var(--tint-strong); border-color: var(--accent); filter: none; }
button.cell-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
button.cell-btn:disabled { background: transparent; border-color: transparent; }
/* Read-only: who has which app is set in the control tower. */
span.cell-mark { padding: .3rem .6rem; font-size: .8rem; border-radius: 999px; white-space: nowrap;
                 color: var(--muted); font-weight: 600; }
span.cell-mark.is-on { background: var(--accent); color: var(--on-accent); }
.notice.managed a { color: inherit; font-weight: 600; }
button.mini { padding: .2rem .55rem; font-size: .74rem; font-weight: 600; border-radius: 7px; margin-top: .25rem;
              background: transparent; color: var(--accent); }
button.mini:hover:not(:disabled) { background: var(--tint); filter: none; }
table.grid tbody tr:hover .who-col { background: var(--soft); }
input[type=checkbox] { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--accent); cursor: inherit; }
/* After a click the page comes back at that row (#p-<login>), below the sticky header. */
table.grid tbody tr { scroll-margin-top: 5rem; }
td.cell .hint { font-size: .7rem; line-height: 1.15; color: var(--muted); }
td.cell .hint.err { color: var(--err); } td.cell .hint.ok { color: var(--ok); }
table.grid th.app-col small.team { margin-top: .2rem; font-weight: 600; }
table.grid th.app-col small.team.ok { color: var(--ok); }
table.grid th.app-col small.team.no { color: var(--err); }
.notice.flash { margin: .4rem 0; padding: .55rem 1rem; }
.person strong { display: block; }
.status { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; white-space: nowrap; }

table.history td, table.history th { padding: .45rem .75rem; }
table.history th { color: var(--muted); font-weight: 600; font-size: .82rem; }
table.history td.when { white-space: nowrap; color: var(--muted); }

@media (max-width: 60rem) {
  .who { text-align: left; }
  table.grid .who-col { min-width: 12rem; }
  .apps { grid-template-columns: 1fr; }
}

/* « Améliorations »: per app, its open requests; below, the cross-app job's form. */
ul.reqs { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
ul.reqs li { border-top: 1px solid var(--line); padding-top: .5rem; }
ul.reqs li .row { margin-top: .3rem; }
.figures { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .4rem 0; }
.figures strong { font-size: 1.15rem; }
form.stack { display: flex; flex-direction: column; gap: .6rem; }
form.stack label { font-weight: 600; font-size: .92rem; }
form.stack input[type=text], form.stack textarea { width: 100%; box-sizing: border-box; font: inherit;
  padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); }
form.stack textarea { min-height: 10rem; resize: vertical; }

/* ── administration: its three (four) parts as sub-tabs ──────────────────── */
nav.subtabs { display: flex; flex-wrap: wrap; gap: .2rem; margin: -.4rem 0 1.4rem; border-bottom: 1px solid var(--line); }
nav.subtabs a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); font-weight: 600;
                border-bottom: 3px solid transparent; margin-bottom: -1px; }
nav.subtabs a:hover { color: var(--fg); }
nav.subtabs a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.titlebar { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; justify-content: space-between; }
.titlebar h1 { margin-right: auto; }

/* ── horizontal rows: an app, a request, a chantier ──────────────────────── */
.rows { display: flex; flex-direction: column; gap: .6rem; }
.rows .card { margin: 0; }
.card.hrow { padding: .85rem 1.1rem; }
.hrow-main { display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr) auto; gap: .5rem 1.2rem;
             align-items: center; }
.hrow-main:has(.hrow-figs) { grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr) minmax(8rem, 13rem) auto; }
.hrow-id { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.hrow-id h3 { font-size: 1.08rem; }
.hrow-body { min-width: 0; overflow-wrap: anywhere; }
.hrow-body h3 { font-size: 1rem; margin-bottom: .15rem; }
.hrow-body h3 a { color: var(--fg); text-decoration: none; }
.hrow-body h3 a:hover { color: var(--accent); text-decoration: underline; }
.hrow-figs { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; }
.hrow-actions { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; align-items: center; }
.hrow-actions button, .hrow-actions .btn { padding: .42rem .8rem; font-size: .9rem; }
@media (max-width: 60rem) {
  .hrow-main, .hrow-main:has(.hrow-figs) { grid-template-columns: 1fr; }
  .hrow-actions { justify-content: flex-start; }
}

/* The fold under an app: an arrow that turns, and its last commits. */
details.commits-fold, details.more { margin-top: .55rem; }
details.commits-fold summary, details.more summary { cursor: pointer; list-style: none; font-size: .87rem; font-weight: 600;
  color: var(--accent); display: inline-flex; gap: .4rem; align-items: baseline; }
details.commits-fold summary::-webkit-details-marker, details.more summary::-webkit-details-marker { display: none; }
details.commits-fold summary::before, details.more summary::before { content: "▸"; display: inline-block;
  transition: transform .12s; color: var(--muted); }
details[open].commits-fold summary::before, details[open].more summary::before { transform: rotate(90deg); }
details.commits-fold summary .muted { font-weight: 400; }
details.commits-fold ul.commits { margin-top: .4rem; }
@media (prefers-reduced-motion: reduce) { details summary::before { transition: none; } }

/* ── chips, tags, states ─────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: 0 0 .7rem; }
.filters > .muted { min-width: 5.5rem; }
a.chip { padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
         text-decoration: none; color: var(--muted); font-size: .85rem; font-weight: 600; }
a.chip:hover { border-color: var(--accent); color: var(--fg); }
a.chip[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
a.chip .n { font-weight: 400; opacity: .8; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: .76rem; font-weight: 600; padding: .12rem .45rem; border-radius: 6px;
       background: var(--soft); color: var(--muted); margin-right: .25rem; }
.badge.kind { background: var(--tint-strong); color: var(--accent); }
.badge.wait { background: var(--warn-bg); color: var(--warn); }
.badge.run { background: var(--tint-strong); color: var(--accent); }
.badge.st-nouveau, .badge.st-ouvert { background: var(--warn-bg); color: var(--warn); }
.badge.st-accepte, .badge.st-valide { background: var(--tint-strong); color: var(--accent); }
.badge.st-planifie, .badge.st-en-cours { background: var(--tint-strong); color: var(--accent); }
.badge.st-fait, .badge.st-corrige { background: var(--ok-bg); color: var(--ok); }
.badge.st-refuse, .badge.st-ignore, .badge.st-classe { background: var(--soft); color: var(--muted); }
.badge.st-echec { background: var(--err-bg); color: var(--err); }
.sev { display: inline-block; font-size: .78rem; font-weight: 700; padding: .18rem .5rem; border-radius: 6px;
       font-variant-numeric: tabular-nums; }
.sev-critique { background: var(--err); color: #fff; }
.sev-majeure { background: var(--err-bg); color: var(--err); }
.sev-mineure { background: var(--warn-bg); color: var(--warn); }
.sev-info { background: var(--soft); color: var(--muted); }
.live { color: var(--ok); font-weight: 600; }
.prewrap { white-space: pre-wrap; margin-top: .3rem; }

/* ── a chantier: how to reach it, its findings, its report ───────────────── */
.join { display: flex; flex-direction: column; gap: .8rem; }
.join-state { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; }
.join-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 1.5rem; }
.join-ways h3 { font-size: .92rem; margin-bottom: .45rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.join-ways p { margin: .45rem 0 0; }
table.findings { font-size: .9rem; }
table.findings thead th { position: sticky; top: 0; background: var(--soft); font-weight: 600; z-index: 1; }
table.findings td { vertical-align: top; }
table.findings td.where { max-width: 16rem; overflow-wrap: anywhere; }
table.findings .pick { width: 2.4rem; text-align: center; }
.report { overflow-wrap: anywhere; }
.report h2 { margin: 1.4rem 0 .5rem; } .report h2:first-child { margin-top: 0; }
.report h3, .report h4, .report h5 { margin: 1rem 0 .4rem; }
.report ul, .report ol { padding-left: 1.3rem; }
.report pre.table { white-space: pre; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: .4rem; }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .6rem; }
.kinds legend { grid-column: 1 / -1; }
label.kindopt { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .9rem; border: 1.5px solid var(--line);
                border-radius: 10px; cursor: pointer; font-weight: 400; }
label.kindopt:has(input:checked) { border-color: var(--accent); background: var(--tint); }
label.kindopt input { margin-top: .2rem; accent-color: var(--accent); }
label.kindopt > span { display: flex; flex-direction: column; gap: .15rem; }
label.kindopt .muted, label.tick .muted { font-weight: 400; }

/* « Retours »: a 👎 to handle stands out by its left edge. */
.card.fb.is-down { border-left: 4px solid var(--err-bg); }
.card.fb.is-up { background: color-mix(in srgb, var(--ok-bg) 35%, var(--card)); }
.rating { font-size: 1.3rem; line-height: 1; }
.fb .comment { margin-top: .3rem; font-style: italic; }
.fb .team-reply { margin-top: .45rem; padding: .45rem .7rem; border-radius: 8px; background: var(--ok-bg); color: #14532d; }
.fb .reply-box form { margin-top: .5rem; }
.fb .reply-box textarea { min-height: 5rem; }
.ticks { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
label.tick { display: inline-flex; gap: .4rem; align-items: center; font-weight: 500; font-size: .92rem; }
label.tick.is-off { color: #8d8a84; }

/* While an action runs (static/console.js): the button clicked says so, with
   a small turning ring, and its form is greyed so it cannot be sent twice. */
form.is-busy { cursor: progress; }
form.is-busy button:disabled { cursor: progress; }
button.is-busy, button.is-busy:disabled { background: var(--soft); border-color: var(--line); color: var(--muted);
  display: inline-flex; align-items: center; gap: .45rem; }
button.is-busy::before { content: ""; width: .8em; height: .8em; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; animation: turn .7s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button.is-busy::before { animation: none; } }
form.is-busy td.cell button.cell-btn:disabled:not(.is-busy) { opacity: .45; }

/* « Demandes » · « Répondre »: a pop-up (console.js moves the <dialog> to the
 * page and opens it); without script, the <details> shows the same form in
 * place — a closed <dialog> is display:none, so it is shown here. */
.hrow-buttons { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; align-items: center; }
details.reply { display: inline-block; }
details.reply > summary { list-style: none; padding: .42rem .8rem; font-size: .9rem; }
details.reply > summary::-webkit-details-marker { display: none; }
details.reply[open] { flex-basis: 100%; }
details.reply[open] > dialog { display: block; position: static; border: 1px solid var(--line); border-radius: var(--radius);
  margin: .5rem 0 0; padding: 1rem; width: auto; background: var(--card); color: var(--fg); }
dialog.reply-dialog { width: min(36rem, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; background: var(--card); color: var(--fg); box-shadow: 0 1rem 3rem rgba(0, 0, 0, .25); }
dialog.reply-dialog::backdrop { background: rgba(20, 18, 15, .45); }
dialog.reply-dialog h2 { font-size: 1.08rem; margin: 0; }
dialog.reply-dialog .row { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.reply-sent { margin-top: .45rem; padding: .45rem .6rem; border-left: 3px solid var(--accent); background: var(--soft); border-radius: 6px; }

/* « Demandes »: a launch's PR, and its diff */
.change { margin-top: .55rem; padding-top: .5rem; border-top: 1px dashed var(--line); }
.change .change-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; align-items: center; }
.change ul.files { margin: .3rem 0 0; padding-left: 1.1rem; }
.add { color: var(--ok); font-variant-numeric: tabular-nums; }
.del { color: var(--err); font-variant-numeric: tabular-nums; }
details.diff-file { margin-top: .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
details.diff-file > summary { cursor: pointer; padding: .5rem .75rem; font-size: .9rem; }
.diff-scroll { overflow-x: auto; border-top: 1px solid var(--line); }
pre.diff { margin: 0; padding: .4rem 0; font-size: .8rem; line-height: 1.4; }
pre.diff span { display: block; padding: 0 .75rem; white-space: pre; }
pre.diff .add { background: var(--ok-bg); color: inherit; }
pre.diff .del { background: var(--err-bg); color: inherit; }
pre.diff .hunk { color: var(--muted); background: var(--soft); }

/* The launch pop-up: the request as Claude will read it, the admin's consignes, the brief */
dialog.launch-dialog { width: min(48rem, calc(100vw - 2rem)); }
dialog.launch-dialog input[name="title"] { width: 100%; }
dialog.launch-dialog textarea { min-height: 7rem; }
dialog.launch-dialog textarea.big { min-height: 12rem; }
pre.brief { white-space: pre-wrap; font-size: .8rem; max-height: 50vh; overflow: auto; background: var(--soft);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; }
details.reply-sent > summary { cursor: pointer; }

/* « Historique »: a card's timeline, the history page */
ol.timeline { list-style: none; margin: .4rem 0 0; padding: 0 0 0 .8rem; border-left: 2px solid var(--line); }
ol.timeline > li { margin: .25rem 0; }
details.event-detail { display: inline; }
details.event-detail > summary { display: inline; cursor: pointer; color: var(--accent); font-size: .8rem; margin-left: .3rem; }
details.event-detail[open] { display: block; margin: .3rem 0 .5rem; }
pre.brief.full { max-height: none; }
form.history-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
form.history-filters label { display: flex; flex-direction: column; font-size: .8rem; gap: .15rem; }
nav.pager { display: flex; gap: 1rem; margin-top: .8rem; }
ul.convs, ul.analyses { list-style: none; padding: 0; margin: .4rem 0 0; }
ul.convs > li, ul.analyses > li { padding: .3rem 0; border-top: 1px solid var(--line); }

/* ── on a phone ──────────────────────────────────────────────────────────────
 * The bar shrinks to two rows (the brand with « Se déconnecter », then the tabs, one
 * row that scrolls sideways); the administration's sub-tabs are one scrolling row
 * too; a page's long lead is its first lines, a tap shows the rest (console.js);
 * tighter margins; nothing wider than the screen but tables, which scroll in their box. */
@media (max-width: 40rem) {
  .top-in { padding: .5rem .9rem .35rem; gap: .35rem .6rem; }
  .brand { gap: .6rem; }
  .brand img { height: 26px; }
  .brand span { padding-left: .6rem; font-size: .92rem; }
  .top-in > form { order: 2; }
  .top-in > form button { padding: .3rem .6rem; font-size: .82rem; }
  .who { display: none; }
  nav.tabs { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; gap: .15rem;
             scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav.tabs::-webkit-scrollbar { display: none; }
  nav.tabs a { white-space: nowrap; padding: .35rem .5rem; font-size: .88rem; }
  nav.tabs a.admin { margin-left: .15rem; padding-left: .55rem; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-left: -.9rem; margin-right: -.9rem; padding: 0 .9rem .2rem;
             scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filters::-webkit-scrollbar { display: none; }
  .filters > .muted { min-width: 0; }
  .filters a.chip { white-space: nowrap; }

  nav.subtabs { flex-wrap: nowrap; overflow-x: auto; margin: -.3rem -.9rem 1rem; padding: 0 .9rem;
                scrollbar-width: none; -webkit-overflow-scrolling: touch;
                -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
                mask-image: linear-gradient(to right, #000 85%, transparent); }
  nav.subtabs::-webkit-scrollbar { display: none; }
  nav.subtabs a { white-space: nowrap; padding: .5rem .7rem; font-size: .92rem; }

  main, main.wide { padding: 1rem .9rem 4rem; }
  h1 { font-size: 1.25rem; }
  .lead { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
          cursor: pointer; margin-bottom: 1rem; font-size: .93rem; }
  .lead.open { display: block; -webkit-line-clamp: unset; }
  .notice, .card, p, li, dd, td { overflow-wrap: anywhere; }
  .card { padding: .85rem; }
  .hrow-buttons { justify-content: flex-start; }
  dialog { width: calc(100vw - 1.2rem); max-width: none; margin: .6rem auto; }
  input, select, textarea { font-size: 16px; }    /* below 16px, iOS zooms into the field */
}
