/* ========================================
   VITALYS — Main Stylesheet
   ========================================

   TABLE OF CONTENTS
   -----------------
   1. Base & Typography
   2. Service Cards
   3. Sparkles (hero form)
   4. FAQ Accordion
   5. Stepper
   6. Progressive Form
   7. Service Tabs
   8. Chat Widget
   9. Conversation Phone (comment ça marche)
   10. Marquee Réassurance
   11. Responsive

   ======================================== */


/* -----------------------------------------
   1. BASE & TYPOGRAPHY
   ----------------------------------------- */
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: 'Satoshi', sans-serif; color: #0F172A; background: #FFFFFF; }
h1, h2, h3, h4, h5, h6 { font-family: 'General Sans', sans-serif; }

/* -----------------------------------------
   2. SERVICE CARDS
   ----------------------------------------- */
.service-card {
  transition: all 0.2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.1);
}

/* -----------------------------------------
   3. SPARKLES (hero form decorations)
   ----------------------------------------- */
.sparkle {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  animation: sparkle-pulse 2.5s ease-in-out infinite;
}
.sparkle-1 { width: 48px; height: 48px; top: -22px; right: 50px; animation-delay: 0s; }
.sparkle-3 { width: 52px; height: 52px; bottom: -28px; left: 35px; animation-delay: 1s; }
.sparkle-5 { width: 44px; height: 44px; top: 40%; right: -16px; animation-delay: 2s; }

