/* Ali Gator v221 — chat : la mascotte du logo qui réfléchit + carte de téléchargement Drive stable. Thème clair. */

/* ---------- 1) la mascotte exacte du logo à la place des trois points ---------- */
html:root body aside.lxc .lxc-msg.is-typing:has(> .aggt) > .lxc-dots { display: none !important; }
html:root body aside.lxc .lxc-msg.is-typing > .aggt {
  position: relative; display: inline-flex; flex: none; align-items: flex-end; justify-content: center; width: 46px; height: 50px; margin-right: 8px; vertical-align: middle;
  animation: aggt-in .45s cubic-bezier(.22, .8, .24, 1) both;
}
html:root body aside.lxc .aggt-logo {
  position: relative; z-index: 1; display: block; width: 42px; height: auto; user-select: none; pointer-events: none;
  transform-origin: 50% 96%; animation: aggt-think 2.2s cubic-bezier(.45, .05, .35, 1) infinite;
}
html:root body aside.lxc .aggt-shadow {
  position: absolute; left: 50%; bottom: 0; width: 26px; height: 5px; margin-left: -13px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(35, 77, 34, .28), rgba(35, 77, 34, 0)); animation: aggt-shadow 2.2s cubic-bezier(.45, .05, .35, 1) infinite;
}
@keyframes aggt-think {
  0%   { transform: translateY(0) rotate(0deg) scale(1, 1); }
  12%  { transform: translateY(0) rotate(0deg) scale(1.06, .92); }
  28%  { transform: translateY(-7px) rotate(-7deg) scale(.97, 1.04); }
  44%  { transform: translateY(0) rotate(0deg) scale(1.05, .94); }
  56%  { transform: translateY(0) rotate(0deg) scale(1, 1); }
  66%  { transform: translateY(-1px) rotate(5deg) scale(1, 1); }
  74%  { transform: translateY(0) rotate(-3deg) scale(1, 1); }
  82%  { transform: translateY(-1px) rotate(4deg) scale(1, 1); }
  100% { transform: translateY(0) rotate(0deg) scale(1, 1); }
}
@keyframes aggt-shadow {
  0%, 56%, 100% { transform: scaleX(1); opacity: 1; }
  12%, 44% { transform: scaleX(1.12); opacity: 1; }
  28% { transform: scaleX(.7); opacity: .55; }
}
@keyframes aggt-in { from { opacity: 0; transform: translateY(4px) scale(.9); } to { opacity: 1; transform: none; } }

/* ---------- 2) téléchargement depuis Google Drive : une carte stable ---------- */
html:root body aside.lxc[data-agdl="on"] > .lxc-max-foot { display: none !important; }
html:root body aside.lxc[data-agdl="back"] > .lxc-max-foot { animation: agdl-in .5s cubic-bezier(.22, .8, .24, 1) both; }
html:root body aside.lxc[data-agdl="on"] .lxc-chip { font-size: 0 !important; }
html:root body aside.lxc[data-agdl="on"] .lxc-chip::after { content: "Téléchargement des PDF…"; font-size: 10.5px; }
html:root body aside.lxc[data-agdl="on"] .lxc-chip::before { background: #2a7a52 !important; animation: lxc-pulse 1.2s ease-in-out infinite !important; }
html:root body aside.lxc > .agdl { flex: none; margin: 4px 18px 0; }
html:root body aside.lxc > .agdl[hidden] { display: none !important; }
html:root body aside.lxc > .agdl > .agdl-in {
  padding: 13px 14px 12px; border-radius: 18px; border: 1px solid rgb(216, 230, 210);
  background: linear-gradient(130deg, rgba(255, 255, 255, .95), rgba(244, 251, 234, .92));
  box-shadow: 0 1px 0 #fff inset, 0 10px 24px -20px rgba(35, 77, 34, .45);
}
html:root body aside.lxc .agdl-h { display: flex; align-items: center; gap: 11px; min-width: 0; }
html:root body aside.lxc .agdl-ic {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: rgba(197, 242, 111, .42); color: #1d6141; transition: background-color .4s ease, color .4s ease;
}
html:root body aside.lxc .agdl-ic svg { width: 17px; height: 17px; }
html:root body aside.lxc .agdl:not(.is-done):not(.is-stop) .agdl-ic svg { animation: agdl-drop 1.4s ease-in-out infinite; }
html:root body aside.lxc .agdl-t { display: grid; gap: 1px; min-width: 0; flex: 1; }
html:root body aside.lxc .agdl-t strong { font-size: 13.5px; font-weight: 650; color: #0c1a12; }
html:root body aside.lxc .agdl-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: #5b6b62; }
html:root body aside.lxc .agdl-n { flex: none; font-size: 13px; font-weight: 700; color: #1d6141; font-variant-numeric: tabular-nums; }
html:root body aside.lxc .agdl-track { height: 6px; margin-top: 11px; border-radius: 99px; background: rgba(29, 97, 65, .12); overflow: hidden; }
html:root body aside.lxc .agdl-track i { display: block; height: 100%; width: 4%; border-radius: inherit; background: linear-gradient(90deg, #8fd03a, #1d6141); transition: width .6s cubic-bezier(.22, .8, .24, 1); }
html:root body aside.lxc .agdl-cur { margin: 8px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: #5b6b62; }
html:root body aside.lxc .agdl-cur:empty { display: none; }
html:root body aside.lxc .agdl.is-done .agdl-ic { background: #3f9a1f; color: #fff; animation: agdl-pop .5s cubic-bezier(.3, 1.5, .5, 1) both; }
html:root body aside.lxc .agdl.is-stop .agdl-ic { background: rgba(240, 190, 80, .25); color: #7a4f06; }
@keyframes agdl-drop { 0%, 100% { transform: translateY(-1.5px); } 50% { transform: translateY(1.5px); } }
@keyframes agdl-pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes agdl-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html:root body aside.lxc :is(.aggt, .aggt-logo, .aggt-shadow, .agdl-ic svg, .agdl-ic) { animation: none !important; }
  html:root body aside.lxc[data-agdl="back"] > .lxc-max-foot { animation: none !important; }
}
