/* REAV Track : surface back-office du design system REAV (tokens rc-*, police système, clair et sombre). */
@import url("ds/tokens/colors-brand.css");
@import url("ds/tokens/colors-semantic.css");
@import url("ds/tokens/colors-cockpit.css");
@import url("ds/tokens/fonts.css");
@import url("ds/tokens/radius.css");
@import url("ds/tokens/shadow.css");
@import url("ds/tokens/spacing.css");

/* Compléments propres à l'app, dérivés des tokens. */
:root, [data-theme="light"] {
  color-scheme: light;
  --app-bg: var(--rc-plane);
  --app-surface: #ffffff;
  --app-sunken: #f2f2f8;
  --app-hover: #f4f4fb;
  --app-border: #e6e6ef;
  --app-border-strong: #d4d4e0;
  --app-shadow-sm: 0 1px 2px rgba(13, 13, 60, .06);
  --app-shadow-md: 0 4px 14px rgba(13, 13, 60, .08), 0 1px 3px rgba(13, 13, 60, .05);
  --app-shadow-lg: 0 18px 48px rgba(13, 13, 60, .14), 0 2px 6px rgba(13, 13, 60, .06);
  --app-focus: 0 0 0 3px rgba(60, 60, 158, .18);
  --primary: var(--indigo);
  --primary-hover: var(--indigo-pressed);
  --on-primary: #fff;
}
[data-theme="dark"] {
  color-scheme: dark;
  --app-bg: #0d0d12;
  --app-surface: #16161e;
  --app-sunken: #111118;
  --app-hover: #1d1d28;
  --app-border: #262633;
  --app-border-strong: #353545;
  --app-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --app-shadow-md: 0 6px 18px rgba(0, 0, 0, .4);
  --app-shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  --app-focus: 0 0 0 3px rgba(139, 141, 236, .28);
  --primary: #6f71dd;
  --primary-hover: #8183e6;
  --on-primary: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--app-bg); color: var(--rc-ink); font-family: var(--font-cockpit);
       font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
       text-rendering: optimizeLegibility; }
a { color: var(--rc-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 700; margin: 0; letter-spacing: -.015em; }
h2 { font-size: 15px; font-weight: 650; margin: 0 0 10px; letter-spacing: -.005em; }
h3 { font-size: 13px; font-weight: 650; margin: 0 0 8px; }
p { margin: 0 0 8px; }
code, .mono { font-family: var(--font-mono); font-size: 12.5px; }
code { background: var(--app-sunken); border-radius: 4px; padding: 1px 5px; }
hr { border: 0; border-top: 1px solid var(--app-border); margin: 16px 0; }
.ic { flex: none; display: inline-block; vertical-align: -3px; }
.muted { color: var(--rc-muted); }
.ink2 { color: var(--rc-ink2); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { margin-left: auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr); } }
::selection { background: var(--rc-accent-soft); }

/* ---------- en-tête ---------- */
.topbar { display: flex; align-items: center; gap: 22px; height: 56px; padding: 0 20px; background: var(--app-surface);
          border-bottom: 1px solid var(--app-border); position: sticky; top: 0; z-index: 40; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--rc-ink); text-decoration: none !important; flex: none; }
.brand-icon { display: block; border-radius: 7px; }
.brand-name { font-size: 16px; font-weight: 500; color: var(--rc-ink2); letter-spacing: -.01em; white-space: nowrap; }
.brand-name b { font-weight: 750; color: var(--rc-ink); letter-spacing: -.005em; }
.tabs { display: flex; align-items: center; gap: 2px; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border-radius: 7px;
          color: var(--rc-ink2); font-size: 13.5px; font-weight: 550; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--rc-ink); background: var(--app-hover); }
.tabs a .ic { color: var(--rc-muted); }
.tabs a.on .ic { color: var(--rc-accent); }
.tabs a.on { color: var(--rc-ink); }
.tabs a.on::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -11px; height: 2px;
                    border-radius: 2px; background: var(--rc-accent); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.quicksearch { position: relative; display: flex; align-items: center; margin: 0; }
