/* ReportAbug — styles widget + admin */
.rab-fab {
  position: fixed;
  right: 12px;
  bottom: 80px;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rab-fab-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  color: #fff;
}
.rab-fab-bug { background: #dc2626; }
.rab-fab-idea { background: #2563eb; }
.rab-fab-chat { background: #7c3aed; }
.rab-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15,23,42,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.rab-overlay.hidden { display: none; }
.rab-modal {
  background: #fff;
  border-radius: 16px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.rab-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.rab-modal-head--draggable { cursor: move; touch-action: none; user-select: none; }
.rab-modal-head--draggable .rab-close { cursor: pointer; }
.rab-modal-head h2 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.rab-close { border: none; background: transparent; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.rab-label { display: block; font-size: 12px; font-weight: 600; margin: 8px 0 4px; color: #475569; }
.rab-req { color: #dc2626; }
.rab-input, .rab-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
.rab-desc-row { display: flex; gap: 8px; align-items: flex-start; }
.rab-textarea { flex: 1; resize: vertical; min-height: 100px; }
.rab-micro {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-shrink: 0;
}
.rab-micro.is-active { background: #fee2e2; border-color: #f87171; }
.rab-mic-hint {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0 0;
}
.rab-mic-hint kbd {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-family: inherit;
}
.rab-att-help { font-size: 12px; color: #64748b; margin: 10px 0 6px; }
.rab-file-label { color: #2563eb; cursor: pointer; text-decoration: underline; }
.rab-attachments { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rab-att { position: relative; width: 72px; height: 72px; }
.rab-att img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid #e2e8f0; }
.rab-att--pending img { opacity: 0.65; }
.rab-att-remove {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: #0f172a; color: #fff; cursor: pointer; font-size: 14px; line-height: 1;
}
.rab-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.rab-btn { border: none; border-radius: 8px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.rab-btn-ghost { background: #f1f5f9; color: #334155; }
.rab-btn-primary { background: #15803d; color: #fff; }
.rab-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.rab-message { font-size: 13px; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.rab-message.hidden { display: none; }
.rab-message--ok { background: #dcfce7; color: #166534; }
.rab-message--err { background: #fee2e2; color: #991b1b; }
.rab-message--warn { background: #fef3c7; color: #92400e; }
body.rab-modal-open { overflow: hidden; }

/* Admin retours */
#v2-view.v2-view--feedback-full {
  max-width: none;
  width: 100%;
}
.fb-page-card {
  max-width: none;
  width: 100%;
  cursor: default;
}
.fb-page-card:hover {
  transform: none;
  box-shadow: var(--v2-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.04));
  border-color: var(--v2-border, #e2e8f0);
}
.fb-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.fb-table-wrap { overflow-x: hidden; width: 100%; }
.fb-table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.fb-table th, .fb-table td { border: 1px solid #e2e8f0; padding: 8px; vertical-align: top; word-wrap: break-word; overflow-wrap: anywhere; }
.fb-table th { background: #f8fafc; text-align: left; white-space: normal; }
.fb-table .fb-desc-col { width: 22%; }
.fb-row--open { background: #fffbeb; }
.fb-row--pending_validation { background: #faf5ff; }
.fb-row--paused { background: #f1f5f9; }
.fb-row--in_progress { background: #eff6ff; }
.fb-row--done { background: #f0fdf4; }
.fb-row--wont_fix { background: #fef2f2; }
.fb-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }
.fb-badge--pending { background: #f3e8ff; color: #6b21a8; }
.fb-badge--paused { background: #e2e8f0; color: #475569; }
.fb-user-pill { display: inline-flex; vertical-align: middle; margin-left: 0.25rem; }
.fb-user-pill .impersonate-btn { width: 1.65rem; height: 1.65rem; font-size: 0.95rem; }
.fb-validate-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fb-deploy-targets { border: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fb-deploy-legend { font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 2px; padding: 0; }
.fb-deploy-label { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.fb-deploy-label input { margin: 0; }
.fb-deploy-cell { min-width: 96px; vertical-align: top; }
.fb-deploy-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.fb-deploy-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #e0f2fe; color: #0369a1; }
.fb-deploy-chip--done { background: #dcfce7; color: #166534; }
.fb-deploy-chip--pending { background: #ffedd5; color: #c2410c; }
.fb-deploy-requeue { display: block; font-size: 10px; font-weight: 600; color: #c2410c; margin-top: 4px; }
.fb-deploy-add { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 6px; }
.fb-ta { width: 100%; min-width: 140px; font: inherit; border: 1px solid #cbd5e1; border-radius: 6px; padding: 4px 6px; }
.fb-toolbar .v2-select,
.fb-toolbar .v2-input,
.fb-table .v2-select,
.fb-table .fb-reporter,
.fb-table .fb-status {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  background: #fff;
  font: inherit;
  color: inherit;
}
.fb-table .fb-status { max-width: 100%; }
.fb-table .fb-reporter {
  width: auto;
  max-width: 10.5rem;
  min-width: 0;
  vertical-align: middle;
}
.fb-ta.fb-desc { min-width: 0; min-height: 110px; resize: vertical; }
.fb-ta.fb-readonly {
  background: #f8fafc;
  border-color: #e2e8f0;
  cursor: default;
  white-space: pre-wrap;
  line-height: 1.45;
  resize: none;
  color: #334155;
}
.fb-ta.fb-readonly--desc { min-height: 110px; }
.fb-ta.fb-readonly--notes { min-height: 72px; }
.fb-att-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 1px solid #cbd5e1; }
.fb-lightbox {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 24px;
}
.fb-lightbox.hidden { display: none; }
.fb-lightbox-inner { max-width: 900px; width: 100%; color: #fff; }
.fb-lightbox-inner img { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto 12px; border-radius: 8px; }
.fb-lightbox-close { position: absolute; top: 16px; right: 20px; background: transparent; border: none; color: #fff; font-size: 2rem; cursor: pointer; }

/* Cloche notifications — aligné sur .v2-header-tool */
.rab-bell-wrap { position: relative; display: inline-flex; align-items: center; gap: 2px; }
.rab-history-link { /* style via .v2-header-tool */ }
.rab-bell-btn { position: relative; }
.rab-bell-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; border-radius: 999px;
  background: #dc2626; color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.rab-bell-badge.hidden { display: none; }
.rab-bell-panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: min(360px, 90vw); background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.12);
  z-index: 9999; max-height: 520px; overflow: auto;
}
.rab-bell-panel--fixed {
  position: fixed;
  left: auto;
  z-index: 10050;
}
.rab-bell-panel.hidden { display: none; }
.rab-bell-item { padding: 12px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.rab-bell-item:last-child { border-bottom: none; }
.rab-bell-actions { padding: 10px 12px; border-top: 1px solid #e2e8f0; }
.rab-bell-section { padding: 0; }
.rab-bell-section-title {
  padding: 10px 12px 6px; margin: 0; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: #64748b;
}
.rab-bell-empty { padding: 0 12px 10px; margin: 0; font-size: 13px; color: #94a3b8; }
.rab-bell-divider { height: 1px; background: #e2e8f0; margin: 0; }
.rab-bell-section--team { background: #f8fafc; }
.rab-bell-team-item {
  padding: 8px 12px; border-bottom: 1px solid #f1f5f9; font-size: 12px;
}
.rab-bell-team-item:last-of-type { border-bottom: none; }
.rab-bell-actions--team { background: #f8fafc; }

/* Activité récente (feed OF sous la cloche) */
.rab-bell-section--activity { padding-bottom: 4px; }
.rab-act-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 12px; text-decoration: none; color: inherit;
  border-bottom: 1px solid #f1f5f9;
}
.rab-act-item:last-child { border-bottom: none; }
a.rab-act-item:hover { background: #f8fafc; }
.rab-act-ico {
  width: 28px; height: 28px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
  border: 1px solid transparent;
}
.rab-act-ico--check { background: rgba(52, 211, 153, 0.15); border-color: rgba(52, 211, 153, 0.25); }
.rab-act-ico--mail { background: rgba(192, 132, 252, 0.12); border-color: rgba(192, 132, 252, 0.25); }
.rab-act-ico--clock { background: rgba(252, 211, 77, 0.15); border-color: rgba(252, 211, 77, 0.25); }
.rab-act-ico--alert { background: rgba(252, 165, 165, 0.15); border-color: rgba(252, 165, 165, 0.25); }
.rab-act-ico--mic { background: rgba(28, 183, 230, 0.12); border-color: rgba(28, 183, 230, 0.25); }
.rab-act-body { min-width: 0; flex: 1; }
.rab-act-title { font-size: 12px; color: #1e293b; line-height: 1.35; }
.rab-act-sub { font-size: 11px; color: #64748b; margin-top: 2px; line-height: 1.3; }
.rab-act-meta { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* Page historique corrections */
.fb-history-page { max-width: 52rem; }
.fb-history-toolbar { flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin-bottom: 1rem; }
.fb-history-search { flex: 1; min-width: 12rem; }
.fb-history-search input { width: 100%; min-width: 0; }
.fb-history-card {
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
  background: #fff;
}
.fb-history-card__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px;
}
.fb-history-card__date { margin-left: auto; font-size: 11px; color: #94a3b8; }
.fb-history-badge {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; background: #dcfce7; color: #166534;
}
.fb-history-card__desc { font-size: 13px; color: #334155; margin: 0 0 8px; line-height: 1.45; }
.fb-history-card__notes {
  font-size: 13px; color: #475569; background: #f8fafc; border-radius: 6px;
  padding: 8px 10px; margin: 0 0 8px;
}
.fb-history-card__link { margin: 0 0 4px; }
.fb-history-card__commit { margin: 6px 0 0; color: #64748b; }
.fb-history-pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e2e8f0;
}

@media (prefers-color-scheme: dark) {
  .rab-modal { background: #1e293b; color: #e2e8f0; }
  .rab-input, .rab-textarea { background: #0f172a; border-color: #334155; color: #e2e8f0; }
  .fb-row--open { background: rgba(251,191,36,.12); }
  .fb-row--pending_validation { background: rgba(168,85,247,.12); }
  .fb-row--in_progress { background: rgba(59,130,246,.12); }
  .fb-row--done { background: rgba(34,197,94,.12); }
  .fb-row--wont_fix { background: rgba(239,68,68,.12); }
}

.fb-type-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-type-tab {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.fb-type-tab.is-active { background: #0f172a; color: #fff; border-color: #0f172a; }
.fb-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.fb-registry-card { padding: 12px 14px; }
.fb-registry-wrap { max-height: 220px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.fb-registry-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fb-registry-table thead th { position: sticky; top: 0; background: #f8fafc; z-index: 1; }
.fb-registry-table th, .fb-registry-table td { border-bottom: 1px solid #e2e8f0; padding: 6px 8px; text-align: left; }
.fb-registry-row--resolved { background: #f0fdf4; }
.fb-registry-link { border: none; background: none; color: #2563eb; cursor: pointer; font-weight: 600; text-decoration: underline; }
.fb-row--highlight { outline: 2px solid #2563eb; outline-offset: -2px; }
.fb-reopen-modal {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(15,23,42,.45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.fb-reopen-modal.hidden { display: none; }
.fb-reopen-dialog {
  background: #fff; border-radius: 12px; padding: 20px; width: min(32rem, 100%);
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}
