/* ═══ La boule de billard 8 (20/11/2026) ═══ */
.b8 { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.b8[hidden] { display: none; }
.b8 > * { pointer-events: auto; }
.b8-boule { width: 62px; height: 62px; border: 0; padding: 0; border-radius: 50%; background: none; cursor: pointer; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)) drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  animation: b8-flotte 4.5s ease-in-out infinite; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.b8-boule svg { width: 100%; height: 100%; display: block; }
/* sur fond noir, la boule noire a besoin d'un liseré et d'un halo pour se voir */
.b8-boule { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .32), 0 0 26px 2px rgba(255, 255, 255, .14); }
.b8-boule:hover { transform: scale(1.08) rotate(-8deg); }
.b8-boule:focus-visible { outline: 2px solid #f2f2f2; outline-offset: 4px; }
.b8.ouvert .b8-boule { animation: none; transform: rotate(-14deg) scale(.92); }
.b8.pense .b8-boule { animation: b8-roule 1.1s linear infinite; }
@keyframes b8-flotte { 50% { transform: translateY(-5px); } }
@keyframes b8-roule { to { transform: rotate(360deg); } }
.b8-panneau { width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 140px)); display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border-radius: 22px; background: rgba(12, 12, 14, .965); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 24px 60px rgba(0, 0, 0, .6); color: #f2f2f2;
  transform-origin: bottom right; animation: b8-deroule .28s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes b8-deroule { from { opacity: 0; transform: translateY(14px) scale(.92); } }
.b8-tete { display: flex; align-items: center; gap: 10px; }
.b8-tete b { flex: 1; font-size: 14.5px; font-weight: 600; }
.b8-mini { width: 28px; height: 28px; flex: none; } .b8-mini svg { width: 100%; height: 100%; display: block; }
.b8-fermer { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #f2f2f2; cursor: pointer; font-size: 13px; }
.b8-fermer:hover { background: rgba(255, 255, 255, .14); }
.b8-fil { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 90px; padding-right: 2px; }
.b8-msg { margin: 0; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; max-width: 94%; }
.b8-msg p { margin: 0 0 6px; } .b8-msg p:last-child { margin-bottom: 0; }
.b8-msg ol, .b8-msg ul { margin: 4px 0 6px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.b8-msg code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; background: rgba(255, 255, 255, .08); padding: 1px 5px; border-radius: 5px; }
.b8-msg.huit { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); align-self: flex-start; }
.b8-msg.moi { background: #f2f2f2; color: #000; align-self: flex-end; }
.b8-msg.attente { color: #9a9ca1; font-style: italic; border-style: dashed; }
.b8-msg.panne { color: #ff6b6b; font-style: normal; }
.b8-idees { display: flex; flex-wrap: wrap; gap: 6px; }
.b8-idee { font: inherit; font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); color: #d8d9dc; cursor: pointer; }
.b8-idee:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.b8-form { display: flex; gap: 8px; align-items: flex-end; }
.b8-champ { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .35); color: #fff; font: inherit; font-size: 14px; }
.b8-champ:focus { outline: none; border-color: #f2f2f2; }
.b8-envoyer { border: 0; border-radius: 999px; background: #f2f2f2; color: #000; font: inherit; font-weight: 600; font-size: 13px; padding: 11px 16px; cursor: pointer; }
.b8-envoyer:disabled { opacity: .5; cursor: progress; }
/* téléphone : au-dessus de la barre du bas, panneau presque pleine largeur */
@media (max-width: 760px) {
  .b8 { right: 14px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .b8-boule { width: 54px; height: 54px; }
  .b8-panneau { max-height: calc(100vh - 220px); }
}
