/* Ali Gator v172 — messages de la page d'un lot (erreur, reprise de connexion) : tuile flottante en bas à droite,
   à gauche du chat. Elle reste tant que le message existe (pas de croix), apparaît et s'en va en douceur
   (erreur-v172.js anime la sortie). */
@keyframes agerr-in{from{opacity:0;transform:translateY(16px) scale(.98)}}
@keyframes agerr-out{to{opacity:0;transform:translateY(12px) scale(.98)}}
@keyframes agerr-spin{to{transform:rotate(360deg)}}
html:root body{--agerr-r:22px;--agerr-b:22px}
html:root.lxc-on:not(.lxc-dock) body{--agerr-b:88px}
@media (min-width:1180px){html:root.lxc-dock body{--agerr-r:calc(var(--lxc-w,400px) + 40px)}}

html:root body:not(#lx) :is(#root section.batch-page>p.batch-error,p.agerr-leaving):not(#agerr-x){position:fixed;z-index:880;top:auto;left:auto;right:var(--agerr-r);bottom:var(--agerr-b);box-sizing:border-box;width:max-content;min-width:260px;max-width:min(420px,calc(100vw - 44px));max-height:40vh;overflow:auto;margin:0!important;padding:15px 20px 16px 64px!important;border-radius:20px!important;border:1px solid rgba(214,108,76,.22);background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(255,249,245,.95))!important;-webkit-backdrop-filter:blur(18px) saturate(1.3);backdrop-filter:blur(18px) saturate(1.3);box-shadow:inset 4px 0 0 #e0714e,0 1px 2px rgba(60,20,8,.06),0 26px 52px -24px rgba(60,20,8,.42)!important;color:#5b2c1d!important;font-size:13.5px!important;line-height:1.5!important;font-weight:500;text-align:left;animation:agerr-in .55s cubic-bezier(.22,1,.36,1) both;transition:right .6s cubic-bezier(.22,1,.36,1),bottom .45s cubic-bezier(.22,1,.36,1)}
html:root body:not(#lx) :is(#root section.batch-page>p.batch-error,p.agerr-leaving):not(#agerr-x)::before{content:'À noter';display:block;margin:0 0 4px;font:600 10.5px/1.2 var(--lx-mono,ui-monospace,monospace);letter-spacing:.14em;text-transform:uppercase;color:#c0532f}
html:root body:not(#lx) :is(#root section.batch-page>p.batch-error,p.agerr-leaving):not(#agerr-x)::after{content:'';position:absolute;left:18px;top:16px;width:30px;height:30px;border-radius:50%;background:rgba(224,113,78,.13) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 7.5v6' stroke='%23c0532f' stroke-width='2.4' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17' r='1.4' fill='%23c0532f'/%3E%3C/svg%3E") center/18px no-repeat}
/* reprise de connexion automatique : ton calme, icône qui tourne */
html:root body:not(#lx) :is(#root section.batch-page>p.batch-error[role=status],p.agerr-leaving[data-role=status]):not(#agerr-x){border-color:rgba(29,97,65,.18);box-shadow:inset 4px 0 0 #3f8f5c,0 1px 2px rgba(8,30,18,.06),0 26px 52px -24px rgba(8,30,18,.38)!important;color:#28392e!important;background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(246,251,242,.95))!important}
html:root body:not(#lx) :is(#root section.batch-page>p.batch-error[role=status],p.agerr-leaving[data-role=status]):not(#agerr-x)::before{content:'Connexion';color:#2f6a3f}
html:root body:not(#lx) :is(#root section.batch-page>p.batch-error[role=status],p.agerr-leaving[data-role=status]):not(#agerr-x)::after{background:rgba(42,122,82,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 12a8 8 0 1 1-2.34-5.66M20 4v4.5h-4.5' fill='none' stroke='%232a7a52' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;animation:agerr-spin 1.4s linear infinite}
/* deux messages à la fois : l'erreur se place au-dessus de la reprise de connexion */
html:root body:not(#lx) #root section.batch-page:has(>p.batch-error[role=status])>p.batch-error[role=alert]:not(#agerr-x){bottom:calc(var(--agerr-b) + 96px)}
/* copie qui s'en va quand le message disparaît (posée par erreur-v172.js) */
html:root body:not(#lx) p.agerr-leaving:not(#agerr-x):not(#agerr-y):not(#agerr-z){right:auto!important;bottom:auto!important;pointer-events:none;animation:agerr-out .34s cubic-bezier(.4,0,.2,1) both!important;transition:none!important}
@media (max-width:760px){
  html:root body:not(#lx) :is(#root section.batch-page>p.batch-error,p.agerr-leaving):not(#agerr-x){left:12px;right:12px;width:auto;min-width:0;max-width:none}
}
@media (prefers-reduced-motion:reduce){html:root body:not(#lx) :is(#root section.batch-page>p.batch-error,p.agerr-leaving):not(#agerr-x),html:root body:not(#lx) :is(#root section.batch-page>p.batch-error,p.agerr-leaving):not(#agerr-x)::after{animation:none!important;transition:none!important}}
