/* ===== Chatbot Yalla Volt : tout est préfixé .yvc pour ne jamais toucher le reste du site =====
   Réutilise les variables de site.css (--bg --card --card2 --ac --ac2 --on-ac --tx --mut --bd). */
.yvc{position:fixed;right:max(16px,env(safe-area-inset-right,0px));bottom:max(16px,env(safe-area-inset-bottom,0px));z-index:30;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:15px;line-height:1.5;color:var(--tx)}
.yvc *{box-sizing:border-box}

/* --- Bouton flottant --- */
.yvc-launch{display:inline-flex;align-items:center;gap:10px;height:56px;padding:0 20px 0 16px;border:0;border-radius:99px;background:var(--ac);color:var(--on-ac);font:inherit;font-weight:800;cursor:pointer;
  box-shadow:0 12px 30px -10px rgba(0,0,0,.7),0 8px 24px -8px rgba(255,213,9,.55);transition:transform .15s,background .2s}
.yvc-launch:hover{background:var(--ac2);transform:translateY(-2px)}
.yvc-launch svg{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.yvc.open .yvc-launch{display:none}
.cs-lock .yvc{display:none}                          /* la liste déroulante mobile du formulaire passe devant */

/* --- Panneau --- */
.yvc-panel{display:flex;flex-direction:column;width:380px;max-width:calc(100vw - 32px);height:min(600px,calc(100vh - 110px));height:min(600px,calc(100dvh - 110px));
  background:var(--card);border:1px solid rgba(255,213,9,.35);border-radius:18px;overflow:hidden;box-shadow:0 30px 70px -20px rgba(0,0,0,.8);outline:0}
.yvc-panel[hidden]{display:none}
.yvc.open .yvc-panel{animation:yvcIn .18s ease-out}
@keyframes yvcIn{from{opacity:0;transform:translateY(10px)}}

.yvc-head{display:flex;align-items:center;gap:8px;padding:12px 12px 12px 16px;background:linear-gradient(180deg,#15306a,var(--card));border-bottom:1px solid var(--bd)}
.yvc-ht{flex:1;min-width:0;display:grid}
.yvc-ht b{font-size:1rem;line-height:1.25}
.yvc-ht small{color:var(--mut);font-size:.78rem}
.yvc-lang{display:flex;gap:4px}
.yvc-lang button{min-width:34px;height:30px;padding:0 8px;border:1px solid rgba(255,255,255,.2);border-radius:99px;background:transparent;color:var(--mut);font:inherit;font-size:.78rem;font-weight:700;cursor:pointer}
.yvc-lang button[aria-pressed=true]{background:var(--ac);border-color:var(--ac);color:var(--on-ac)}
.yvc-wa,.yvc-x{display:grid;place-items:center;flex:none;width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.08);color:var(--tx);cursor:pointer;padding:0}
.yvc-wa:hover,.yvc-x:hover{background:rgba(255,213,9,.18);color:var(--ac)}
.yvc-wa svg,.yvc-x svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* --- Messages --- */
.yvc-log{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth}
.yvc-m{max-width:88%;padding:10px 13px;border-radius:14px;white-space:pre-line;overflow-wrap:anywhere;font-size:.94rem}
.yvc-bot{align-self:flex-start;background:rgba(255,255,255,.07);border:1px solid var(--bd);border-bottom-left-radius:4px}
.yvc-user{align-self:flex-end;background:var(--ac);color:var(--on-ac);font-weight:600;border-bottom-right-radius:4px}
.yvc-m[dir=rtl].yvc-bot{border-bottom-left-radius:14px;border-bottom-right-radius:4px}
.yvc-m[dir=rtl].yvc-user{border-bottom-right-radius:14px;border-bottom-left-radius:4px}
.yvc-typing{display:flex;gap:5px;align-items:center;padding:13px 14px}
.yvc-typing i{width:7px;height:7px;border-radius:50%;background:var(--mut);animation:yvcDot 1s infinite ease-in-out}
.yvc-typing i:nth-child(2){animation-delay:.15s}.yvc-typing i:nth-child(3){animation-delay:.3s}
@keyframes yvcDot{0%,80%,100%{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}

/* --- Boutons de suggestion + lien d'action --- */
.yvc-chips{display:flex;flex-wrap:wrap;gap:8px;align-self:flex-start;max-width:100%}
.yvc-chips button{font:inherit;font-size:.86rem;font-weight:600;color:var(--ac);background:transparent;border:1px solid rgba(255,213,9,.5);border-radius:99px;padding:7px 13px;cursor:pointer;transition:background .15s}
.yvc-chips button:hover{background:rgba(255,213,9,.14)}
.yvc-cta{align-self:flex-start;display:inline-block;background:var(--ac);color:var(--on-ac);font-weight:800;font-size:.9rem;text-decoration:none;border-radius:10px;padding:10px 16px}
.yvc-cta:hover{background:var(--ac2)}

/* --- Saisie --- */
.yvc-form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--bd);background:var(--card)}
.yvc-form input{flex:1;min-width:0;width:auto;min-height:44px;height:44px;padding:0 14px;font-size:1rem;border-radius:99px}
.yvc-send{flex:none;width:44px;height:44px;border:0;border-radius:50%;background:var(--ac);color:var(--on-ac);display:grid;place-items:center;cursor:pointer;padding:0}
.yvc-send:hover{background:var(--ac2)}
.yvc-send:disabled{opacity:.5;cursor:default}
.yvc-send svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.yvc-note{padding:0 14px 10px;color:var(--mut);font-size:.72rem;text-align:center;background:var(--card)}

/* --- Mobile : feuille plein largeur ancrée en bas --- */
@media (max-width:640px){
  .yvc{right:max(12px,env(safe-area-inset-right,0px));bottom:max(12px,env(safe-area-inset-bottom,0px))}
  .yvc-launch{width:56px;padding:0;justify-content:center}
  .yvc-lt{display:none}
  .yvc.open{left:0;right:0;bottom:0}
  .yvc-panel{width:100%;max-width:none;height:min(78vh,640px);height:min(78dvh,640px);border-radius:18px 18px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom,0px)}
  .yvc-m{max-width:92%}
}
html.yvc-open{overflow:hidden}
@media (min-width:641px){html.yvc-open{overflow:auto}}
@media (prefers-reduced-motion:reduce){.yvc *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
