/* Site chat (chat.js). One pill button in the corner; a window opens above it. */
.achat { position: fixed; right: 20px; bottom: 20px; z-index: 50; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
.achat * { box-sizing: border-box; }

.achat__bubble {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: #1c1b19; color: #fff; font: 600 15px/1 "Inter", sans-serif;
  box-shadow: 0 12px 28px -8px rgba(28, 27, 25, .5);
  transition: transform .18s ease, background .18s ease;
}
.achat__bubble:hover { background: #d2561f; transform: translateY(-2px); }
.achat__bubble:focus-visible { outline: 3px solid #d2561f; outline-offset: 3px; }
.achat__bubble svg { width: 20px; height: 20px; }
.achat.is-open .achat__bubble { display: none; }

.achat__panel {
  width: min(420px, calc(100vw - 24px)); height: min(620px, calc(100vh - 40px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 18px; border: 1px solid #e6dfd4;
  box-shadow: 0 28px 64px -20px rgba(28, 27, 25, .45);
  animation: achat-in .2s ease both;
}
.achat__panel[hidden] { display: none; }
@keyframes achat-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .achat__panel { animation: none; } .achat__bubble { transition: none; } }

.achat__head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 14px 18px; background: #1c1b19; color: #fff; flex-shrink: 0; }
.achat__head-text { flex: 1; min-width: 0; }
.achat__head-text strong { display: block; font-size: 15px; line-height: 1.25; }
.achat__head-text span { display: block; font-size: 12.5px; opacity: .75; margin-top: 2px; }
.achat__hbtn { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; opacity: .8; font-size: 22px; line-height: 1; }
.achat__hbtn svg { width: 18px; height: 18px; }
.achat__hbtn:hover { background: rgba(255, 255, 255, .14); opacity: 1; }
.achat__hbtn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.achat__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 14px 10px; background: #fbf8f3; display: flex; flex-direction: column; gap: 10px; }
.achat__log > :first-child { margin-top: auto; }
.achat__row { display: flex; }
.achat__row--user { justify-content: flex-end; }
.achat__msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; color: #1c1b19; overflow-wrap: anywhere; }
.achat__msg--user { background: #1c1b19; color: #fff; border-bottom-right-radius: 5px; }
.achat__msg--bot { background: #fff; border: 1px solid #e6dfd4; border-bottom-left-radius: 5px; }
.achat__msg p { margin: 0 0 8px; }
.achat__msg p:last-child { margin-bottom: 0; }
.achat__msg ul { margin: 6px 0 8px 18px; padding: 0; }
.achat__msg li { margin: 4px 0; }
.achat__msg a { color: #d2561f; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.achat__typing { color: #6b665e; font-style: italic; }

.achat__card { flex: 1; max-width: 88%; margin: 0; padding: 14px; border-radius: 16px; border-bottom-left-radius: 5px; background: #fff6ef; border: 1px solid #f0c9b0; display: grid; gap: 8px; }
.achat__card-title { margin: 0; font-weight: 700; color: #1c1b19; font-size: 14.5px; }
.achat__card-text { margin: 0; font-size: 13px; color: #6b665e; line-height: 1.45; }
.achat__card input { width: 100%; padding: 10px 12px; border: 1px solid #e6dfd4; border-radius: 10px; font: 400 15px/1.3 "Inter", sans-serif; color: #1c1b19; background: #fff; }
.achat__card input:focus { outline: 2px solid #d2561f; border-color: transparent; }
.achat__card-actions { display: flex; gap: 8px; align-items: center; }
.achat__card-actions .achat__send { padding: 10px 18px; }
.achat__card-skip { all: unset; cursor: pointer; font: 600 13px/1 "Inter", sans-serif; color: #6b665e; padding: 8px 10px; border-radius: 8px; }
.achat__card-skip:hover { background: #f3e3d6; }
.achat__card-msg { margin: 0; font-size: 12.5px; color: #a84216; min-height: 1em; }

.achat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 12px; background: #fbf8f3; flex-shrink: 0; }
.achat__chips[hidden] { display: none; }
.achat__chip { cursor: pointer; border: 1px solid #e6dfd4; background: #fff; color: #1c1b19; font: 500 13px/1.2 "Inter", sans-serif; padding: 8px 12px; border-radius: 999px; transition: border-color .12s, color .12s; }
.achat__chip:hover { border-color: #d2561f; color: #d2561f; }

.achat__form { display: flex; gap: 8px; padding: 12px 14px 8px; background: #fff; border-top: 1px solid #e6dfd4; flex-shrink: 0; }
.achat__form input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid #e6dfd4; border-radius: 12px; font: 400 16px/1.3 "Inter", sans-serif; color: #1c1b19; background: #fff; }
.achat__form input:focus { outline: 2px solid #d2561f; border-color: transparent; }
.achat__send { padding: 0 18px; border: 0; border-radius: 12px; background: #d2561f; color: #fff; font: 600 14px/1 "Inter", sans-serif; cursor: pointer; min-height: 42px; }
.achat__send:hover { background: #a84216; }
.achat__note { margin: 0; padding: 0 14px 10px; font-size: 11.5px; color: #8a847a; background: #fff; text-align: center; flex-shrink: 0; }

@media (max-width: 520px) {
  .achat { right: 0; bottom: 0; left: 0; }
  .achat__bubble { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 15px; }
  .achat__bubble span { display: none; }
  .achat__bubble svg { width: 24px; height: 24px; }
  .achat__panel { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .achat__form { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}
