/* Ordiland — bulle de l'assistant. Couleurs du thème : encre #0B2436, pétrole #0E5C73,
   bleu #0077C8, turquoise #00A6B8, fond #F2F5F8, filets #DDE4EB. */
.ord-ast { position: fixed; right: 20px; bottom: 20px; z-index: 1035; font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; color: #17232E; }
.ord-ast *, .ord-ast *::before, .ord-ast *::after { box-sizing: border-box; }

.ord-ast__fab {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
  height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #0077C8 0%, #00A6B8 100%); color: #fff;
  font-family: inherit; font-weight: 700; font-size: .95rem; line-height: 1; box-shadow: 0 10px 28px rgba(0, 119, 200, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ord-ast__fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0, 119, 200, .42); }
.ord-ast__fab:focus-visible { outline: 3px solid #0B2436; outline-offset: 3px; }
.ord-ast__fab svg { width: 26px; height: 26px; flex: 0 0 26px; }
.ord-ast.is-open .ord-ast__fab { display: none; }

.ord-ast__panel {
  width: 380px; height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(11, 36, 54, .28), 0 0 0 1px rgba(11, 36, 54, .06);
}
.ord-ast__panel[hidden] { display: none; }

.ord-ast__head {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; color: #fff;
  background: linear-gradient(90deg, #0B2436 0%, #12405C 55%, #0E5C73 100%);
}
.ord-ast__avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #7FDDE8; }
.ord-ast__avatar svg { width: 22px; height: 22px; }
.ord-ast__title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.ord-ast__title strong { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 1.02rem; letter-spacing: .01em; }
.ord-ast__title span { font-size: .75rem; color: #B7C6D3; }
.ord-ast__title em { color: #FFD28A; font-style: normal; font-weight: 700; }
.ord-ast__close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.ord-ast__close:hover { background: rgba(255, 255, 255, .14); }
.ord-ast__close svg { width: 20px; height: 20px; }

.ord-ast__list { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: #F2F5F8; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ord-ast__msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: .9rem; line-height: 1.45; word-wrap: break-word; }
.ord-ast__msg p { margin: 0 0 .45em; }
.ord-ast__msg p:last-child { margin-bottom: 0; }
.ord-ast__msg ul { margin: .2em 0 .45em; padding-left: 1.15em; }
.ord-ast__msg li { margin: .15em 0; }
.ord-ast__msg a[href^="tel:"] { white-space: nowrap; }
.ord-ast__msg a { color: #0077C8; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ord-ast__msg--bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 5px; box-shadow: 0 1px 3px rgba(11, 36, 54, .08); }
.ord-ast__msg--user { align-self: flex-end; background: #0077C8; color: #fff; border-bottom-right-radius: 5px; }
.ord-ast__msg--user a { color: #fff; }

.ord-ast__typing { display: flex; gap: 5px; padding: 14px 16px; }
.ord-ast__typing span { width: 7px; height: 7px; border-radius: 50%; background: #8595A3; animation: ordAstDot 1.1s infinite ease-in-out; }
.ord-ast__typing span:nth-child(2) { animation-delay: .15s; }
.ord-ast__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ordAstDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ord-ast__typing span { animation: none; opacity: .7; } .ord-ast__fab { transition: none; } }

.ord-ast__chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.ord-ast__chip { border: 1px solid #B9D9EF; background: #fff; color: #0B5A94; border-radius: 999px; padding: 7px 12px; font-family: inherit; font-weight: 600; font-size: .8rem; line-height: 1.2; cursor: pointer; text-align: left; }
.ord-ast__chip:hover { background: #EAF3FA; border-color: #0077C8; }

.ord-ast__cards { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.ord-ast__cards:last-child { margin-bottom: 0; }
.ord-ast__cards:first-child { margin-top: 0; }
.ord-ast__card { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid #DDE4EB; border-radius: 12px; background: #fff; color: #17232E !important; text-decoration: none !important; font-weight: 400 !important; transition: border-color .15s ease, box-shadow .15s ease; }
.ord-ast__card:hover { border-color: #0077C8; box-shadow: 0 4px 12px rgba(0, 119, 200, .12); }
.ord-ast__card img, .ord-ast__noimg { width: 58px; height: 58px; flex: 0 0 58px; object-fit: contain; border-radius: 8px; background: #fff; }
.ord-ast__noimg { background: #EDF3F8; }
.ord-ast__card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ord-ast__card-name { font-size: .82rem; font-weight: 700; line-height: 1.3; color: #0B2436; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ord-ast__card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; }
.ord-ast__card-meta strong { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: .95rem; color: #0B2436; }
.ord-ast__stock { font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: #FFF1E6; color: #A33600; }
.ord-ast__stock.is-ok { background: #E7F6EF; color: #1B7F4B; }

.ord-ast__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid #DDE4EB; background: #fff; }
.ord-ast__input { flex: 1; resize: none; min-height: 42px; max-height: 120px; padding: 10px 14px; border: 1px solid #C6D4E0; border-radius: 21px; font-family: inherit; font-weight: 400; font-size: .9rem; line-height: 1.4; color: #17232E; background: #F2F5F8; outline: none; }
.ord-ast__input:focus { border-color: #0077C8; background: #fff; box-shadow: 0 0 0 3px rgba(0, 119, 200, .12); }
.ord-ast__send { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0077C8 0%, #00A6B8 100%); }
.ord-ast__send:disabled { opacity: .5; cursor: default; }
.ord-ast__send svg { width: 20px; height: 20px; }
.ord-ast__note { margin: 0; padding: 0 14px 10px; background: #fff; font-size: .68rem; line-height: 1.4; color: #5A6B7A; }
.ord-ast__note a { color: #0077C8; }

@media (max-width: 575.98px) {
  .ord-ast { right: 14px; bottom: 14px; }
  .ord-ast__fab { width: 56px; padding: 0; justify-content: center; }
  .ord-ast__fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ord-ast.is-open { inset: 0; right: 0; bottom: 0; }
  .ord-ast__panel { width: 100%; height: 100%; border-radius: 0; }
  .ord-ast__input { font-size: 16px; } /* évite le zoom automatique sur iPhone */
}
@media print { .ord-ast { display: none !important; } }