.quicksearch .ic { position: absolute; left: 10px; color: var(--rc-muted); pointer-events: none; }
.quicksearch input[type=search] { width: 220px; height: 34px; padding: 0 30px 0 32px; border-radius: 8px; background: var(--app-sunken);
                     border: 1px solid transparent; transition: width .15s, background .15s, border-color .15s; }
.quicksearch input[type=search]:focus { width: 280px; background: var(--app-surface); }
.quicksearch kbd { position: absolute; right: 8px; pointer-events: none; }
.quicksearch input:focus ~ kbd { display: none; }
.hide-sm { display: inline; }
@media (max-width: 900px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .brand-name { display: none; }
  .quicksearch input[type=search] { width: 130px; } .quicksearch input[type=search]:focus { width: 170px; }
  .quicksearch kbd, .hide-sm { display: none; }
  .tabs a { padding: 0 8px; }
  .tabs a span { display: none; }
}

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: flex; border-radius: 50%; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:focus-visible { outline: none; box-shadow: var(--app-focus); }
.menu-panel { position: absolute; right: 0; top: 42px; width: 260px; background: var(--app-surface); border: 1px solid var(--app-border);
              border-radius: 12px; box-shadow: var(--app-shadow-lg); padding: 6px; z-index: 50; }
.menu-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 10px; border-bottom: 1px solid var(--app-border); margin-bottom: 6px; }
.menu-head b { display: block; font-size: 13.5px; }
.menu-head span { display: block; font-size: 12px; color: var(--rc-muted); }
.menu-panel form { margin: 0; }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border: 0; border-radius: 7px; background: none;
             color: var(--rc-ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; text-decoration: none !important; }
.menu-item:hover { background: var(--app-hover); }
.menu-item .ic { color: var(--rc-ink2); }

.page { padding: 24px 24px 72px; max-width: 1600px; margin: 0 auto; }
@media (max-width: 700px) { .page { padding: 16px 14px 60px; } }
.pagehead { display: flex; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead .sub { margin-top: 3px; font-size: 13px; color: var(--rc-ink2); }
.eyebrow { font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--rc-muted); }

