/* ========== CONTACT HERO ========== */
.contact-hero {
  position: relative;
  height: 90vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--light);
  overflow: hidden;
  padding-top: 100px;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

.contact-hero .hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-hero .hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.contact-hero .hero-title span {
  color: var(--accent);
  position: relative;
}

.contact-hero .hero-title span::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 10px;
  background: rgba(255, 94, 91, 0.3);
  z-index: -1;
}

.contact-hero .hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  max-width: 600px;
}




/* Contact Mode Selector */
.contact-mode-selector {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.mode-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--light);
  padding: 1rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.mode-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--light);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 94, 91, 0.3);
}
.contact-mode-selector a.mode-btn {
  display: inline-flex; /* Pour aligner l'icône et le texte */
  text-decoration: none; /* Enlève le soulignement du lien */
  /* Le reste du style reste identique à .mode-btn */
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--light);
  padding: 1rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.contact-mode-selector a.mode-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.contact-mode-selector a.mode-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--light);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 94, 91, 0.3);
}
/* ========== HERO IMAGE & FLOATING ELEMENTS ========== */
.hero-image {
  position: relative;
  height: 500px;
  border-radius: var(--border-radius);
  overflow: visible; /* Changement important */
  box-shadow: var(--box-shadow);
  margin-top: 2rem;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
}

.floating-elements {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  z-index: 2;
  pointer-events: none;
}

.floating-element {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  animation: floatElement 8s ease-in-out infinite;
  animation-delay: var(--delay);
  z-index: 3;
  white-space: nowrap;
}

/* Positionnement précis des éléments flottants */
.floating-element:nth-child(1) {
  top: 10%;
  left: -5%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  top: 60%;
  right: -5%;
  animation-delay: 0.5s;
}

.floating-element:nth-child(3) {
  bottom: -5%;
  left: 20%;
  animation-delay: 1s;
}

