/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --wa-dark-green: #075E54;
  --wa-green: #128C7E;
  --wa-light-green: #25D366;
  --wa-bubble-out: #DCF8C6;
  --wa-bubble-in: #FFFFFF;
  --wa-bg: #ECE5DD;
  --wa-topbar: #075E54;
  --wa-input-bg: #FFFFFF;
  --wa-separator: #E0E0E0;
  --wa-text-primary: #111B21;
  --wa-text-secondary: #667781;
  --wa-text-light: #AAAAAA;
  --wa-tick: #4FC3F7;
  --status-bar-h: env(safe-area-inset-top, 0px);
  --bottom-safe: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  background: var(--wa-dark-green);
  color: var(--wa-text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SCREENS
   ============================================================ */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.28s ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.screen.slide-out {
  transform: translateX(-30%);
  opacity: 0.6;
  pointer-events: none;
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
#screen-login {
  background: linear-gradient(180deg, var(--wa-dark-green) 0%, var(--wa-dark-green) 40%, #F0F0F0 40%);
  justify-content: center;
  align-items: center;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 0 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
}

.login-logo-icon {
  width: 100px;
  height: 100px;
  background: var(--wa-light-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.login-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  text-align: center;
}

.login-form {
  width: 100%;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--wa-dark-green);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--wa-separator);
  border-radius: 10px;
  font-size: 16px;
  color: var(--wa-text-primary);
  background: #FAFAFA;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
  border-color: var(--wa-light-green);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
  background: #FFFFFF;
}

.login-btn {
  width: 100%;
  padding: 15px;
  background: var(--wa-light-green);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 3px 12px rgba(37, 211, 102, 0.4);
}

.login-btn:active {
  background: var(--wa-green);
  transform: scale(0.98);
}

.login-hint {
  font-size: 12px;
  color: var(--wa-text-secondary);
  text-align: center;
  line-height: 1.5;
}

.login-error {
  background: #FDECEA;
  color: #C62828;
  border: 1px solid #FFCDD2;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  text-align: center;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  background: var(--wa-topbar);
  color: #FFFFFF;
  padding: 0 8px 0 16px;
  height: 56px;
  min-height: 56px;
  flex-shrink: 0;
  padding-top: var(--status-bar-h);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 10;
}

.conversations-topbar {
  background: var(--wa-dark-green);
}

.topbar-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.topbar-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.topbar-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  margin-top: 1px;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.topbar-icon-btn:active {
  background: rgba(255,255,255,0.15);
}

/* Chat topbar */
.chat-topbar {
  gap: 10px;
}

.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: -8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.back-btn:active {
  background: rgba(255,255,255,0.15);
}

.chat-topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
  text-transform: uppercase;
}

.chat-topbar-info {
  flex: 1;
  min-width: 0;
}

.chat-topbar-name {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-topbar-status {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 1px;
}

/* ============================================================
   ONLINE PANEL
   ============================================================ */
.online-panel {
  background: #FFFFFF;
  border-bottom: 1px solid var(--wa-separator);
  overflow: hidden;
  max-height: 200px;
  transition: max-height 0.3s ease;
  flex-shrink: 0;
}

.online-panel.hidden {
  max-height: 0;
}

.online-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wa-dark-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.close-panel-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--wa-text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}

.online-users-list {
  display: flex;
  gap: 16px;
  padding: 8px 16px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.online-user-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.online-user-item:active .online-user-avatar {
  opacity: 0.8;
}

.online-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  position: relative;
  text-transform: uppercase;
}

.online-user-avatar::after {
  content: '';
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  background: var(--wa-light-green);
  border-radius: 50%;
  border: 2px solid #FFFFFF;
}

.online-user-name {
  font-size: 11px;
  color: var(--wa-text-secondary);
  max-width: 52px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   CONVERSATIONS LIST
   ============================================================ */
#screen-conversations {
  background: #FFFFFF;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.conv-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #F0F0F0;
  position: relative;
}