/* ---------- avatars ---------- */
.avatar { --size: 22px; width: var(--size); height: var(--size); flex: none; border-radius: 50%; display: inline-grid; place-items: center;
          font-size: calc(var(--size) * .42); font-weight: 650; letter-spacing: .02em; color: #fff; line-height: 1; user-select: none; }
.avatar.s1 { background: #5254c5; } .avatar.s2 { background: #168f66; } .avatar.s3 { background: #b07800; }
.avatar.s4 { background: #2f6f2f; } .avatar.s5 { background: #c2557f; } .avatar.s6 { background: #c23d3c; }
.avatar.none { background: transparent; border: 1.5px dashed var(--app-border-strong); }

/* ---------- cartes, puces ---------- */
.card { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 12px; padding: 16px 18px;
        box-shadow: var(--app-shadow-sm); }
.card + .card { margin-top: 14px; }
.card-h { font-size: 13.5px; font-weight: 650; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card-h .muted { font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; font-size: 11.5px; font-weight: 600; border-radius: 999px;
        padding: 0 8px; white-space: nowrap; background: var(--rc-accent-soft); color: var(--rc-ink2); line-height: 1; }
.chip.good { background: var(--rc-chip-good); color: var(--rc-good-ink); }
.chip.warn { background: var(--rc-chip-warn); color: var(--rc-ink); }
.chip.serious { background: var(--rc-chip-serious); color: var(--rc-ink); }
.chip.crit { background: var(--rc-chip-crit); color: var(--rc-crit); }
.chip.agent { background: var(--rc-accent); color: #fff; }
.chip.outline { background: transparent; border: 1px solid var(--app-border-strong); }
/* Statut : pastille carrée, icône colorée (forme distincte des chips arrondies). */
.st { --c: var(--rc-g0); display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 6px;
      font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1; color: var(--rc-ink);
      background: var(--app-surface); border: 1px solid var(--app-border-strong); }
.st .ic { color: var(--c); }
.st-entrant { --c: var(--rc-muted); } .st-grooming { --c: var(--rc-serious); } .st-planifie { --c: var(--rc-s1); }
.st-plus_tard { --c: var(--rc-muted); } .st-pret { --c: var(--rc-g0); } .st-en_cours { --c: var(--rc-s3); }
.st-qa { --c: var(--rc-s1); } .st-valide { --c: var(--rc-s2); } .st-en_prod { --c: var(--rc-good); } .st-archive { --c: var(--rc-muted); }
/* Type : icône colorée, libellé en option. */
.ty { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--rc-ink2); white-space: nowrap; }
.ty-bug .ic { color: var(--rc-crit); } .ty-evolution .ic { color: var(--rc-s1); } .ty-incident .ic { color: var(--rc-serious); }
/* Signal posé par un humain : icône et texte, sans fond. */
.sig { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--rc-ink2); white-space: nowrap; cursor: help; }
.sig .ic { color: var(--rc-muted); }
.sig-regression, .sig-regression .ic { color: var(--rc-crit); }
/* Pourquoi le ticket attend une décision. */
.why { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; font-size: 13px;
       background: var(--rc-chip-warn); color: var(--rc-ink); }
.why > .ic { color: var(--rc-serious); margin-top: 1px; }
.why b { display: block; font-weight: 650; }
.why span { color: var(--rc-ink2); }
.why-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--rc-ink2); white-space: nowrap;
            min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.why-mini .ic { color: var(--rc-serious); }
/* Libellé de champ précédé de son icône. */
.lbl { display: inline-flex; align-items: center; gap: 7px; }
.lbl .ic { color: var(--rc-muted); }
.key { font-family: var(--font-mono); font-size: 11.5px; color: var(--rc-muted); white-space: nowrap; letter-spacing: -.01em; }
a.key:hover { color: var(--rc-accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--rc-g0); }
.prio-urgente { background: var(--rc-crit); } .prio-haute { background: var(--rc-serious); }
.prio-normale { background: var(--rc-s1); } .prio-basse { background: var(--rc-g0); }
.prio { display: inline-flex; align-items: center; gap: 2px; }
.prio i { width: 3px; border-radius: 1px; background: var(--app-border-strong); }
.prio i:nth-child(1) { height: 6px; } .prio i:nth-child(2) { height: 9px; } .prio i:nth-child(3) { height: 12px; }
.prio.p-basse i:nth-child(1), .prio.p-normale i:nth-child(-n+2), .prio.p-haute i { background: var(--rc-ink2); }
.prio.p-urgente i { background: var(--rc-crit); }

/* ---------- formulaires ---------- */
input[type=text], input[type=password], input[type=search], input[type=date], input[type=number], input[type=email], select, textarea {
  font: inherit; font-size: 13.5px; color: var(--rc-ink); background: var(--app-surface); border: 1px solid var(--app-border-strong);
  border-radius: 8px; padding: 0 10px; height: 34px; max-width: 100%; transition: border-color .12s, box-shadow .12s; }
select { padding-right: 28px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2388889a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; }
select[multiple] { height: auto; padding: 4px; background-image: none; }
textarea { width: 100%; height: auto; min-height: 96px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--rc-axis); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rc-accent); box-shadow: var(--app-focus); }
input::placeholder, textarea::placeholder { color: var(--rc-muted); }
input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--primary); margin: 0; }
input[type=color] { width: 34px; height: 34px; padding: 2px; border: 1px solid var(--app-border-strong); border-radius: 8px; background: none; }
label { display: block; font-size: 12.5px; color: var(--rc-ink2); font-weight: 600; margin-bottom: 5px; }
.field { margin-bottom: 12px; }
.field.inline { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 10px; margin-bottom: 8px; }
.field.inline label { margin: 0; font-weight: 500; }
.field.inline select, .field.inline input { width: 100%; }
.check { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--rc-ink); font-size: 13px; cursor: pointer; margin: 0; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 14px; }
.formgrid .wide { grid-column: 1 / -1; }
.formgrid input, .formgrid select { width: 100%; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-input label { margin: 0; }
.chips-input input { position: absolute; opacity: 0; pointer-events: none; }
.chips-input span { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
                    border: 1px solid var(--app-border-strong); color: var(--rc-ink2); cursor: pointer; transition: all .12s; }
.chips-input input:checked + span { background: var(--rc-accent-soft); border-color: var(--rc-accent); color: var(--rc-ink); }
.chips-input input:focus-visible + span { box-shadow: var(--app-focus); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px;
       border: 1px solid var(--app-border-strong); background: var(--app-surface); color: var(--rc-ink); font: inherit; font-size: 13.5px;
       font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; line-height: 1;
       box-shadow: var(--app-shadow-sm); transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--app-hover); border-color: var(--rc-axis); }
