/* Chatbot commun : les couleurs viennent de variables --cb-* définies par le site sur un parent (valeurs par défaut ici) */
.cb { position: fixed; right: 16px; bottom: 16px; z-index: 60; font-family: inherit; }
.cb-bulle-ouvrir { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--cb-accent, #2747c4); background: var(--cb-fond, #fff); box-shadow: 0 6px 20px #0004; cursor: pointer; display: grid; place-items: center; font-size: 28px; padding: 0; position: relative; transform-origin: 50% 100%; animation: cb-saut 3s ease-in-out infinite; }
.cb-bulle-ouvrir img { border-radius: 50%; }
/* petit saut avec écrasement à l'atterrissage, toutes les 3 secondes, pour attirer l'oeil */
@keyframes cb-saut { 0%, 55%, 100% { transform: translateY(0) scale(1, 1); } 62% { transform: translateY(0) scale(1.12, .88); } 72% { transform: translateY(-70px) scale(.92, 1.12); } 82% { transform: translateY(0) scale(1.1, .9); } 88% { transform: translateY(-28px) scale(.97, 1.04); } 94% { transform: translateY(0) scale(1.04, .96); } }
.cb-bulle-ouvrir:hover { animation-play-state: paused; transform: scale(1.1); }
.cb-pastille { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; border-radius: 11px; background: #e5322d; color: #fff; font: 700 13px/22px system-ui, sans-serif; text-align: center; border: 2px solid #fff; animation: cb-pastille 1.5s ease-in-out infinite; }
@keyframes cb-pastille { 50% { transform: scale(1.2); } }
.cb-accroche { position: absolute; right: 76px; bottom: 14px; white-space: nowrap; font: inherit; font-weight: 600; font-size: .95rem; color: var(--cb-texte, #111); background: var(--cb-fond, #fff); border: 2px solid var(--cb-accent, #2747c4); border-radius: 999px; padding: .45rem 1rem; box-shadow: 0 4px 14px #0003; cursor: pointer; animation: cb-apparait .5s 1.2s both; }
.cb-accroche::after { content: ""; position: absolute; right: -9px; top: 50%; width: 14px; height: 14px; background: inherit; border-right: 2px solid var(--cb-accent, #2747c4); border-top: 2px solid var(--cb-accent, #2747c4); transform: translateY(-50%) rotate(45deg); }
@keyframes cb-apparait { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.cb-fenetre { position: absolute; right: 0; bottom: 76px; width: min(370px, calc(100vw - 32px)); height: min(520px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--cb-fond, #fff); color: var(--cb-texte, #111); border: 1px solid var(--cb-bord, #d9ddea); border-radius: 16px; box-shadow: 0 12px 40px #0005; overflow: hidden; }
.cb-tete { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; background: var(--cb-accent, #2747c4); color: var(--cb-accent-texte, #fff); }
.cb-tete img { border-radius: 50%; background: #fff; }
.cb-tete strong { flex: 1; font-size: 1rem; }
.cb-tete button { background: none; border: 0; color: inherit; font-size: 1.1rem; cursor: pointer; }
.cb-corps { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .5rem; }
.cb-bulle { margin: 0; padding: .55rem .8rem; border-radius: 14px; max-width: 88%; font-size: .95rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.cb-bot { background: var(--cb-bot, #eef0f6); align-self: flex-start; border-bottom-left-radius: 4px; }
.cb-moi { background: var(--cb-accent, #2747c4); color: var(--cb-accent-texte, #fff); align-self: flex-end; border-bottom-right-radius: 4px; }
.cb-suggestions { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.cb-suggestions button { font: inherit; font-size: .88rem; text-align: left; background: var(--cb-fond, #fff); color: var(--cb-accent, #2747c4); border: 1px solid var(--cb-accent, #2747c4); border-radius: 999px; padding: .35rem .8rem; cursor: pointer; }
.cb-suggestions button:hover { background: var(--cb-bot, #eef0f6); }
.cb-points span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: #888; animation: cb-saute 1s infinite; }
.cb-points span:nth-child(2) { animation-delay: .15s; } .cb-points span:nth-child(3) { animation-delay: .3s; }
@keyframes cb-saute { 50% { transform: translateY(-5px); } }
.cb-saisie { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--cb-bord, #d9ddea); }
.cb-saisie input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--cb-texte, #111); background: var(--cb-fond, #fff); border: 1px solid var(--cb-bord, #d9ddea); border-radius: 999px; padding: .5rem .9rem; }
.cb-saisie button { font: inherit; font-weight: 700; background: var(--cb-accent, #2747c4); color: var(--cb-accent-texte, #fff); border: 0; border-radius: 999px; padding: .5rem 1rem; cursor: pointer; }
.cb-saisie button:disabled { opacity: .5; cursor: default; }
.cb-mention { margin: 0; padding: 0 .8rem .5rem; font-size: .72rem; color: #777; text-align: center; }
@media (prefers-reduced-motion: reduce) { .cb-bulle-ouvrir, .cb-points span, .cb-pastille { animation: none; } .cb-accroche { animation: none; } }
.cb-bot a { color: inherit; text-decoration: underline; font-weight: 600; }

/* Couleurs et sens d'écriture propres à Vanguard */
.cb { --cb-accent: var(--navy); --cb-accent-texte: #fff; --cb-fond: var(--surface); --cb-texte: var(--text); --cb-bot: var(--bg-alt); --cb-bord: var(--line); }
[dir="rtl"] .cb { right: auto; left: 16px; }
[dir="rtl"] .cb-fenetre { right: auto; left: 0; }
[dir="rtl"] .cb-accroche { right: auto; left: 76px; }
[dir="rtl"] .cb-accroche::after { right: auto; left: -9px; transform: translateY(-50%) rotate(-135deg); }
.cb-fenetre[hidden] { display: none; }
