/* ============================================================
   Cabinet — Suivi des demandes
   Direction : instrument financier. Rail encre-navy, accent teal
   discipliné, références & dates en mono (écritures de grand livre),
   chiffres tabulaires partout.
   ============================================================ */

:root {
  /* Encre & papier */
  --ink-900: #0e1524;   /* rail, texte fort */
  --ink-800: #16203a;
  --ink-700: #1e2b45;
  --ink-500: #43506b;
  --ink-400: #6b7690;
  --ink-300: #9aa3b8;

  --paper:    #f5f6f8;  /* canvas (froid, pas crème) */
  --surface:  #ffffff;
  --line:     #e4e7ec;
  --line-strong: #d3d8e0;

  /* Accent — teal discipliné (héritage "vert du comptable") */
  --teal-700: #0b5c54;
  --teal-600: #0f766e;
  --teal-500: #14907f;
  --teal-050: #e6f2f0;

  /* Sémantique statut */
  --gray-600: #64748b;  --gray-050: #eef1f5;
  --blue-600: #2563eb;  --blue-050: #e8effd;
  --amber-700:#b45309;  --amber-050:#fbf0dc;
  --red-600:  #c2321f;  --red-050:  #fbe9e6;
  --green-700:#15803d;  --green-050:#e5f4ea;

  --text:    #111726;
  --text-dim:#5a6478;

  --radius: 9px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(14,21,36,.05), 0 1px 3px rgba(14,21,36,.04);
  --shadow-md: 0 4px 14px rgba(14,21,36,.08);

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;

  --rail-w: 244px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
  font-feature-settings: "tnum" 1, "cv05" 1;  /* chiffres tabulaires */
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.num  { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Layout */
.app { display: flex; min-height: 100vh; }

.rail {
  width: var(--rail-w);
  flex: 0 0 var(--rail-w);
  background: var(--ink-900);
  color: #c7cee0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.rail__brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.rail__mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: linear-gradient(150deg, var(--teal-500), var(--teal-700));
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: #fff;
  font-size: 15px; letter-spacing: .5px;
}
.rail__title {
  font-family: var(--font-display);
  font-weight: 600; font-size: 14.5px; color: #fff; line-height: 1.15;
}
.rail__title small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-300); letter-spacing: .3px; }

.rail__nav { padding: 12px 12px; flex: 1; overflow-y: auto; }
.rail__section {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .11em;
  color: var(--ink-400); padding: 14px 10px 6px; font-weight: 600;
}
.rail__link {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 11px; border-radius: var(--radius-sm);
  color: #c7cee0; font-size: 13.5px; font-weight: 500;
  margin-bottom: 1px;
}
.rail__link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.rail__link.is-active { background: var(--teal-600); color: #fff; }
.rail__link.is-active svg { color: #fff; }
.rail__link svg { width: 17px; height: 17px; color: var(--ink-300); flex: 0 0 17px; }
.rail__badge {
  margin-left: auto; background: var(--red-600); color: #fff;
  font-size: 11px; font-weight: 600; border-radius: 20px;
  padding: 1px 7px; min-width: 20px; text-align: center;
}
.rail__link.is-active .rail__badge { background: rgba(255,255,255,.25); }

.rail__user {
  padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 32px;
  background: var(--teal-600); color: #fff;
  display: grid; place-items: center;
  font-weight: 600; font-size: 12px; font-family: var(--font-display);
}
.rail__user .meta { min-width: 0; }
.rail__user .meta b { color: #fff; font-size: 13px; font-weight: 600; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail__user .meta span { color: var(--ink-300); font-size: 11px; }
.rail__logout { margin-left: auto; color: var(--ink-300); display: grid; place-items: center; }
.rail__logout:hover { color: #fff; }

/* ------------------------------------------------------------ Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 60px; background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px; position: sticky; top: 0; z-index: 20;
}
.topbar h1 {
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  margin: 0; color: var(--ink-900); letter-spacing: -.01em;
}
.topbar .spacer { flex: 1; }

.content { padding: 26px 28px 48px; max-width: 1320px; width: 100%; }

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  padding: 8px 15px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; background: none;
  line-height: 1.2; transition: background .12s, border-color .12s;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--teal-600); color: #fff; }
.btn--primary:hover { background: var(--teal-700); text-decoration: none; }
.btn--ghost { background: var(--surface); color: var(--ink-700); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--paper); text-decoration: none; }
.btn--subtle { color: var(--ink-500); }
.btn--subtle:hover { background: var(--gray-050); text-decoration: none; }
.btn--sm { padding: 5px 10px; font-size: 12.5px; }
.btn--danger { background: var(--red-600); color: #fff; }

/* ------------------------------------------------------------ Cards / panels */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.panel__head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.panel__head h2 {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  margin: 0; color: var(--ink-900);
}
.panel__head .spacer { flex: 1; }
.panel__body { padding: 18px; }
.panel__body--flush { padding: 0; }

/* ------------------------------------------------------------ KPI strip */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ink-300);
}
.kpi--total::before  { background: var(--ink-700); }
.kpi--ouvert::before { background: var(--blue-600); }
.kpi--retard::before { background: var(--red-600); }
.kpi--bientot::before{ background: var(--amber-700); }
.kpi--sla::before    { background: var(--green-700); }
.kpi__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-dim); font-weight: 600; margin-bottom: 8px;
}
.kpi__value {
  font-family: var(--font-display); font-size: 27px; font-weight: 600;
  color: var(--ink-900); line-height: 1; font-variant-numeric: tabular-nums;
}
.kpi__value small { font-size: 15px; color: var(--ink-400); font-weight: 500; }
.kpi__sub { font-size: 11.5px; color: var(--text-dim); margin-top: 5px; }

