/* =========================================================
   Prox-i · Suivi de maintenance
   Design system aligné sur la charte prox-i.pf
   Noir · Blanc · Cyan #14dff4 — Lustria (titres) / Muli (texte)
   ========================================================= */

/* ---------- Polices de la charte, hébergées localement ---------- */
@font-face { font-family: 'Lustria'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/lustria-400.woff2') format('woff2'); }
@font-face { font-family: 'Muli'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('fonts/muli-300.woff2') format('woff2'); }
@font-face { font-family: 'Muli'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/muli-400.woff2') format('woff2'); }
@font-face { font-family: 'Muli'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/muli-600.woff2') format('woff2'); }
@font-face { font-family: 'Muli'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/muli-700.woff2') format('woff2'); }
@font-face { font-family: 'Muli'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('fonts/muli-800.woff2') format('woff2'); }

:root {
  /* Charte */
  --noir: #000000;
  --blanc: #ffffff;
  --cyan: #14dff4;              /* accent signature — fonds & filets uniquement */
  --cyan-encre: #06788a;        /* déclinaison lisible sur fond clair */
  --cyan-voile: #e4fbfe;
  --cyan-nuit: #7fecfa;         /* cyan sur fond noir */

  /* Neutres */
  --fond: #f4f4f4;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #efefef;
  --ligne: #e2e2e2;
  --ligne-forte: #cfcfcf;
  --encre: #111111;
  --encre-2: #5c5c5c;
  /* Le gris #a6a6a6 de la charte est réservé aux fonds noirs (7,4:1).
     Sur blanc il tombe à 2,4:1 : on utilise une déclinaison plus dense. */
  --encre-3: #737373;
  --gris-charte: #a6a6a6;

  /* Alias conservés pour les styles de page */
  --bg: var(--fond);
  --border: var(--ligne);
  --border-strong: var(--ligne-forte);
  --text: var(--encre);
  --text-2: var(--encre-2);
  --text-3: var(--encre-3);
  --brand: var(--cyan);
  --brand-dark: var(--cyan-encre);
  --brand-soft: var(--cyan-voile);
  --nav: var(--noir);
  --nav-2: #1a1a1a;

  /* Sémantique */
  --ok: #15734a;        --ok-soft: #e7f3ec;
  --warn: #935c05;      --warn-soft: #fbf1e0;
  --danger: #c4211a;    --danger-soft: #fceceb;
  --info: #06788a;      --info-soft: #e4fbfe;
  --neutral: #5c5c5c;   --neutral-soft: #eeeeee;
  --purple: #5b3fa8;    --purple-soft: #eeeafa;

  /* Formes — nettes, pas de rondeur SaaS */
  --radius: 3px;
  --radius-sm: 2px;
  --radius-lg: 4px;

  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 20px 60px -24px rgba(0, 0, 0, .5);

  --serif: 'Lustria', Georgia, 'Times New Roman', serif;
  --font: 'Muli', 'Segoe UI', -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Cascadia Mono', 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--encre);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan-encre); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3, h4 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  letter-spacing: -.005em; color: var(--encre);
}

button, input, select, textarea { font: inherit; color: inherit; }

/* ---------------------------------------------------------
   Structure
   --------------------------------------------------------- */

.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
.page { padding: 26px 34px 60px; max-width: 1560px; width: 100%; }

/* ---------------------------------------------------------
   Barre latérale — noir plein
   --------------------------------------------------------- */

.sidebar {
  background: var(--noir); color: #b4b4b4;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}

.brand { padding: 24px 18px 20px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.brand-logo { display: block; line-height: 0; }
.brand-logo img { width: 152px; height: auto; display: block; }
.brand-sub {
  font-size: 9.5px; letter-spacing: .21em; text-transform: uppercase;
  color: #6f6f6f; font-weight: 700; margin-top: 13px;
  padding-top: 11px; border-top: 1px solid rgba(255, 255, 255, .1);
}
.brand-sub b { color: var(--cyan); font-weight: 700; }

.nav { padding: 8px 0 22px; flex: 1; }
.nav-label {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .17em;
  color: #6b6b6b; font-weight: 800; padding: 18px 18px 8px;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 18px; color: #b4b4b4;
  font-size: 13.5px; font-weight: 400; position: relative;
  border-left: 2px solid transparent;
}
.nav-item:hover { background: #131313; color: #ededed; text-decoration: none; }
.nav-item svg { width: 16px; height: 16px; flex: none; opacity: .7; }
.nav-item.is-active {
  background: #131313; color: var(--blanc);
  border-left-color: var(--cyan); font-weight: 600;
}
.nav-item.is-active svg { opacity: 1; color: var(--cyan); }
.nav-count {
  margin-left: auto; font-size: 10.5px; font-weight: 700;
  background: rgba(255, 255, 255, .1); color: #d0d0d0;
  padding: 1px 6px; border-radius: var(--radius-sm); min-width: 20px; text-align: center;
}
.nav-item.is-active .nav-count { background: var(--cyan); color: var(--noir); }
.nav-count.is-alert { background: rgba(196, 33, 26, .3); color: #ff9d97; }

.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 14px 18px; display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 31px; height: 31px; border-radius: 50%;
  background: #262626; color: #d4d4d4; border: 1px solid #3a3a3a;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none;
}
.avatar.sm { width: 23px; height: 23px; font-size: 9.5px; }
.avatar.xs { width: 20px; height: 20px; font-size: 8.5px; border-width: 1px; }
.sidebar-foot .who { font-size: 12.5px; color: #ededed; font-weight: 600; line-height: 1.3; }
.sidebar-foot .role { font-size: 10.5px; color: #767676; letter-spacing: .04em; }

/* ---------------------------------------------------------
   Barre supérieure
   --------------------------------------------------------- */

.topbar {
  background: var(--surface); border-bottom: 1px solid var(--noir);
  padding: 0 34px; min-height: 64px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 21px; line-height: 1.2; }
.topbar .crumb {
  font-size: 11.5px; color: var(--encre-3); margin-top: 2px;
  letter-spacing: .02em;
}
.topbar .spacer { flex: 1; }

/* ---------------------------------------------------------
   Boutons & champs
   --------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 1px solid var(--noir);
  background: var(--surface); color: var(--noir);
  border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}
.btn:hover { background: var(--noir); color: var(--blanc); text-decoration: none; }
.btn svg { width: 15px; height: 15px; }

.btn-primary { background: var(--cyan); border-color: var(--cyan); color: var(--noir); font-weight: 700; }
.btn-primary:hover { background: var(--noir); border-color: var(--noir); color: var(--cyan); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--blanc); }
.btn-danger:hover { background: #9d1a14; border-color: #9d1a14; color: var(--blanc); }

.btn-ghost { border-color: transparent; background: transparent; color: var(--encre-2); font-weight: 400; }
.btn-ghost:hover { background: var(--surface-3); color: var(--noir); }

.btn-sm { padding: 4px 9px; font-size: 11.5px; gap: 5px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { padding: 11px 20px; font-size: 13.5px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.select, .input, .textarea {
  padding: 8px 11px; border: 1px solid var(--ligne-forte);
  border-radius: var(--radius-sm); background: var(--surface);
  font-size: 13px; outline: none; width: 100%;
}
.select:focus, .input:focus, .textarea:focus {
  border-color: var(--noir); box-shadow: 0 0 0 2px var(--cyan);
}
.select {
  cursor: pointer; padding-right: 28px; appearance: none;
  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='%23111' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.select.w-auto, .input.w-auto { width: auto; }
.textarea { resize: vertical; min-height: 70px; line-height: 1.6; }

.field { display: block; margin-bottom: 13px; }
.field > label, .lbl {
  display: block; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .13em;
  color: var(--encre-2); margin-bottom: 6px;
}
.hint { font-size: 11.5px; color: var(--encre-3); margin-top: 5px; }

.search { position: relative; display: inline-flex; align-items: center; }
.search svg { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--encre-3); pointer-events: none; }
.search .input { padding-left: 32px; min-width: 268px; }

/* ---------------------------------------------------------
   Cartes
   --------------------------------------------------------- */

.card { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--radius); }
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--ligne);
  display: flex; align-items: center; gap: 12px;
}
.card-head h2, .card-head h3 { font-size: 15.5px; font-family: var(--serif); }
.card-head .spacer { flex: 1; }
.card-head .sub {
  font-size: 11px; color: var(--encre-3); font-weight: 400;
  text-transform: uppercase; letter-spacing: .1em;
}
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 18px; }
.card-foot {
  padding: 12px 18px; border-top: 1px solid var(--ligne);
  background: var(--surface-2); font-size: 12.5px; color: var(--encre-2);
  display: flex; align-items: center; gap: 10px;
}

.section-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .17em; color: var(--encre-2); margin: 26px 0 12px;
  padding-bottom: 7px; border-bottom: 2px solid var(--cyan); display: inline-block;
}
.section-title:first-child { margin-top: 0; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 336px; align-items: start; }
.grid-session { grid-template-columns: minmax(0, 1fr) 326px; align-items: start; }

@media (max-width: 1280px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-main, .grid-session { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .grid-4, .grid-3, .grid-5, .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* ---------------------------------------------------------
   Indicateurs
   --------------------------------------------------------- */

.kpi {
  background: var(--surface); border: 1px solid var(--ligne);
  border-top: 3px solid var(--noir);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 15px 17px 16px; position: relative;
}
.kpi .kpi-label {
  font-size: 9.5px; font-weight: 800; color: var(--encre-2);
  text-transform: uppercase; letter-spacing: .15em;
  display: flex; align-items: center; gap: 6px;
}
.kpi .kpi-value {
  font-family: var(--serif); font-size: 33px; font-weight: 400;
  letter-spacing: -.02em; margin: 9px 0 3px; line-height: 1;
}
.kpi .kpi-value small { font-size: 16px; color: var(--encre-3); }
.kpi .kpi-foot { font-size: 11.5px; color: var(--encre-2); line-height: 1.45; }
.kpi.accent-brand  { border-top-color: var(--cyan); }
.kpi.accent-ok     { border-top-color: var(--ok); }
.kpi.accent-warn   { border-top-color: #d98c0c; }
.kpi.accent-danger { border-top-color: var(--danger); }

/* ---------------------------------------------------------
   Étiquettes
   --------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border-radius: var(--radius-sm);
  font-size: 10px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; white-space: nowrap; line-height: 1.7;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.badge-ok      { background: var(--ok-soft); color: var(--ok); }
.badge-warn    { background: var(--warn-soft); color: var(--warn); }
.badge-danger  { background: var(--danger-soft); color: var(--danger); }
.badge-info    { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--neutral-soft); color: var(--neutral); }
.badge-brand   { background: var(--noir); color: var(--cyan); }
.badge-purple  { background: var(--purple-soft); color: var(--purple); }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 7px; border-radius: var(--radius-sm);
  border: 1px solid var(--ligne-forte); background: var(--surface);
  font-size: 11px; color: var(--encre-2); font-weight: 600; white-space: nowrap;
}
/* Puce de prestation contractuelle */
.presta {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 7px; border-radius: var(--radius-sm);
  border: 1px solid var(--ligne-forte); background: var(--surface);
  font-size: 10.5px; font-weight: 700; color: var(--encre-2);
  white-space: nowrap; line-height: 1.7;
}
.presta b {
  font-weight: 800; color: var(--encre);
  padding-left: 5px; margin-left: 1px; border-left: 1px solid var(--ligne);
}
.presta.is-campagne { border-color: var(--noir); background: var(--noir); color: #d0d0d0; }
.presta.is-campagne b { color: var(--cyan); border-left-color: #3d3d3d; }
.presta.is-plat { color: var(--encre-3); background: var(--surface-2); }

.tech { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tech::before { content: ""; width: 8px; height: 8px; flex: none; }
.tech-wordpress::before { background: #21759b; }
.tech-symfony::before   { background: #000000; }
.tech-drupal::before    { background: #0678be; }
.tech-proxi::before     { background: var(--cyan); }
.tech-react::before     { background: #23a6d5; }
.tech-php::before       { background: #8892bf; }
.tech-mobile::before    { background: var(--purple); }

/* ---------------------------------------------------------
   Tableaux
   --------------------------------------------------------- */

.table-wrap { overflow-x: auto; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .14em; color: var(--encre-2);
  padding: 10px 14px; border-bottom: 1px solid var(--noir);
  background: var(--surface); white-space: nowrap; position: sticky; top: 0;
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--ligne); vertical-align: middle; }
table.tbl tbody tr:hover { background: var(--cyan-voile); }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl .nowrap { white-space: nowrap; }
table.tbl .cell-main { font-weight: 700; color: var(--encre); }
table.tbl .cell-main:hover { color: var(--cyan-encre); }
table.tbl .cell-sub { font-size: 11px; color: var(--encre-3); }
table.tbl tr.row-group td {
  background: var(--surface-3); font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .14em; color: var(--encre-2); padding: 7px 14px;
}
table.tbl tr.is-muted td { opacity: .5; }
table.tbl td .stack { display: flex; flex-direction: column; gap: 1px; }
table.tbl .actions { text-align: right; white-space: nowrap; }

/* ---------------------------------------------------------
   Jauges
   --------------------------------------------------------- */

.bar { height: 6px; background: var(--surface-3); overflow: hidden; position: relative; border-radius: 0; }
.bar > span { display: block; height: 100%; background: var(--cyan); transition: width .3s; }
.bar.sm { height: 4px; }
.bar.lg { height: 9px; }
.bar > span.is-ok { background: var(--ok); }
.bar > span.is-warn { background: #d98c0c; }
.bar > span.is-danger { background: var(--danger); }

.meter-line { display: flex; align-items: center; gap: 10px; }
.meter-line .bar { flex: 1; min-width: 60px; }
.meter-line .meter-val {
  font-size: 11.5px; font-variant-numeric: tabular-nums;
  color: var(--encre-2); white-space: nowrap; font-weight: 700;
}

/* ---------------------------------------------------------
   Listes
   --------------------------------------------------------- */

.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--ligne); }
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--surface-2); }
.list-item .li-icon { width: 25px; height: 25px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm); }
.list-item .li-icon svg { width: 14px; height: 14px; }
.li-icon.tone-danger { background: var(--danger-soft); color: var(--danger); }
.li-icon.tone-warn   { background: var(--warn-soft); color: var(--warn); }
.li-icon.tone-info   { background: var(--noir); color: var(--cyan); }
.li-icon.tone-ok     { background: var(--ok-soft); color: var(--ok); }
.list-item .li-title { font-size: 13px; font-weight: 700; line-height: 1.4; }
.list-item .li-desc { font-size: 12px; color: var(--encre-2); margin-top: 3px; line-height: 1.5; }
.list-item .li-meta {
  font-size: 10px; color: var(--encre-3); margin-top: 5px;
  text-transform: uppercase; letter-spacing: .11em; font-weight: 700;
}

/* Chronologie */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--ligne-forte); }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item::before {
  content: ""; position: absolute; left: -24px; top: 5px;
  width: 9px; height: 9px; background: var(--blanc); border: 2px solid var(--ligne-forte);
}
.tl-item.is-ok::before { border-color: var(--ok); background: var(--ok); }
.tl-item.is-warn::before { border-color: #d98c0c; background: #d98c0c; }
.tl-item.is-danger::before { border-color: var(--danger); background: var(--danger); }
.tl-date { font-size: 10.5px; color: var(--encre-2); font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.tl-title { font-size: 13px; font-weight: 700; margin-top: 2px; }
.tl-body { font-size: 12.5px; color: var(--encre-2); margin-top: 4px; line-height: 1.55; }

/* ---------------------------------------------------------
   Protocole (session)
   --------------------------------------------------------- */

.step-group { margin-bottom: 14px; }
.step-group-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 2px;
  font-size: 9.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .15em; color: var(--encre-2);
}
.step-group-head .gline { flex: 1; height: 1px; background: var(--ligne); }

.step {
  border: 1px solid var(--ligne); background: var(--surface);
  margin-bottom: 7px; overflow: hidden;
  border-left: 3px solid var(--ligne);
  transition: border-color .15s;
}
.step.is-current { border-color: var(--ligne); border-left-color: var(--cyan); }
.step.is-done { background: var(--surface-2); border-left-color: var(--ok); }
.step.is-failed { border-left-color: var(--danger); }
.step.is-skipped { border-left-color: var(--ligne-forte); opacity: .68; }

.step-head { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; cursor: pointer; }
.step-head:hover { background: var(--surface-2); }
.step-check {
  width: 20px; height: 20px; flex: none; margin-top: 1px; border-radius: 50%;
  border: 1.5px solid var(--ligne-forte); background: var(--surface);
  display: grid; place-items: center; color: transparent;
}
.step-check svg { width: 11px; height: 11px; }
.step.is-done .step-check { background: var(--ok); border-color: var(--ok); color: var(--blanc); }
.step.is-failed .step-check { background: var(--danger); border-color: var(--danger); color: var(--blanc); }
.step.is-skipped .step-check { background: var(--neutral-soft); border-color: var(--ligne-forte); color: var(--encre-3); }
.step-title { font-size: 13.5px; font-weight: 600; flex: 1; line-height: 1.45; }
.step.is-done .step-title { color: var(--encre-2); font-weight: 400; }
.step-num { font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--encre-3); font-weight: 800; margin-right: 3px; }
.step-body { padding: 14px 14px 15px 44px; border-top: 1px solid var(--ligne); }
.step-instructions {
  background: var(--noir); color: #d8d8d8; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 12.5px; line-height: 1.65; margin-bottom: 14px;
}
.step-instructions b, .step-instructions strong { color: var(--cyan); font-weight: 700; }
.step-instructions ul { margin: 7px 0 0; padding-left: 17px; }
.step-instructions li { margin-bottom: 3px; }
.step-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }

/* ---------------------------------------------------------
   Bandeau de session
   --------------------------------------------------------- */

.session-bar {
  background: var(--noir); color: var(--blanc);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 22px; margin-bottom: 14px; flex-wrap: wrap;
}
.session-bar .btn { border-color: #3d3d3d; background: transparent; color: var(--blanc); }
.session-bar .btn:hover { background: var(--blanc); color: var(--noir); border-color: var(--blanc); }
.session-bar .btn-primary { background: var(--cyan); border-color: var(--cyan); color: var(--noir); }
.session-bar .btn-primary:hover { background: var(--blanc); border-color: var(--blanc); color: var(--noir); }
.session-bar .meter-val { color: #d8d8d8; }
.session-bar .bar { background: #2e2e2e; }

.timer {
  font-family: var(--mono); font-size: 32px; font-weight: 600;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--cyan);
}
.timer.is-over { color: #ff8078; }
.timer-label {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .16em;
  color: #8a8a8a; font-weight: 800; display: flex; align-items: center; gap: 6px;
}
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .2 } }

.vsep { width: 1px; align-self: stretch; background: #333; }

/* ---------------------------------------------------------
   Journal
   --------------------------------------------------------- */

.journal { max-height: 340px; overflow-y: auto; }
.journal-item { display: flex; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--ligne); font-size: 12.5px; }
.journal-item:last-child { border-bottom: none; }
.journal-time { font-family: var(--mono); font-size: 10.5px; color: var(--encre-3); flex: none; padding-top: 2px; font-weight: 600; }
.journal-text { color: var(--encre-2); line-height: 1.5; }
.journal-text b { color: var(--encre); font-weight: 700; }

/* ---------------------------------------------------------
   Onglets
   --------------------------------------------------------- */

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--noir); margin-bottom: 20px; }
.tab {
  padding: 10px 18px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em; color: var(--encre-2);
  border: none; background: none; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--noir); }
.tab.is-active { color: var(--noir); border-bottom-color: var(--cyan); }

/* ---------------------------------------------------------
   Barre d’outils
   --------------------------------------------------------- */

.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }

.seg { display: inline-flex; border: 1px solid var(--noir); border-radius: var(--radius-sm); overflow: hidden; }
.seg button {
  padding: 7px 13px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em;
  background: var(--surface); border: none; border-right: 1px solid var(--ligne);
  cursor: pointer; color: var(--encre-2);
}
.seg button:last-child { border-right: none; }
.seg button.is-active { background: var(--noir); color: var(--cyan); }
.seg button:not(.is-active):hover { background: var(--surface-3); color: var(--noir); }

/* ---------------------------------------------------------
   Listes de définitions
   --------------------------------------------------------- */

.dl { display: flex; flex-direction: column; }
.dl-row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--ligne); font-size: 13px; }
.dl-row:last-child { border-bottom: none; }
.dl-row dt {
  color: var(--encre-3); flex: none; width: 128px;
  font-size: 9.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; padding-top: 3px;
}
.dl-row dd { margin: 0; flex: 1; min-width: 0; font-weight: 400; }

/* ---------------------------------------------------------
   Encarts
   --------------------------------------------------------- */

.callout {
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 12.5px; line-height: 1.6; display: flex; gap: 10px;
  border-left: 3px solid;
}
.callout svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.callout-danger { background: var(--danger-soft); color: #7d1611; border-color: var(--danger); }
.callout-warn   { background: var(--warn-soft); color: #6b4304; border-color: #d98c0c; }
.callout-info   { background: var(--cyan-voile); color: #04525f; border-color: var(--cyan); }
.callout-ok     { background: var(--ok-soft); color: #0d4b30; border-color: var(--ok); }
.callout strong { font-weight: 800; }

/* ---------------------------------------------------------
   Fenêtre modale
   --------------------------------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .62);
  display: none; place-items: center; z-index: 100; padding: 24px;
}
.modal-backdrop.is-open { display: grid; }
.modal {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 620px;
  max-height: 88vh; display: flex; flex-direction: column;
  border-top: 4px solid var(--cyan);
}
.modal-head { padding: 17px 22px; border-bottom: 1px solid var(--ligne); display: flex; align-items: center; gap: 12px; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot {
  padding: 15px 22px; border-top: 1px solid var(--ligne);
  display: flex; gap: 9px; justify-content: flex-end; background: var(--surface-2);
}

/* ---------------------------------------------------------
   Utilitaires
   --------------------------------------------------------- */

.muted { color: var(--encre-3); }
.dim { color: var(--encre-2); }
.small { font-size: 12px; }
.xsmall { font-size: 11px; }
.strong { font-weight: 700; }
.mono { font-family: var(--mono); font-size: .93em; }
.right { text-align: right; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: 9px; }
.row-tight { display: flex; align-items: center; gap: 6px; }
.col { display: flex; flex-direction: column; gap: 4px; }
.wrap { flex-wrap: wrap; } .flex1 { flex: 1; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 6px } .mt-2 { margin-top: 12px } .mt-3 { margin-top: 20px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 6px } .mb-2 { margin-bottom: 12px } .mb-3 { margin-bottom: 20px }
.empty { padding: 36px 18px; text-align: center; color: var(--encre-3); font-size: 13px; }

.legend { display: flex; gap: 15px; flex-wrap: wrap; font-size: 11px; color: var(--encre-2); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; display: inline-block; }

.vchip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: var(--radius-sm);
  background: var(--neutral-soft); color: var(--encre-2);
}
.vchip.is-ok { background: var(--ok-soft); color: var(--ok); }
.vchip.is-warn { background: var(--warn-soft); color: var(--warn); }
.vchip.is-eol { background: var(--danger-soft); color: var(--danger); }
.arrow-v { color: var(--encre-3); font-size: 11px; }

.stackbar { display: flex; height: 9px; overflow: hidden; background: var(--surface-3); }
.stackbar > span { display: block; height: 100%; }

/* ---------------------------------------------------------
   Impression
   --------------------------------------------------------- */

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .app { display: block; }
  .page { padding: 0; max-width: none; }
  body { background: #fff; font-size: 11pt; }
  .card { border-color: #d5d5d5; break-inside: avoid; }
  .report { border: none !important; padding: 0 !important; }
  .page-break { break-before: page; }
  a { color: inherit; text-decoration: none; }
}
