/**
 * TerpzLab Chatbot Widget - Thème Sombre Premium CBD
 * Version avec boutons + Chat Live - Responsive Mobile
 */

/* Variables CSS - Thème Clair */
:root {
  --terpz-bg-primary: #ffffff;
  --terpz-bg-secondary: #f8f9fa;
  --terpz-bg-tertiary: #f0f2f5;
  --terpz-bg-message: #e9ecef;
  --terpz-accent: #799c79;
  --terpz-accent-dim: #5a7a5a;
  --terpz-accent-glow: rgba(121, 156, 121, 0.25);
  --terpz-purple: #7c3aed;
  --terpz-purple-dim: #6d28d9;
  --terpz-orange: #ea580c;
  --terpz-text-primary: #1a1a1a;
  --terpz-text-secondary: #6b7280;
  --terpz-text-muted: #9ca3af;
  --terpz-border: #e5e7eb;
  --terpz-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  --terpz-shadow-glow: 0 0 30px var(--terpz-accent-glow);
  --terpz-radius: 16px;
  --terpz-radius-sm: 12px;
  --terpz-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset & Base */
.terpz-chatbot * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.terpz-chatbot {
  font-family: var(--terpz-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Empêcher le zoom sur focus des inputs sur iOS */
@supports (-webkit-touch-callout: none) {
  .terpz-chatbot input,
  .terpz-chatbot textarea,
  .terpz-chatbot select {
    font-size: 16px !important;
  }
}

/* Bouton d'ouverture du chat */
.terpz-chat-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--terpz-accent) 0%, var(--terpz-accent-dim) 100%);
  border: none;
  cursor: pointer;
  box-shadow: var(--terpz-shadow), var(--terpz-shadow-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99999;
  animation: terpz-pulse 2s infinite;
}

.terpz-chat-button:hover {
  transform: scale(1.1);
  box-shadow: var(--terpz-shadow), 0 0 60px var(--terpz-accent-glow);
}

.terpz-chat-button svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
  transition: transform 0.3s ease;
}

.terpz-chat-button.open svg {
  transform: rotate(90deg);
}

@keyframes terpz-pulse {
  0%, 100% {
    box-shadow: var(--terpz-shadow), 0 0 20px var(--terpz-accent-glow);
  }
  50% {
    box-shadow: var(--terpz-shadow), 0 0 40px var(--terpz-accent-glow);
  }
}

/* Fenêtre du chat */
.terpz-chat-window {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 380px;
  height: 580px;
  max-height: calc(100vh - 120px);
  max-width: calc(100vw - 40px);
  background: var(--terpz-bg-primary);
  border-radius: var(--terpz-radius);
  border: 1px solid var(--terpz-border);
  box-shadow: var(--terpz-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.terpz-chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header */
.terpz-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--terpz-accent) 0%, var(--terpz-accent-dim) 100%);
  border-bottom: none;
  flex-shrink: 0;
}

.terpz-chat-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.terpz-chat-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.4);
  transform-origin: center top;
}

.terpz-chat-info {
  flex: 1;
  min-width: 0;
}

.terpz-chat-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terpz-status-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: terpz-status-pulse 2s infinite;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

@keyframes terpz-status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.terpz-chat-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terpz-chat-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.terpz-chat-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.terpz-chat-close svg {
  width: 16px;
  height: 16px;
  stroke: #ffffff;
}

/* Bouton retour */
.terpz-back-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.terpz-back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.terpz-back-btn svg {
  width: 16px;
  height: 16px;
  stroke: #ffffff;
}

.terpz-back-btn.hidden {
  display: none;
}

/* Zone de contenu principale */
.terpz-chat-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: var(--terpz-bg-primary);
  min-height: 0;
}

.terpz-chat-content::-webkit-scrollbar {
  width: 5px;
}

.terpz-chat-content::-webkit-scrollbar-track {
  background: transparent;
}

.terpz-chat-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

/* ========================================
   VUE MENU PRINCIPAL (BOUTONS)
   ======================================== */
.terpz-menu-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  height: 100%;
}

.terpz-menu-view.hidden {
  display: none;
}

.terpz-menu-welcome {
  text-align: center;
  padding: 8px 0 16px;
}

.terpz-menu-welcome-icon {
  font-size: 40px;
  margin-bottom: 10px;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.terpz-menu-welcome-icon img,
.terpz-welcome-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
}

