/* Messagerie VSP TECH — bulle du site et de l'espace client (voir app/Views/chat_widget.php
   et public/assets/js/vsp-chat.js). Tout est préfixé #vsp-chat pour ne pas subir les styles
   de la vitrine (Bootstrap) ni de l'espace client. */

#vsp-chat {
    --vc-main: #2c3e50;
    --vc-accent: #e67e22;
    --vc-accent-ink: #ffffff;
    --vc-ink: #1d2733;
    --vc-muted: #66768a;
    --vc-line: #e6eaef;
    --vc-soft: #f3f5f8;
    --vc-bubble: #eef1f5;
    --vc-radius: 18px;
    --vc-lift: 0px;
    --vc-side: 20px;
    position: fixed;
    bottom: calc(20px + var(--vc-lift));
    right: var(--vc-side);
    z-index: 99998;
    font-family: 'Plus Jakarta Sans', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--vc-ink);
    -webkit-font-smoothing: antialiased;
}
#vsp-chat.vc-left { right: auto; left: var(--vc-side); }
#vsp-chat *, #vsp-chat *::before, #vsp-chat *::after { box-sizing: border-box; }
#vsp-chat [hidden] { display: none !important; }
#vsp-chat button { font: inherit; color: inherit; margin: 0; cursor: pointer; text-transform: none; letter-spacing: normal; }
#vsp-chat h2, #vsp-chat h3, #vsp-chat p { margin: 0; letter-spacing: normal; text-transform: none; }
#vsp-chat a { color: inherit; text-decoration: none; }
#vsp-chat svg { display: block; flex-shrink: 0; }
#vsp-chat :focus-visible { outline: 2px solid var(--vc-accent); outline-offset: 2px; }
.vc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Bouton flottant ---------- */
#vsp-chat .vc-launcher {
    width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0;
    background: var(--vc-accent); color: var(--vc-accent-ink);
    box-shadow: 0 10px 28px rgba(16, 24, 40, .28), 0 2px 6px rgba(16, 24, 40, .16);
    display: flex; align-items: center; justify-content: center; position: relative;
    transition: transform .18s ease, box-shadow .18s ease;
}
#vsp-chat .vc-launcher:hover { transform: scale(1.06); box-shadow: 0 14px 34px rgba(16, 24, 40, .32); }
#vsp-chat .vc-launcher svg { width: 28px; height: 28px; transition: transform .2s ease, opacity .2s ease; }
#vsp-chat .vc-launcher .vc-ico-close { position: absolute; opacity: 0; transform: rotate(-60deg) scale(.6); width: 22px; height: 22px; }
#vsp-chat.vc-open .vc-launcher .vc-ico-chat { opacity: 0; transform: rotate(60deg) scale(.6); }
#vsp-chat.vc-open .vc-launcher .vc-ico-close { opacity: 1; transform: none; }
#vsp-chat .vc-badge {
    position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px; padding: 0 6px;
    border-radius: 11px; background: #e5484d; color: #fff; font-size: 11.5px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}

/* ---------- Panneau ---------- */
#vsp-chat .vc-panel {
    position: absolute; bottom: 74px; right: 0;
    width: 380px; height: min(640px, calc(100vh - 120px)); height: min(640px, calc(100dvh - 120px));
    background: #fff; border-radius: var(--vc-radius); overflow: hidden;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .22), 0 4px 14px rgba(16, 24, 40, .1);
    display: flex; flex-direction: column;
    transform-origin: bottom right; animation: vcIn .22s cubic-bezier(.2, .9, .3, 1.1);
}
#vsp-chat.vc-left .vc-panel { right: auto; left: 0; transform-origin: bottom left; }
@keyframes vcIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

#vsp-chat .vc-views { flex: 1 1 auto; min-height: 0; position: relative; }
#vsp-chat .vc-view { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; }
#vsp-chat .vc-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#vsp-chat .vc-scroll::-webkit-scrollbar { width: 6px; }
#vsp-chat .vc-scroll::-webkit-scrollbar-thumb { background: #d6dce3; border-radius: 6px; }

