/* Public AI advisor — Monsieur Bécane */
.mb-ai-widget {
  position: fixed;
  z-index: 55;
  right: 22px;
  bottom: 154px;
  font-family: inherit;
}
.mb-ai-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 19px;
  border: 1px solid #c98a35;
  border-radius: 999px;
  background: #17392f;
  color: #fffaf0;
  box-shadow: 0 8px 24px rgba(28, 28, 26, .24);
  font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.mb-ai-trigger span:first-child { color: #efb84f; font-size: 19px; }
.mb-ai-trigger:hover { background: #102d25; box-shadow: 0 12px 28px rgba(28, 28, 26, .3); transform: translateY(-2px); }
.mb-ai-trigger:focus-visible,
.mb-ai-close:focus-visible,
.mb-ai-send:focus-visible,
.mb-ai-whatsapp:focus-visible { outline: 3px solid #e6ae45; outline-offset: 3px; }
.mb-ai-panel {
  position: fixed;
  right: 22px;
  bottom: 88px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(520px, calc(100dvh - 112px));
  overflow: hidden;
  border: 1px solid #e5d7c2;
  border-radius: 20px;
  background: #fffdf9;
  box-shadow: 0 18px 60px rgba(22, 36, 30, .24);
  color: #24231f;
}
.mb-ai-panel[hidden] { display: none; }
.mb-ai-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 19px 16px;
  background: linear-gradient(135deg, #17392f, #102b24);
  color: #fffaf0;
}
.mb-ai-kicker { color: #edb84d; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.mb-ai-head h2 { margin: 5px 0 2px; color: inherit; font-size: 20px; }
.mb-ai-head p { margin: 0; color: rgba(255,250,240,.78); font-size: 12px; }
.mb-ai-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: transparent;
  color: white;
  font-family: inherit; font-size: 24px; font-weight: 400; line-height: 1;
  cursor: pointer;
}
.mb-ai-messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 15px;
  overscroll-behavior: contain;
}
.mb-ai-message {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mb-ai-assistant { align-self: flex-start; border: 1px solid #eee6da; background: #f7f2e9; color: #302e28; border-bottom-left-radius: 5px; }
.mb-ai-user { align-self: flex-end; background: #17392f; color: white; border-bottom-right-radius: 5px; }
.mb-ai-typing { color: #766c5e; font-style: italic; }
.mb-ai-error { border-color: #e7c8ba; color: #8f391f; }
.mb-ai-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px 8px;
  border-top: 1px solid #eee6da;
}
.mb-ai-form textarea {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 105px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid #ded5c7;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font-family: inherit; font-size: 14px; line-height: 1.4;
}
.mb-ai-form textarea:focus { border-color: #b77a2c; outline: 2px solid rgba(183,122,44,.18); }
.mb-ai-send {
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  background: #c6502c;
  color: white;
  font-family: inherit; font-size: 12px; font-weight: 700; line-height: 1;
  cursor: pointer;
}
.mb-ai-send:disabled { cursor: wait; opacity: .65; }
.mb-ai-note { margin: 0; padding: 1px 15px 7px; color: #746f66; font-size: 10px; line-height: 1.4; }
.mb-ai-whatsapp {
  align-self: flex-start;
  margin: 0 15px 14px;
  color: #17634b;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.mb-ai-whatsapp:hover { text-decoration: underline; }
.mb-ai-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
@media (max-width: 840px) {
  .mb-ai-widget { right: 13px; bottom: calc(210px + env(safe-area-inset-bottom, 0px)); }
  .mb-ai-trigger { min-height: 50px; padding: 0 16px; }
  .mb-ai-panel {
    right: 12px;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    width: min(390px, calc(100vw - 24px));
    height: min(520px, calc(100dvh - 112px - env(safe-area-inset-bottom, 0px)));
    border-radius: 18px;
  }
}
@media (prefers-reduced-motion: reduce) { .mb-ai-trigger { transition: none; } }

.mb-ai-form[hidden] { display: none; }
