/* Midi Froid AI widget - entirely scoped to #mf-chat-root */
#mf-chat-root { --mf-navy:#10243b; --mf-navy2:#193856; --mf-gold:#c29b61; --mf-ink:#183047; --mf-muted:#668093; --mf-bg:#f5f7fa; --mf-line:#dde6ed; font-family:Inter,Arial,Helvetica,sans-serif; color:var(--mf-ink); position:fixed; bottom:22px; right:22px; z-index:2147483000; font-size:14px; line-height:1.45; }
#mf-chat-root *, #mf-chat-root *::before, #mf-chat-root *::after {box-sizing:border-box}
#mf-chat-root button, #mf-chat-root input, #mf-chat-root select, #mf-chat-root textarea {font:inherit}
#mf-chat-root button {cursor:pointer}
#mf-chat-root button:focus-visible, #mf-chat-root input:focus-visible, #mf-chat-root textarea:focus-visible, #mf-chat-root select:focus-visible, #mf-chat-root a:focus-visible {outline:3px solid #66aeef;outline-offset:2px}
#mf-chat-root .mf-toggle {width:66px;height:66px;border-radius:50%;background:var(--mf-navy);color:white;border:1px solid rgba(255,255,255,.2);box-shadow:0 12px 38px #0d243b50;display:flex;align-items:center;justify-content:center;margin-left:auto;position:relative;transition:transform .2s}
#mf-chat-root .mf-toggle:hover {transform:translateY(-2px)}
#mf-chat-root .mf-toggle::after {content:"";width:10px;height:10px;border-radius:50%;background:#5cce99;border:2px solid var(--mf-navy);position:absolute;right:8px;top:7px}
#mf-chat-root .mf-toggle svg {width:29px;height:29px}
#mf-chat-root .mf-panel[hidden], #mf-chat-root [hidden] {display:none!important}
#mf-chat-root .mf-panel {width:min(400px,calc(100vw - 24px));height:min(650px,calc(100dvh - 110px));min-height:390px;display:flex;flex-direction:column;border:1px solid var(--mf-line);border-radius:18px;overflow:hidden;background:white;box-shadow:0 18px 70px #142a4752;margin-bottom:13px}
#mf-chat-root .mf-header {background:linear-gradient(115deg,var(--mf-navy),var(--mf-navy2));color:#fff;padding:17px 18px;display:flex;gap:11px;align-items:center;flex:0 0 auto}
#mf-chat-root .mf-emblem {width:38px;height:38px;border:1px solid #c29b6180;color:var(--mf-gold);border-radius:10px;font-size:13px;font-weight:800;display:flex;align-items:center;justify-content:center;letter-spacing:1px}
#mf-chat-root .mf-header-name {font-size:13px;font-weight:800;letter-spacing:.09em}
#mf-chat-root .mf-header-sub {font-size:11px;color:#d4e2ec;margin-top:2px}
#mf-chat-root .mf-header-spacer {flex:1}
#mf-chat-root .mf-icon-btn {border:0;background:transparent;color:inherit;border-radius:8px;padding:5px;font-size:20px;line-height:1}
#mf-chat-root .mf-language {background:#ffffff18;color:#fff;border:1px solid #ffffff60;border-radius:7px;font-size:12px;padding:4px 2px}
#mf-chat-root .mf-language option {color:#142b42}
#mf-chat-root .mf-main {min-height:0;flex:1;display:flex;flex-direction:column;background:var(--mf-bg)}
#mf-chat-root .mf-chatview {min-height:0;flex:1;display:flex;flex-direction:column}
#mf-chat-root .mf-stream {flex:1;min-height:0;overflow-y:auto;padding:20px 15px;display:flex;flex-direction:column;gap:12px;overscroll-behavior:contain}
#mf-chat-root .mf-bubble {font-size:13px;padding:11px 13px;line-height:1.5;max-width:91%;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:13px;box-shadow:0 2px 9px #112c3b0b}
#mf-chat-root .mf-bubble.bot {background:white;align-self:flex-start;border:1px solid var(--mf-line);border-top-left-radius:3px}
#mf-chat-root .mf-bubble.visitor {background:var(--mf-navy2);color:#fff;align-self:flex-end;border-top-right-radius:3px}
#mf-chat-root .mf-quick {padding:0 12px 9px;display:flex;gap:7px;flex-wrap:wrap}
#mf-chat-root .mf-chip {color:#254865;background:#fff;border:1px solid #bdcedb;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:600}
#mf-chat-root .mf-chip:hover {background:#eaf2f9}
#mf-chat-root .mf-lead-link {margin:0 13px 10px;border:1px solid #c9b083;background:#fffaf3;color:#6f522e;border-radius:9px;padding:10px;font-weight:700;text-align:center}
#mf-chat-root .mf-compose {display:flex;gap:8px;padding:11px 13px;background:#fff;border-top:1px solid var(--mf-line);align-items:flex-end}
#mf-chat-root .mf-compose textarea {resize:none;min-height:41px;max-height:100px;flex:1;outline:none;padding:10px 11px;border:1px solid #cfdae3;border-radius:10px;background:#fff;color:var(--mf-ink);font-size:13px}
#mf-chat-root .mf-send {background:var(--mf-navy);border:0;border-radius:9px;color:#fff;height:40px;min-width:42px;font-size:19px}
#mf-chat-root .mf-send:disabled {opacity:.5;cursor:not-allowed}
#mf-chat-root .mf-privacy {margin:0;padding:7px 12px 11px;color:#6c8291;background:#fff;text-align:center;font-size:10px;line-height:1.35}
#mf-chat-root a {color:#2b658e;text-decoration:underline}
#mf-chat-root .mf-leadview {flex:1;overflow-y:auto;padding:15px;background:var(--mf-bg)}
#mf-chat-root .mf-lead-title {font-size:17px;font-weight:800;margin:0 0 6px}
#mf-chat-root .mf-lead-intro {font-size:12px;color:var(--mf-muted);margin:0 0 15px}
#mf-chat-root .mf-lead-form {display:grid;grid-template-columns:1fr 1fr;gap:10px}
#mf-chat-root .mf-field {display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:700;color:#314b5d}
#mf-chat-root .mf-field.wide {grid-column:1/-1}
#mf-chat-root .mf-field input, #mf-chat-root .mf-field select, #mf-chat-root .mf-field textarea {width:100%;background:#fff;border:1px solid #cbd9e3;border-radius:8px;padding:9px;color:var(--mf-ink);font-size:13px;font-weight:400;min-width:0}
#mf-chat-root .mf-field textarea {min-height:90px;resize:vertical}
#mf-chat-root .mf-consent {grid-column:1/-1;display:flex;gap:8px;align-items:flex-start;font-size:11px;color:#476070;line-height:1.45;margin-top:2px}
#mf-chat-root .mf-consent input {margin:2px 0 0;accent-color:var(--mf-navy);flex:0 0 auto}
#mf-chat-root .mf-submit {grid-column:1/-1;padding:12px;border:0;border-radius:9px;background:var(--mf-navy);color:#fff;font-size:13px;font-weight:750}
#mf-chat-root .mf-submit:disabled {opacity:.5;cursor:wait}
#mf-chat-root .mf-status {grid-column:1/-1;font-size:12px;min-height:17px;color:#a73d32}
#mf-chat-root .mf-form-success {font-size:14px;line-height:1.6;background:#fff;border:1px solid #bfd7c3;border-radius:10px;padding:15px}
#mf-chat-root .mf-back {color:#fff;border:1px solid #ffffff54;background:transparent;padding:3px 8px;border-radius:8px}
#mf-chat-root .mf-hidden-trap {position:absolute;left:-10000px;opacity:0;pointer-events:none}
@media (max-width:530px) {
 #mf-chat-root {bottom:12px;right:12px}
 #mf-chat-root .mf-panel {width:calc(100vw - 24px);height:min(690px,calc(100dvh - 92px))}
 #mf-chat-root .mf-toggle {width:58px;height:58px}
}
@media (prefers-reduced-motion:reduce) {#mf-chat-root .mf-toggle {transition:none}}

#mf-chat-root .mf-demo-banner {background:#fff3d7;color:#61440f;padding:7px 12px;font-size:11px;font-weight:700;text-align:center;border-bottom:1px solid #efcf91}

#mf-chat-root .mf-field.mf-required input,#mf-chat-root .mf-field.mf-required textarea {border-color:#9bb7ca}
#mf-chat-root .mf-field.mf-required span {color:#17364d} 
/
/* MIDI FROID - Bulle style WhatsApp */

/* Positionnement à droite */
#mf-chat-root {
  width: min(400px, calc(100vw - 24px));
  pointer-events: none;
}

