/* Ali Gator · v231 · Téléchargements : le bouton cliqué montre l’avancement, les autres attendent leur tour, petit message en bas.
   Retour arrière : retirer downloads-v231.css et remettre downloads-v205.js?v=2 dans index.html. */
html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all){position:relative;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  transition:background-color .2s ease,color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .15s ease,opacity .2s ease}
html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all) > .ag231-label{position:relative;z-index:1;font-variant-numeric:tabular-nums}

/* En cours : couleur pleine (pas grisé), petit cercle qui tourne, barre qui avance en bas du bouton */
html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all).is-loading{opacity:1!important;cursor:progress!important;color:#1d4a32!important;background:#eef7e6!important;
  border-color:#b9d6a3!important;box-shadow:0 0 0 3px rgba(120,176,67,.18)!important;animation:ag231-glow 1.8s ease-in-out infinite}
html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all).is-loading::before{content:"";position:relative;z-index:1;flex:none;width:14px;height:14px;box-sizing:border-box;
  border-radius:50%;border:2px solid rgba(47,122,74,.22);border-top-color:#2f7a4a;animation:ag231-spin .8s linear infinite}
html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all).is-loading::after{content:"";position:absolute;left:0;bottom:0;width:38%;height:3px;border-radius:3px;
  background:linear-gradient(90deg,rgba(120,176,67,0),#78b043,rgba(120,176,67,0));animation:ag231-slide 1.25s ease-in-out infinite}
html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all).is-loading.has-pct::after{width:var(--ag231-p,0%);background:#78b043;animation:none;transition:width .3s ease}

/* En attente : visible et calme, pas grisé */
html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all).is-waiting{opacity:1!important;cursor:default!important;color:#5f7864!important;background:#f6f9f2!important;
  border-style:dashed!important;border-color:#c9dbbd!important}
html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all).is-waiting::before{content:"";position:relative;z-index:1;flex:none;width:12px;height:12px;box-sizing:border-box;
  border-radius:50%;border:2px solid #b8caac;border-right-color:transparent;animation:ag231-spin 2.4s linear infinite}

/* Petit message en bas de l’écran */
html:root body > .ag231-toast{position:fixed;left:50%;bottom:22px;z-index:95;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;column-gap:10px;
  width:min(440px,calc(100vw - 24px));box-sizing:border-box;padding:10px 8px 13px 14px;border:1px solid #d8e6d2;border-radius:16px;overflow:hidden;
  background:rgba(255,255,255,.97);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  box-shadow:0 18px 44px -16px rgba(23,68,47,.38),0 2px 8px rgba(23,68,47,.08);
  font-family:"Hellix",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#26432f;
  opacity:0;transform:translate(-50%,12px) scale(.98);transition:opacity .22s ease,transform .28s cubic-bezier(.2,.8,.2,1)}
html:root body > .ag231-toast.is-in{opacity:1;transform:translate(-50%,0)}
html:root body > .ag231-toast .ag231-ico{width:16px;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid rgba(47,122,74,.22);border-top-color:#2f7a4a;
  animation:ag231-spin .8s linear infinite}
html:root body > .ag231-toast[data-kind="ok"] .ag231-ico,
html:root body > .ag231-toast[data-kind="err"] .ag231-ico{display:none}
html:root body > .ag231-toast .ag231-txt{min-width:0}
html:root body > .ag231-toast .ag231-txt > strong{display:block;font-size:13px;font-weight:700;line-height:1.3}
html:root body > .ag231-toast .ag231-txt > span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.35;color:#5f7864}
html:root body > .ag231-toast .ag231-txt > span:empty{display:none}
html:root body > .ag231-toast .ag231-meta{font-size:12px;font-weight:650;color:#2f5139;font-variant-numeric:tabular-nums;white-space:nowrap}
html:root body > .ag231-toast .ag231-x{display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;border-radius:8px;background:transparent;color:#7d8e7d;
  font:inherit;font-size:18px;line-height:1;cursor:pointer;transition:background-color .15s ease,color .15s ease}
html:root body > .ag231-toast .ag231-x:hover{background:#f1f5ee;color:#24533a}
html:root body > .ag231-toast .ag231-bar{position:absolute;left:0;right:0;bottom:0;height:3px;background:rgba(120,176,67,.12)}
html:root body > .ag231-toast .ag231-bar::after{content:"";position:absolute;left:0;top:0;bottom:0;width:35%;border-radius:3px;
  background:linear-gradient(90deg,rgba(120,176,67,0),#78b043,rgba(120,176,67,0));animation:ag231-slide 1.3s ease-in-out infinite}
html:root body > .ag231-toast.has-pct .ag231-bar::after{width:var(--ag231-p,0%);background:#78b043;animation:none;transition:width .3s ease}
html:root body > .ag231-toast:is([data-kind="ok"],[data-kind="err"]) .ag231-bar{display:none}
html:root body > .ag231-toast[data-kind="err"]{border-color:#f1d2c8;background:rgba(253,244,241,.98)}
html:root body > .ag231-toast[data-kind="err"] .ag231-txt > strong{color:#9a3a26}

@keyframes ag231-spin{to{transform:rotate(360deg)}}
@keyframes ag231-slide{0%{transform:translateX(-100%)}100%{transform:translateX(280%)}}
@keyframes ag231-glow{50%{box-shadow:0 0 0 5px rgba(120,176,67,.1)}}
@media (prefers-reduced-motion:reduce){
  html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all,.ag231-toast,.ag231-toast *),
  html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all,.ag231-toast .ag231-bar)::before,
  html:root body :is(.ag205-single,.ag205-all,.ag205-chat-all,.ag231-toast .ag231-bar)::after{animation-duration:2.4s!important;transition-duration:.01s!important}
}
