/* ============================================================
 *  Peerly — Chat "+" Menu
 *  v1.0.0 — Menu compact pour fichiers/vocaux/sondages
 * ============================================================ */

.chat-plus-wrapper {
  position: relative;
  flex-shrink: 0;
}

.btn-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition:
    background 150ms var(--md-sys-motion-easing-standard),
    color 150ms var(--md-sys-motion-easing-standard),
    transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-plus:hover:not(:disabled) {
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
}
.btn-plus:active:not(:disabled) { transform: scale(0.92); }
.btn-plus:disabled { opacity: 0.38; cursor: not-allowed; }

.btn-plus i {
  font-size: 22px;
  line-height: 1;
  transition: transform 280ms cubic-bezier(0.22, 1.2, 0.36, 1);
}
.chat-plus-wrapper.open .btn-plus {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-primary);
}
.chat-plus-wrapper.open .btn-plus i { transform: rotate(45deg); }

/* ---------- Menu déroulant ---------- */
.chat-plus-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  padding: 6px;
  background: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  box-shadow: var(--md-sys-elevation-level3);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transform-origin: bottom left;
  pointer-events: none;
  transition:
    opacity 180ms var(--md-sys-motion-easing-standard),
    transform 220ms cubic-bezier(0.22, 1.2, 0.36, 1);
  z-index: 200;
}
.chat-plus-wrapper.open .chat-plus-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-plus-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--md-sys-shape-corner-small);
  background: transparent;
  border: none;
  color: var(--md-sys-color-on-surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 120ms var(--md-sys-motion-easing-standard);
}
.chat-plus-item:hover { background: var(--md-sys-color-surface-container-highest); }
.chat-plus-item:active { transform: scale(0.98); }

.chat-plus-item i {
  font-size: 18px;
  color: var(--md-sys-color-primary);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  line-height: 1;
}