/* Fenêtre de chat — fichier autonome (shop + blog). Préfixe asw- pour ne rien écraser. */
.asw-root, .asw-root * { box-sizing: border-box; }
.asw-root [hidden], .asw-bar-btn [hidden], .asw-badge[hidden] { display: none !important; }
/* Variables aussi sur le bouton de barre : il vit hors du conteneur du chat */
.asw-root, .asw-bar-btn {
  --asw-teal: #0f766e; --asw-teal-2: #0ea5a4; --asw-ink: #0f172a; --asw-muted: #64748b;
  --asw-line: #e2e8f0; --asw-bg: #f8fafc;
}
.asw-root { font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 14.5px; color: var(--asw-ink); }

/* Bulle (ordinateur, ou mobile sans barre) */
.asw-bubble {
  position: fixed; right: 20px; bottom: 20px; z-index: 9990;
  display: flex; align-items: center; gap: 9px; border: 0; cursor: pointer;
  background: var(--asw-teal); color: #fff; font: inherit; font-weight: 700; font-size: 14.5px;
  padding: 13px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgba(15, 23, 42, .22);
}
.asw-bubble:hover { background: #0d665f; }
.asw-bubble { border-radius: 18px; padding: 10px 16px 10px 14px; text-align: left; }
.asw-bubble-txt { display: flex; flex-direction: column; line-height: 1.2; max-width: 290px; }
.asw-bubble-title { font-weight: 800; font-size: 15px; }
.asw-bubble-sub { font-weight: 500; font-size: 11.5px; opacity: .92; margin-top: 2px; }
/* Compact bubble: opening hours shown on hover/focus only, so the bubble no longer covers prices and order summaries */
.asw-bubble-sub { display: none; }
.asw-bubble:hover .asw-bubble-sub, .asw-bubble:focus-visible .asw-bubble-sub { display: block; }
.asw-bubble:focus-visible, .asw-bar-btn:focus-visible, .asw-root button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.asw-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; flex: none; }
.asw-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); }
.asw-dot.off { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .22); }
.asw-bubble.asw-closed { background: #334155; }
.asw-bubble.asw-closed:hover { background: #1e293b; }
.asw-bar-btn .asw-dot { width: 8px; height: 8px; display: inline-block; vertical-align: middle; }
.asw-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff;
  font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}

/* Bouton injecté dans une barre d'actions mobile existante */
.asw-bar-btn { position: relative; cursor: pointer; }
.as-cta-bar .asw-bar-btn { background: #fff; color: var(--asw-teal); border: 1.5px solid var(--asw-teal); flex: 0 0 auto; padding-left: 14px; padding-right: 14px; }
.asw-bar-btn .asw-badge { position: absolute; top: -7px; right: -5px; }

/* Panneau */
.asw-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 10000;
  width: 370px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 110px);
  background: #fff; border: 1px solid var(--asw-line); border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .25); display: flex; flex-direction: column; overflow: hidden;
}
.asw-panel.asw-full {
  inset: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  border-radius: 0; border: 0;
}
.asw-head { background: var(--asw-teal); color: #fff; padding: 13px 14px 12px 16px; display: flex; align-items: flex-start; gap: 10px; }
.asw-head-txt { flex: 1; min-width: 0; }
.asw-title { font-weight: 800; font-size: 15.5px; letter-spacing: .2px; }
.asw-status { display: flex; align-items: center; gap: 7px; font-size: 12.5px; opacity: .95; margin-top: 3px; }
.asw-hours { font-size: 11.5px; opacity: .8; margin-top: 2px; }
.asw-close {
  background: rgba(255, 255, 255, .15); color: #fff; border: 0; width: 34px; height: 34px; border-radius: 9px;
  font-size: 20px; line-height: 1; cursor: pointer; flex: none;
}
.asw-close:hover { background: rgba(255, 255, 255, .28); }

.asw-list { flex: 1; overflow-y: auto; padding: 14px 14px 6px; background: var(--asw-bg); display: flex; flex-direction: column; gap: 8px; }
.asw-msg { max-width: 84%; padding: 9px 12px; border-radius: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.asw-msg.asw-me { align-self: flex-end; background: var(--asw-teal); color: #fff; border-bottom-right-radius: 4px; }
.asw-msg.asw-them { align-self: flex-start; background: #fff; border: 1px solid var(--asw-line); border-bottom-left-radius: 4px; }
.asw-msg.asw-auto { align-self: flex-start; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; border-bottom-left-radius: 4px; }
.asw-meta { display: block; font-size: 11px; opacity: .7; margin-top: 4px; }
.asw-me .asw-meta { text-align: right; }
.asw-msg.asw-failed { background: #fee2e2; color: #991b1b; }
.asw-note { align-self: center; text-align: center; font-size: 12.5px; color: var(--asw-muted); padding: 4px 8px; }

.asw-email { margin: 6px 12px 0; padding: 11px 12px; background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 12px; font-size: 13px; color: #134e4a; }
.asw-email p { margin: 0 0 8px; line-height: 1.4; }
.asw-email-row { display: flex; gap: 6px; }
.asw-email input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 8px 10px; border: 1.5px solid #99f6e4; border-radius: 9px; background: #fff; }
.asw-email-actions { display: flex; gap: 12px; margin-top: 7px; font-size: 12.5px; }
.asw-link-btn { background: none; border: 0; padding: 0; color: var(--asw-teal); text-decoration: underline; cursor: pointer; font: inherit; }

.asw-err { margin: 6px 12px 0; padding: 8px 11px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; font-size: 13px; line-height: 1.4; }

.asw-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--asw-line); background: #fff; }
.asw-input {
  flex: 1; min-width: 0; resize: none; font: inherit; font-size: 16px; line-height: 1.4;
  padding: 9px 11px; border: 1.5px solid var(--asw-line); border-radius: 12px; max-height: 120px; min-height: 42px;
}
.asw-input:focus { outline: none; border-color: var(--asw-teal-2); }
.asw-send { background: var(--asw-teal); color: #fff; border: 0; border-radius: 12px; padding: 0 15px; height: 42px; font: inherit; font-weight: 700; cursor: pointer; flex: none; }
.asw-send:disabled { opacity: .55; cursor: default; }
.asw-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.asw-legal { padding: 0 12px 10px; background: #fff; font-size: 11.5px; color: var(--asw-muted); text-align: center; }
.asw-legal a { color: var(--asw-muted); }
.asw-full .asw-legal { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }

/* Mobile plein écran : on bloque le défilement de la page derrière le chat */
html.asw-lock, html.asw-lock body { overflow: hidden !important; }