/* Boutons d'icône (fermer, retour…) */
#vsp-chat .vc-icon-btn {
    width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent;
    display: inline-flex; align-items: center; justify-content: center; color: inherit; flex-shrink: 0;
}
#vsp-chat .vc-icon-btn:hover { background: rgba(127, 140, 156, .14); }
#vsp-chat .vc-icon-btn svg { width: 20px; height: 20px; }

/* ---------- Barre d'onglets ---------- */
#vsp-chat .vc-tabs {
    display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--vc-line);
    background: #fff; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); flex-shrink: 0;
}
#vsp-chat .vc-tab {
    border: 0; background: transparent; padding: 7px 4px 6px; border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 12.5px; font-weight: 600; color: var(--vc-muted); position: relative;
}
#vsp-chat .vc-tab svg { width: 23px; height: 23px; }
#vsp-chat .vc-tab:hover { color: var(--vc-ink); }
#vsp-chat .vc-tab[aria-selected="true"] { color: var(--vc-accent); }
#vsp-chat .vc-tab .vc-dot { position: absolute; top: 5px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: #e5484d; border: 2px solid #fff; }

/* ---------- Accueil ---------- */
#vsp-chat .vc-home-head {
    color: #fff; padding: 18px 20px 72px;
    background: var(--vc-main);
    background:
        radial-gradient(420px 220px at 105% -10%, color-mix(in srgb, var(--vc-accent) 38%, transparent), transparent 70%),
        linear-gradient(160deg, var(--vc-main) 0%, color-mix(in srgb, var(--vc-main) 78%, #000) 100%);
}
#vsp-chat .vc-home-top { display: flex; align-items: center; gap: 10px; min-height: 40px; }
#vsp-chat .vc-logo { height: 38px; width: auto; max-width: 130px; object-fit: contain; }
#vsp-chat .vc-team { display: flex; margin-left: auto; }
#vsp-chat .vc-team span {
    width: 32px; height: 32px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--vc-main) 85%, #000);
    background: #f4f6f9; color: var(--vc-main); font-size: 11.5px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; margin-left: -8px;
}
#vsp-chat .vc-team span:nth-child(2) { background: var(--vc-accent); color: #fff; }
#vsp-chat .vc-team span:nth-child(3) { background: #9fb3c8; color: #13202d; }
#vsp-chat .vc-home-head .vc-icon-btn { color: #fff; }
#vsp-chat .vc-home-head .vc-icon-btn:hover { background: rgba(255, 255, 255, .14); }
#vsp-chat .vc-team + .vc-icon-btn { margin-left: 4px; }
#vsp-chat .vc-hello { margin-top: 30px; font-size: 27px; line-height: 1.22; font-weight: 800; letter-spacing: -.3px; color: #fff; font-family: inherit; }
#vsp-chat .vc-hello span { display: block; }
#vsp-chat .vc-hello .vc-hello-1 { color: #fff; }
#vsp-chat .vc-hello .vc-hello-2 { color: rgba(255, 255, 255, .72); }

#vsp-chat .vc-home-body { padding: 0 16px 18px; margin-top: -56px; display: flex; flex-direction: column; gap: 12px; position: relative; }
#vsp-chat .vc-card {
    background: #fff; border-radius: 14px; border: 1px solid var(--vc-line);
    box-shadow: 0 6px 18px rgba(16, 24, 40, .08); width: 100%; text-align: left;
}
#vsp-chat button.vc-card { padding: 15px 16px; display: flex; align-items: center; gap: 12px; transition: box-shadow .15s ease, transform .15s ease; }
#vsp-chat button.vc-card:hover { box-shadow: 0 10px 24px rgba(16, 24, 40, .13); transform: translateY(-1px); }
#vsp-chat .vc-card-title { font-weight: 700; font-size: 14.5px; color: var(--vc-ink); }
#vsp-chat .vc-card-sub { font-size: 13px; color: var(--vc-muted); margin-top: 2px; display: block; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#vsp-chat .vc-card-main { flex: 1 1 auto; min-width: 0; }
#vsp-chat .vc-card-icon { color: var(--vc-accent); }
#vsp-chat .vc-card-icon svg { width: 22px; height: 22px; }
#vsp-chat .vc-start .vc-unread { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; flex-shrink: 0; }

