/* Assistant — bulle de discussion de la vitrine */
.chatbot { --cb-color: var(--color-primary-solid, #B25A0B); --cb-border: var(--color-border, #E7DFD0); --cb-muted: var(--color-text-muted, #70665B);
  position: fixed; right: 20px; bottom: 20px; z-index: 900; font-family: inherit; }
.chatbot [hidden] { display: none !important; }

.chatbot-launcher { width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--cb-color); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 6px 20px rgba(43,27,18,.28); transition: transform .15s; }
.chatbot-launcher:hover { transform: scale(1.06); }
.chatbot-launcher:focus-visible, .chatbot-head-btn:focus-visible, .chatbot-send:focus-visible, .chatbot-chip:focus-visible { outline: 3px solid #fff; outline-offset: -3px; box-shadow: 0 0 0 3px var(--cb-color); }
.chatbot-ico-close { display: none; font-size: 20px; }
.chatbot.is-open .chatbot-ico-open { display: none; }
.chatbot.is-open .chatbot-ico-close { display: inline; }

.chatbot-panel { position: absolute; right: 0; bottom: 70px; width: 370px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 110px);
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--cb-border); border-radius: 16px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(43,27,18,.25); }

.chatbot-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--cb-color); color: #fff; }
.chatbot-avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.chatbot-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.chatbot-head-text strong { font-size: 15px; }
.chatbot-head-text span { font-size: 12px; color: #fff; }
.chatbot-head-btn { width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; font-size: 16px; }
.chatbot-head-btn:hover { background: rgba(255,255,255,.18); }

.chatbot-log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; background: #FBF8F2; overscroll-behavior: contain; }
.chatbot-msg { max-width: 88%; padding: 9px 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 14px; }
.chatbot-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--cb-border); border-bottom-left-radius: 3px; color: #2B1B12; }
.chatbot-msg.user { align-self: flex-end; background: var(--cb-color); color: #fff; border-bottom-right-radius: 3px; }
.chatbot-msg.error { align-self: flex-start; background: #FDECEA; border: 1px solid #F3C2BC; color: #8A1F11; border-bottom-left-radius: 3px; }

.chatbot-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--cb-border); border-radius: 14px; border-bottom-left-radius: 3px; }
.chatbot-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--cb-muted); animation: chatbot-dot 1.2s infinite ease-in-out; }
.chatbot-typing i:nth-child(2) { animation-delay: .15s; }
.chatbot-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatbot-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chatbot-typing i { animation: none; opacity: .6; } .chatbot-launcher { transition: none; } }

.chatbot-cards { align-self: stretch; display: flex; flex-direction: column; gap: 8px; }
.chatbot-card { display: flex; gap: 10px; padding: 8px; background: #fff; border: 1px solid var(--cb-border); border-radius: 12px; color: inherit; text-decoration: none; }
.chatbot-card:hover { border-color: var(--cb-color); }
.chatbot-card-photo { width: 68px; height: 68px; flex: none; border-radius: 8px; background: #EFE9DC center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--cb-muted); font-size: 22px; }
.chatbot-card-body { flex: 1; min-width: 0; line-height: 1.35; }
.chatbot-card-titre { font-size: 13.5px; font-weight: 600; color: #2B1B12; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chatbot-card-lieu { font-size: 12px; color: var(--cb-muted); }
.chatbot-card-prix { font-size: 13px; font-weight: 600; color: var(--cb-color); margin-top: 2px; }

.chatbot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chatbot-chip { font: inherit; font-size: 12.5px; padding: 5px 11px; border: 1px solid var(--cb-color); border-radius: 999px; background: #fff; color: var(--cb-color); cursor: pointer; text-decoration: none; }
.chatbot-chip:hover { background: var(--cb-color); color: #fff; }

.chatbot-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--cb-border); background: #fff; }
.chatbot-form input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--cb-border); border-radius: 20px; font: inherit; font-size: 16px; }
.chatbot-form input:focus { outline: 2px solid var(--cb-color); outline-offset: 0; }
.chatbot-send { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--cb-color); color: #fff; cursor: pointer; font-size: 16px; }
.chatbot-send:disabled { opacity: .5; cursor: default; }
.chatbot-mention { margin: 0; padding: 0 14px 10px; font-size: 11px; line-height: 1.4; color: var(--cb-muted); background: #fff; }
.chatbot-mention a { color: var(--cb-color); text-decoration: underline; }

@media (max-width: 560px) {
  html.chatbot-lock, html.chatbot-lock body { overflow: hidden; }
  .chatbot-head-btn { width: 40px; height: 40px; }
  .chatbot-chip { padding: 8px 13px; }
  .chatbot { right: 14px; bottom: 14px; }
  .chatbot.is-open { right: 0; bottom: 0; left: 0; top: 0; }
  .chatbot.is-open .chatbot-launcher { display: none; }
  .chatbot.is-open .chatbot-panel { position: fixed; inset: 0; width: auto; max-width: none; height: auto; max-height: none; border: 0; border-radius: 0; }
}

.chatbot-rappel { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--cb-border); background: #FDF3E7; color: var(--cb-color); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chatbot-rappel:hover { background: #FBE8D0; }
.chatbot-rappel:focus-visible { outline: 2px solid var(--cb-color); outline-offset: -2px; }
.chatbot-lead { align-self: stretch; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--cb-border); border-radius: 12px; font-size: 13px; }
.chatbot-lead > strong { font-size: 13.5px; color: #2B1B12; }
.chatbot-lead-champ { display: flex; flex-direction: column; gap: 3px; color: var(--cb-muted); font-size: 12px; }
.chatbot-lead-champ input { height: 38px; padding: 0 10px; border: 1px solid var(--cb-border); border-radius: 8px; font: inherit; font-size: 16px; color: #2B1B12; }
.chatbot-lead-champ input:focus { outline: 2px solid var(--cb-color); outline-offset: 0; }
.chatbot-lead-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.4; color: #2B1B12; }
.chatbot-lead-consent input { margin-top: 2px; flex: none; width: 18px; height: 18px; accent-color: var(--cb-color); }
.chatbot-lead-consent a { color: var(--cb-color); text-decoration: underline; }
.chatbot-lead-erreur { margin: 0; padding: 6px 10px; border-radius: 8px; background: #FDECEA; color: #8A1F11; font-size: 12.5px; }
.chatbot-lead-actions { display: flex; gap: 8px; }
.chatbot-chip-plein { background: var(--cb-color); color: #fff; }
.chatbot-chip-plein:hover { background: #8F4708; }
.chatbot-chip:disabled { opacity: .5; cursor: default; }
.chatbot-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
