/* DeveooChatbot — widget front. Couleur principale : --mlcb-color (réglable en back-office) */
.mlcb {
  --mlcb-color: #dd231d;
  --mlcb-bg: #ffffff;
  --mlcb-soft: #f7f5f5;
  --mlcb-ink: #171717;
  --mlcb-muted: #5f5f5f;
  --mlcb-line: #e6e2e2;
  position: fixed; bottom: 20px; z-index: 2147483000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.45; color: var(--mlcb-ink);
}
.mlcb--right { right: 20px; }
.mlcb--left { left: 20px; }
.mlcb *, .mlcb *::before, .mlcb *::after { box-sizing: border-box; }

.mlcb-launcher {
  width: 232px; height: 66px; border-radius: 22px; border: 0; cursor: pointer;
  background: var(--mlcb-color); color: #fff; font-size: 26px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2); display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 8px 14px 8px 9px;
  transition: transform .15s ease;
}
.mlcb-launcher:hover { transform: translateY(-3px); }
.mlcb-launcher:focus-visible, .mlcb button:focus-visible, .mlcb a:focus-visible, .mlcb-input:focus-visible { outline: 2px solid var(--mlcb-color); outline-offset: 2px; }
.mlcb.is-open .mlcb-launcher { display: none; }

.mlcb-panel {
  position: absolute; bottom: 0; width: 500px; max-width: calc(100vw - 40px); height: min(780px, calc(100vh - 40px));
  background: var(--mlcb-bg); border-radius: 16px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22); display: flex; flex-direction: column;
}
.mlcb--right .mlcb-panel { right: 0; }
.mlcb--left .mlcb-panel { left: 0; }
.mlcb-panel[hidden] { display: none; }