#vsp-chat .vc-find { padding: 8px; }
#vsp-chat .vc-search {
    display: flex; align-items: center; gap: 8px; background: var(--vc-soft); border-radius: 10px;
    padding: 0 12px; border: 1px solid transparent;
}
#vsp-chat .vc-search:focus-within { border-color: var(--vc-accent); background: #fff; }
#vsp-chat .vc-search input {
    flex: 1 1 auto; min-width: 0; border: 0; background: transparent; outline: none; box-shadow: none;
    padding: 11px 0; font: inherit; font-size: 14.5px; color: var(--vc-ink); margin: 0; height: auto;
}
#vsp-chat .vc-search input::placeholder { color: #8796a7; }
#vsp-chat .vc-search svg { width: 18px; height: 18px; color: var(--vc-accent); }
#vsp-chat .vc-list { list-style: none; margin: 4px 0 0; padding: 0; }
#vsp-chat .vc-row {
    width: 100%; border: 0; background: transparent; text-align: left; border-radius: 10px;
    padding: 11px 10px; display: flex; align-items: center; gap: 10px; color: var(--vc-ink);
}
#vsp-chat .vc-row:hover { background: var(--vc-soft); }
#vsp-chat .vc-row-main { flex: 1 1 auto; min-width: 0; }
#vsp-chat .vc-row-title { font-size: 14px; font-weight: 500; display: block; }
#vsp-chat .vc-row-sub { font-size: 12.5px; color: var(--vc-muted); display: block; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#vsp-chat .vc-chevron { width: 16px; height: 16px; color: var(--vc-accent); }
#vsp-chat .vc-status-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--vc-muted); padding: 2px 6px; }
#vsp-chat .vc-pulse { width: 8px; height: 8px; border-radius: 50%; background: #9aa6b4; flex-shrink: 0; }
#vsp-chat .vc-pulse.on { background: #22a35a; box-shadow: 0 0 0 3px rgba(34, 163, 90, .18); }
#vsp-chat .vc-wa { display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
#vsp-chat .vc-wa svg { width: 22px; height: 22px; color: #1f9d55; }

/* ---------- Barres de titre (Messages, Aide, article) ---------- */
#vsp-chat .vc-bar {
    display: flex; align-items: center; gap: 6px; padding: 10px 10px; border-bottom: 1px solid var(--vc-line);
    min-height: 58px; flex-shrink: 0; background: #fff;
}
#vsp-chat .vc-bar h2 { flex: 1 1 auto; text-align: center; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#vsp-chat .vc-bar .vc-spacer { width: 36px; flex-shrink: 0; }
#vsp-chat .vc-pad { padding: 14px 16px 18px; }
#vsp-chat .vc-empty { text-align: center; padding: 56px 24px 24px; color: var(--vc-muted); }
#vsp-chat .vc-empty svg { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--vc-ink); }
#vsp-chat .vc-empty strong { display: block; color: var(--vc-ink); font-size: 16px; margin-bottom: 4px; }
#vsp-chat .vc-loading { text-align: center; color: var(--vc-muted); padding: 30px 0; font-size: 13px; }
#vsp-chat .vc-cta { padding: 12px 16px 16px; display: flex; justify-content: center; flex-shrink: 0; }
#vsp-chat .vc-pill {
    border: 0; border-radius: 999px; padding: 11px 20px; background: var(--vc-accent); color: var(--vc-accent-ink);
    font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--vc-accent) 35%, transparent);
}
#vsp-chat .vc-pill:hover { filter: brightness(.95); }
#vsp-chat .vc-pill svg { width: 16px; height: 16px; }
#vsp-chat .vc-conv-item { padding: 12px 14px; border-bottom: 1px solid var(--vc-line); border-radius: 0; }
#vsp-chat .vc-conv-item .vc-row-title { font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
#vsp-chat .vc-conv-item time { margin-left: auto; font-size: 12px; color: var(--vc-muted); font-weight: 400; flex-shrink: 0; }
#vsp-chat .vc-conv-item.unread .vc-row-sub { color: var(--vc-ink); font-weight: 600; }
#vsp-chat .vc-section-title { font-size: 13px; font-weight: 700; color: var(--vc-muted); margin: 14px 4px 4px; }
#vsp-chat .vc-cat .vc-row-title { font-weight: 600; }
#vsp-chat .vc-cat .vc-count { font-size: 12.5px; color: var(--vc-muted); display: block; margin-top: 3px; }

