/* AIGenie Tech — Assistant d'achat IA (widget premium) */
.ag-chat-btn { position:fixed; right:24px; bottom:24px; width:60px; height:60px; border-radius:50%; border:0; cursor:pointer; z-index:1250;
  background:linear-gradient(135deg,#c9a86a,#a8843f); color:#0a0a0c; display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 30px rgba(201,168,106,.45); transition:transform .25s, box-shadow .25s; }
.ag-chat-btn:hover { transform:translateY(-3px) scale(1.04); box-shadow:0 14px 38px rgba(201,168,106,.6); }
.ag-chat-btn.is-open { transform:scale(.9); opacity:.85; }
.ag-chat-btn__pulse { position:absolute; inset:0; border-radius:50%; box-shadow:0 0 0 0 rgba(201,168,106,.55); animation:agPulse 2.4s infinite; }
@keyframes agPulse { 0%{box-shadow:0 0 0 0 rgba(201,168,106,.5);} 70%{box-shadow:0 0 0 16px rgba(201,168,106,0);} 100%{box-shadow:0 0 0 0 rgba(201,168,106,0);} }

.ag-chat { position:fixed; right:24px; bottom:96px; width:370px; max-width:calc(100vw - 32px); height:520px; max-height:calc(100vh - 130px);
  background:#fff; border-radius:14px; box-shadow:0 24px 70px rgba(0,0,0,.4); z-index:1250; display:flex; flex-direction:column; overflow:hidden;
  opacity:0; visibility:hidden; transform:translateY(20px) scale(.97); transform-origin:bottom right; transition:all .3s cubic-bezier(.16,1,.3,1); }
.ag-chat.is-open { opacity:1; visibility:visible; transform:none; }
.ag-chat__head { background:linear-gradient(135deg,#0a0a0c,#1a1a1f); color:#fff; padding:1rem 1.1rem; display:flex; align-items:center; gap:.7rem; }
.ag-chat__ava { width:38px; height:38px; border-radius:50%; background:linear-gradient(135deg,#c9a86a,#a8843f); color:#0a0a0c; display:flex; align-items:center; justify-content:center; font-size:1.1rem; flex:0 0 38px; }
.ag-chat__head strong { font-family:var(--ag-head),sans-serif; font-size:.98rem; display:block; }
.ag-chat__head span { font-size:.72rem; color:#b9b9c0; }
.ag-chat__x { margin-left:auto; background:none; border:0; color:#9a9aa2; font-size:1.5rem; line-height:1; cursor:pointer; }
.ag-chat__x:hover { color:#fff; }
.ag-chat__body { flex:1; overflow-y:auto; padding:1rem; background:#f7f7f9; display:flex; flex-direction:column; gap:.6rem; }
.ag-msg { display:flex; max-width:85%; }
.ag-msg--me { align-self:flex-end; }
.ag-msg--bot { align-self:flex-start; }
.ag-msg__b { padding:.65rem .85rem; border-radius:14px; font-size:.86rem; line-height:1.4; }
.ag-msg--bot .ag-msg__b { background:#fff; color:#222; border:1px solid #eee; border-bottom-left-radius:4px; }
.ag-msg--me .ag-msg__b { background:#0a0a0c; color:#fff; border-bottom-right-radius:4px; }
.ag-msg__cta { display:inline-block; margin-top:.5rem; background:var(--ag-gold,#c9a86a); color:#0a0a0c !important; padding:.35rem .8rem; border-radius:20px; font-size:.76rem; font-weight:700; text-decoration:none; font-family:var(--ag-head),sans-serif; }
.ag-msg__typing { display:flex; gap:4px; padding:.8rem .9rem; }
.ag-msg__typing span { width:7px; height:7px; border-radius:50%; background:#c9a86a; animation:agDot 1s infinite; }
.ag-msg__typing span:nth-child(2){animation-delay:.15s;} .ag-msg__typing span:nth-child(3){animation-delay:.3s;}
@keyframes agDot { 0%,60%,100%{opacity:.3;transform:translateY(0);} 30%{opacity:1;transform:translateY(-4px);} }
.ag-chat__chips { display:flex; flex-wrap:wrap; gap:.4rem; padding:.6rem 1rem; background:#f7f7f9; border-top:1px solid #ececef; }
.ag-chip { background:#fff; border:1px solid #e0e0e4; border-radius:20px; padding:.4rem .8rem; font-size:.76rem; cursor:pointer; color:#333; transition:all .2s; font-family:var(--ag-head),sans-serif; }
.ag-chip:hover { background:#0a0a0c; color:#fff; border-color:#0a0a0c; }
.ag-chat__form { display:flex; padding:.7rem; gap:.5rem; border-top:1px solid #ececef; background:#fff; }
.ag-chat__form input { flex:1; border:1px solid #ddd; border-radius:22px; padding:.6rem 1rem; font-size:.85rem; outline:none; }
.ag-chat__form input:focus { border-color:var(--ag-gold,#c9a86a); }
.ag-chat__form button { width:42px; height:42px; flex:0 0 42px; border-radius:50%; border:0; background:var(--ag-gold,#c9a86a); color:#0a0a0c; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .2s; }
.ag-chat__form button:hover { background:#0a0a0c; color:#fff; }

/* mode sombre */
html.ag-dark .ag-chat { background:#16161b; }
html.ag-dark .ag-chat__body, html.ag-dark .ag-chat__chips { background:#101013; }
html.ag-dark .ag-msg--bot .ag-msg__b { background:#1d1d23; color:#e0e0e4; border-color:rgba(255,255,255,.08); }
html.ag-dark .ag-chip { background:#1d1d23; color:#d6d6db; border-color:rgba(255,255,255,.12); }
html.ag-dark .ag-chat__form { background:#16161b; border-color:rgba(255,255,255,.08); }
html.ag-dark .ag-chat__form input { background:#1d1d23; color:#e6e6ea; border-color:rgba(255,255,255,.14); }

@media (max-width:767px){
  .ag-chat { right:8px; bottom:84px; width:calc(100vw - 16px); height:70vh; }
  .ag-chat-btn { width:54px; height:54px; right:16px; bottom:16px; }
}