/* ------------------------------------------------------------ Tables */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-dim); font-weight: 600;
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: #fafbfc;
}
table.grid td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover { background: #fafbfd; }
table.grid tr.row-link { cursor: pointer; }
.ref { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-700); font-weight: 500; }
.subj { font-weight: 500; color: var(--ink-900); }
.muted { color: var(--text-dim); }
.due-cell { font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; }

/* ------------------------------------------------------------ Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 2px 9px;
  border-radius: 20px; line-height: 1.5; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.badge--nouveau { background: var(--gray-050); color: var(--gray-600); }
.badge--nouveau::before { background: var(--gray-600); }
.badge--en_cours { background: var(--blue-050); color: var(--blue-600); }
.badge--en_cours::before { background: var(--blue-600); }
.badge--en_attente { background: var(--amber-050); color: var(--amber-700); }
.badge--en_attente::before { background: var(--amber-700); }
.badge--resolu { background: var(--green-050); color: var(--green-700); }
.badge--resolu::before { background: var(--green-700); }
.badge--cloture { background: var(--gray-050); color: var(--ink-500); }
.badge--cloture::before { background: var(--ink-500); }

/* SLA chip */
.sla {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  padding: 2px 8px; border-radius: 5px;
}
.sla--en_retard { background: var(--red-050); color: var(--red-600); }
.sla--bientot   { background: var(--amber-050); color: var(--amber-700); }
.sla--dans_les_temps { background: var(--green-050); color: var(--green-700); }
.sla--retard_resolu  { background: var(--red-050); color: var(--red-600); }
.sla--ouvert { background: var(--gray-050); color: var(--gray-600); }
.sla-ico { width: 12px; height: 12px; flex: 0 0 12px; }

/* Priority ticks */
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; }
.prio__dot { width: 8px; height: 8px; border-radius: 2px; }
.prio--BASSE   .prio__dot { background: var(--ink-300); }
.prio--NORMALE .prio__dot { background: var(--blue-600); }
.prio--HAUTE   .prio__dot { background: var(--amber-700); }
.prio--URGENTE .prio__dot { background: var(--red-600); }

.domain-tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 5px;
  letter-spacing: .02em;
}
.domain-tag--client { background: var(--teal-050); color: var(--teal-700); }
.domain-tag--rh { background: #efe9fb; color: #6d28d9; }

/* ------------------------------------------------------------ Forms */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-700);
  margin-bottom: 6px;
}
.field .hint { font-size: 11.5px; color: var(--text-dim); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number],
select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 14px;
  padding: 9px 11px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
textarea { resize: vertical; min-height: 92px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(15,118,110,.13);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-row { display: flex; gap: 10px; align-items: flex-end; }

/* ------------------------------------------------------------ Toolbar / filters */
.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar select, .toolbar input[type=text] { width: auto; min-width: 150px; }
.toolbar .search { min-width: 230px; }

/* ------------------------------------------------------------ Detail */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 11px 16px; font-size: 13px; }
.meta-list dt { color: var(--text-dim); font-weight: 500; }
.meta-list dd { margin: 0; font-weight: 500; color: var(--ink-900); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative; padding: 0 0 16px 22px; font-size: 13px;
}
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 4px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal-500);
  box-shadow: 0 0 0 3px var(--teal-050);
}
.timeline li::after {
  content: ""; position: absolute; left: 7.5px; top: 14px; bottom: 0;
  width: 1px; background: var(--line);
}
.timeline li:last-child::after { display: none; }
.timeline .t-msg { color: var(--ink-800); }
.timeline .t-meta { color: var(--text-dim); font-size: 11.5px; margin-top: 2px; }
.timeline li.k-escalated::before { background: var(--red-600); box-shadow: 0 0 0 3px var(--red-050); }
.timeline li.k-reminder::before  { background: var(--amber-700); box-shadow: 0 0 0 3px var(--amber-050); }
.timeline li.k-status::before    { background: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-050); }