@keyframes sparkle-pulse {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  20% { opacity: 1; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
  80% { opacity: 0.6; transform: scale(0.8); }
}

/* -----------------------------------------
   4. FAQ ACCORDION
   ----------------------------------------- */
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-answer.open { max-height: 300px; }
.faq-item.active { border-color: rgba(67,56,202,0.25); }
.faq-item.active .faq-icon { background: #4338CA; color: white; }

/* -----------------------------------------
   5. STEPPER
   ----------------------------------------- */
.stepper-line { position: absolute; top: 24px; left: 50%; right: -50%; height: 2px; background: #E2E8F0; z-index: 0; }

/* -----------------------------------------
   6. PROGRESSIVE FORM
   ----------------------------------------- */
.pf-sec { border-bottom: 1px solid #F1F5F9; overflow: hidden; transition: all 0.4s cubic-bezier(.16,1,.3,1); }
.pf-sec:last-of-type { border-bottom: none; }
.pf-sec-head { padding: 14px 20px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: background 0.2s; }
.pf-sec-head:hover { background: #FAFBFC; }
.pf-sec.locked .pf-sec-head { cursor: default; }
.pf-sec.locked .pf-sec-head:hover { background: transparent; }
.pf-sec-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; transition: all 0.3s; }
.pf-sec.locked .pf-sec-num { background: #F1F5F9; color: #CBD5E1; }
.pf-sec.current .pf-sec-num { background: #4338CA; color: white; box-shadow: 0 0 0 4px rgba(67,56,202,0.1); animation: pfPulse 2s ease-in-out infinite; }
.pf-sec.done .pf-sec-num { background: #10B981; color: white; }
@keyframes pfPulse { 0%,100% { box-shadow: 0 0 0 4px rgba(67,56,202,0.1); } 50% { box-shadow: 0 0 0 8px rgba(67,56,202,0.05); } }
.pf-sec-title { font-size: 14px; font-weight: 600; }
.pf-sec.locked .pf-sec-title { color: #CBD5E1; }
.pf-sec.done .pf-sec-title { color: #64748B; }
.pf-sec-summary { font-size: 12px; color: #4338CA; font-weight: 500; margin-top: 1px; display: none; }
.pf-sec.done .pf-sec-summary { display: block; }
.pf-sec-edit { font-size: 12px; color: #94A3B8; font-weight: 500; display: none; }
.pf-sec.done .pf-sec-edit { display: block; }
.pf-sec-edit:hover { color: #4338CA; }
.pf-sec-body { max-height: 0; overflow: hidden; transition: max-height 0.45s cubic-bezier(.16,1,.3,1), padding 0.35s ease; padding: 0 20px; }
.pf-sec.current .pf-sec-body { max-height: 600px; padding: 0 20px 18px; }

/* Service options */
.pf-svc { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid #F1F5F9; border-radius: 14px; cursor: pointer; transition: all 0.2s; }
.pf-svc:hover { border-color: #E0E7FF; background: #FAFAFF; }
.pf-svc.selected { border-color: #4338CA; background: #EEF2FF; }
.pf-svc-ico { width: 44px; height: 44px; border-radius: 12px; background: #F8FAFC; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s; }
.pf-svc.selected .pf-svc-ico { background: #4338CA; }
.pf-svc.selected .pf-svc-ico svg { color: white !important; }
.pf-svc-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #D1D5DB; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.pf-svc.selected .pf-svc-check { border-color: #4338CA; background: #4338CA; }

/* Créneau */
.pf-cren { flex: 1; padding: 12px 8px; border: 2px solid #F1F5F9; border-radius: 12px; text-align: center; cursor: pointer; transition: all 0.2s; }
.pf-cren:hover { border-color: #E0E7FF; }
.pf-cren.selected { border-color: #4338CA; background: #EEF2FF; }

/* Form inputs */
.pf-input { width: 100%; border: 2px solid #E2E8F0; border-radius: 12px; padding: 11px 14px; font-size: 14px; color: #1E293B; outline: none; transition: all 0.2s; font-family: 'Satoshi', sans-serif; background: #F8FAFC; }
.pf-input:focus { border-color: #4338CA; box-shadow: 0 0 0 4px rgba(67,56,202,0.06); }
.pf-input:focus { background: #fff; }
.pf-input::placeholder { color: #94A3B8; }

/* CTA buttons */
.pf-cta { width: 100%; padding: 14px; border-radius: 14px; font-size: 15px; font-weight: 600; color: white; border: none; cursor: pointer; font-family: 'Satoshi', sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.25s; margin-top: 16px; }
.pf-cta-primary { background: #4338CA; }
.pf-cta-primary:hover { background: #6366F1; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(67,56,202,0.2); }
.pf-cta-success { background: #10B981; }
.pf-cta-success:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(16,185,129,0.2); }

/* -----------------------------------------
   7. SERVICE TABS
   ----------------------------------------- */
.svc-tab { background: #F1F5F9; color: #64748B; }
.svc-tab:hover { background: #E2E8F0; color: #334155; }
.svc-tab.active { background: #4338CA; color: white; }

/* -----------------------------------------
   8. CHAT WIDGET
   ----------------------------------------- */
.chat-popup { transform: scale(0.8); opacity: 0; pointer-events: none; transition: transform 0.2s ease, opacity 0.2s ease; }
.chat-popup.open { transform: scale(1); opacity: 1; pointer-events: auto; }
.chat-bubble-bot { background: #F1F5F9; border-radius: 16px 16px 16px 4px; }
.chat-bubble-user { background: #4338CA; color: white; border-radius: 16px 16px 4px 16px; }

/* -----------------------------------------
   8b. CHAT TYPING DOTS
   ----------------------------------------- */
.chat-dot {
  width: 6px; height: 6px; background: #94A3B8; border-radius: 50%;
  display: inline-block;
  animation: chatDotBounce 1.4s ease-in-out infinite;
}
.chat-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatDotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* -----------------------------------------
   9. CONVERSATION PHONE (comment ça marche)
   ----------------------------------------- */
.conv-phone {
  width: 100%; max-width: 420px; margin: 0 auto;
  background: white; border-radius: 32px;
  box-shadow: 0 25px 80px -12px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden; position: relative;
}
.conv-phone::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 28px; background: white; border-radius: 0 0 16px 16px; z-index: 10;
}
.conv-phone::after {
  content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 4px; background: #E5E7EB; border-radius: 4px; z-index: 11;
}
.conv-header {
  background: linear-gradient(135deg, #4338CA 0%, #6366F1 100%);
  padding: 40px 24px 16px; text-align: center; position: relative;
}
.conv-messages { padding: 20px 16px 24px; height: 370px; overflow-y: auto; background: #F8FAFC; scroll-behavior: smooth; }
.conv-messages::-webkit-scrollbar { width: 0; }
.conv-bubble {
  max-width: 82%; padding: 10px 14px; font-size: 14px; line-height: 1.5;
  margin-bottom: 8px; opacity: 0; transform: translateY(12px) scale(0.95);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.conv-bubble.show { opacity: 1; transform: translateY(0) scale(1); }
.conv-bubble-user {
  background: #4338CA; color: white; border-radius: 18px 18px 4px 18px;
  margin-left: auto; position: relative;
}
.conv-checks {
  display: flex; justify-content: flex-end; align-items: center; gap: 2px;
  margin-top: 3px; margin-bottom: 4px;
}
.conv-checks svg { width: 14px; height: 14px; color: #94A3B8; transition: color 0.4s ease; }
.conv-checks.read svg { color: #4338CA; }
.conv-timestamp {
  text-align: center; font-size: 11px; color: #94A3B8;
  margin: 8px 0 12px; opacity: 0; transition: opacity 0.3s ease;
}
.conv-timestamp.show { opacity: 1; }
.conv-inputbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: white; border-top: 1px solid #F1F5F9;
}
.conv-inputbar-field {
  flex: 1; background: #F1F5F9; border-radius: 20px; padding: 8px 14px;
  font-size: 13px; color: #1E293B; min-height: 36px; font-family: 'Satoshi', sans-serif;
  overflow: hidden; white-space: nowrap;
}
.conv-inputbar-send {
  width: 32px; height: 32px; border-radius: 50%; background: #4338CA;
  display: flex; align-items: center; justify-content: center; shrink: 0;
  opacity: 0.3; transition: opacity 0.3s, transform 0.2s;
}
.conv-inputbar-send.active { opacity: 1; }
.conv-inputbar-send.sent { transform: scale(0.8); opacity: 0.3; }
.conv-notif {
  position: absolute; top: 8px; left: 12px; right: 12px; z-index: 20;
  background: white; border-radius: 14px; padding: 10px 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  display: flex; align-items: center; gap: 10px;
  transform: translateY(-120%); opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
}
.conv-notif.show { transform: translateY(0); opacity: 1; }
.conv-notif-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #4338CA, #6366F1);
  display: flex; align-items: center; justify-content: center; shrink: 0;
}
.conv-bubble-bot {
  background: white; color: #1E293B; border-radius: 18px 18px 18px 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.conv-bubble-system {
  background: none; text-align: center; max-width: 100%;
  font-size: 12px; color: #94A3B8; margin: 12px 0;
}
.conv-typing { display: flex; gap: 4px; padding: 12px 16px; align-items: center; }
.conv-typing span {
  width: 7px; height: 7px; background: #94A3B8; border-radius: 50%;
  animation: convTyping 1.4s ease-in-out infinite;
}
.conv-typing span:nth-child(2) { animation-delay: 0.2s; }
.conv-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes convTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.conv-profile-card {
  background: white; border-radius: 14px; padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #E5E7EB;
  margin-top: 6px;
}
.conv-replay {
  background: none; border: 1px solid #E2E8F0; color: #64748B;
  font-size: 13px; padding: 8px 20px; border-radius: 10px;
  cursor: pointer; transition: all 0.2s;
  font-family: 'Satoshi', sans-serif; font-weight: 500;
}
.conv-replay:hover { border-color: #4338CA; color: #4338CA; }

/* -----------------------------------------
   10. MARQUEE REASSURANCE
   ----------------------------------------- */
.marquee-reassurance { overflow: hidden; }
.marquee-track-reassurance {
  display: flex;
  gap: 2.5rem;
  animation: marquee-scroll 25s linear infinite;
  width: max-content;
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* -----------------------------------------
   11. RESPONSIVE
   ----------------------------------------- */
@media(max-width:768px){
  #chat-widget{bottom:5rem!important;}
  #chat-popup{width:calc(100vw - 2rem);right:-0.5rem;}
}