/* Article */
#vsp-chat .vc-article { padding: 18px 20px 24px; font-size: 14.5px; line-height: 1.6; color: #2b3644; overflow-wrap: anywhere; }
#vsp-chat .vc-article h1 { font-size: 21px; line-height: 1.3; margin: 0 0 14px; color: var(--vc-ink); font-weight: 800; }
#vsp-chat .vc-article h2, #vsp-chat .vc-article h3, #vsp-chat .vc-article h4 { font-size: 16px; margin: 18px 0 8px; color: var(--vc-ink); font-weight: 700; }
#vsp-chat .vc-article p { margin: 0 0 12px; }
#vsp-chat .vc-article ul, #vsp-chat .vc-article ol { padding-left: 20px; margin: 0 0 12px; }
#vsp-chat .vc-article a { color: color-mix(in srgb, var(--vc-accent) 80%, #000); text-decoration: underline; }
#vsp-chat .vc-article img { max-width: 100%; height: auto; border-radius: 8px; }
#vsp-chat .vc-article pre, #vsp-chat .vc-article code { background: var(--vc-soft); border-radius: 6px; font-size: 13px; }
#vsp-chat .vc-article pre { padding: 10px; overflow-x: auto; white-space: pre-wrap; }
#vsp-chat .vc-article table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
#vsp-chat .vc-article td, #vsp-chat .vc-article th { border: 1px solid var(--vc-line); padding: 6px 8px; }
#vsp-chat .vc-article-foot { border-top: 1px solid var(--vc-line); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--vc-muted); flex-shrink: 0; }
#vsp-chat .vc-link { color: color-mix(in srgb, var(--vc-accent) 85%, #000); font-weight: 600; border: 0; background: none; padding: 0; text-decoration: underline; }

/* ---------- Conversation ---------- */
#vsp-chat .vc-conv-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px; border-bottom: 1px solid var(--vc-line); min-height: 62px; flex-shrink: 0; background: #fff; }
#vsp-chat .vc-who { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; }
#vsp-chat .vc-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: var(--vc-main); color: #fff; font-size: 12px; font-weight: 800; position: relative;
}
#vsp-chat .vc-avatar.bot { background: var(--vc-accent); background: linear-gradient(135deg, var(--vc-accent), color-mix(in srgb, var(--vc-accent) 70%, #7a2b00)); }
#vsp-chat .vc-avatar svg { width: 19px; height: 19px; }
#vsp-chat .vc-avatar .vc-pulse { position: absolute; right: -1px; bottom: -1px; border: 2px solid #fff; width: 11px; height: 11px; box-shadow: none; }
#vsp-chat .vc-who-name { font-weight: 700; font-size: 15px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#vsp-chat .vc-who-sub { font-size: 12.5px; color: var(--vc-muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#vsp-chat .vc-human { border: 1px solid var(--vc-line); background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--vc-ink); }
#vsp-chat .vc-human:hover { border-color: var(--vc-accent); color: color-mix(in srgb, var(--vc-accent) 80%, #000); }