.btn:focus-visible { outline: none; box-shadow: var(--app-focus); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { color: var(--rc-crit); }
.btn.danger:hover { background: var(--rc-chip-crit); border-color: var(--rc-chip-crit); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--rc-ink2); }
.btn.ghost:hover { color: var(--rc-ink); background: var(--app-hover); }
.btn.icon { width: 28px; padding: 0; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.github { height: 42px; font-size: 14.5px; background: #1f2328; border-color: #1f2328; color: #fff; }
.btn.github:hover { background: #32383f; border-color: #32383f; }
[data-theme="dark"] .btn.github { background: #f0f0f5; border-color: #f0f0f5; color: #0d0d12; }
kbd { font-family: var(--font-mono); font-size: 10.5px; line-height: 16px; min-width: 18px; text-align: center; border: 1px solid var(--app-border-strong);
      border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--rc-ink2); background: var(--app-surface); }

/* ---------- tableaux ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--rc-muted);
            font-weight: 600; padding: 0 12px 9px 0; border-bottom: 1px solid var(--app-border); white-space: nowrap; }
.table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--app-border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr, .table tr:not(:first-child) { transition: background .1s; }
.table.hover tr:not(:first-child):hover td { background: var(--app-hover); }
.table td:first-child, .table th:first-child { padding-left: 2px; }
.tablewrap { overflow-x: auto; }
.cell-title { color: var(--rc-ink); font-weight: 550; }
.cell-title:hover { color: var(--rc-accent); }

/* ---------- board ---------- */
.sprint-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.sprint-head h1 { display: flex; align-items: center; gap: 10px; }
.sprint-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--rc-ink2); margin-top: 4px; }
.sprint-meta span { display: inline-flex; align-items: center; gap: 6px; }
.sprint-meta .ic { color: var(--rc-muted); }
.meter { display: inline-flex; align-items: center; gap: 8px; }
.meter .bar { width: 64px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filters select { height: 32px; font-size: 13px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px;
         align-items: stretch; }
.col { background: var(--app-sunken); border: 1px solid var(--app-border); border-radius: 12px; padding: 10px; min-height: 320px;
       display: flex; flex-direction: column; }
.col-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--rc-ink); padding: 2px 4px 10px; }
.col-h .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--rc-muted); }
.col-h .dot { width: 9px; height: 9px; }
.st-pret { background: var(--rc-g0); } .st-en_cours { background: var(--rc-s3); } .st-qa { background: var(--rc-s1); }
.st-valide { background: var(--rc-s2); } .st-en_prod { background: var(--rc-good); }
.col-list { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 80px; border-radius: 8px; }
.col-empty { margin: 0; padding: 18px 8px; text-align: center; font-size: 12.5px; color: var(--rc-muted);
             border: 1px dashed var(--app-border-strong); border-radius: 8px; }