.mlcb-head { display: flex; align-items: center; gap: 6px; padding: 12px 12px 12px 16px; background: var(--mlcb-color); color: #fff; }
.mlcb-title { flex: 1; font-weight: 700; font-size: 15px; }
.mlcb-head__btn { background: rgba(255, 255, 255, .16); color: #fff; border: 0; border-radius: 14px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.mlcb-head__btn:hover { background: rgba(255, 255, 255, .28); }
.mlcb-head__close { font-size: 20px; line-height: 1; padding: 2px 9px; }

.mlcb-body { flex: 1; overflow-y: auto; padding: 14px 12px; background: var(--mlcb-soft); display: flex; flex-direction: column; gap: 8px; }
.mlcb-msg { display: flex; flex-direction: column; max-width: 100%; }
.mlcb-msg--user { align-items: flex-end; }
.mlcb-msg--bot { align-items: flex-start; }
.mlcb-bubble { max-width: 86%; padding: 9px 12px; border-radius: 14px; white-space: normal; overflow-wrap: anywhere; }
.mlcb-msg--bot .mlcb-bubble { background: #fff; border: 1px solid var(--mlcb-line); border-end-start-radius: 4px; }
.mlcb-msg--user .mlcb-bubble { background: var(--mlcb-color); color: #fff; border-end-end-radius: 4px; }

.mlcb-cards { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 4px; max-width: 100%; scroll-snap-type: x mandatory; }
.mlcb-card {
  flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 3px;
  background: #fff; border: 1px solid var(--mlcb-line); border-radius: 12px; padding: 8px;
  color: var(--mlcb-ink); text-decoration: none; text-align: left;
}
.mlcb-card:hover { border-color: var(--mlcb-color); text-decoration: none; }
.mlcb-card__img { width: 100%; height: 110px; object-fit: contain; background: #fff; border-radius: 8px; }
.mlcb-card__img--empty { background: var(--mlcb-soft); }
.mlcb-card__brand { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--mlcb-muted); }
.mlcb-card__name { font-size: 12.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mlcb-card__price { display: flex; gap: 6px; align-items: baseline; font-weight: 700; color: var(--mlcb-color); }
.mlcb-card__price s { font-weight: 400; font-size: 11.5px; color: var(--mlcb-muted); }
.mlcb-card__stock { font-size: 11px; font-weight: 600; }
.mlcb-card__stock.is-in { color: #1b7a3a; }
.mlcb-card__stock.is-out { color: #b42318; }
.mlcb-card__view { margin-top: auto; font-size: 12px; text-align: center; padding: 5px; border-radius: 8px; background: var(--mlcb-soft); color: var(--mlcb-color); font-weight: 600; }

.mlcb-contact { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mlcb-contact__btn { padding: 7px 12px; border-radius: 18px; background: #fff; border: 1px solid var(--mlcb-line); color: var(--mlcb-ink); text-decoration: none; font-weight: 600; font-size: 13px; }
.mlcb-contact__btn--wa { background: #25d366; border-color: #25d366; color: #fff; }
.mlcb-contact__btn:hover { text-decoration: none; filter: brightness(.96); }
.mlcb-contact__hours { width: 100%; font-size: 12px; color: var(--mlcb-muted); }
.mlcb-cta { margin-top: 6px; font-weight: 600; color: var(--mlcb-color); }

.mlcb-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; background: #fff; border-top: 1px solid var(--mlcb-line); max-height: 132px; overflow-y: auto; }
.mlcb-chips:empty { display: none; }
.mlcb-chip { border: 1px solid var(--mlcb-color); color: var(--mlcb-color); background: #fff; border-radius: 18px; padding: 6px 11px; font-size: 13px; cursor: pointer; line-height: 1.2; }
.mlcb-chip:hover { background: var(--mlcb-color); color: #fff; }
.mlcb-chip--ghost { border-color: var(--mlcb-line); color: var(--mlcb-muted); }

.mlcb-form { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--mlcb-line); background: #fff; }
.mlcb-input { flex: 1; min-width: 0; border: 1px solid var(--mlcb-line); border-radius: 20px; padding: 9px 14px; font-size: 16px; color: var(--mlcb-ink); background: #fff; }
.mlcb-send { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--mlcb-color); color: #fff; cursor: pointer; font-size: 16px; flex: 0 0 40px; }
.mlcb-panel[dir="rtl"] .mlcb-send span { display: inline-block; transform: scaleX(-1); }
.mlcb-foot { font-size: 11px; color: var(--mlcb-muted); text-align: center; padding: 0 10px 8px; background: #fff; }

.mlcb-langpick { background: #fff; border: 1px solid var(--mlcb-line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.mlcb-langpick__title { margin: 0 0 4px; font-weight: 600; text-align: center; }
.mlcb-langpick__btn { padding: 10px; border-radius: 10px; border: 1px solid var(--mlcb-color); background: #fff; color: var(--mlcb-color); font-size: 15px; font-weight: 600; cursor: pointer; }
.mlcb-langpick__btn:hover, .mlcb-langpick__btn.is-active { background: var(--mlcb-color); color: #fff; }

.mlcb-dots { display: inline-flex; gap: 4px; padding: 3px 0; }
.mlcb-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--mlcb-muted); animation: mlcb-blink 1.2s infinite; }
.mlcb-dots i:nth-child(2) { animation-delay: .2s; }
.mlcb-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes mlcb-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

@media (max-width: 600px) {
  .mlcb { bottom: 14px; }
  .mlcb--right { right: 14px; }
  .mlcb--left { left: 14px; }
  .mlcb.is-open { inset: 0; }
  .mlcb.is-open .mlcb-panel { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mlcb-dots i { animation: none; opacity: .6; }
  .mlcb-launcher { transition: none; }
}

/* Bloc de début de discussion, glissement tactile et navigation au clavier. */
.mlcb-body { min-height: 0; }
.mlcb-body > * { flex-shrink: 0; }
.mlcb-promo { min-width: 0; width: 100%; padding: 10px; border: 1px solid var(--mlcb-line); border-radius: 14px; background: #fff; }
.mlcb-promo__title { margin: 0 0 8px; font-size: 14px; line-height: 1.4; font-weight: 700; color: var(--mlcb-ink); }
.mlcb-promo__banner { display: block; border-radius: 10px; overflow: hidden; }
.mlcb-promo__image { display: block; width: 100%; height: auto; max-height: 200px; object-fit: contain; border-radius: 10px; }
.mlcb-promo__image[hidden] { display: none; }
.mlcb-promo__track { width: 100%; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.mlcb-promo .mlcb-card { flex-basis: 156px; }
.mlcb-promo .mlcb-card__img { height: 94px; }
.mlcb-promo__controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 5px; }
.mlcb-promo__arrow { width: 32px; height: 30px; padding: 0; border: 1px solid var(--mlcb-line); background: var(--mlcb-soft); color: var(--mlcb-color); border-radius: 9px; font-size: 24px; cursor: pointer; line-height: 1; }
.mlcb-promo__arrow:disabled { opacity: .35; cursor: default; }
.mlcb-promo__count { color: var(--mlcb-muted); font-size: 11px; }

.mlcb-powered { display: inline-block; margin-top: 5px; color: var(--mlcb-muted); font-size: 10px; text-decoration: none; }
.mlcb-powered:hover { color: var(--mlcb-color); text-decoration: underline; }
.mlcb-card__price { flex-wrap: wrap; }
.mlcb-card__price > * { white-space: nowrap; }

/* Version 1.2 — invitation identifiable et espace de discussion plus ample. */
.mlcb button { font-family: inherit; }
.mlcb-launcher { animation: mlcb-invite-ring 2.4s ease-out 3; border: 1px solid rgba(255,255,255,.25); text-align: start; }
.mlcb-launcher__avatar, .mlcb-head__avatar, .mlcb-teaser__avatar { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mlcb-launcher__avatar { width: 48px; height: 48px; border-radius: 16px; background: rgba(255,255,255,.17); }
.mlcb-symbol { position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; width: 27px; height: 23px; border: 2px solid currentColor; border-radius: 8px 8px 8px 3px; color: inherit; }
.mlcb-symbol::after { content: ''; position: absolute; bottom: -5px; left: 3px; width: 7px; height: 7px; border-left: 2px solid currentColor; transform: skewY(-35deg); }
.mlcb-symbol i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.mlcb-launcher__copy { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 3px; }
.mlcb-launcher__label { white-space: nowrap; font-size: 14px; font-weight: 700; line-height: 1.2; }
.mlcb-launcher__hint { font-size: 11px; line-height: 1.2; opacity: .9; }
.mlcb-launcher__chevron { font-size: 24px; font-weight: 400; }
.mlcb-teaser { position: absolute; bottom: 82px; width: 300px; max-width: calc(100vw - 40px); padding: 22px; border-radius: 22px; border: 1px solid var(--mlcb-line); border-top: 4px solid var(--mlcb-color); background: #fff; box-shadow: 0 12px 40px rgba(21,35,41,.18); color: var(--mlcb-ink); }
.mlcb--right .mlcb-teaser { right: 0; }
.mlcb--left .mlcb-teaser { left: 0; }
.mlcb-teaser::after { content: ''; position: absolute; right: 32px; bottom: -7px; width: 12px; height: 12px; transform: rotate(45deg); background: #fff; border-right: 1px solid var(--mlcb-line); border-bottom: 1px solid var(--mlcb-line); }
.mlcb--left .mlcb-teaser::after { right: auto; left: 32px; }
.mlcb-teaser[hidden], .mlcb.is-open .mlcb-teaser { display: none; }
.mlcb-teaser__close { position: absolute; top: 7px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%; padding: 0; background: transparent; color: var(--mlcb-muted); font-size: 23px; cursor: pointer; }
.mlcb-teaser[dir="rtl"] .mlcb-teaser__close { right: auto; left: 8px; }
.mlcb-teaser__top { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; }
.mlcb-teaser__avatar { width: 42px; height: 42px; border-radius: 14px; color: var(--mlcb-color); background: var(--mlcb-soft); }
.mlcb-teaser__title { max-width: 170px; font-size: 17px; line-height: 1.3; font-weight: 750; }
.mlcb-teaser__text { margin: 0 0 17px; font-size: 13px; line-height: 1.65; color: var(--mlcb-muted); }
.mlcb-teaser__action { display: block; width: 100%; padding: 11px 8px; border: 0; border-radius: 12px; background: var(--mlcb-color); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.mlcb-teaser__action:hover { filter: brightness(.95); }
.mlcb-panel { border-radius: 24px; border: 1px solid rgba(0,0,0,.06); box-shadow: 0 20px 70px rgba(21,35,41,.25); }
.mlcb-head { padding: 17px 16px; gap: 11px; flex-shrink: 0; }
.mlcb-head__avatar { width: 44px; height: 44px; border-radius: 15px; background: rgba(255,255,255,.17); }
.mlcb-heading { min-width: 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mlcb-title { flex: none; font-size: 18px; overflow-wrap: anywhere; }
.mlcb-subtitle { font-size: 11px; font-weight: 400; opacity: .88; }
.mlcb-head__btn { min-height: 34px; padding: 6px 10px; }
.mlcb-head__close { width: 34px; font-size: 23px; }
.mlcb-body { padding: 16px; gap: 11px; }
.mlcb-bubble { font-size: 14px; line-height: 1.6; padding: 11px 14px; }
.mlcb-promo { padding: 14px; border-radius: 18px; border-top: 3px solid var(--mlcb-color); box-shadow: 0 3px 12px rgba(25,45,40,.04); }
.mlcb-promo__eyebrow { display: block; margin-bottom: 4px; font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--mlcb-color); }
.mlcb-promo__title { margin-bottom: 12px; font-size: 18px; letter-spacing: -.02em; }
.mlcb-promo__image { max-height: 230px; border-radius: 12px; }
.mlcb-cards { gap: 8px; }
.mlcb-promo .mlcb-card { flex-basis: 194px; padding: 11px; border-radius: 14px; gap: 5px; }
.mlcb-promo .mlcb-card__img { height: 130px; }
.mlcb-promo .mlcb-card__name { font-size: 13px; }
.mlcb-promo .mlcb-card__price { font-size: 17px; letter-spacing: -.02em; }
.mlcb-promo .mlcb-card__view { padding: 8px; }
.mlcb-promo__arrow { width: 36px; height: 34px; }
.mlcb-chips { padding: 11px 14px; flex-shrink: 0; }
.mlcb-form { padding: 12px 14px 8px; align-items: center; flex-shrink: 0; }
.mlcb-input { padding: 12px 15px; border-radius: 14px; }
.mlcb-send { width: 44px; height: 44px; flex-basis: 44px; border-radius: 14px; }
.mlcb-foot { padding: 3px 14px 10px; flex-shrink: 0; }
.mlcb-powered { font-size: 11px; font-weight: 600; color: var(--mlcb-color); }
@keyframes mlcb-invite-ring { 0% { box-shadow: 0 8px 24px rgba(0,0,0,.15), 0 0 0 0 rgba(28,95,100,.2); } 70%,100% { box-shadow: 0 8px 24px rgba(0,0,0,.15), 0 0 0 14px rgba(28,95,100,0); } }
@media (max-width: 600px) {
  .mlcb-launcher { width: 232px; height: 62px; }
  .mlcb-teaser { width: 286px; max-width: calc(100vw - 28px); bottom: 78px; padding: 19px; }
  .mlcb.is-open .mlcb-panel { border: 0; border-radius: 0; }
  .mlcb-head { padding: 12px; gap: 8px; }
  .mlcb-body { padding: 12px; }
  .mlcb-title { font-size: 16px; }
  .mlcb-subtitle { font-size: 10px; }
  .mlcb-head__avatar { width: 36px; height: 36px; border-radius: 12px; }
  .mlcb-head__avatar .mlcb-symbol { transform: scale(.8); }
  .mlcb-head__btn { font-size: 11px; padding-inline: 8px; }
  .mlcb-promo { padding: 11px; }
  .mlcb-promo .mlcb-card { flex-basis: 176px; }
  .mlcb-promo .mlcb-card__img { height: 120px; }
  .mlcb-foot { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (max-height: 480px) { .mlcb-teaser { display: none; } .mlcb-chips { max-height: 76px; } }
@media (prefers-reduced-motion: reduce) { .mlcb-launcher { animation: none; transition: none; } }

/* Recherche besoin et budget. */
.mlcb-chip--guided { color: #fff; background: var(--mlcb-color); font-weight: 700; }
.mlcb-guide { width: 100%; border: 1px solid var(--mlcb-line); background: #fff; border-radius: 18px; padding: 16px; }
.mlcb-guide h3 { margin: 0 0 7px; font-size: 18px; color: var(--mlcb-ink); }
.mlcb-guide__intro, .mlcb-guide__status { margin: 0 0 12px; color: var(--mlcb-muted); font-size: 12px; line-height: 1.6; }
.mlcb-guide label { display: block; margin: 12px 0 5px; font-size: 12px; font-weight: 650; color: var(--mlcb-ink); }
.mlcb-guide textarea, .mlcb-guide input[type="text"], .mlcb-guide select { display: block; width: 100%; min-width: 0; border: 1px solid var(--mlcb-line); border-radius: 10px; padding: 10px; font: inherit; font-size: 16px; color: var(--mlcb-ink); background: #fff; }
.mlcb-guide textarea { resize: vertical; min-height: 72px; }
.mlcb-guide__budgets { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.mlcb-guide__presets { display: flex; flex-wrap: wrap; gap: 5px; }
.mlcb-guide__presets button { border: 1px solid var(--mlcb-line); padding: 6px 9px; border-radius: 20px; background: var(--mlcb-soft); color: var(--mlcb-color); cursor: pointer; font-size: 11px; }
.mlcb-guide .mlcb-guide__stock { display: flex; align-items: center; gap: 8px; margin: 14px 0; }
.mlcb-guide__stock input { flex: 0 0 auto; }
.mlcb-guide__error { font-size: 12px; color: #a02424; }
.mlcb-guide__status:empty, .mlcb-guide__error:empty { display: none; }
.mlcb-guide__actions { display: flex; gap: 8px; }
.mlcb-guide__submit, .mlcb-guide__cancel { border: 0; border-radius: 10px; padding: 11px 13px; cursor: pointer; font-size: 13px; font-weight: 700; }
.mlcb-guide__submit { flex: 1; background: var(--mlcb-color); color: #fff; }
.mlcb-guide__cancel { background: var(--mlcb-soft); color: var(--mlcb-muted); }
.mlcb-guide button:disabled { opacity: .5; cursor: wait; }

.mlcb-guide__budgets label { min-height: 32px; display: flex; align-items: flex-end; }