#vsp-chat .vc-thread { padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 4px; }
#vsp-chat .vc-intro { text-align: center; font-size: 12.5px; color: var(--vc-muted); margin: 4px 16px 14px; line-height: 1.5; }
#vsp-chat .vc-day { text-align: center; font-size: 11.5px; color: #8796a7; font-weight: 600; margin: 12px 0 6px; }
#vsp-chat .vc-msg { display: flex; flex-direction: column; max-width: 84%; }
#vsp-chat .vc-msg.in { align-self: flex-start; }
#vsp-chat .vc-msg.out { align-self: flex-end; align-items: flex-end; }
#vsp-chat .vc-bubble {
    padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word;
}
#vsp-chat .vc-msg.in .vc-bubble { background: var(--vc-bubble); color: var(--vc-ink); border-bottom-left-radius: 6px; }
#vsp-chat .vc-msg.out .vc-bubble { background: var(--vc-accent); color: var(--vc-accent-ink); border-bottom-right-radius: 6px; }
#vsp-chat .vc-msg.out .vc-bubble a { color: inherit; text-decoration: underline; }
#vsp-chat .vc-msg.in .vc-bubble a { color: color-mix(in srgb, var(--vc-accent) 80%, #000); text-decoration: underline; }
#vsp-chat .vc-msg.grouped .vc-bubble { margin-top: -1px; }
#vsp-chat .vc-meta { font-size: 11.5px; color: #8796a7; margin: 4px 4px 8px; }
#vsp-chat .vc-meta.err { color: #c62828; }
#vsp-chat .vc-meta .vc-link { font-size: 11.5px; }
#vsp-chat .vc-msg.pending .vc-bubble { opacity: .7; }
#vsp-chat .vc-img { display: block; max-width: 100%; max-height: 240px; border-radius: 12px; margin: 2px 0; cursor: zoom-in; }
#vsp-chat .vc-typing { display: inline-flex; gap: 4px; padding: 13px 16px; }
#vsp-chat .vc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8796a7; display: block; animation: vcDot 1.2s infinite ease-in-out; }
#vsp-chat .vc-typing i:nth-child(2) { animation-delay: .15s; }
#vsp-chat .vc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes vcDot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
#vsp-chat .vc-closed { text-align: center; font-size: 12px; color: var(--vc-muted); background: var(--vc-soft); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }

/* Carte d'identification (visiteur non connecté, avant le 1er message) */
#vsp-chat .vc-identify { align-self: stretch; background: #fff; border: 1px solid var(--vc-line); border-radius: 14px; padding: 14px; margin: 6px 0 10px; box-shadow: 0 4px 14px rgba(16, 24, 40, .06); }
#vsp-chat .vc-identify p { font-size: 13.5px; color: var(--vc-ink); margin-bottom: 10px; }
#vsp-chat .vc-identify .vc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#vsp-chat .vc-field { display: block; margin-bottom: 8px; }
#vsp-chat .vc-field span { display: block; font-size: 12px; font-weight: 600; color: var(--vc-muted); margin-bottom: 3px; }
#vsp-chat .vc-field input {
    width: 100%; border: 1px solid #d6dde5; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px;
    color: var(--vc-ink); background: #fff; outline: none; box-shadow: none; margin: 0; height: auto;
}
#vsp-chat .vc-field input:focus { border-color: var(--vc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vc-accent) 18%, transparent); }
#vsp-chat .vc-identify .vc-err { color: #c62828; font-size: 12.5px; margin: 2px 0 8px; }
#vsp-chat .vc-identify .vc-pill { width: 100%; justify-content: center; }
#vsp-chat .vc-identify .vc-hint { font-size: 11.5px; color: #8796a7; margin: 8px 0 0; }