.conv-item:active {
  background: #F5F5F5;
}

.conv-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
  text-transform: uppercase;
}

.conv-avatar.group {
  background: var(--wa-dark-green);
}

.conv-info {
  flex: 1;
  min-width: 0;
}

.conv-top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.conv-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--wa-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.conv-time {
  font-size: 12px;
  color: var(--wa-text-secondary);
  flex-shrink: 0;
  white-space: nowrap;
}

.conv-last-msg {
  font-size: 14px;
  color: var(--wa-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-last-msg .sender-prefix {
  color: var(--wa-text-primary);
  font-weight: 500;
}

/* FAB */
.fab {
  position: absolute;
  bottom: calc(20px + var(--bottom-safe));
  right: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wa-light-green);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.5);
  transition: transform 0.15s, background 0.15s;
  z-index: 5;
}

.fab:active {
  background: var(--wa-green);
  transform: scale(0.93);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.modal.hidden {
  pointer-events: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.25s;
}

.modal:not(.hidden) .modal-backdrop {
  opacity: 1;
}

.modal-sheet-tall {
  max-height: 85vh !important;
}

.modal-sheet {
  position: relative;
  background: #FFFFFF;
  border-radius: 20px 20px 0 0;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: var(--bottom-safe);
}

.modal:not(.hidden) .modal-sheet {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--wa-text-primary);
  border-bottom: 1px solid var(--wa-separator);
}

.modal-close {
  background: none;
  border: none;
  font-size: 26px;
  color: var(--wa-text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}

.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 0;
}

.modal-hint {
  font-size: 13px;
  color: var(--wa-text-secondary);
  padding: 0 20px 12px;
}

.modal-users-list {
  display: flex;
  flex-direction: column;
}

.modal-user-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.15s;
}

.modal-user-item:active {
  background: #F5F5F5;
}

.modal-user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
  text-transform: uppercase;
  position: relative;
}

.modal-user-avatar::after {
  content: '';
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background: var(--wa-light-green);
  border-radius: 50%;
  border: 2px solid #FFFFFF;
}

.modal-user-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--wa-text-primary);
}

.modal-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--wa-text-secondary);
  font-size: 14px;
}

/* ============================================================
   CHAT SCREEN
   ============================================================ */
#screen-chat {
  background: var(--wa-bg);
}