.col-list .tcard + .col-empty, .col-list.has-cards .col-empty { display: none; }
.tcard { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 10px; padding: 10px 11px 9px;
         cursor: grab; user-select: none; box-shadow: var(--app-shadow-sm); transition: box-shadow .15s, border-color .15s; }
.tcard:hover { box-shadow: var(--app-shadow-md); border-color: var(--app-border-strong); }
.tcard a { -webkit-user-drag: none; }
.tcard .top { display: flex; align-items: center; gap: 6px; }
.tcard .t { display: block; font-size: 13.5px; font-weight: 550; color: var(--rc-ink); margin: 6px 0 0; line-height: 1.4;
            text-decoration: none !important; overflow-wrap: anywhere; }
.tcard .t:hover { color: var(--rc-accent); }
.tcard .meta { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; color: var(--rc-ink2); }
.tcard .meta .avatar { margin-left: auto; }
.tcard .ctx { font-size: 12px; color: var(--rc-ink2); }
.sortable-ghost { opacity: .4; }
.sortable-fallback, .sortable-drag { box-shadow: var(--app-shadow-lg) !important; transform: rotate(1.5deg); }

/* ---------- grooming ---------- */
.gq { display: flex; flex-direction: column; gap: 8px; }
.grow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; background: var(--app-surface);
        border: 1px solid var(--app-border); border-radius: 12px; padding: 13px 16px; cursor: pointer; box-shadow: var(--app-shadow-sm);
        transition: box-shadow .12s, border-color .12s; }
.grow:hover { border-color: var(--app-border-strong); }
.grow.sel { border-color: var(--rc-accent); box-shadow: var(--app-focus); }
.grow.stale::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rc-serious); }
@media (max-width: 860px) { .grow { grid-template-columns: 1fr; gap: 10px; } }
.grow .title { font-weight: 600; font-size: 14.5px; margin: 5px 0 4px; line-height: 1.35; }
.grow .info { font-size: 12.5px; color: var(--rc-ink2); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.grow .info span { display: inline-flex; align-items: center; gap: 5px; }
.proposal { font-size: 13px; color: var(--rc-ink2); border-left: 2px solid var(--app-border); padding-left: 14px; }
.proposal .act { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--rc-ink); margin-bottom: 3px; }
.proposal .why { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.proposal.none { color: var(--rc-muted); display: flex; align-items: center; gap: 7px; }
.gpanel { grid-column: 1 / -1; display: none; border-top: 1px solid var(--app-border); padding-top: 12px; margin-top: 2px; }
.grow.sel .gpanel.open { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gpanel label { margin: 0; }
.shortcuts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--rc-ink2); margin-bottom: 14px;
             padding: 10px 14px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 10px; }
.shortcuts span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- fiche ticket ---------- */
.ticket-head { margin-bottom: 18px; }
.th-keys { display: flex; align-items: center; gap: 10px; margin-top: 10px; min-height: 30px; }
.th-keys .key { font-size: 12.5px; }
.th-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 10px 0 8px; font-size: 13px; color: var(--rc-ink); }
.th-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.th-meta .ic { color: var(--rc-muted); }
.th-origin { font-size: 12.5px; color: var(--rc-muted); }
.sig-input { display: grid; gap: 6px; }
.sig-input label { margin: 0; cursor: pointer; }
.sig-input input { position: absolute; opacity: 0; pointer-events: none; }
.sig-input span { display: grid; grid-template-columns: 18px 1fr; column-gap: 8px; padding: 7px 10px; border-radius: 8px;
                  border: 1px solid var(--app-border); font-size: 12.5px; }
