/* Chatbot Guide Popup Styles */

.chatbot-popup {
  position: sticky;
  top: 20px;
  grid-column: 4;
  width: 100%;
  height: fit-content;
  max-height: calc(100vh - 40px);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(79, 172, 254, 0.3);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  z-index: 10000;
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

.chatbot-popup.active {
  display: flex;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.chatbot-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(0, 242, 254, 0.2));
  border-bottom: 1px solid rgba(79, 172, 254, 0.2);
}

.chatbot-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.chatbot-info {
  flex: 1;
}

.chatbot-info h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 700;
}

.chatbot-info p {
  margin: 5px 0 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.chatbot-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 400px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(79, 172, 254, 0.5);
  border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(79, 172, 254, 0.7);
}

.chatbot-message {
  display: flex;
  gap: 10px;
  animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chatbot-message.bot {
  align-items: flex-start;
}

.chatbot-message.user {
  flex-direction: row-reverse;
  align-items: flex-start;
}

.chatbot-message-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.chatbot-message.bot .chatbot-message-avatar {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.chatbot-message.user .chatbot-message-avatar {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.chatbot-message-content {
  flex: 1;
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 80%;
  word-wrap: break-word;
}

.chatbot-message.bot .chatbot-message-content {
  background: rgba(79, 172, 254, 0.15);
  border: 1px solid rgba(79, 172, 254, 0.3);
  color: #fff;
  border-bottom-left-radius: 4px;
}

.chatbot-message.user .chatbot-message-content {
  background: rgba(102, 126, 234, 0.2);
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chatbot-message-content h4 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #4facfe;
  font-weight: 700;
}

.chatbot-message-content p {
  margin: 5px 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.chatbot-message-content ul,
.chatbot-message-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.chatbot-message-content li {
  margin: 5px 0;
  line-height: 1.5;
}

.chatbot-message-content strong {
  color: #4facfe;
}

.chatbot-input {
  padding: 15px 20px;
  border-top: 1px solid rgba(79, 172, 254, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.chatbot-next-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(79, 172, 254, 0.3);
}

.chatbot-next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 172, 254, 0.5);
}

.chatbot-next-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chatbot-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
  z-index: 9999;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(79, 172, 254, 0.6);
}

.chatbot-toggle-btn.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 1400px) {
  #dossierImagesList {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .images-validation-grid {
    grid-column: 1 / 3;
  }
  
  .chatbot-popup {
    grid-column: 3;
  }
}

@media (max-width: 1200px) {
  #dossierImagesList {
    grid-template-columns: 1fr;
  }
  
  .images-validation-grid {
    grid-column: 1;
  }
  
  .chatbot-popup {
    grid-column: 1;
    position: relative;
    top: auto;
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .chatbot-popup {
    max-height: calc(100vh - 100px);
  }

  .chatbot-toggle-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    bottom: 15px;
    right: 15px;
  }
}

/* Styles pour l'exemple interactif dans le chatbot */
.chatbot-message-special {
  width: 100%;
  max-width: 100% !important;
}

.example-drop-zone {
  background: rgba(79, 172, 254, 0.1);
  border: 2px dashed rgba(79, 172, 254, 0.5);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.example-drop-zone.completed {
  border-color: rgba(76, 175, 80, 0.5);
  background: rgba(76, 175, 80, 0.1);
}

.example-drop-zone-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.example-drop-icon {
  font-size: 2rem;
  opacity: 0.7;
}

.example-drop-zone p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.example-drop-hint {
  font-size: 0.75rem !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

.example-images-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  justify-content: center;
}

.example-image-item {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(79, 172, 254, 0.3);
}

.example-image-item.dropped {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(76, 175, 80, 0.5);
}

.example-image-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.example-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(76, 175, 80, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.example-image-item.dropped .example-image-overlay {
  opacity: 1;
  animation: checkPulse 0.8s ease;
}

/* Après l'animation, l'overlay disparaît pour montrer l'image */
.example-image-item.dropped .example-image-overlay {
  animation: checkPulse 0.8s ease forwards;
}

@keyframes checkPulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes checkPulse {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.example-image-check {
  font-size: 1.5rem;
  color: #fff;
}

.example-prompt-container {
  width: 100%;
}

.example-prompt-input textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
}

.example-prompt-input textarea:focus {
  outline: none;
  border-color: #4facfe;
  background: rgba(255, 255, 255, 0.08);
}

.example-prompt-input textarea.completed {
  border-color: rgba(76, 175, 80, 0.5);
  background: rgba(76, 175, 80, 0.1);
}

.example-result-container {
  width: 100%;
}

.example-result-image {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(79, 172, 254, 0.3);
}

.example-result-image.show {
  opacity: 1;
  transform: scale(1);
}

.example-result-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: contain;
}

.example-result-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
}

.example-result-badge {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #fff;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

@media (max-width: 768px) {
  .example-image-item {
    width: 120px;
    height: 120px;
  }
  
  .example-drop-zone {
    padding: 15px;
    min-height: 100px;
  }
  
  .example-result-image img {
    max-height: 300px;
  }
}



