/* Charji — bouton + formulaire de feedback beta */

.cbf-fab {
  position: fixed;
  left: 12px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 1400;
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font: 600 12px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cbf-fab:active {
  transform: translateY(1px);
}

.cbf-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}
.cbf-overlay[hidden] {
  display: none;
}

.cbf-sheet {
  width: 100%;
  max-width: 480px;
  margin: 0 12px 12px;
  background: #fff;
  color: #0f172a;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.35);
  animation: cbf-rise 0.18s ease-out;
}
@keyframes cbf-rise {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cbf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 10px;
}
.cbf-close {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 6px;
}

.cbf-rating {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.cbf-star {
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #cbd5e1;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.12s ease;
}
.cbf-star.is-on {
  color: #f59e0b;
}

.cbf-message {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  font: 400 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #0f172a;
  background: #f8fafc;
}
.cbf-message:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

.cbf-filerow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.cbf-attach {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: #2563eb;
  cursor: pointer;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  padding: 7px 11px;
}
.cbf-fileinput {
  display: none;
}
.cbf-shotname {
  font-size: 12px;
  color: #475569;
}

.cbf-status {
  min-height: 16px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #475569;
}
.cbf-status.is-error {
  color: #dc2626;
}
.cbf-status.is-ok {
  color: #16a34a;
}

.cbf-send {
  width: 100%;
  margin-top: 12px;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font: 600 15px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #fff;
  background: #2563eb;
  cursor: pointer;
}
.cbf-send:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Thème sombre */
.charji-theme-dark .cbf-sheet {
  background: #0f172a;
  color: #e2e8f0;
}
.charji-theme-dark .cbf-message {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
.charji-theme-dark .cbf-message:focus {
  background: #1e293b;
}
.charji-theme-dark .cbf-shotname {
  color: #94a3b8;
}
.charji-theme-dark .cbf-status {
  color: #94a3b8;
}