.sig-input .ic { grid-row: span 2; margin-top: 1px; color: var(--rc-muted); }
.sig-input b { font-weight: 600; color: var(--rc-ink); }
.sig-input i { font-style: normal; color: var(--rc-muted); font-size: 11.5px; line-height: 1.35; }
.sig-input label:hover span { background: var(--app-hover); }
.sig-input input:checked + span { background: var(--rc-accent-soft); border-color: var(--rc-accent); }
.sig-input input:checked + span .ic { color: var(--rc-accent); }
.sig-input input:focus-visible + span { box-shadow: var(--app-focus); }
.ticket-title { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; margin: 6px 0 4px; }
.desc { font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }
.desc p { margin: 0 0 10px; } .desc p:last-child { margin-bottom: 0; }
.desc ul, .desc ol { padding-left: 22px; margin: 0 0 10px; }
.desc pre { background: var(--app-sunken); padding: 12px; border-radius: 8px; overflow-x: auto; font-size: 12.5px; }
.desc code { font-size: 12.5px; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 9px 12px; font-size: 13.5px; align-items: center; margin: 0; }
.kv dt { color: var(--rc-muted); font-size: 12.5px; }
.kv dd { margin: 0; min-width: 0; }
.due { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; position: relative; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 7px; width: 7px; height: 7px; border-radius: 50%;
                       background: var(--app-border-strong); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--app-border); }
.timeline li:last-child::after { display: none; }
.timeline li.agent::before { background: var(--rc-accent); }
.timeline .when { color: var(--rc-muted); font-size: 12px; }
.timeline .diff { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: 11.5px; color: var(--rc-ink2); overflow-wrap: anywhere; }
.comment { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--app-border); }
.comment:first-of-type { border-top: 0; padding-top: 2px; }
.comment .head { font-size: 12.5px; color: var(--rc-muted); margin-bottom: 3px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.comment .head b { color: var(--rc-ink); font-weight: 600; }
.composer { border: 1px solid var(--app-border-strong); border-radius: 10px; overflow: hidden; margin-top: 8px; }
.composer:focus-within { border-color: var(--rc-accent); box-shadow: var(--app-focus); }
.composer textarea { border: 0; border-radius: 0; box-shadow: none !important; min-height: 76px; }
.composer .bar-actions { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--app-sunken);
                         border-top: 1px solid var(--app-border); }
details > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; list-style: none; display: flex; align-items: center; gap: 6px; }
details > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.8px solid var(--rc-muted); border-bottom: 1.8px solid var(--rc-muted);
                                 transform: rotate(-45deg); transition: transform .15s; margin-right: 3px; }
details.fold[open] > summary::before { transform: rotate(45deg); }
.link-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--app-border); }
.link-row:last-of-type { border-bottom: 0; }
.link-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop { border: 1px solid var(--app-border); border-radius: 10px; padding: 12px 14px; }
.prop + .prop { margin-top: 10px; }
.prop.primary { border-color: var(--rc-accent); }

/* ---------- divers ---------- */
.empty { padding: 40px 20px; text-align: center; color: var(--rc-ink2); border: 1px dashed var(--app-border-strong); border-radius: 12px;
         background: var(--app-surface); }
.empty .ic { color: var(--rc-muted); margin-bottom: 8px; }
.empty b { display: block; color: var(--rc-ink); font-size: 15px; margin-bottom: 4px; }
.empty p { margin: 0 0 14px; }
.notice { background: var(--rc-chip-warn); border-radius: 10px; padding: 10px 13px; font-size: 13px; margin-bottom: 14px; }
.notice.good { background: var(--rc-chip-good); }
.notice.crit { background: var(--rc-chip-crit); color: var(--rc-crit); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: 420px; display: flex; gap: 10px; align-items: flex-start;
         background: var(--app-surface); color: var(--rc-ink); border: 1px solid var(--app-border); border-left: 3px solid var(--rc-crit);
         box-shadow: var(--app-shadow-lg); border-radius: 10px; padding: 12px 15px; font-size: 13.5px; animation: toast-in .18s ease-out; }