.comment {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 13px; margin-bottom: 10px;
}
.comment .c-head { display: flex; gap: 8px; align-items: center; margin-bottom: 5px; }
.comment .c-head b { font-size: 12.5px; }
.comment .c-head span { font-size: 11.5px; color: var(--text-dim); }

/* ------------------------------------------------------------ Progress / SLA bar */
.slabar { height: 4px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 8px; }
.slabar > span { display: block; height: 100%; border-radius: 3px; }

/* ------------------------------------------------------------ Flash */
.flashes { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px;
  border: 1px solid; display: flex; align-items: center; gap: 9px;
}
.flash--success { background: var(--green-050); border-color: #bfe3cb; color: var(--green-700); }
.flash--danger  { background: var(--red-050);   border-color: #f0c4bd; color: var(--red-600); }
.flash--warning { background: var(--amber-050); border-color: #edd6a8; color: var(--amber-700); }

/* ------------------------------------------------------------ Empty state */
.empty { text-align: center; padding: 46px 20px; color: var(--text-dim); }
.empty svg { width: 34px; height: 34px; color: var(--line-strong); margin-bottom: 10px; }
.empty h3 { font-family: var(--font-display); font-size: 15px; color: var(--ink-700); margin: 0 0 4px; }

/* ------------------------------------------------------------ Split status bars (dashboard) */
.stack { display: flex; flex-direction: column; gap: 10px; }
.statrow { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.statrow .lbl { width: 110px; color: var(--ink-700); font-weight: 500; }
.statrow .bar { flex: 1; height: 8px; background: var(--gray-050); border-radius: 4px; overflow: hidden; }
.statrow .bar > span { display: block; height: 100%; }
.statrow .val { width: 32px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-900); }

.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }

.section-title {
  font-family: var(--font-display); font-size: 12px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-dim); font-weight: 600; margin: 26px 0 12px;
}

/* ------------------------------------------------------------ Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-aside {
  background: var(--ink-900); color: #fff; padding: 54px 52px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-aside::after {
  content: ""; position: absolute; right: -120px; bottom: -120px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20,144,127,.35), transparent 70%);
}
.login-aside .brand { display: flex; align-items: center; gap: 12px; }
.login-aside h2 {
  font-family: var(--font-display); font-size: 30px; font-weight: 600;
  line-height: 1.2; margin: 0 0 12px; letter-spacing: -.02em; max-width: 440px;
}
.login-aside p { color: var(--ink-300); font-size: 14.5px; max-width: 420px; line-height: 1.6; }
.login-aside .ledger {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-400);
  display: flex; flex-direction: column; gap: 4px;
}
.login-aside .ledger span { display: flex; justify-content: space-between; max-width: 300px;
  border-bottom: 1px dotted rgba(255,255,255,.12); padding-bottom: 3px; }

.login-main { display: grid; place-items: center; padding: 40px; background: var(--surface); }
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { font-family: var(--font-display); font-size: 22px; margin: 0 0 6px; color: var(--ink-900); }
.login-card > p { color: var(--text-dim); margin: 0 0 26px; font-size: 13.5px; }
.demo-hint {
  margin-top: 22px; padding: 12px 14px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); line-height: 1.7;
}
.demo-hint b { color: var(--ink-700); }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .detail-grid, .two-col { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-aside { display: none; }
}
@media (max-width: 720px) {
  .rail { position: fixed; z-index: 100; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-md); }
  .rail.open { transform: none; }
  .form-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 0 16px; }
  .menu-toggle { display: inline-grid !important; }
}
.menu-toggle { display: none; }

/* ============================================================
   Composants spécifiques SMSI
   ============================================================ */

/* Niveaux de risque */
.risk { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:2px 9px; border-radius:20px; white-space:nowrap; }
.risk::before { content:""; width:7px; height:7px; border-radius:2px; }
.risk--faible   { background:var(--green-050); color:var(--green-700); }
.risk--faible::before { background:var(--green-700); }
.risk--modere   { background:#fbf0dc; color:var(--amber-700); }
.risk--modere::before { background:var(--amber-700); }
.risk--eleve    { background:#fdeee1; color:#c2540b; }
.risk--eleve::before { background:#c2540b; }
.risk--critique { background:var(--red-050); color:var(--red-600); }
.risk--critique::before { background:var(--red-600); }
.risk--inconnu  { background:var(--gray-050); color:var(--gray-600); }
.risk--inconnu::before { background:var(--gray-600); }

/* Statuts de mesure (DdA) */
.cstatus { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; padding:2px 9px; border-radius:20px; white-space:nowrap; }
.cstatus::before { content:""; width:6px; height:6px; border-radius:50%; }
.cstatus--IMPLEMENTE { background:var(--green-050); color:var(--green-700); }
.cstatus--IMPLEMENTE::before { background:var(--green-700); }
.cstatus--EN_COURS { background:var(--blue-050); color:var(--blue-600); }
.cstatus--EN_COURS::before { background:var(--blue-600); }
.cstatus--NON_DEMARRE { background:var(--gray-050); color:var(--gray-600); }
.cstatus--NON_DEMARRE::before { background:var(--gray-600); }
.cstatus--NON_APPLICABLE { background:#f1eef7; color:#6d5aa6; }
.cstatus--NON_APPLICABLE::before { background:#6d5aa6; }

/* Type de constat */
.ftype { font-size:11.5px; font-weight:600; padding:2px 8px; border-radius:5px; white-space:nowrap; }
.ftype--NC_MAJEURE { background:var(--red-050); color:var(--red-600); }
.ftype--NC_MINEURE { background:#fdeee1; color:#c2540b; }
.ftype--OBSERVATION { background:var(--blue-050); color:var(--blue-600); }
.ftype--OPPORTUNITE { background:var(--teal-050); color:var(--teal-700); }

/* Pastille d'applicabilité */
.appl { font-size:11.5px; font-weight:600; padding:2px 8px; border-radius:5px; }
.appl--in { background:var(--teal-050); color:var(--teal-700); }
.appl--out { background:#f1eef7; color:#6d5aa6; }

/* Matrice des risques 5x5 */
.matrix { border-collapse:separate; border-spacing:4px; }
.matrix td, .matrix th { text-align:center; }
.matrix th { font-size:11px; color:var(--text-dim); font-weight:600; padding:2px; }
.matrix .cell { width:52px; height:40px; border-radius:6px; font-weight:700; font-size:14px;
  color:#fff; position:relative; font-variant-numeric:tabular-nums; }
.matrix .axis-label { font-size:10.5px; color:var(--text-dim); font-weight:600; text-transform:uppercase; letter-spacing:.06em; }

/* Barre de couverture */
.cov { height:7px; border-radius:4px; background:var(--gray-050); overflow:hidden; }
.cov > span { display:block; height:100%; background:var(--teal-500); border-radius:4px; }

/* Anneau de progression DdA */
.ring-wrap { display:flex; align-items:center; gap:16px; }
.ring { --p:0; width:96px; height:96px; border-radius:50%;
  background:conic-gradient(var(--teal-500) calc(var(--p)*1%), var(--gray-050) 0);
  display:grid; place-items:center; }
.ring::before { content:""; position:absolute; width:72px; height:72px; border-radius:50%; background:var(--surface); }
.ring span { position:relative; font-family:var(--font-display); font-size:22px; font-weight:600; color:var(--ink-900); }

/* Puce de mesure liée */
.chip { display:inline-flex; align-items:center; gap:5px; font-family:var(--font-mono); font-size:12px;
  background:var(--paper); border:1px solid var(--line); border-radius:5px; padding:2px 8px; margin:2px 3px 2px 0; color:var(--ink-700); }
.chip a { color:inherit; }

/* Checkboxes de mesures (formulaires) */
.ctrl-picker { max-height:280px; overflow-y:auto; border:1px solid var(--line); border-radius:8px; padding:6px; }
.ctrl-picker label { display:flex; align-items:center; gap:8px; padding:5px 8px; border-radius:5px; font-size:12.5px; font-weight:400; cursor:pointer; }
.ctrl-picker label:hover { background:var(--paper); }
.ctrl-picker input { width:auto; }
.ctrl-picker .ref { flex:0 0 42px; }

.meta-inline { display:flex; gap:18px; flex-wrap:wrap; font-size:13px; }
.meta-inline b { color:var(--ink-900); }
.scorebox { display:inline-grid; place-items:center; min-width:34px; height:26px; padding:0 6px; border-radius:6px;
  font-weight:700; font-size:13px; color:#fff; font-variant-numeric:tabular-nums; }

/* Pastilles de type de fichier (pièces jointes) */
.filetag { display:inline-grid; place-items:center; width:30px; height:22px; border-radius:4px;
  font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.02em;
  background:var(--gray-050); color:var(--gray-600); }
.filetag--pdf { background:#fdeceb; color:#c2321f; }
.filetag--doc, .filetag--docx { background:#e8f0fb; color:#1d4ed8; }
.filetag--xls, .filetag--xlsx, .filetag--csv { background:#e7f5ec; color:#15803d; }
.filetag--ppt, .filetag--pptx { background:#fdefe3; color:#c2540b; }
.filetag--png, .filetag--jpg, .filetag--jpeg, .filetag--gif, .filetag--webp, .filetag--svg { background:#f1eef7; color:#6d5aa6; }
.filetag--zip, .filetag--7z, .filetag--rar { background:#eef0f2; color:#475569; }
