/* ══════════════════════════════════════════════════════════════════════════════
   SUPERVISION — AUDIT, SESSIONS & SIGNALEMENTS WORKFLOWS
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Bo-audit ────────────────────────────────────────────────────────────── */
.ba-filters { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.ba-filter-select { padding:7px 10px; border:1px solid var(--border2); border-radius:8px; font-size:12.5px; background:var(--surface); color:var(--text); outline:none; cursor:pointer; }
.ba-log-row { display:flex; align-items:flex-start; gap:14px; padding:12px 0; border-bottom:1px solid var(--border); }
.ba-log-row:last-child { border-bottom:none; }
.ba-log-icon { width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:15px; margin-top:1px; }
.ba-log-action { font-size:12.5px; font-weight:600; color:var(--text); }
.ba-log-meta { font-size:11.5px; color:var(--text3); margin-top:2px; }
.ba-log-details { font-size:11px; color:var(--text2); margin-top:3px; line-height:1.4; }
.ba-log-time { font-size:11px; color:var(--text3); flex-shrink:0; white-space:nowrap; }
.ba-undo-btn { padding:4px 11px; border:1px solid var(--border2); border-radius:7px; background:var(--surface2); color:var(--text2); font-size:11.5px; font-weight:500; cursor:pointer; transition:all .15s; white-space:nowrap; }
.ba-undo-btn:hover { background:var(--amber-light); color:var(--amber); border-color:rgba(255,149,0,.35); }
.ba-empty { text-align:center; padding:40px 20px; color:var(--text3); font-size:13px; }

/* ══════════════════════════════════════════════════════════════════════════════
   SESSIONS & TRAÇABILITÉ DES INTERVENTIONS
   ══════════════════════════════════════════════════════════════════════════════ */
.session-code-box {
  background: var(--surface2);
  border: 2px dashed var(--border2);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color .15s ease;
}
.session-code-box:hover {
  border-color: var(--blue);
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Workflow Reporting & Review Badges ───────────────────────────────────── */
.wf-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--amber-light);
  color: var(--amber);
  border: 1px solid rgba(255, 149, 0, 0.28);
  white-space: nowrap;
  line-height: 1.3;
}

.wf-review-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--amber-light);
  border: 1px solid rgba(255, 149, 0, 0.32);
  margin-bottom: 14px;
}

.wf-review-banner-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 149, 0, 0.16);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wf-report-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.wf-report-trigger-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-light);
}

.wf-report-reasons-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wf-report-reason-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: all 0.14s ease;
}

.wf-report-reason-item:hover {
  border-color: var(--border2);
  background: var(--surface);
}

.wf-report-reason-item.selected {
  border-color: var(--blue);
  background: var(--blue-light);
}

.wf-report-reason-radio {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.wf-report-reason-item.selected .wf-report-reason-radio {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: inset 0 0 0 3px var(--surface);
}

/* ── Backoffice Signalements Workflows (Harmonisation Visuelle) ────────── */
.bo-report-kpi-card {
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.bo-report-kpi-card:hover {
  border-color: var(--border2);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.bo-report-kpi-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-light), var(--shadow-sm);
}
.bo-report-kpi-card.active-amber {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-light), var(--shadow-sm);
}
.bo-report-kpi-card.active-purple {
  border-color: #8B5CF6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2), var(--shadow-sm);
}
.bo-report-kpi-card.active-green {
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--green-light), var(--shadow-sm);
}

/* Lignes de tableau interactives */
.bo-report-table-row {
  cursor: pointer;
  transition: background 0.12s ease;
}
.bo-report-table-row:hover td {
  background: var(--surface2) !important;
}
.bo-report-table-row.is-expanded td {
  background: var(--surface2) !important;
}
.bo-report-table-row.is-mine {
  box-shadow: inset 3px 0 0 var(--blue);
}
.bo-report-chevron {
  transition: transform 0.2s ease;
  color: var(--text3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bo-report-chevron.open {
  transform: rotate(180deg);
  color: var(--blue);
}

/* Tiroir de détails déplié (style bo-audit) */
.bo-report-expand-drawer {
  padding: 16px 20px;
  background: var(--surface2);
  border-top: 1px solid var(--border2);
  animation: tf-fade-in 0.2s ease-out;
}
.bo-report-drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}
@media (max-width: 960px) {
  .bo-report-drawer-grid {
    grid-template-columns: 1fr;
  }
}
.bo-report-drawer-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.bo-report-drawer-box-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Vue Fiches (style cartes TroubleFlow) */
.bo-report-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.bo-report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
  position: relative;
}
.bo-report-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow);
}
.bo-report-card.is-mine {
  border-left: 3.5px solid var(--blue);
}

.bo-report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.bo-report-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.bo-report-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bo-report-title-block {
  min-width: 0;
  flex: 1;
}
.bo-report-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.bo-report-wf-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  letter-spacing: -0.1px;
  transition: color 0.15s ease;
}
.bo-report-wf-title:hover {
  color: var(--blue);
  text-decoration: underline;
}
.bo-report-author-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 1.5px 7px;
  border-radius: 5px;
  background: var(--surface2);
  color: var(--text2);
}
.bo-report-author-chip.is-mine {
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
}
.bo-report-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.bo-report-context-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  flex-wrap: wrap;
}
.bo-report-context-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text2);
}
.bo-report-context-item strong {
  color: var(--text);
  font-weight: 600;
}
.bo-report-trace-btn {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  padding: 2.5px 7px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.bo-report-trace-btn:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.bo-report-comment-box {
  background: var(--surface2);
  border-left: 3px solid var(--border2);
  padding: 9px 12px;
  border-radius: 0 7px 7px 0;
  margin-bottom: 12px;
}
.bo-report-comment-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.bo-report-comment-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.bo-report-resolution-box {
  background: var(--green-light);
  border: 1px solid rgba(40, 205, 65, 0.25);
  border-radius: 8px;
  padding: 9px 13px;
  margin-bottom: 12px;
}
.bo-report-resolution-box.dismissed {
  background: var(--surface2);
  border-color: var(--border);
}
.bo-report-resolution-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #1A9130;
  margin-bottom: 3px;
}
.bo-report-resolution-box.dismissed .bo-report-resolution-head {
  color: var(--text3);
}
.bo-report-resolution-note {
  font-size: 12px;
  color: var(--text);
  line-height: 1.45;
}

.bo-report-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.bo-report-actions-left,
.bo-report-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bo-filter-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-light);
  color: var(--blue);
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
}
.bo-filter-badge-pill button {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  font-weight: 700;
  padding: 0 2px;
  display: flex;
  align-items: center;
}