.toast.ok { border-left-color: var(--rc-good); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bar { height: 6px; border-radius: 3px; background: var(--app-border); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--rc-good); border-radius: 3px; }
.secret { font-family: var(--font-mono); font-size: 13px; background: var(--app-sunken); border: 1px solid var(--app-border); padding: 12px;
          border-radius: 8px; word-break: break-all; user-select: all; }
.swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: none; }
.axis-group { margin-bottom: 14px; }
.htmx-request.spin, .htmx-request .spin { opacity: .6; }

/* ---------- connexion ---------- */
body.auth { min-height: 100vh;
  background: radial-gradient(900px 500px at 50% -10%, var(--rc-accent-soft), transparent 70%), var(--app-bg); }
body.auth .page { max-width: none; padding: 0; }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 392px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 16px;
             box-shadow: var(--app-shadow-lg); padding: 34px 32px 28px; text-align: center; }
.auth-icon { display: block; margin: 0 auto 18px; border-radius: 12px; box-shadow: 0 6px 18px rgba(60, 60, 158, .28); }
.auth-card h1 { font-size: 24px; font-weight: 500; color: var(--rc-ink2); letter-spacing: -.02em; }
.auth-card h1 b { font-weight: 750; color: var(--rc-ink); }
.auth-sub { color: var(--rc-ink2); margin: 6px 0 24px; font-size: 14px; }
.auth-note { margin: 10px 0 0; font-size: 12.5px; color: var(--rc-muted); }
.auth-card .notice { text-align: left; }
.auth-sep { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--rc-muted); font-size: 11.5px; font-weight: 600;
            letter-spacing: .06em; text-transform: uppercase; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--app-border); }
.auth-person { margin-bottom: 8px; }
.auth-login { opacity: .7; font-weight: 400; }
.auth-dev { display: flex; gap: 8px; margin-top: 14px; }
.auth-dev input { flex: 1; min-width: 0; }
.auth-foot { margin-top: 18px; font-size: 12px; color: var(--rc-muted); }
.pagehead h1 { display: flex; align-items: center; gap: 10px; }
.table.fixed { table-layout: fixed; }
.table.fixed td:first-child { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .table.fixed { table-layout: auto; min-width: 720px; } }
.admin-line { display: grid; grid-template-columns: minmax(0, 1.1fr) 84px minmax(0, 1.2fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.admin-line input { width: 100%; }
details.menu > summary.btn { border-radius: 7px; }
.split > .card + .card, .grid2 > .card + .card { margin-top: 0; }
.sprint-meta form.inline { display: inline-flex; margin: 0; }
/* Administration Slack : étapes de branchement. */
.ok-banner { background: var(--rc-chip-good); margin-bottom: 16px; }
.ok-banner > .ic { color: var(--rc-good); }
.setup { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.setup-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding: 18px 20px; border-radius: 12px;
              background: var(--app-surface); border: 1px solid var(--app-border); }
.setup-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
           background: var(--rc-accent-soft); color: var(--rc-accent); }
.setup-step.done .setup-n { background: var(--rc-chip-good); color: var(--rc-good); }
.setup-body h2 { font-size: 15px; margin: 4px 0 6px; }
.setup-body p { font-size: 13.5px; }
.setup-form { display: grid; gap: 10px; margin-top: 10px; }
.setup-form .field { display: grid; gap: 4px; margin: 0; }
.setup-form .field > span { font-size: 12.5px; font-weight: 600; }
.setup-form .field i { font-style: normal; font-weight: 400; color: var(--rc-muted); margin-left: 6px; }
.setup-form .btn { justify-self: start; }
.setup-channel { display: grid; gap: 8px; margin-top: 10px; max-width: 460px; }
.manifest { position: relative; margin-top: 8px; }
.manifest textarea { width: 100%; font-family: var(--font-mono); font-size: 11.5px; }
.manifest .btn { position: absolute; top: 8px; right: 8px; }
@media (max-width: 600px) { .setup-step { grid-template-columns: 1fr; padding: 16px; } }
