/* Container principal */
.AgentChat_container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0;
  z-index: 9999;
  pointer-events: none;
}

.AgentChat_container.active {
  width: 100%;
  pointer-events: auto;
}

/* Panneau latéral droit */
.AgentChat_side-panel {
  position: fixed;
  top: 0;
  right: -480px;
  bottom: 0;
  width: 480px;
  background: #ffffff;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
}

.AgentChat_container.active .AgentChat_side-panel {
  right: 0;
}

/* Header du panneau */
.AgentChat_panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e8eaed;
  flex-shrink: 0;
}

.AgentChat_header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.AgentChat_logo {
  font-size: 24px;
  line-height: 1;
  color: #3c8dbc;
}

.AgentChat_title {
  font-size: 20px;
  font-weight: 500;
  color: #202124;
  margin: 0;
}

.AgentChat_close-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: #5f6368;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.AgentChat_close-btn:hover {
  background: #f1f3f4;
}

/* Contenu principal */
.AgentChat_panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Section découverte */
.AgentChat_discover-section {
  margin-bottom: 20px;
}

.AgentChat_section-title {
  font-size: 14px;
  font-weight: 400;
  color: #5f6368;
  margin: 0 0 16px 0;
}

/* Grille d'actions (cartes) */
.AgentChat_actions-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Carte d'action (style Gemini) */
.AgentChat_action-card {
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 7px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.AgentChat_action-card:hover {
  background: #f1f3f4;
  border-color: #dadce0;
  transform: translateX(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.AgentChat_action-card.active {
  background: #e8f0fe;
  border-color: #4285f4;
}

.AgentChat_card-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  color: #5f6368;
}

.AgentChat_action-card:hover .AgentChat_card-icon-circle {
  background: #e8f0fe;
  color: #1967d2;
}

.AgentChat_action-card.active .AgentChat_card-icon-circle {
  background: #4285f4;
  color: #ffffff;
}

.AgentChat_card-content {
  flex: 1;
  min-width: 0;
}

.AgentChat_card-title {
  font-size: 15px;
  font-weight: 400;
  color: #202124;
  margin: 0;
}

/* Animation de réflexion de l'IA */
.AgentChat_thinking-animation {
  margin-top: 24px;
  padding: 32px 24px;
  text-align: center;
  animation: AgentChat_fadeIn 0.3s ease;
}

.AgentChat_thinking-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.AgentChat_thinking-icon {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4 0%, #1967d2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  animation: AgentChat_pulse 2s ease-in-out infinite;
}

.AgentChat_thinking-text {
  font-size: 15px;
  font-weight: 500;
  color: #202124;
}

.AgentChat_thinking-dots {
  display: flex;
  gap: 8px;
}

.AgentChat_thinking-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4285f4;
  animation: AgentChat_bounce 1.4s ease-in-out infinite;
}

.AgentChat_thinking-dots span:nth-child(1) {
  animation-delay: 0s;
}

.AgentChat_thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.AgentChat_thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes AgentChat_pulse {
  0%, 100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.7);
  }
  50% {
      transform: scale(1.05);
      box-shadow: 0 0 0 10px rgba(66, 133, 244, 0);
  }
}

@keyframes AgentChat_bounce {
  0%, 80%, 100% {
      transform: scale(0);
      opacity: 0.5;
  }
  40% {
      transform: scale(1);
      opacity: 1;
  }
}

/* Zone de résultat */
.AgentChat_result-area {
  margin-top: 24px;
  animation: AgentChat_fadeIn 0.3s ease;
}

.AgentChat_result-content {
  background: #ffffff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 20px;
}

.AgentChat_result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.AgentChat_result-icon {
  font-size: 20px;
  color: #4285f4;
}

.AgentChat_result-header h4 {
  font-size: 15px;
  font-weight: 400;
  color: #202124;
  margin: 0;
}

.AgentChat_result-text {
  font-size: 14px;
  color: #202124;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 16px;
}

/* Actions rapides (Insérer, Copier, etc.) */
.AgentChat_result-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e8eaed;
  margin-bottom: 12px;
}

.AgentChat_action-btn {
  background: transparent;
  border: none;
  color: #1967d2;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.AgentChat_action-btn:hover {
  background: #e8f0fe;
}

.AgentChat_action-btn i {
  font-size: 14px;
}

.AgentChat_insert-btn {
  color: #1967d2;
}

.AgentChat_more-btn {
  margin-left: auto;
  padding: 8px;
}

/* Suggestions rapides */
.AgentChat_suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.AgentChat_suggestion-btn {
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  color: #202124;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 16px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.AgentChat_suggestion-btn:hover {
  background: #e8f0fe;
  border-color: #4285f4;
}

.AgentChat_suggestion-btn i {
  font-size: 12px;
}

/* Zone de saisie chat en bas */
.AgentChat_chat-input-container {
  padding: 16px 24px;
  border-top: 1px solid #e8eaed;
  flex-shrink: 0;
  background: #ffffff;
}

.AgentChat_input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: 24px;
  padding: 4px 4px 4px 16px;
  transition: all 0.2s;
}

.AgentChat_input-wrapper:focus-within {
  background: #ffffff;
  border-color: #4285f4;
  box-shadow: 0 1px 6px rgba(66, 133, 244, 0.2);
}

.AgentChat_chat-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #202124;
  padding: 8px 0;
}

.AgentChat_chat-input::placeholder {
  color: #5f6368;
}

.AgentChat_send-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #4285f4;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.AgentChat_send-btn:hover {
  background: #1967d2;
  transform: scale(1.05);
}

.AgentChat_send-btn:active {
  transform: scale(0.95);
}

.AgentChat_send-btn.loading {
  background: #5f6368;
  cursor: not-allowed;
}

.AgentChat_send-icon {
  font-size: 18px;
  font-weight: bold;
}

.AgentChat_spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: AgentChat_spin 0.8s linear infinite;
}

.AgentChat_send-btn.loading .AgentChat_spinner {
  display: block;
}

.AgentChat_send-btn.loading .AgentChat_send-icon {
  display: none;
}

/* Animations */
@keyframes AgentChat_fadeIn {
  from {
      opacity: 0;
      transform: translateY(10px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

@keyframes AgentChat_spin {
  to {
      transform: rotate(360deg);
  }
}

/* Scrollbar personnalisée */
.AgentChat_panel-content::-webkit-scrollbar {
  width: 8px;
}

.AgentChat_panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.AgentChat_panel-content::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 4px;
}

.AgentChat_panel-content::-webkit-scrollbar-thumb:hover {
  background: #bdc1c6;
}

.AgentChat_generate-ai-btn {
  position: absolute;
  right: 20px;
  bottom: 10px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #3c8dbc, #3c8dbc);
  color: white;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
}

.AgentChat_generate-ai-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.AgentChat_generate-ai-btn i {
  font-size: 22px;
}

/* Responsive */
@media (max-width: 768px) {
  .AgentChat_side-panel {
      width: 100%;
      right: -100%;
  }
}
