/* =========================================================
   Assistant VSA · bot.css  (positionné à gauche)
   ========================================================= */
.bot-launch{position:fixed;left:14px;bottom:calc(var(--appbar) + 14px + var(--safe-b));z-index:520;display:flex;align-items:center;gap:10px}
.bot-fab{width:58px;height:58px;border-radius:50%;background:conic-gradient(from 200deg,var(--sun),var(--sun2),var(--red),var(--sun));display:flex;align-items:center;justify-content:center;box-shadow:0 12px 28px rgba(208,42,12,.35);position:relative;transition:.3s var(--ease)}
.bot-fab::before{content:'';position:absolute;inset:3px;border-radius:50%;background:var(--g800)}
.bot-fab::after{content:'';position:absolute;inset:-6px;border-radius:50%;border:2px solid rgba(244,198,0,.6);animation:botRing 2.4s ease-out infinite}
@keyframes botRing{from{transform:scale(.9);opacity:1}to{transform:scale(1.35);opacity:0}}
.bot-fab svg{position:relative;width:28px;height:28px;color:var(--sun)}
.bot-fab:hover{transform:scale(1.06) rotate(-6deg)}
.bot-fab .badge{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;border-radius:10px;background:var(--red);color:#fff;font-size:11px;font-weight:800;display:none;align-items:center;justify-content:center;border:2px solid #fff;z-index:2}
.bot-fab .badge.show{display:flex}
.bot-teaser{background:#fff;color:var(--ink);border-radius:16px 16px 16px 4px;padding:10px 32px 10px 14px;font-size:13px;font-weight:600;box-shadow:var(--shadow-lg);max-width:230px;position:relative;cursor:pointer;opacity:0;transform:translateX(-10px) scale(.95);transform-origin:left bottom;transition:.35s var(--ease);pointer-events:none;line-height:1.4}
.bot-teaser.show{opacity:1;transform:none;pointer-events:auto}
.bot-teaser b{color:var(--g600)}
.bot-teaser button{position:absolute;top:6px;right:6px;width:22px;height:22px;border-radius:50%;font-size:14px;color:var(--muted);display:flex;align-items:center;justify-content:center}
.bot-teaser button:hover{background:var(--bg)}
.bot-open .bot-launch{opacity:0;pointer-events:none;transform:scale(.8)}

.bot{position:fixed;z-index:800;inset:0;display:flex;flex-direction:column;background:#f4f7f2;transform:translateY(100%);opacity:0;visibility:hidden;transition:transform .4s var(--ease),opacity .3s,visibility .4s;height:100dvh}
.bot-open .bot{transform:none;opacity:1;visibility:visible}
.bot-hd{display:flex;align-items:center;gap:10px;padding:calc(10px + env(safe-area-inset-top,0px)) 12px 10px;background:linear-gradient(135deg,var(--g800),var(--g600));color:#fff;flex-shrink:0;position:relative;overflow:hidden}
.bot-hd::after{content:'';position:absolute;right:-50px;top:-70px;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle,rgba(244,198,0,.35),transparent 65%)}
.bot-av{width:42px;height:42px;border-radius:50%;background:var(--sun);color:var(--g900);display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative}
.bot-av svg{width:24px;height:24px}
.bot-av::after{content:'';position:absolute;right:0;bottom:0;width:11px;height:11px;border-radius:50%;background:#3ddc6f;border:2px solid var(--g700)}
.bot-ttl{flex:1;min-width:0;position:relative;z-index:1}
.bot-ttl b{display:block;font-size:15px;font-weight:800}
.bot-ttl small{font-size:11.5px;color:rgba(255,255,255,.78)}
.bot-hd .hb{width:38px;height:38px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;background:rgba(255,255,255,.1);position:relative;z-index:1}
.bot-hd .hb:hover{background:rgba(255,255,255,.2)}
.bot-hd .hb svg{width:18px;height:18px}

.bot-body{flex:1;overflow-y:auto;padding:14px 12px 6px;scroll-behavior:smooth;overscroll-behavior:contain}
.bot-day{text-align:center;font-size:11px;color:var(--muted);font-weight:700;margin:2px 0 12px}
.bot-day span{background:#fff;padding:4px 10px;border-radius:999px;border:1px solid var(--line)}
.bm{display:flex;gap:8px;margin-bottom:10px;align-items:flex-end;animation:msgIn .35s var(--ease)}
@keyframes msgIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.bm .m-av{width:28px;height:28px;border-radius:50%;background:var(--sun);color:var(--g900);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.bm .m-av svg{width:16px;height:16px}
.bm .bub{max-width:82%;padding:10px 13px;border-radius:16px;font-size:14px;line-height:1.5;word-wrap:break-word}
.bm.bot-m .bub{background:#fff;color:var(--ink);border-bottom-left-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.05)}
.bm.me{justify-content:flex-end}
.bm.me .bub{background:var(--g600);color:#fff;border-bottom-right-radius:4px}
.bm .bub b{font-weight:700}
.bm.bot-m .bub b{color:var(--g700)}
.bm .bub ul{margin:6px 0 2px 0;padding-left:16px}
.bm .bub li{margin:2px 0}
.bm .bub a{color:var(--red);font-weight:700;text-decoration:underline}
.bm time{display:block;font-size:10px;opacity:.55;margin-top:4px;text-align:right}
.m-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.m-act{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;font-size:12.5px;font-weight:700;background:var(--gpale);color:var(--g700);transition:.2s;text-decoration:none!important}
.m-act:hover{background:var(--g600);color:#fff}
.m-act.red{background:var(--red);color:#fff}
.m-act.wa{background:#25D366;color:#fff}
.m-act svg{width:14px;height:14px}
.typing{display:flex;gap:4px;padding:14px 14px}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);opacity:.5;animation:typ 1.2s infinite}
.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes typ{0%,60%,100%{transform:none;opacity:.4}30%{transform:translateY(-5px);opacity:1}}

.bot-chips{display:flex;gap:6px;overflow-x:auto;padding:8px 12px;scrollbar-width:none;flex-shrink:0}
.bot-chips::-webkit-scrollbar{display:none}
.bot-chips button{flex-shrink:0;padding:8px 13px;border-radius:999px;border:1.5px solid var(--g600);color:var(--g700);background:#fff;font-size:12.5px;font-weight:700;white-space:nowrap;transition:.2s}
.bot-chips button:hover,.bot-chips button:active{background:var(--g600);color:#fff}

.bot-ft{display:flex;align-items:flex-end;gap:8px;padding:8px 10px calc(10px + var(--safe-b));background:#fff;border-top:1px solid var(--line);flex-shrink:0}
.bot-ft textarea{flex:1;resize:none;border:1.5px solid var(--line);border-radius:20px;padding:10px 14px;font-size:16px;max-height:110px;outline:none;line-height:1.35;background:var(--bg);color:var(--ink);font-family:inherit}
.bot-ft textarea:focus{border-color:var(--g600);background:#fff}
.bot-ft .fb{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:.2s}
.bot-ft .send{background:var(--red);color:#fff}
.bot-ft .send:disabled{background:var(--line);color:var(--muted)}
.bot-ft .mic{background:var(--gpale);color:var(--g700)}
.bot-ft .mic.rec{background:var(--red);color:#fff;animation:pulse 1.2s infinite}
.bot-ft svg{width:20px;height:20px}
.bot-legal{font-size:10.5px;color:var(--muted);text-align:center;padding:0 12px 6px;background:#fff}

@media(min-width:1024px){
  .bot-launch{left:24px;bottom:24px}
  .bot{inset:auto auto 24px 24px;width:390px;height:min(640px,calc(100vh - 48px));border-radius:22px;overflow:hidden;box-shadow:0 30px 80px rgba(8,24,12,.35);transform:translateY(20px) scale(.96);transform-origin:left bottom}
  .bot-open .bot{transform:none}
  .bot-hd{padding-top:12px}
  .bot-hd .hb.back{display:none}
}
@media(max-width:1023px){ .bot-hd .hb.min{display:none} }
