/* ── Bouton flottant ────────────────────────────────────────────── */
#rbw-fab {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 8000;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent, #e05c2a);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  transition: transform .15s, opacity .15s;
}
#rbw-fab:hover { transform: scale(1.08); }
#rbw-fab .mat-icon { font-size: 22px; }

/* Sur mobile, laisser de la place à la navbar basse */
@media (max-width: 768px) {
  #rbw-fab { bottom: 72px; right: 14px; }
}

/* ── Panneau ─────────────────────────────────────────────────────── */
#rbw-panel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 8001;
  width: 300px;
  background: var(--bg-surface, #1e1e1e);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  display: none;
  flex-direction: column;
  gap: 12px;
  font-family: 'Montserrat', sans-serif;
}
#rbw-panel.open { display: flex; }

@media (max-width: 768px) {
  #rbw-panel {
    right: 14px;
    left: 14px;
    width: auto;
    bottom: 128px;
  }
}

/* En-tête du panneau */
#rbw-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#rbw-panel-header span {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted, #888);
}
#rbw-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #888);
  padding: 0;
  line-height: 1;
  display: flex;
}
#rbw-close .mat-icon { font-size: 20px; }

/* Pills type */
#rbw-types {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rbw-type-btn {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15);
  background: transparent;
  color: var(--text-muted, #888);
  font-size: .75rem;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.rbw-type-btn.active {
  background: var(--accent, #e05c2a);
  color: #fff;
  border-color: transparent;
}

/* Textarea */
#rbw-message {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: var(--text-primary, #f0f0f0);
  font-family: 'Montserrat', sans-serif;
  font-size: .85rem;
  padding: 8px 10px;
  box-sizing: border-box;
  outline: none;
}
#rbw-message:focus { border-color: var(--accent, #e05c2a); }

/* Zone cible pointée */
#rbw-target-info {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--text-muted, #888);
  background: rgba(255,255,255,.04);
  border-radius: 6px;
  padding: 6px 8px;
}
#rbw-target-info.visible { display: flex; }
#rbw-target-info .mat-icon { font-size: 14px; color: var(--accent, #e05c2a); }
#rbw-target-clear {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted, #888);
  cursor: pointer;
  padding: 0;
  display: flex;
}
#rbw-target-clear .mat-icon { font-size: 14px; }

/* Actions */
#rbw-actions {
  display: flex;
  gap: 8px;
}
#rbw-pointer-btn {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15);
  background: transparent;
  color: var(--text-muted, #888);
  font-size: .78rem;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: border-color .15s, color .15s;
}
#rbw-pointer-btn:hover { border-color: var(--accent, #e05c2a); color: var(--accent, #e05c2a); }
#rbw-pointer-btn .mat-icon { font-size: 16px; }
#rbw-submit {
  flex: 1;
  padding: 7px;
  border-radius: 999px;
  border: none;
  background: var(--accent, #e05c2a);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
#rbw-submit:disabled { opacity: .4; cursor: default; }

/* Feedback envoi */
#rbw-feedback {
  font-size: .78rem;
  text-align: center;
  min-height: 1em;
  color: var(--text-muted, #888);
}
#rbw-feedback.success { color: #5cb85c; }
#rbw-feedback.error   { color: #d9534f; }

/* ── Mode pointage ───────────────────────────────────────────────── */
#rbw-capture-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  cursor: crosshair;
}
#rbw-capture-hint {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.75);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .78rem;
  padding: 6px 14px;
  border-radius: 999px;
  z-index: 9001;
  pointer-events: none;
}
#rbw-capture-highlight {
  position: fixed;
  z-index: 8999;
  border: 2px solid var(--accent, #e05c2a);
  border-radius: 3px;
  background: rgba(224, 92, 42, .12);
  pointer-events: none;
  transition: all .05s;
}