/* Console d'arbitrage : gabarit visuel du prototype (fond ardoise, indigo, rose, ambre). */
#vue-travail.arb {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  font-family: ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  color: #e2e8f0;
}
#vue-travail.arb[hidden],
#vue-travail [hidden] { display: none !important; }

.arb-carte {
  width: 100%;
  max-width: 1550px;
  height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.arb-entete,
.arb-barre,
.arb-pied { flex-shrink: 0; }
.arb-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid #1e293b;
}
.arb-entete__id,
.arb-entete__ligne,
.arb-entete__actions,
.arb-mode,
.arb-barre,
.arb-barre__groupe,
.arb-types,
.arb-presets,
.arb-saisie,
.arb-pied,
.arb-pied__chiffres,
.arb-pied__actions,
.arb-gros { display: flex; align-items: center; }
.arb-entete__id { gap: 16px; }
.arb-entete__ligne { gap: 8px; flex-wrap: wrap; }
.arb-entete h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}
.arb-entete p { margin: 2px 0 0; font-size: 12px; color: #94a3b8; }
.arb-icone {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(to top right, #e11d48, #f59e0b);
  box-shadow: 0 10px 20px rgba(225, 29, 72, 0.2);
  font-size: 1.25rem;
}
.arb-badge {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.arb-entete__actions { gap: 12px; }
.arb-mode {
  gap: 0;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid #1e293b;
  background: #020617;
  font-size: 12px;
}
.arb-mode > span { padding: 0 10px; font-size: 11px; font-weight: 700; color: #94a3b8; }
.arb-mode button,
.arb-types button,
.arb-chip,
.arb-preset,
.arb-secondaire,
.arb-principal,
.arb-fermer,
.arb-saisie button {
  border: 0;
  cursor: pointer;
  font-weight: 700;
}
.arb-mode button {
  padding: 6px 12px;
  border-radius: 12px;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
}
.arb-mode button.is-on {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.arb-fermer {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(51, 65, 85, 0.6);
  background: #1e293b;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 18px;
}
.arb-fermer:hover { background: #334155; color: #fff; }

.arb-barre {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  background: rgba(2, 6, 23, 0.6);
  border-bottom: 1px solid #1e293b;
}
.arb-barre__groupe { flex-wrap: wrap; gap: 8px; }
.arb-kicker {
  margin-right: 4px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.arb-sep { width: 1px; height: 20px; margin: 0 4px; background: #1e293b; }
.arb-sep--haut { height: 40px; }
.arb-chip {
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 12px;
}
.arb-chip:hover { background: #334155; }
.arb-types {
  gap: 4px;
  margin-right: 8px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid #1e293b;
  background: #020617;
}
.arb-types button {
  padding: 4px 10px;
  border-radius: 8px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 12px;
}
.filtre-type.is-neg { color: #fda4af; border: 1px solid rgba(136, 19, 55, 0.5); }
.filtre-type.is-pos { color: #6ee7b7; border: 1px solid rgba(6, 78, 59, 0.5); }
.filtre-type.is-sel { color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); font-weight: 900; }
.filtre-type.is-on { background: #4f46e5; color: #fff; border-color: transparent; }
.filtre-type.is-neg.is-on { background: #e11d48; }
.filtre-type.is-pos.is-on { background: #059669; }
.filtre-type.is-sel.is-on {
  background: #f59e0b;
  color: #020617;
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.3);
}
.arb-select,
.arb-recherche,
.arb-saisie input {
  border-radius: 12px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  outline: none;
}
.arb-select { padding: 6px 12px; }
.arb-select:focus,
.arb-recherche:focus,
.arb-saisie input:focus { border-color: #6366f1; }
.arb-recherche { width: 16rem; padding: 6px 12px; background: #0f172a; }
.arb-recherche::placeholder,
.arb-saisie input::placeholder { color: #64748b; font-weight: 500; }
.arb-presets { flex-wrap: wrap; gap: 8px; }
.arb-presets[hidden] { display: none !important; }
.arb-preset { padding: 6px 12px; border-radius: 12px; font-size: 12px; }
.arb-preset--indigo { background: rgba(30, 27, 75, 0.6); color: #a5b4fc; border: 1px solid rgba(67, 56, 202, 0.5); }
.arb-preset--amber { background: rgba(69, 26, 3, 0.4); color: #fcd34d; border: 1px solid rgba(180, 83, 9, 0.5); }
.arb-preset--rose { background: rgba(76, 5, 25, 0.4); color: #fda4af; border: 1px solid rgba(190, 18, 60, 0.5); }
.arb-preset--violet { background: rgba(46, 16, 101, 0.55); color: #ddd6fe; border: 1px solid rgba(109, 40, 217, 0.55); }
.arb-saisie {
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  background: #0f172a;
}
.arb-saisie--amber { border: 1px solid rgba(180, 83, 9, 0.4); }
.arb-saisie--indigo { border: 1px solid rgba(67, 56, 202, 0.4); }
.arb-saisie--amber > span:first-child { color: #fbbf24; font-size: 11px; font-weight: 900; }
.arb-saisie--indigo > span:first-child { color: #818cf8; font-size: 11px; font-weight: 900; }
.arb-saisie input {
  width: 6.5rem;
  border: 0;
  background: transparent;
  font-family: ui-monospace, monospace;
}
.arb-unite { font-size: 10px; font-weight: 700; color: #94a3b8; }
.arb-saisie--amber button { padding: 2px 8px; border-radius: 8px; background: #d97706; color: #fff; font-size: 10px; font-weight: 900; }
.arb-saisie--indigo button { padding: 2px 8px; border-radius: 8px; background: #4f46e5; color: #fff; font-size: 10px; font-weight: 900; }

.arb-flash {
  margin: 8px 32px 0;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.arb-flash.is-err { background: rgba(136, 19, 55, 0.45); color: #fda4af; }
.arb-flash.is-ok { background: rgba(6, 78, 59, 0.45); color: #6ee7b7; }
.arb-flash[hidden] { display: none !important; }
.arb-attente { margin: 0; padding: 28px 32px; color: #94a3b8; font-size: 13px; }
.arb-attente[hidden],
.arb-scroll[hidden],
#footer-metric-qte[hidden],
.col-prix[hidden] { display: none !important; }

.arb-scroll { flex: 1; min-height: 0; overflow: auto; background: #0f172a; }
.arb-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 12px; }
.arb-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 12px;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid #1e293b;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.arb-table .tri { cursor: pointer; }
.arb-table .tri:hover { color: #fff; }
.arb-table .c-check { width: 40px; padding-left: 24px; text-align: center; }
.arb-table .c-plus { width: 32px; }
.arb-table .c-desi { min-width: 240px; }
.arb-table .c-zone { width: 8rem; text-align: center; }
.arb-table .c-num { text-align: right; }
.arb-table .c-fin { width: 9rem; padding-right: 32px; color: #fbbf24; text-align: right; }
.arb-table tbody td { padding: 14px 12px; border-bottom: 1px solid rgba(30, 41, 59, 0.6); vertical-align: middle; }
.arb-ligne { cursor: pointer; }
.arb-ligne:hover td { background: rgba(30, 41, 59, 0.4); }
.arb-ligne.is-on td { background: rgba(30, 27, 75, 0.35); }
.arb-ligne.is-off { opacity: 0.65; }
.arb-ligne .c-check { padding-left: 24px; text-align: center; }
.arb-ligne .c-plus { text-align: center; }
.arb-code {
  border: 0;
  background: none;
  padding: 0;
  color: #818cf8;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.arb-desi {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #fff;
}
.arb-theo { text-align: right; font-family: ui-monospace, monospace; color: #94a3b8; }
.arb-cpt { text-align: right; font-family: ui-monospace, monospace; font-weight: 700; color: #fff; }
.arb-prix, .arb-val { text-align: right; font-family: ui-monospace, monospace; }
.arb-prix { color: #94a3b8; }
.arb-val { font-weight: 700; color: #cbd5e1; }
.arb-fin { padding-right: 32px; text-align: right; font-family: ui-monospace, monospace; font-weight: 900; font-size: 14px; }
.arb-fin.is-neg, .is-negatif { color: #fb7185; }
.arb-fin.is-pos, .is-positif { color: #34d399; }
.arb-ecart {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: ui-monospace, monospace;
  font-weight: 900;
}
.arb-ecart.is-neg { color: #fb7185; background: rgba(76, 5, 25, 0.6); border-color: rgba(159, 18, 57, 0.6); }
.arb-ecart.is-pos { color: #34d399; background: rgba(2, 44, 34, 0.6); border-color: rgba(6, 95, 70, 0.6); }
.arb-plus {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #cbd5e1;
  font-family: ui-monospace, monospace;
  font-weight: 900;
  cursor: pointer;
}
.arb-plus.is-on { background: #4f46e5; border-color: #6366f1; color: #fff; }
.arb-badge-zone {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.arb-badge-vide {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: rgba(30, 41, 59, 0.8);
  color: #64748b;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-style: italic;
}
.arb-zones { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.arb-plus-zones {
  padding: 2px 8px;
  border-radius: 6px;
  background: #1e293b;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
}
.arb-check { width: 16px; height: 16px; accent-color: #4f46e5; cursor: pointer; }

.arb-detail-ligne td { padding: 0; background: rgba(2, 6, 23, 0.9); border-bottom: 1px solid rgba(49, 46, 129, 0.4); }
.arb-detail-bloc { padding: 16px; }
.arb-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.arb-kpi {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #1e293b;
  background: #0f172a;
}
.arb-kpi span { display: block; font-size: 9px; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; color: #94a3b8; }
.arb-kpi strong { display: block; margin-top: 2px; font-family: ui-monospace, monospace; font-size: 16px; color: #fff; }
.arb-kpi em { font-style: normal; font-size: 9px; color: #64748b; }
.arb-kpi .is-indigo { color: #818cf8; }
.arb-kpi .is-amber { color: #fbbf24; }
.arb-hist {
  margin-top: 12px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #1e293b;
  background: #0f172a;
}
.arb-hist__titre {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  background: #020617;
  border-bottom: 1px solid #1e293b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}
.arb-hist table { width: 100%; border-collapse: collapse; }
.arb-hist th {
  padding: 6px 12px;
  background: #020617;
  color: #64748b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
}
.arb-hist td { padding: 6px 12px; border-bottom: 1px solid rgba(30, 41, 59, 0.5); font-size: 11px; color: #cbd5e1; }
.arb-hist tr.is-rebut { background: rgba(76, 5, 25, 0.3); opacity: 0.7; }
.arb-hist .qte { text-align: right; font-weight: 900; font-family: ui-monospace, monospace; color: #818cf8; }
.arb-vide { padding: 12px; text-align: center; color: #64748b; font-style: italic; }

.arb-pied {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px 32px;
  background: rgba(2, 6, 23, 0.9);
  border-top: 1px solid #1e293b;
}
.arb-pied__chiffres { gap: 24px; flex-wrap: wrap; }
.arb-label {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.arb-label--amber { color: #fbbf24; }
.arb-label--indigo { color: #818cf8; }
.arb-gros { align-items: baseline; gap: 8px; margin-top: 2px; }
.arb-gros strong { font-size: 1.5rem; font-weight: 900; color: #fff; }
.arb-gros span { font-size: 12px; font-weight: 700; color: #94a3b8; }
.arb-ambre { color: #fbbf24 !important; font-family: ui-monospace, monospace; }
.arb-indigo { color: #818cf8 !important; font-family: ui-monospace, monospace; }
.arb-pill { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 900; }
.arb-pill--amber { background: #451a03; color: #fcd34d; border: 1px solid #92400e; }
.arb-pill--indigo { background: #1e1b4b; color: #a5b4fc; border: 1px solid #3730a3; }
.arb-detail { display: flex; gap: 8px; margin-top: 4px; font-size: 10px; }
.arb-detail .perte { font-weight: 700; color: #fb7185; }
.arb-detail .surplus { font-weight: 700; color: #34d399; }
.arb-detail .barre { color: #475569; }
.arb-pied__actions { gap: 16px; }
.arb-secondaire {
  padding: 12px 20px;
  border-radius: 16px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #cbd5e1;
  font-size: 12px;
}
.arb-secondaire:hover { background: #334155; color: #fff; }
.arb-principal {
  padding: 12px 28px;
  border-radius: 16px;
  background: linear-gradient(to right, #e11d48, #f43f5e, #4f46e5);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 16px 30px rgba(225, 29, 72, 0.3);
}
.arb-principal:hover { filter: brightness(1.08); }
.arb-principal:disabled { opacity: 0.6; cursor: wait; }

@media (max-width: 900px) {
  .arb-kpis { grid-template-columns: 1fr 1fr; }
  .arb-entete, .arb-barre, .arb-pied { padding-left: 16px; padding-right: 16px; }
}
