/* =====================================================================
   Assistant « Lou » — fenêtre de discussion.
   Mobile d'abord : plein écran sur téléphone, panneau flottant en bas
   à droite à partir de 700px. Charte : bleu nuit / bordeaux.
   ===================================================================== */
[x-cloak]{display:none!important}

.sa-chat__panel{position:fixed;inset:0;z-index:250;display:flex;flex-direction:column;background:var(--c-surface,#fff);
  color:var(--c-ink,#0B1B3F);font-size:.95rem;padding-bottom:env(safe-area-inset-bottom,0px)}
@media(min-width:700px){
  .sa-chat__panel{inset:auto 20px 20px auto;width:390px;height:min(620px,calc(100vh - 40px));border-radius:20px;
    box-shadow:0 24px 60px rgba(0,28,86,.28);overflow:hidden}
}

.sa-chat__head{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 16px;padding-top:calc(12px + env(safe-area-inset-top,0px));
  background:var(--c-navy,#001C56);color:#fff}
@media(min-width:700px){.sa-chat__head{padding-top:12px}}
.sa-chat__avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;flex:none;
  background:linear-gradient(135deg,var(--c-turquoise,#16A6B6),var(--c-coral,#B62A43))}
.sa-chat__avatar svg.lucide,.sa-chat__avatar i{width:19px;height:19px;color:#fff}
.sa-chat__who{flex:1;min-width:0}
.sa-chat__name{margin:0;font-family:var(--font-display,inherit);font-weight:700;font-size:1.05rem;line-height:1.2;color:#fff}
.sa-chat__ai{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.5);
  font-size:.68rem;font-weight:700;letter-spacing:.06em;vertical-align:2px;color:#fff}
.sa-chat__role{margin:0;font-size:.78rem;color:rgba(255,255,255,.75);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sa-chat__icon{width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:#fff;display:grid;place-items:center;cursor:pointer}
.sa-chat__icon:hover{background:rgba(255,255,255,.14)}
.sa-chat__icon svg.lucide,.sa-chat__icon i{width:19px;height:19px}

.sa-chat__list{flex:1;overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:12px;background:var(--c-bg,#FAFAFC);
  overscroll-behavior:contain}
.sa-chat__msg{display:flex;flex-direction:column;gap:8px;max-width:88%}
.sa-chat__msg--user{align-self:flex-end;align-items:flex-end}
.sa-chat__msg--bot{align-self:flex-start}
.sa-chat__bubble{margin:0;padding:10px 14px;border-radius:18px 18px 18px 4px;background:#fff;border:1px solid var(--c-line,#E3E6EE);
  line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}
.sa-chat__msg--user .sa-chat__bubble{background:var(--c-navy,#001C56);color:#fff;border-color:transparent;border-radius:18px 18px 4px 18px}
.sa-chat__bubble.is-error{background:#FDECEE;border-color:#F3C1C9;color:#8E1F33}

.sa-chat__chips{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.sa-chat__chip{border:1px solid var(--c-navy,#001C56);background:#fff;color:var(--c-navy,#001C56);border-radius:999px 999px 999px 0;
  padding:8px 14px;font:inherit;font-size:.88rem;text-align:left;cursor:pointer;line-height:1.35}
.sa-chat__chip:hover{background:var(--c-navy,#001C56);color:#fff}

.sa-chat__cards{display:flex;flex-direction:column;gap:6px;width:100%}
.sa-chat__card{display:flex;align-items:center;gap:10px;padding:8px;border-radius:14px;background:#fff;border:1px solid var(--c-line,#E3E6EE);
  text-decoration:none;color:inherit;min-width:0}
.sa-chat__card:hover{border-color:var(--c-navy,#001C56)}
.sa-chat__thumb{width:52px;height:52px;flex:none;border-radius:10px;overflow:hidden;background:var(--c-sand,#F6F1EA)}
.sa-chat__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.sa-chat__cardtxt{display:flex;flex-direction:column;min-width:0;flex:1}
.sa-chat__type{font-size:.72rem;letter-spacing:.04em;text-transform:uppercase;color:var(--c-ink-soft,#4A5578);
  overflow-wrap:anywhere}
.sa-chat__ctitle{font-weight:600;line-height:1.3;color:var(--c-navy,#001C56);overflow-wrap:anywhere} /* titre entier, jamais tronqué */
.sa-chat__price{font-size:.82rem;color:var(--c-coral,#B62A43);font-weight:600}
.sa-chat__go{width:18px;height:18px;flex:none;color:var(--c-ink-soft,#4A5578)}

.sa-chat__handoff{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.sa-chat__handoff .btn{min-height:40px;font-size:.86rem}

.sa-chat__typing{display:inline-flex;gap:4px;align-items:center;min-height:40px}
.sa-chat__typing span{width:7px;height:7px;border-radius:50%;background:var(--c-ink-soft,#4A5578);animation:sa-chat-dot 1s infinite ease-in-out}
.sa-chat__typing span:nth-child(2){animation-delay:.15s}
.sa-chat__typing span:nth-child(3){animation-delay:.3s}
@keyframes sa-chat-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.sa-chat__typing span{animation:none;opacity:.6}}

.sa-chat__form{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;border-top:1px solid var(--c-line,#E3E6EE);background:#fff}
.sa-chat__form textarea{flex:1;min-width:0;resize:none;max-height:120px;border:1px solid var(--c-line,#E3E6EE);border-radius:22px;
  padding:11px 16px;font:inherit;font-size:16px;line-height:1.35;color:var(--c-ink,#0B1B3F);background:var(--c-bg,#FAFAFC)}
.sa-chat__form textarea:focus-visible{outline:2px solid var(--c-navy,#001C56);outline-offset:1px}
.sa-chat__send{width:46px;height:46px;flex:none;border:0;border-radius:50%;background:var(--c-coral,#B62A43);color:#fff;
  display:grid;place-items:center;cursor:pointer}
.sa-chat__send:disabled{opacity:.45;cursor:default}
.sa-chat__send svg.lucide,.sa-chat__send i{width:19px;height:19px}
.sa-chat__note{margin:0;padding:0 14px 10px;background:#fff;font-size:.72rem;line-height:1.35;color:var(--c-ink-soft,#4A5578)}

/* Fenêtre ouverte sur mobile : on masque les boutons flottants dessous. */
@media(max-width:699px){body:has(.sa-chat__panel:not([style*="display: none"])) .hp-fab-stack{visibility:hidden}}