/* Chat background pattern */
.messages-container {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c4b5a5' fill-opacity='0.12'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.messages-list {
  flex: 1;
  padding: 8px 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Date separator */
.date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

.date-separator-label {
  background: #E1F2FA;
  color: #4A90D9;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Messages */
.message-row {
  display: flex;
  margin-bottom: 2px;
}

.message-row.sent {
  justify-content: flex-end;
}

.message-row.received {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 75%;
  padding: 7px 10px 6px;
  border-radius: 8px;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

.message-row.sent .message-bubble {
  background: var(--wa-bubble-out);
  border-top-right-radius: 2px;
}

.message-row.received .message-bubble {
  background: var(--wa-bubble-in);
  border-top-left-radius: 2px;
}

/* Tail */
.message-row.sent .message-bubble::after {
  content: '';
  position: absolute;
  top: 0;
  right: -8px;
  border: 8px solid transparent;
  border-top-color: var(--wa-bubble-out);
  border-right: none;
  border-top-right-radius: 2px;
}

.message-row.received .message-bubble::after {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  border: 8px solid transparent;
  border-top-color: var(--wa-bubble-in);
  border-left: none;
}

.message-sender-name {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--wa-dark-green);
}

.message-text {
  font-size: 14.5px;
  color: var(--wa-text-primary);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
}

.message-time {
  font-size: 11px;
  color: var(--wa-text-secondary);
  white-space: nowrap;
}

.message-row.sent .message-time {
  color: #809A7A;
}

/* Consecutive messages - tighten up */
.message-row.sent + .message-row.sent .message-bubble {
  border-top-right-radius: 8px;
}

.message-row.sent + .message-row.sent .message-bubble::after {
  display: none;
}

.message-row.received + .message-row.received .message-bubble {
  border-top-left-radius: 8px;
}

.message-row.received + .message-row.received .message-bubble::after {
  display: none;
}

/* Typing indicator */
.typing-indicator {
  padding: 4px 12px 8px;
  display: flex;
  align-items: flex-end;
}

.typing-indicator.hidden {
  display: none;
}

.typing-bubble {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 10px 14px;
  display: flex;
  gap: 4px;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #B0B0B0;
  animation: typing-bounce 1.3s ease-in-out infinite;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ============================================================
   INPUT BAR
   ============================================================ */
/* Barre fichier en attente */
.file-preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F0F0F0;
  border-top: 1px solid #E0E0E0;
  padding: 8px 12px 6px;
  flex-shrink: 0;
}
.file-preview-bar.hidden { display: none; }
.file-preview-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: #E0E0E0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-preview-name {
  flex: 1;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Panneau emoji */
.emoji-panel {
  background: #fff;
  border-top: 1px solid #E0E0E0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: 240px;
}
.emoji-panel.hidden { display: none; }
.emoji-cats {
  display: flex;
  gap: 2px;
  padding: 6px 8px 4px;
  border-bottom: 1px solid #F0F0F0;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.emoji-cats::-webkit-scrollbar { display: none; }
.emoji-cat-btn {
  background: none;
  border: none;
  font-size: 20px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
}
.emoji-cat-btn.active { opacity: 1; background: #E8F5E9; }
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 2px;
  padding: 6px 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.emoji-item {
  font-size: 22px;
  line-height: 1;
  padding: 5px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: background 0.1s;
  border: none;
  background: none;
  user-select: none;
}
.emoji-item:active { background: #E8F5E9; }

/* Boutons action input */
.input-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: none;
  color: #667781;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s;
  padding: 0;
}
.input-action-btn:active, .input-action-btn.active { color: var(--wa-green); }
.input-action-btn svg { pointer-events: none; }

/* Message image */
.msg-image {
  display: block;
  max-width: 220px;
  max-height: 200px;
  border-radius: 6px;
  cursor: zoom-in;
  margin-bottom: 4px;
  object-fit: cover;
}

/* Message PDF/fichier */
.msg-file-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.07);
  border-radius: 8px;
  padding: 8px 10px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  margin-bottom: 4px;
  max-width: 220px;
  word-break: break-all;
}
.msg-file-link svg { flex-shrink: 0; color: #E74C3C; }

/* Liens cliquables dans les messages */
.msg-link {
  color: var(--wa-dark-green);
  text-decoration: underline;
  word-break: break-all;
}

/* Visionneuse image plein écran */
.img-viewer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-viewer-backdrop.hidden { display: none; }
.img-viewer-backdrop img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 4px;
  object-fit: contain;
}
.img-viewer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-bar {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 6px 8px;
  padding-bottom: calc(6px + var(--bottom-safe));
  background: #F0F0F0;
  flex-shrink: 0;
}

.input-wrapper {
  flex: 1;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 10px 16px;
  min-height: 44px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.message-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--wa-text-primary);
  resize: none;
  max-height: 100px;
  overflow-y: auto;
  background: transparent;
  line-height: 1.4;
  -webkit-overflow-scrolling: touch;
}

.message-input::placeholder {
  color: #B0B0B0;
}

.send-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--wa-light-green);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
}

.send-btn:active {
  background: var(--wa-green);
  transform: scale(0.92);
}

/* ============================================================
   REPLY BAR (au-dessus de l'input)
   ============================================================ */
.reply-bar {
  display: flex;
  align-items: center;
  background: #F0F0F0;
  border-top: 1px solid #E0E0E0;
  padding: 8px 12px 6px;
  gap: 8px;
  flex-shrink: 0;
}

.reply-bar.hidden { display: none; }

.reply-bar-content {
  flex: 1;
  display: flex;
  align-items: stretch;
  background: #E8E8E8;
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}