/* Réponses rapides */
#vsp-chat .vc-quick { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 6px 14px 10px; flex-shrink: 0; }
#vsp-chat .vc-chip {
    border-radius: 999px; padding: 9px 14px; font-size: 13.5px; font-weight: 600; line-height: 1.25; text-align: right;
    border: 1.5px solid var(--vc-accent); background: #fff; color: color-mix(in srgb, var(--vc-accent) 82%, #000);
    max-width: 100%;
}
#vsp-chat .vc-chip:hover { background: color-mix(in srgb, var(--vc-accent) 8%, #fff); }
#vsp-chat .vc-chip.solid { background: var(--vc-accent); color: var(--vc-accent-ink); }
#vsp-chat .vc-chip.solid:hover { filter: brightness(.95); }

/* Saisie */
#vsp-chat .vc-composer {
    display: flex; align-items: flex-end; gap: 6px; border-top: 1px solid var(--vc-line); background: #fff;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); flex-shrink: 0;
}
#vsp-chat .vc-composer textarea {
    flex: 1 1 auto; min-width: 0; resize: none; border: 0; outline: none; box-shadow: none; background: transparent;
    font: inherit; font-size: 15px; line-height: 1.4; color: var(--vc-ink); padding: 9px 6px; max-height: 120px; margin: 0; height: auto;
}
#vsp-chat .vc-composer textarea::placeholder { color: #8796a7; }
#vsp-chat .vc-send {
    width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--vc-accent); color: var(--vc-accent-ink);
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
#vsp-chat .vc-send:disabled { background: #d6dde5; color: #fff; cursor: default; }
#vsp-chat .vc-send svg { width: 18px; height: 18px; }
#vsp-chat .vc-attach { color: var(--vc-muted); }
#vsp-chat .vc-counter { font-size: 11px; color: var(--vc-muted); align-self: center; }
#vsp-chat .vc-counter.over { color: #c62828; font-weight: 700; }

/* ---------- Mobile : plein écran ---------- */
@media (max-width: 576px) {
    #vsp-chat { --vc-side: 14px; bottom: calc(14px + var(--vc-lift) + env(safe-area-inset-bottom)); }
    #vsp-chat .vc-launcher { width: 54px; height: 54px; }
    #vsp-chat .vc-panel {
        position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; bottom: auto; right: auto;
        animation: vcInUp .22s ease;
    }
    #vsp-chat.vc-open .vc-launcher { display: none; }
    #vsp-chat .vc-hello { font-size: 25px; margin-top: 24px; }
    #vsp-chat .vc-search input, #vsp-chat .vc-composer textarea, #vsp-chat .vc-field input { font-size: 16px; }
    #vsp-chat .vc-icon-btn { width: 42px; height: 42px; }
}
@keyframes vcInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (max-width: 360px) {
    #vsp-chat .vc-identify .vc-two { grid-template-columns: 1fr; gap: 0; }
    #vsp-chat .vc-hello { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
    #vsp-chat .vc-panel, #vsp-chat .vc-launcher, #vsp-chat .vc-typing i { animation: none !important; transition: none !important; }
}
/* Pas d'impression de la bulle */
@media print { #vsp-chat { display: none !important; } }

/* « Parler à un conseiller » mis en avant quand l'assistant n'a pas trouvé la réponse dans les articles */
#vsp-chat .vc-human.is-suggested { background: var(--vc-accent, #e67e22); border-color: var(--vc-accent, #e67e22); color: #fff; animation: vc-human-pulse 1.6s ease-in-out 3; }
@keyframes vc-human-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, .45); } 50% { box-shadow: 0 0 0 8px rgba(230, 126, 34, 0); } }
@media (prefers-reduced-motion: reduce) { .vc-human.is-suggested { animation: none; } }