#mf-chat-root .mf-panel,
#mf-chat-root .mf-toggle {
  pointer-events: auto;
}

/* Grande bulle verte */
#mf-chat-root .mf-toggle {
  position: relative !important;
  width: 310px !important;
  height: 84px !important;
  max-width: 100% !important;
  border-radius: 36px 36px 10px 36px !important;
  background: #087C54 !important;
  color: white !important;
  border: none !important;
  margin-left: auto !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  overflow: visible !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.24) !important;
}

/* Texte blanc */
#mf-chat-root .mf-toggle::before {
  content: "AI TECHNICAL SUPPORT";
  color: white !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  order: 2;
  position: relative;
  z-index: 2;
}

/* Icône de discussion */
#mf-chat-root .mf-toggle svg {
  width: 29px !important;
  height: 29px !important;
  flex-shrink: 0;
  order: 1;
  position: relative;
  z-index: 2;
}

/* Pointe de la bulle WhatsApp */
#mf-chat-root .mf-toggle::after {
  content: "" !important;
  position: absolute !important;
  top: auto !important;
  right: 0 !important;
  bottom: -14px !important;
  width: 27px !important;
  height: 22px !important;
  background: #087C54 !important;
  border: none !important;
  border-radius: 0 !important;
  transform: none !important;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  box-shadow: none !important;
}

/* Survol */
#mf-chat-root .mf-toggle:hover {
  background: #056342 !important;
}

#mf-chat-root .mf-toggle:hover::after {
  background: #056342 !important;
}

/* Adaptation mobile */
@media (max-width: 480px) {
  #mf-chat-root .mf-toggle {
    width: 270px !important;
    height: 74px !important;
  }

  #mf-chat-root .mf-toggle::before {
    font-size: 13px !important;
  }
}
