/* ============================================================
   connect.visuelink.com — outil interne
   Charte : anthracite #454444, orange #f39200
   Parti pris : outil de travail dense et lisible ; les chiffres
   et références en chasse fixe ; la timeline comme signature.
   ============================================================ */

:root {
  --anthracite: #454444;
  --anthracite-fonce: #333232;
  --orange: #f39200;
  --orange-doux: #fff4e3;
  --fond: #f6f5f3;
  --carte: #ffffff;
  --trait: #e4e2de;
  --texte: #2b2a29;
  --texte-2: #77746f;
  --ok: #1e7d43;
  --ok-fond: #e7f4ec;
  --attente: #a86a00;
  --attente-fond: #fdf1dc;
  --alerte: #b3261e;
  --alerte-fond: #fbebea;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: inherit; }
.mono, td.num, .ref { font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: .93em; }

/* ---- Barre haute ---- */
.barre { background: var(--anthracite); color: #fff; }
.barre-int {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 28px; min-height: 54px;
}
.marque { font-weight: 700; letter-spacing: .02em; text-decoration: none; font-size: 17px; }
.marque .point { color: var(--orange); }
.barre nav { display: flex; gap: 4px; flex: 1; }
.barre nav a {
  text-decoration: none; padding: 15px 14px; color: #d8d6d3;
  border-bottom: 3px solid transparent;
}
.barre nav a:hover { color: #fff; }
.barre nav a.actif { color: #fff; border-bottom-color: var(--orange); }
.qui { font-size: 13px; color: #d8d6d3; display: flex; gap: 12px; align-items: center; }
.sortie { color: var(--orange); text-decoration: none; }
.sortie:hover { text-decoration: underline; }

/* ---- Contenu ---- */
.contenu { max-width: 1200px; margin: 0 auto; padding: 22px 20px 60px; }
h1 { font-size: 21px; margin: 0 0 4px; font-weight: 650; }
.sous-titre { color: var(--texte-2); margin: 0 0 18px; font-size: 14px; }
.pied {
  max-width: 1200px; margin: 0 auto; padding: 14px 20px;
  color: var(--texte-2); font-size: 12px; border-top: 1px solid var(--trait);
}

/* ---- Cartes / filtres ---- */
.carte {
  background: var(--carte); border: 1px solid var(--trait);
  border-radius: 8px; padding: 16px 18px; margin-bottom: 16px;
}
.filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filtres label { display: block; font-size: 12px; color: var(--texte-2); margin-bottom: 3px; }
.filtres input, .filtres select {
  padding: 7px 10px; border: 1px solid var(--trait); border-radius: 6px;
  font: inherit; background: #fff; min-width: 150px;
}
.filtres input:focus, .filtres select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 1px;
}
.bouton {
  background: var(--anthracite); color: #fff; border: 0; border-radius: 6px;
  padding: 8px 16px; font: inherit; cursor: pointer; text-decoration: none; display: inline-block;
}
.bouton:hover { background: var(--anthracite-fonce); }
.bouton.principal { background: var(--orange); color: #201a10; font-weight: 600; }
.bouton.principal:hover { filter: brightness(.95); }
.bouton.discret { background: transparent; color: var(--anthracite); border: 1px solid var(--trait); }

/* ---- Tuiles de synthèse ---- */
.tuiles { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tuile {
  background: var(--carte); border: 1px solid var(--trait); border-radius: 8px;
  padding: 12px 18px; min-width: 170px; flex: 0 1 auto;
}
.tuile .valeur { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tuile .libelle { font-size: 12px; color: var(--texte-2); }
.tuile.accent { border-left: 4px solid var(--orange); }

/* ---- Tableaux ---- */
table { width: 100%; border-collapse: collapse; background: var(--carte); }
.table-carte { border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; overflow-x: auto; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--trait); vertical-align: top; }
th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--texte-2); background: #fbfaf9; font-weight: 600; white-space: nowrap;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--orange-doux); }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .second { color: var(--texte-2); font-size: 12.5px; }

/* ---- Badges ---- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.b-ok      { background: var(--ok-fond);      color: var(--ok); }
.b-attente { background: var(--attente-fond); color: var(--attente); }
.b-alerte  { background: var(--alerte-fond);  color: var(--alerte); }
.b-neutre  { background: #efeeec;             color: var(--texte-2); }
.b-fourn   { color: #fff; font-weight: 600; letter-spacing: .02em; }
.barre-h { display:flex; align-items:center; gap:10px; margin:5px 0; }
.barre-h .lib { width:120px; font-size:12.5px; color:var(--texte-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.barre-h .jauge { flex:1; background:#efeeec; border-radius:4px; height:16px; overflow:hidden; }
.barre-h .jauge > div { height:100%; }
.barre-h .val { width:96px; text-align:right; font-size:12.5px; }
.var-plus  { color: var(--alerte); font-weight:600; }
.var-moins { color: var(--ok); font-weight:600; }
.filtres input[type=date] { padding:6px 8px; }
.lien-discret { color: var(--texte-2); text-decoration:none; }
.lien-discret:hover { text-decoration:underline; }

/* ---- Timeline (signature) ---- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li {
  position: relative; padding: 0 0 18px 26px;
  border-left: 2px solid var(--trait); margin-left: 8px;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 3px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--carte); border: 3px solid var(--orange);
}
.timeline li.creation::before { background: var(--orange); }
.timeline .quand { font-size: 12px; color: var(--texte-2); }
.timeline .quoi { font-weight: 600; }
.timeline .passage { font-family: ui-monospace, monospace; font-size: 13px; }
.timeline .passage .fleche { color: var(--orange); font-weight: 700; }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 6px 12px; border: 1px solid var(--trait); border-radius: 6px;
  text-decoration: none; background: var(--carte); font-size: 14px;
}
.pagination .ici { background: var(--anthracite); color: #fff; border-color: var(--anthracite); }

/* ---- Login ---- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--anthracite);
  background-image: radial-gradient(circle at 20% 15%, #514f4f 0, transparent 45%);
}
.login-boite {
  background: var(--carte); border-radius: 10px; padding: 34px 36px;
  width: min(400px, calc(100vw - 32px)); box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.login-boite h1 { font-size: 22px; margin-bottom: 2px; }
.login-boite .marque-login { font-weight: 700; font-size: 15px; color: var(--texte-2); margin-bottom: 22px; }
.login-boite .marque-login b { color: var(--orange); }
.champ { margin-bottom: 14px; }
.champ label { display: block; font-size: 13px; color: var(--texte-2); margin-bottom: 4px; }
.champ input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--trait);
  border-radius: 6px; font: inherit;
}
.champ input:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
.erreur {
  background: var(--alerte-fond); color: var(--alerte);
  border-radius: 6px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px;
}
.info {
  background: var(--orange-doux); color: var(--attente);
  border-radius: 6px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px;
}

/* ---- Divers ---- */
.deux-colonnes { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) {
  .deux-colonnes { grid-template-columns: 1fr; }
  .barre-int { flex-wrap: wrap; padding: 8px 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  tbody tr { transition: background .12s ease; }
}