/* Animation améliorée */
@keyframes floatElement {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  50% {
    transform: translateY(-20px) translateX(10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  }
}

/* ========== CONTACT HERO - RESPONSIVE ========== */
@media (max-width: 992px) {
  .contact-hero {
    height: auto;
    min-height: auto;
    padding: 100px 0 60px;
  }
  
  .contact-hero .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-image {
    order: -1;
    margin-top: 0;
    margin-bottom: 2rem;
    height: 350px;
  }
}

@media (max-width: 768px) {
  .contact-hero .hero-title {
    font-size: clamp(2rem, 6vw, 2.5rem);
    text-align: center;
  }
  
  .contact-hero .hero-subtitle {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
  }
  
  .contact-mode-selector {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .mode-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .floating-elements {
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
  }
  
  .floating-element {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .floating-element:nth-child(1) {
    top: 5%;
    left: -3%;
  }
  
  .floating-element:nth-child(2) {
    top: 70%;
    right: -3%;
  }
  
  .floating-element:nth-child(3) {
    bottom: -5%;
    left: 15%;
  }
}

@media (max-width: 480px) {
  .hero-image {
    height: 280px;
  }
  
  .floating-element {
    display: none; /* On cache les bulles sur très petits écrans */
  }
  
  .contact-hero {
    padding: 80px 0 40px;
  }
}
/* ========== SIMPLE CONTACT SECTION ========== */
.contact-simple-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-box, .how-it-works-box, .contact-form-box {
  background: var(--light);
  border-radius: var(--border-radius);
  padding: 3rem;
  box-shadow: var(--box-shadow);
}

.contact-form-box {
  width: 100%;
}

.contact-page-form .submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.contact-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--border-radius);
  background: #25d366;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.contact-whatsapp-btn:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
}

.contact-whatsapp-btn i {
  font-size: 1.2rem;
}

.how-it-works-box {
  grid-column: 1 / -1;
}

.contact-method {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.method-icon {
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.method-details h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.contact-number, .contact-address {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.contact-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--accent-dark);
}

.work-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.work-step .step-number {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.work-step .step-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.work-step .step-content p {
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .contact-simple-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-info-box, .how-it-works-box, .contact-form-box {
    padding: 2rem;
  }
}

/* ========== AI ASSISTANT SECTION ========== */
.ai-assistant {
  padding: var(--section-spacing) 0;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: var(--light);
}

.ai-assistant .section-title {
  color: var(--light);
}

.ai-assistant .section-title span {
  color: var(--accent);
}

.ai-assistant .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.ai-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 3rem;
}

.ai-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.ai-info p {
  opacity: 0.9;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.ai-features {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.ai-feature {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.1rem;
}

.ai-feature i {
  color: var(--accent);
}

#start-chat-btn {
  margin-top: 1rem;
}

.ai-demo {
  background: var(--light);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-bubble {
  max-width: 80%;
  padding: 1rem 1.5rem;
  border-radius: 20px;
  position: relative;
  animation: fadeIn 0.5s ease-out;
}

/* Modifier la couleur des messages de l'assistant */
.chat-bubble.left {
  background: var(--primary) !important;
  color: var(--light) !important;
}

/* Animation pour les messages */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble {
  animation: fadeIn 0.3s ease-out;
}

.chat-bubble.right {
  background: var(--accent);
  color: var(--light);
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

/* AI Chat Widget */
.ai-chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.chat-toggle-btn {
  background: var(--accent);
  color: var(--light);
  border: none;
  border-radius: 50px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(255, 94, 91, 0.4);
  transition: var(--transition);
}

.chat-toggle-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
}

.chat-container {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 350px;
  background: var(--light);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.ai-chat-widget.active .chat-container {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.chat-header {
  background: var(--primary);
  color: var(--light);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h4 {
  font-size: 1.1rem;
  margin: 0;
}

.close-chat {
  background: none;
  border: none;
  color: var(--light);
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-messages {
  height: 300px;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 80%;
  padding: 0.8rem 1.2rem;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
  animation: fadeIn 0.3s ease-out;
}

.ai-message {
  background: rgba(15, 26, 61, 0.05);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}

.user-message {
  background: var(--accent);
  color: var(--light);
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

.chat-input {
  display: flex;
  padding: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-input input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.9rem;
}

.chat-input button {
  background: var(--accent);
  color: var(--light);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.chat-input button:hover {
  background: var(--accent-dark);
}

/* Responsive */
@media (max-width: 1200px) {
  .smart-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .ai-container {
    grid-template-columns: 1fr;
  }
  
  .ai-demo {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .contact-hero .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .contact-mode-selector {
    flex-direction: column;
  }
  
  .hero-image {
    height: 400px;
    order: -1;
  }
  
  .smart-options {
    grid-template-columns: 1fr;
  }
  
  .contact-methods {
    grid-template-columns: 1fr;
  }
  
  .ai-chat-widget {
    bottom: 20px;
    right: 20px;
  }
  
  .chat-container {
    width: 300px;
  }
}

@media (max-width: 480px) {
  .contact-hero {
    min-height: auto;
    padding: 100px 0 60px;
  }
  
  .hero-image {
    height: 300px;
  }
  
  .floating-element {
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
  }
}


/* AI Chat Widget Styles */
.ai-chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  transition: var(--transition);
}

.chat-toggle-btn {
  background: var(--accent);
  color: var(--light);
  border: none;
  border-radius: 30px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  font-weight: 600;
}

.chat-toggle-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
}

.chat-container {
  width: 350px;
  max-width: 90vw;
  background: var(--light);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  position: absolute;
  bottom: 70px;
  right: 0;
}

.ai-chat-widget.active .chat-container {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.chat-header {
  background: var(--primary);
  color: var(--light);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

.close-chat {
  background: none;
  border: none;
  color: var(--light);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.8;
  transition: var(--transition);
}

.close-chat:hover {
  opacity: 1;
  transform: rotate(90deg);
}

.chat-messages {
  height: 300px;
  overflow-y: auto;
  padding: 1rem;
  background: #f9f9f9;
}

.message {
  margin-bottom: 1rem;
  display: flex;
}

.message-content {
  max-width: 80%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  position: relative;
  line-height: 1.4;
}

.user-message {
  justify-content: flex-end;
}

.user-message .message-content {
  background: var(--accent);
  color: var(--light);
  border-bottom-right-radius: 0;
}

.ai-message {
  justify-content: flex-start;
}

.ai-message .message-content {
  background: var(--light);
  border: 1px solid rgba(0,0,0,0.1);
  border-bottom-left-radius: 0;
}

.chat-input {
  display: flex;
  padding: 1rem;
  background: var(--light);
  border-top: 1px solid rgba(0,0,0,0.1);
}

.chat-input input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.chat-input input:focus {
  border-color: var(--accent);
}

#send-message {
  background: var(--accent);
  color: var(--light);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

#send-message:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.chat-status {
  display: none;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  background: rgba(0,0,0,0.03);
}

/* Responsive */
@media (max-width: 768px) {
  .ai-chat-widget {
    bottom: 20px;
    right: 20px;
  }
  
  .chat-toggle-btn {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .chat-container {
    width: 280px;
  }
}

.message-error .message-content {
  background: #ffebee;
  border: 1px solid #f44336;
  color: #d32f2f;
}

.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.8);
  margin-left: 2px;
  animation: blink 0.7s infinite;
  vertical-align: bottom;
  border-radius: 2px;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

.thinking {
  font-style: italic;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}


/***** MESSAGE BUBBLES DESIGN *****/
.message {
  width: 100% !important;
  max-width: 100% !important;
}

.message-content {
  width: 100% !important;
  max-width: 100% !important; 
  box-sizing: border-box;
  padding: 1rem 1.4rem;
  border-radius: 18px;
  background: #f2f2f5;
  color: #1f1f1f;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
  text-align: left;
  font-family: 'Archivo', sans-serif;
}

/***** IA message alignment *****/
.ai-message {
  justify-content: flex-start;
}

.ai-message .message-content {
  background: #f0f2f8;
  color: #1a1a1a;
  border: 1px solid #d8dbe5;
  border-radius: 16px 16px 16px 6px;
}

/***** User message alignment *****/
.user-message {
  justify-content: flex-end;
}

.user-message .message-content {
  background: #ff6a5e;
  color: #fff;
  border-radius: 16px 16px 6px 16px;
  box-shadow: 0 5px 10px rgba(255, 106, 94, 0.2);
}

/***** Chat input enhancements *****/
.chat-input input {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 25px;
  padding: 0.8rem 1.2rem;
  font-size: 0.95rem;
  font-family: 'Archivo', sans-serif;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

/***** Send button rounded and modern *****/
.chat-input button {
  background: #ff6a5e;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  box-shadow: 0 3px 10px rgba(255, 106, 94, 0.3);
  transition: all 0.2s ease;
}

.chat-input button:hover {
  background: #e95a4c;
  transform: translateY(-1px);
}

.message-content {
  animation: fadeSlideIn 0.4s ease-out;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* === Responsive Enhancements for Small Screens === */
@media (max-width: 480px) {
  .hero-content, .form-container, .contact-form, .demande-form, .section {
    padding: 20px !important;
    font-size: 15px !important;
  }
  h1, h2, h3 {
    font-size: 1.4rem !important;
    text-align: center;
  }
  .btn, .button, input[type="submit"] {
    width: 100% !important;
    font-size: 16px !important;
  }
  .language-switcher {
    position: static !important;
    text-align: center;
    margin: 10px 0;
  }
}

.contact-mode-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.contact-mode-link:hover {
  color: var(--primary);
}

@media (max-width: 640px) {
  .contact-mode-link {
    width: 100%;
    border: 1px solid rgba(255, 94, 91, 0.22);
    border-radius: 999px;
    padding: 0.75rem;
    background: rgba(255, 94, 91, 0.08);
  }
}
