/* ============================================================
   XAU Reserve Access — Assistant de chat (widget)
   ============================================================ */
.xchat{ position: fixed; right: 20px; bottom: 20px; z-index: 120; font-family: var(--sans); }

.xchat-fab{
  position: relative; width: 60px; height: 60px; border-radius: 50%;
  border: 1px solid var(--gold-line);
  background: radial-gradient(120% 120% at 30% 20%, rgba(223,192,93,.14), transparent 60%), var(--surface);
  color: var(--gold); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 18px 40px -14px rgba(0,0,0,.75);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), border-color .25s;
}
.xchat-fab:hover{ transform: translateY(-3px); border-color: var(--gold); }
.xchat-fab svg{ width: 26px; height: 26px; }
.xchat-dot{ position: absolute; top: 13px; right: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--pos); border: 2px solid var(--ink); }

.xchat-panel{
  position: absolute; right: 0; bottom: 76px;
  width: min(370px, calc(100vw - 40px));
  height: min(560px, calc(100vh - 130px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.9);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.xchat.open .xchat-panel{ opacity: 1; transform: none; pointer-events: auto; }

.xchat-head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--ink-2); }
.xchat-title{ font-family: var(--serif); font-size: 1.15rem; color: var(--text); line-height: 1.1; }
.xchat-title small{ display: block; font-family: var(--sans); font-size: 11px; color: var(--text-3); margin-top: 4px; letter-spacing: .02em; }
.xchat-close{ background: none; border: 0; color: var(--text-3); cursor: pointer; padding: 4px; flex: none; transition: color .2s; }
.xchat-close:hover{ color: var(--text); }

.xchat-body{ padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.xmsg{ max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.xmsg.bot{ align-self: flex-start; background: var(--ink); border: 1px solid var(--line); color: var(--text-2); border-bottom-left-radius: 4px; }
.xmsg.user{ align-self: flex-end; background: var(--gold); color: #1A1407; border-bottom-right-radius: 4px; font-weight: 500; }

.xtyping{ display: inline-flex; gap: 4px; align-items: center; }
.xtyping i{ width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: xblink 1.2s infinite; }
.xtyping i:nth-child(2){ animation-delay: .2s; }
.xtyping i:nth-child(3){ animation-delay: .4s; }
@keyframes xblink{ 0%,60%,100%{ opacity: .25; } 30%{ opacity: 1; } }

.xchat-suggest{ padding: 12px 16px 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; background: var(--ink-2); max-height: 42%; overflow-y: auto; }
.xchip{ font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px; padding: 8px 13px; cursor: pointer; transition: border-color .2s, color .2s; font-family: var(--sans); text-decoration: none; }
.xchip:hover{ border-color: var(--gold); color: var(--gold); }
.xchip.cta{ background: var(--gold); color: #1A1407; border-color: transparent; font-weight: 600; }
.xchip.cta:hover{ color: #1A1407; background: var(--gold-bright); }

@media (max-width: 560px){
  .xchat{ right: 14px; bottom: 14px; }
  .xchat-fab{ width: 54px; height: 54px; }
  .xchat-panel{ bottom: 68px; height: min(70vh, 520px); }
}
@media (prefers-reduced-motion: reduce){ .xtyping i{ animation: none; } }
