/* ========== CHATBOT DEVIS — MODAL & WIZARD ========== */

/* Bouton inline dans le formulaire (à côté du label "Décrivez votre projet") */
.form-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.form-field-head label { margin-bottom: 0 !important; }

.chatbot-inline-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #3F020A;
  color: #3F020A;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, gap 0.25s ease;
}
.chatbot-inline-cta:hover {
  background: #3F020A;
  color: #FFFFFF;
  gap: 8px;
}
.chatbot-inline-icon {
  display: inline-flex;
  font-size: 0.9rem;
  line-height: 1;
}
.chatbot-inline-help {
  font-size: 0.76rem;
  color: #1D1D1D;
  opacity: 0.6;
  margin: 6px 0 0;
  font-style: italic;
}

.chatbot-cta-wrap {
  background: #F4F4F4;
  border: 1px solid #D4D4D4;
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.chatbot-cta-text { font-family: 'Montserrat', sans-serif; }
.chatbot-cta-title { font-weight: 600; font-size: 0.98rem; color: #1D1D1D; margin: 0 0 4px; }
.chatbot-cta-sub { font-size: 0.85rem; color: #1D1D1D; opacity: 0.72; margin: 0; }
.chatbot-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: #3F020A; color: #FFFFFF;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 14px 22px;
  border: none; border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, gap 0.3s ease;
}
.chatbot-cta:hover { background: #1D1D1D; gap: 14px; }

.chatbot-modal {
  position: fixed; inset: 0;
  background: rgba(29, 29, 29, 0.7);
  display: none; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.chatbot-modal.is-open { display: flex; }
.chatbot-panel {
  background: #FFFFFF;
  width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
  border-radius: 12px;
  padding: 32px;
  font-family: 'Montserrat', sans-serif;
  position: relative;
}
.chatbot-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  font-size: 1.6rem; line-height: 1;
  cursor: pointer; color: #1D1D1D; opacity: 0.6;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.chatbot-close:hover { opacity: 1; }

.chatbot-progress {
  display: flex; gap: 6px; margin-bottom: 24px;
}
.chatbot-progress span {
  flex: 1; height: 3px; background: #E0E0E0; border-radius: 2px;
  transition: background 0.3s ease;
}
.chatbot-progress span.is-active { background: #3F020A; }
.chatbot-progress span.is-done { background: #1D1D1D; }

.chatbot-step { display: none; }
.chatbot-step.is-active { display: block; }
.chatbot-step h3 {
  font-size: 1.4rem; font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px; color: #1D1D1D;
}
.chatbot-step p.chatbot-help {
  font-size: 0.86rem; color: #1D1D1D; opacity: 0.72;
  margin: 0 0 22px;
}

.chatbot-types {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 20px;
}
.chatbot-type-card {
  border: 1px solid #D4D4D4;
  background: #FFFFFF;
  padding: 14px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  text-align: left;
  color: #1D1D1D;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.chatbot-type-card:hover { border-color: #3F020A; }
.chatbot-type-card.is-selected {
  border-color: #3F020A;
  background: #FAF4F5;
  font-weight: 600;
}

.chatbot-field { margin-bottom: 16px; }
.chatbot-field label {
  display: block; font-size: 0.82rem; font-weight: 500;
  margin-bottom: 6px; color: #1D1D1D;
}
.chatbot-field input,
.chatbot-field textarea,
.chatbot-field select {
  width: 100%; padding: 11px 13px;
  border: 1px solid #D4D4D4; border-radius: 6px;
  font-family: inherit; font-size: 0.92rem;
  background: #FFFFFF; color: #1D1D1D;
  transition: border-color 0.2s ease;
}
.chatbot-field input:focus,
.chatbot-field textarea:focus,
.chatbot-field select:focus {
  outline: none; border-color: #3F020A;
}
.chatbot-field textarea { resize: vertical; min-height: 90px; }
.chatbot-field.is-error input,
.chatbot-field.is-error textarea { border-color: #C42E2E; }
.chatbot-error {
  display: block;
  font-size: 0.78rem; color: #C42E2E;
  margin-top: 4px;
}

.chatbot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chatbot-honey {
  position: absolute !important; left: -9999px !important;
  opacity: 0; pointer-events: none;
}

.chatbot-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chatbot-pill {
  border: 1px solid #D4D4D4; background: #FFFFFF;
  padding: 10px 16px; border-radius: 999px;
  cursor: pointer; font-family: inherit; font-size: 0.85rem;
  color: #1D1D1D;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.chatbot-pill:hover { border-color: #3F020A; }
.chatbot-pill.is-selected { border-color: #3F020A; background: #FAF4F5; font-weight: 600; }

.chatbot-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.82rem; line-height: 1.5;
  margin-bottom: 18px;
  color: #1D1D1D;
}
.chatbot-check input { margin-top: 3px; }
.chatbot-check a { color: #3F020A; text-decoration: underline; }

.chatbot-actions {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 20px;
}
.chatbot-btn {
  font-family: inherit; font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 6px; cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}
.chatbot-btn-primary {
  background: #3F020A; color: #FFFFFF; border: none;
}
.chatbot-btn-primary:hover { background: #1D1D1D; }
.chatbot-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.chatbot-btn-ghost {
  background: transparent; color: #1D1D1D;
  border: 1px solid #D4D4D4;
}
.chatbot-btn-ghost:hover { border-color: #1D1D1D; }

.chatbot-recap-card {
  background: #FAF4F5; border-left: 3px solid #3F020A;
  padding: 18px 20px; border-radius: 0 6px 6px 0;
  margin-bottom: 20px;
}
.chatbot-recap-card p { margin: 0 0 12px; font-size: 0.92rem; line-height: 1.55; color: #1D1D1D; }
.chatbot-recap-card ul { margin: 0; padding-left: 18px; font-size: 0.86rem; color: #1D1D1D; }
.chatbot-recap-card li { padding: 3px 0; }

.chatbot-loader {
  display: flex; align-items: center; gap: 12px;
  padding: 24px; font-size: 0.92rem; color: #1D1D1D;
}
.chatbot-spinner {
  width: 22px; height: 22px;
  border: 2px solid #E0E0E0; border-top-color: #3F020A;
  border-radius: 50%; animation: chatbot-spin 0.8s linear infinite;
}
@keyframes chatbot-spin { to { transform: rotate(360deg); } }

.chatbot-thanks {
  text-align: center; padding: 16px 0 8px;
}
.chatbot-thanks-icon {
  width: 60px; height: 60px; margin: 0 auto 18px;
  border-radius: 50%; background: #3F020A;
  display: flex; align-items: center; justify-content: center;
  color: #FFFFFF; font-size: 1.8rem;
}
.chatbot-thanks p { font-size: 1rem; line-height: 1.6; margin: 0 0 22px; color: #1D1D1D; }

.chatbot-toast {
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  background: #1D1D1D; color: #FFFFFF;
  padding: 12px 20px; border-radius: 6px;
  font-family: 'Montserrat', sans-serif; font-size: 0.88rem;
  z-index: 10000; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.chatbot-toast.is-shown { opacity: 1; }

@media (max-width: 640px) {
  .chatbot-panel { padding: 24px 20px; }
  .chatbot-types { grid-template-columns: 1fr; }
  .chatbot-row { grid-template-columns: 1fr; }
  .chatbot-cta-wrap { flex-direction: column; align-items: stretch; }
}