.terpz-menu-welcome-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--terpz-text-primary);
  margin-bottom: 6px;
}

.terpz-menu-welcome-text {
  font-size: 13px;
  color: var(--terpz-text-secondary);
}

/* Boutons du menu */
.terpz-menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.terpz-menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--terpz-bg-secondary);
  border: 1px solid var(--terpz-border);
  border-radius: var(--terpz-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.terpz-menu-btn:hover {
  background: var(--terpz-bg-tertiary);
  border-color: var(--terpz-accent);
  transform: translateX(4px);
}

.terpz-menu-btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.terpz-menu-btn-icon.green {
  background: rgba(90, 122, 90, 0.12);
}

.terpz-menu-btn-icon.purple {
  background: rgba(124, 58, 237, 0.1);
}

.terpz-menu-btn-icon.orange {
  background: rgba(234, 88, 12, 0.1);
}

.terpz-menu-btn-icon.blue {
  background: rgba(59, 130, 246, 0.1);
}

.terpz-menu-btn-content {
  flex: 1;
  min-width: 0;
}

.terpz-menu-btn-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--terpz-text-primary);
  margin-bottom: 2px;
}

.terpz-menu-btn-desc {
  font-size: 11px;
  color: var(--terpz-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terpz-menu-btn-arrow {
  color: var(--terpz-text-muted);
  font-size: 16px;
  flex-shrink: 0;
}

/* Bouton Chat Live spécial */
.terpz-menu-btn.live-chat {
  background: linear-gradient(135deg, rgba(90, 122, 90, 0.08) 0%, rgba(90, 122, 90, 0.04) 100%);
  border-color: rgba(90, 122, 90, 0.3);
  margin-top: auto;
}

.terpz-menu-btn.live-chat:hover {
  border-color: var(--terpz-accent);
  background: linear-gradient(135deg, rgba(90, 122, 90, 0.15) 0%, rgba(90, 122, 90, 0.08) 100%);
}

/* ========================================
   VUE FAQ (QUESTIONS/RÉPONSES)
   ======================================== */
.terpz-faq-view {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  height: 100%;
}

.terpz-faq-view.active {
  display: flex;
}

.terpz-faq-category-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--terpz-accent);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terpz-faq-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terpz-faq-btn {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--terpz-bg-secondary);
  border: 1px solid var(--terpz-border);
  border-radius: var(--terpz-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 13px;
  color: var(--terpz-text-primary);
}

.terpz-faq-btn:hover {
  background: var(--terpz-bg-tertiary);
  border-color: var(--terpz-accent);
}

/* ========================================
   VUE RÉPONSE
   ======================================== */
.terpz-answer-view {
  display: none;
  flex-direction: column;
  padding: 16px;
  height: 100%;
}

.terpz-answer-view.active {
  display: flex;
}

.terpz-answer-question {
  font-size: 13px;
  font-weight: 600;
  color: var(--terpz-accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--terpz-border);
}

.terpz-answer-content {
  flex: 1;
  font-size: 13px;
  color: var(--terpz-text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-y: auto;
}

.terpz-answer-content strong {
  color: var(--terpz-accent);
}

.terpz-answer-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--terpz-border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.terpz-answer-action-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  border-radius: var(--terpz-radius-sm);
  border: 1px solid var(--terpz-border);
  background: var(--terpz-bg-secondary);
  color: var(--terpz-text-primary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.terpz-answer-action-btn:hover {
  background: var(--terpz-bg-tertiary);
  border-color: var(--terpz-accent);
}

.terpz-answer-action-btn.primary {
  background: linear-gradient(135deg, var(--terpz-accent) 0%, var(--terpz-accent-dim) 100%);
  border: none;
  color: #ffffff;
  font-weight: 600;
}

/* ========================================
   VUE CHAT LIVE
   ======================================== */
.terpz-live-view {
  display: none;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.terpz-live-view.active {
  display: flex;
}

/* Formulaire de contact */
.terpz-live-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.terpz-live-intro {
  text-align: center;
  padding: 8px 0 16px;
}

.terpz-live-intro-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.terpz-live-intro-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--terpz-text-primary);
  margin-bottom: 6px;
}

.terpz-live-intro-text {
  font-size: 12px;
  color: var(--terpz-text-secondary);
}

.terpz-live-input {
  padding: 12px 14px;
  background: var(--terpz-bg-tertiary);
  border: 1px solid var(--terpz-border);
  border-radius: var(--terpz-radius-sm);
  color: var(--terpz-text-primary);
  font-size: 16px; /* 16px minimum pour éviter le zoom iOS */
  font-family: var(--terpz-font);
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.terpz-live-input::placeholder {
  color: var(--terpz-text-muted);
}

.terpz-live-input:focus {
  outline: none;
  border-color: var(--terpz-accent);
  box-shadow: 0 0 0 3px var(--terpz-accent-glow);
}

.terpz-live-textarea {
  min-height: 80px;
  resize: none;
}

.terpz-live-submit {
  padding: 12px;
  background: linear-gradient(135deg, var(--terpz-accent) 0%, var(--terpz-accent-dim) 100%);
  border: none;
  border-radius: var(--terpz-radius-sm);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.terpz-live-submit:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px var(--terpz-accent-glow);
}

.terpz-live-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Message de succès / offline */
.terpz-live-success,
.terpz-live-offline {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  height: 100%;
}

.terpz-live-success.active,
.terpz-live-offline.active {
  display: flex;
}

.terpz-live-success-icon {
  font-size: 50px;
  margin-bottom: 16px;
}

.terpz-live-success-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--terpz-text-primary);
  margin-bottom: 10px;
}

.terpz-live-success-text {
  font-size: 13px;
  color: var(--terpz-text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Zone de chat en temps réel */
.terpz-live-chat {
  display: none;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.terpz-live-chat.active {
  display: flex;
}

.terpz-live-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.terpz-live-messages::-webkit-scrollbar {
  width: 5px;
}

.terpz-live-messages::-webkit-scrollbar-thumb {
  background: var(--terpz-border);
  border-radius: 3px;
}

.terpz-live-message {
  display: flex;
  gap: 8px;
  max-width: 85%;
  animation: terpz-message-in 0.3s ease;
}

@keyframes terpz-message-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terpz-live-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.terpz-live-message.admin {
  align-self: flex-start;
}

.terpz-live-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  overflow: hidden;
}

.terpz-live-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.4);
  transform-origin: center top;
}

.terpz-live-message.admin .terpz-live-message-avatar {
  background: linear-gradient(135deg, var(--terpz-accent) 0%, var(--terpz-accent-dim) 100%);
}

.terpz-live-message.user .terpz-live-message-avatar {
  background: linear-gradient(135deg, var(--terpz-purple) 0%, var(--terpz-purple-dim) 100%);
}

.terpz-live-message-content {
  padding: 10px 14px;
  border-radius: var(--terpz-radius-sm);
  color: var(--terpz-text-primary);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.terpz-live-message.admin .terpz-live-message-content {
  background: var(--terpz-bg-tertiary);
  border: 1px solid var(--terpz-border);
  border-bottom-left-radius: 4px;
}

.terpz-live-message.user .terpz-live-message-content {
  background: linear-gradient(135deg, var(--terpz-accent) 0%, var(--terpz-accent-dim) 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

/* Input du chat live */
.terpz-live-input-container {
  padding: 12px 16px;
  background: var(--terpz-bg-primary);
  border-top: 1px solid var(--terpz-border);
  flex-shrink: 0;
}

.terpz-live-input-wrapper {
  display: flex;
  gap: 8px;
}

.terpz-live-chat-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--terpz-bg-tertiary);
  border: 1px solid var(--terpz-border);
  border-radius: var(--terpz-radius-sm);
  color: var(--terpz-text-primary);
  font-family: var(--terpz-font);
  font-size: 16px; /* 16px minimum pour éviter le zoom iOS */
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}

.terpz-live-chat-input:focus {
  outline: none;
  border-color: var(--terpz-accent);
}

.terpz-live-send {
  width: 40px;
  height: 40px;
  border-radius: var(--terpz-radius-sm);
  background: linear-gradient(135deg, var(--terpz-accent) 0%, var(--terpz-accent-dim) 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.terpz-live-send svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

/* Notice conversation fermée - CENTRÉE */
.terpz-live-closed-notice {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  background: var(--terpz-bg-primary);
  border-top: 1px solid var(--terpz-border);
  text-align: center;
  flex-shrink: 0;
}

.terpz-live-closed-text {
  font-size: 13px;
  color: var(--terpz-text-muted);
}

.terpz-live-new-request {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--terpz-accent) 0%, var(--terpz-accent-dim) 100%);
  border: none;
  border-radius: var(--terpz-radius-sm);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.terpz-live-new-request:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px var(--terpz-accent-glow);
}

/* Footer */
.terpz-chat-footer {
  padding: 8px 16px;
  text-align: center;
  font-size: 10px;
  color: var(--terpz-text-muted);
  background: var(--terpz-bg-secondary);
  border-top: 1px solid var(--terpz-border);
  flex-shrink: 0;
}

.terpz-chat-footer a {
  color: var(--terpz-accent);
  text-decoration: none;
  font-weight: 500;
}

/* ========================================
   RESPONSIVE MOBILE
   ======================================== */
/* Bloquer le scroll du body quand le chatbot est ouvert sur mobile */
body.terpz-chat-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  touch-action: none !important;
}

@media (max-width: 480px) {
  /* Fenêtre principale plein écran */
  .terpz-chat-window {
    width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    max-width: 100%;
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    border-radius: 0;
    border: none;
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  /* Header fixe en haut */
  .terpz-chat-header {
    flex-shrink: 0;
    padding: 12px 14px;
  }
  
  /* Footer fixe en bas */
  .terpz-chat-footer {
    flex-shrink: 0;
  }
  
  /* Zone de contenu flexible */
  .terpz-chat-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  /* Vues menu, FAQ, réponse */
  .terpz-menu-view,
  .terpz-faq-view,
  .terpz-answer-view {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 14px;
  }
  
  /* Vue Live Chat */
  .terpz-live-view {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: none;
    flex-direction: column;
  }
  
  .terpz-live-view.active {
    display: flex;
  }
  
  /* Formulaire live */
  .terpz-live-form {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
  }
  
  /* Zone de chat en temps réel */
  .terpz-live-chat {
    flex: 1;
    min-height: 0;
    display: none;
    flex-direction: column;
    overflow: hidden;
  }
  
  .terpz-live-chat.active {
    display: flex;
  }
  
  /* Messages scrollables */
  .terpz-live-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 14px;
  }
  
  /* Input fixe en bas */
  .terpz-live-input-container {
    flex-shrink: 0;
    padding: 10px 14px;
    background: var(--terpz-bg-primary);
    border-top: 1px solid var(--terpz-border);
  }
  
  /* Notice conversation fermée */
  .terpz-live-closed-notice {
    flex-shrink: 0;
  }
  
  /* Bouton flottant */
  .terpz-chat-button {
    width: 50px;
    height: 50px;
    bottom: 16px;
    right: 16px;
  }
  
  .terpz-chat-button svg {
    width: 22px;
    height: 22px;
  }
  
  /* Autres éléments */
  .terpz-chat-logo {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .terpz-chat-title {
    font-size: 14px;
  }
  
  .terpz-menu-welcome-icon {
    width: 120px;
    height: 120px;
  }
  
  .terpz-menu-welcome-icon img,
  .terpz-welcome-img {
    width: 120px;
    height: 120px;
  }
  
  .terpz-menu-welcome-title {
    font-size: 20px;
  }
  
  .terpz-menu-welcome-text {
    font-size: 13px;
  }
  
  .terpz-menu-btn {
    padding: 12px 14px;
  }
  
  .terpz-menu-btn-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .terpz-answer-actions {
    flex-direction: column;
  }
  
  .terpz-answer-action-btn {
    min-width: 100%;
  }
}

/* Petits écrans très étroits */
@media (max-width: 360px) {
  .terpz-chat-header {
    gap: 8px;
  }
  
  .terpz-chat-logo {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .terpz-chat-close,
  .terpz-back-btn {
    width: 28px;
    height: 28px;
  }
  
  .terpz-menu-btn-content {
    max-width: 180px;
  }
  
  .terpz-menu-welcome-icon {
    width: 100px;
    height: 100px;
  }
  
  .terpz-menu-welcome-icon img,
  .terpz-welcome-img {
    width: 100px;
    height: 100px;
  }
  
  .terpz-menu-welcome-title {
    font-size: 18px;
  }
  
  .terpz-live-message-avatar {
    width: 28px;
    height: 28px;
  }
}