.reply-bar-line {
  width: 4px;
  background: var(--wa-green);
  flex-shrink: 0;
}

.reply-bar-text {
  padding: 5px 10px;
  min-width: 0;
}

.reply-bar-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--wa-green);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-bar-preview {
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-bar-cancel {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ============================================================
   CITATION dans la bulle de message
   ============================================================ */
.msg-reply-quote {
  display: flex;
  align-items: stretch;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 5px;
  cursor: pointer;
}

.message-row.sent .msg-reply-quote {
  background: rgba(0,0,0,0.07);
}

.message-row.received .msg-reply-quote {
  background: rgba(0,0,0,0.06);
}

.msg-reply-quote-line {
  width: 4px;
  background: var(--wa-green);
  flex-shrink: 0;
}

.message-row.sent .msg-reply-quote-line {
  background: #3a8c5e;
}

.msg-reply-quote-body {
  padding: 4px 8px;
  min-width: 0;
  flex: 1;
}

.msg-reply-quote-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--wa-green);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-row.sent .msg-reply-quote-name {
  color: #3a8c5e;
}

.msg-reply-quote-text {
  font-size: 12.5px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   MENU CONTEXTUEL (long-press)
   ============================================================ */
.msg-context-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: transparent;
}

.msg-context-backdrop.hidden { display: none; }

.msg-context-menu {
  position: fixed;
  z-index: 1600;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  overflow: hidden;
  min-width: 160px;
}

.msg-context-menu.hidden { display: none; }

.ctx-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 18px;
  border: none;
  background: none;
  font-size: 15px;
  color: #222;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.ctx-menu-item:active {
  background: #f0f0f0;
}

/* Bouton chevron sur la bulle */
.msg-chevron {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.12);
  color: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0;
  flex-shrink: 0;
  z-index: 2;
}

/* Visible au survol (desktop) */
.message-bubble:hover .msg-chevron {
  opacity: 1;
}

/* Sur mobile (pas de hover) : légèrement visible en permanence */
@media (hover: none) {
  .msg-chevron {
    opacity: 0.35;
  }
}

/* Toujours visible sur mobile après un tap */
.message-bubble.menu-open .msg-chevron {
  opacity: 1;
}

/* Highlight du message sélectionné */
.message-row.reply-highlight .message-bubble {
  filter: brightness(0.93);
  transition: filter 0.2s;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-conversations {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 32px;
  text-align: center;
  color: var(--wa-text-secondary);
  gap: 16px;
  pointer-events: none;
}

.empty-conversations svg {
  opacity: 0.25;
}

.empty-conversations h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--wa-text-primary);
  opacity: 0.6;
}

.empty-conversations p {
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   SCROLLBAR (desktop)
   ============================================================ */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 2px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden {
  display: none !important;
}

/* Notification badge */
.conv-unread-badge {
  background: var(--wa-light-green);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}

/* Message entering animation */
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message-row {
  animation: msg-in 0.18s ease-out;
}

/* System message */
.system-message {
  text-align: center;
  padding: 6px 16px;
}

.system-message-text {
  display: inline-block;
  background: #E1F2FA;
  color: #4A90D9;
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 20px;
}


/* ============================================================
   ADMIN SCREEN
   ============================================================ */
.admin-only.hidden { display: none !important; }

/* Topbar admin */
.admin-topbar { background: #075E54; }

/* Tabs */
.admin-tabs {
  display: flex;
  background: #075E54;
  border-bottom: 2px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.admin-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.admin-tab.active {
  color: #FFFFFF;
  border-bottom-color: #25D366;
}

/* Tab content */
.admin-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #F0F2F5;
}

/* Card */
.admin-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.admin-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #075E54;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #F0F0F0;
}

/* Form */
.admin-form { display: flex; flex-direction: column; gap: 12px; }

.admin-row {
  display: flex;
  gap: 10px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.admin-field-sm { flex: 0 0 80px; }

.admin-label {
  font-size: 11px;
  font-weight: 700;
  color: #667781;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.admin-required { color: #E53935; }

.admin-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #E0E0E0;
  border-radius: 8px;
  font-size: 15px;
  color: #111B21;
  background: #FAFAFA;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-input:focus {
  border-color: #25D366;
  box-shadow: 0 0 0 3px rgba(37,211,102,0.12);
  background: #FFFFFF;
}

/* Tag wrap (parrain) */
.admin-tag-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border: 1.5px solid #E0E0E0;
  border-radius: 8px;
  background: #FAFAFA;
  cursor: text;
  transition: border-color 0.2s;
  position: relative;
}

.admin-tag-wrap:focus-within {
  border-color: #25D366;
  box-shadow: 0 0 0 3px rgba(37,211,102,0.12);
  background: #FFFFFF;
}

.admin-tag-input {
  border: none; outline: none; background: transparent;
  font-size: 15px; flex: 1; min-width: 100px; color: #111B21; padding: 0;
}

/* Parrain chips */
.parrain-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #C8E6C9;
  border-radius: 20px;
  padding: 3px 8px 3px 11px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.parrain-chip-remove {
  background: none; border: none; cursor: pointer;
  color: #2E7D32; font-size: 16px; line-height: 1;
  padding: 0; display: flex; align-items: center; opacity: 0.6;
}
.parrain-chip-remove:hover { opacity: 1; }

/* Suggestions dropdown fixe (évite le clipping) */
.admin-suggestions-fixed {
  position: fixed;
  background: #FFFFFF;
  border: 1.5px solid #25D366;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  z-index: 9999;
  overflow-y: auto;
  max-height: 200px;
}

.sug-item {
  padding: 11px 14px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #F5F5F5;
  color: #111B21;
}
.sug-item:last-child { border-bottom: none; }
.sug-item:hover, .sug-item:active { background: #F0FFF4; color: #075E54; }

/* Messages d'état */
.admin-msg {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.admin-msg.error { background: #FDECEA; color: #C62828; border: 1px solid #FFCDD2; }
.admin-msg.success { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }

/* Bouton créer */
.admin-create-btn {
  padding: 13px;
  background: #25D366;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 3px 10px rgba(37,211,102,0.35);
}
.admin-create-btn:active { background: #128C7E; transform: scale(0.98); }

/* Liste items */
.admin-list { display: flex; flex-direction: column; gap: 1px; }

.admin-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid #F5F5F5;
}
.admin-list-item:last-child { border-bottom: none; }

.admin-list-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #FFFFFF; flex-shrink: 0;
}

.admin-list-info { flex: 1; min-width: 0; }

.admin-list-name {
  font-size: 14px; font-weight: 600; color: #111B21;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}

.admin-list-sub {
  font-size: 12px; color: #667781; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.admin-badge {
  background: #075E54; color: white;
  font-size: 10px; padding: 2px 7px; border-radius: 20px; font-weight: 700;
}

.admin-list-del {
  background: #FDECEA; color: #C62828; border: none;
  border-radius: 8px; padding: 7px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.admin-list-del:active { background: #FFCDD2; }

.admin-list-ren {
  background: #E8F5E9; color: #2E7D32; border: none;
  border-radius: 8px; padding: 7px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.admin-list-ren:active { background: #C8E6C9; }

.admin-empty {
  color: #667781; font-size: 13px; text-align: center; padding: 20px 0;
}

/* Vieilles classes conservées pour compatibilité */
.admin-suggestions { display: none; }

/* ============================================================
   PROFILE MODAL
   ============================================================ */
.profile-sheet {
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  padding: 0 !important;
}

.profile-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(0,0,0,0.15);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}

.profile-header {
  background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
  padding: 36px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: white;
  border: 3px solid rgba(255,255,255,0.4);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.profile-name {
  font-size: 20px; font-weight: 700; color: white;
}

.profile-role {
  font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 3px 12px; border-radius: 20px;
}

.profile-body {
  padding: 16px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #F5F5F5;
}
.profile-row:last-child { border-bottom: none; }

.profile-row-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  margin-top: 1px;
}

.profile-row-text {
  font-size: 14px;
  color: #111B21;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-row-label {
  font-size: 11px;
  font-weight: 700;
  color: #667781;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.profile-maps-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #128C7E;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 2px;
}
.profile-maps-link:hover { text-decoration: underline; }

.profile-empty {
  color: #667781; font-size: 13px;
  text-align: center; padding: 20px 0;
}

/* Noms cliquables dans les messages */
.clickable-name { cursor: pointer; }
.clickable-name:hover { text-decoration: underline; }

/* Avatar/nom cliquable en topbar DM */
.chat-topbar-avatar { cursor: pointer; }
.chat-topbar-name  { cursor: pointer; }

/* ============================================================
   MY PROFILE SCREEN
   ============================================================ */
.myprofile-body {
  flex: 1;
  overflow-y: auto;
  background: #F0F2F5;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 40px;
}

.myprofile-photo-section {
  background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
  padding: 32px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.myprofile-avatar-wrap {
  position: relative;
  width: 96px; height: 96px;
}

.myprofile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: #128C7E;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 700; color: white;
  border: 3px solid rgba(255,255,255,0.5);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.myprofile-edit-btn {
  position: absolute;
  bottom: 0; right: 0;
  width: 32px; height: 32px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 2px solid white;
}

.myprofile-name {
  font-size: 22px; font-weight: 700; color: white; text-align: center;
}

.myprofile-username {
  font-size: 14px; color: rgba(255,255,255,0.75);
}

.myprofile-points {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 5px 16px;
}
.myprofile-points.hidden { display: none; }

.myprofile-msg {
  font-size: 13px; font-weight: 500;
  padding: 6px 16px; border-radius: 20px;
}
.myprofile-msg.success { background: rgba(255,255,255,0.25); color: white; }
.myprofile-msg.error   { background: rgba(255,80,80,0.3); color: white; }

.btn-notif {
  margin-top: 10px;
  padding: 10px 22px;
  background: rgba(255,255,255,0.2);
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-notif:hover { background: rgba(255,255,255,0.35); }
.btn-notif.active { background: rgba(255,255,255,0.3); border-color: #4ECDC4; }
.btn-notif.hidden { display: none; }

.myprofile-info-card {
  background: white;
  border-radius: 12px;
  margin: 0 14px;
  padding: 4px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Mini avatar dans les messages de groupe */
.msg-avatar {
  align-self: flex-end;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.message-row.received {
  align-items: flex-end;
  gap: 6px;
}

/* ============================================================
   POINTS
   ============================================================ */
.modal-points {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-points.hidden { display: none; }
.modal-points-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-points-title {
  font-size: 17px;
  font-weight: 700;
  color: #075E54;
  text-align: center;
}
.modal-points-balance {
  font-size: 14px;
  color: #555;
  text-align: center;
}
.modal-points-input {
  border: 1.5px solid #E0E0E0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 20px;
  text-align: center;
  outline: none;
  color: #222;
  width: 100%;
  box-sizing: border-box;
}
.modal-points-input:focus { border-color: #25D366; }
.modal-points-comment {
  border: 1.5px solid #E0E0E0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  margin-top: 8px;
  color: #333;
}
.modal-points-comment:focus { border-color: #25D366; outline: none; }
.modal-points-error {
  font-size: 13px;
  color: #E74C3C;
  text-align: center;
}
.modal-points-error.hidden { display: none; }
.modal-points-actions {
  display: flex;
  gap: 10px;
}
.modal-points-btn {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.modal-points-btn.cancel { background: #F0F0F0; color: #555; }
.modal-points-btn.confirm { background: #25D366; color: #fff; }
.modal-points-btn.confirm:active { background: #128C7E; }

/* Select demande dans modal points */
.modal-points-request {
  border: 1.5px solid #E0E0E0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  color: #333;
  background: #fff;
  cursor: pointer;
}
.modal-points-request:focus { border-color: #25D366; outline: none; }

/* Section demandes */
.requests-section {
  background: #f0faf5;
  border-bottom: 1.5px solid #d4ede2;
  padding: 10px 0 4px;
}
.requests-section.hidden { display: none; }
.requests-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #075E54;
  padding: 0 16px 6px;
}
.requests-list { display: flex; flex-direction: column; gap: 0; }
.request-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  border-top: 1px solid #e5f2eb;
  transition: background 0.15s;
}
.request-card:hover, .request-card:active { background: #e0f5ea; }
.request-card-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.request-card-body { flex: 1; min-width: 0; }
.request-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.request-card-meta {
  font-size: 12px;
  color: #667781;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.request-card-category {
  background: #e8f4f8;
  color: #2a7aa1;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.request-card-arrow {
  color: #25D366;
  flex-shrink: 0;
}
.requests-filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 12px 8px;
  background: #f0faf5;
  border-bottom: 1px solid #d4ede2;
}
.req-filter-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1.5px solid #c5e0d0;
  background: #fff;
  color: #555;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.req-filter-btn:hover {
  background: #e2f5eb;
  border-color: #25D366;
  color: #1a8a45;
}
.req-filter-btn.active {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
  font-weight: 600;
}
.req-filter-count {
  background: rgba(0,0,0,0.12);
  border-radius: 8px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
}

/* ---- Feedback transfert ---- */
.msg-feedback-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 16px;
  border: 1.5px solid #25D366;
  background: #fff;
  color: #075E54;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.msg-feedback-btn:hover { background: #e8faf0; }
.msg-transfer-feedback {
  margin-top: 7px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}
.msg-transfer-feedback.positive {
  background: #e8faf0;
  color: #1a6b3a;
  border-left: 3px solid #25D366;
}
.msg-transfer-feedback.negative-sent {
  background: #f5f5f5;
  color: #888;
  font-style: italic;
}

/* ---- Modal feedback ---- */
.modal-feedback-subtitle {
  font-size: 13px;
  color: #667781;
  margin: -4px 0 12px;
  text-align: center;
}
.modal-feedback-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  outline: none;
}
.modal-feedback-textarea:focus { border-color: #25D366; }
.modal-feedback-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.feedback-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.feedback-btn:hover { opacity: 0.85; }
.feedback-btn.positive { background: #25D366; color: #fff; }
.feedback-btn.negative { background: #e74c3c; color: #fff; }

/* ---- Admin feedbacks ---- */
.admin-badge-red {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}
.admin-feedback-item {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.admin-feedback-item.negative { background: #fff0f0; border-left: 3px solid #e74c3c; }
.admin-feedback-item.positive { background: #f0faf5; border-left: 3px solid #25D366; }
.admin-feedback-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.admin-feedback-badge { font-size: 16px; }
.admin-feedback-date { margin-left: auto; color: #999; font-size: 11px; }
.admin-feedback-comment { color: #444; font-style: italic; }

/* ---- Profile feedbacks ---- */
.profile-feedback-item {
  font-size: 12px;
  color: #555;
  padding: 4px 0 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 4px;
}

/* Bulle de transfert de points dans le chat */
.msg-transfer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px 2px;
  min-width: 160px;
}
.msg-transfer-icon {
  font-size: 26px;
  line-height: 1;
}
.msg-transfer-info {
  display: flex;
  flex-direction: column;
}
.msg-transfer-amount {
  font-size: 18px;
  font-weight: 800;
  color: #075E54;
}
.message-row.sent .msg-transfer-amount { color: #3a8c5e; }
.msg-transfer-label {
  font-size: 12px;
  color: #667781;
}
.msg-transfer-comment {
  font-size: 13px;
  color: #444;
  margin-top: 4px;
  font-style: italic;
}
.msg-transfer-request {
  font-size: 12px;
  color: #075E54;
  margin-top: 4px;
  font-weight: 600;
}
