/*
 * F31 : effets des cosmétiques (bannières et cadres animés, pseudo stylé, raretés).
 * Les classes viennent de site/js/cosmetiques-fx.js ; rien ne bouge si l'utilisateur réduit les animations.
 */
@keyframes fx-monte { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-140%); opacity: 0; } }
@keyframes fx-eclair { 0%, 86%, 100% { opacity: 0; } 87% { opacity: .9; } 88% { opacity: .15; } 90% { opacity: .75; } 93% { opacity: 0; } }
@keyframes fx-neon { 0%, 100% { box-shadow: inset 0 0 0 2px #ff3a47, inset 0 0 26px rgb(255 58 71 / .55); } 48% { box-shadow: inset 0 0 0 2px #ff3a47, inset 0 0 26px rgb(255 58 71 / .55); } 50% { box-shadow: inset 0 0 0 2px rgb(255 58 71 / .3), inset 0 0 6px rgb(255 58 71 / .2); } 53% { box-shadow: inset 0 0 0 2px #ff3a47, inset 0 0 34px rgb(255 58 71 / .7); } }
@keyframes fx-tourne { to { transform: rotate(1turn); } }
@keyframes fx-bat { 0%, 100% { transform: scale(1); opacity: .9; } 15% { transform: scale(1.12); opacity: 1; } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }
@keyframes fx-reflet { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes fx-ondule { to { background-position: 200% 0; } }
@keyframes fx-feu { 0%, 100% { text-shadow: 0 0 6px #ff7a18, 0 -2px 10px #ff3a47; } 50% { text-shadow: 0 0 10px #fbbf24, 0 -4px 16px #ff3a47; } }

/* ---------- Bannières animées : un calque par-dessus le fond ---------- */
.fx-ban { position: relative; isolation: isolate; overflow: hidden; }
.fx-ban::before, .fx-ban::after { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none; }
.fx-ban > * { position: relative; z-index: 1; }
.fx-braises::before {
  inset: auto 0 -40% 0; height: 140%;
  background:
    radial-gradient(3px 3px at 12% 90%, #ffb347, transparent), radial-gradient(2px 2px at 28% 80%, #ff7a18, transparent),
    radial-gradient(3px 3px at 45% 95%, #fbbf24, transparent), radial-gradient(2px 2px at 63% 85%, #ff3a47, transparent),
    radial-gradient(3px 3px at 78% 92%, #ffb347, transparent), radial-gradient(2px 2px at 90% 82%, #ff7a18, transparent);
  animation: fx-monte 3.2s linear infinite;
}
.fx-braises::after {
  inset: auto 0 -40% 0; height: 140%;
  background:
    radial-gradient(2px 2px at 20% 88%, #fbbf24, transparent), radial-gradient(3px 3px at 52% 84%, #ff7a18, transparent),
    radial-gradient(2px 2px at 70% 96%, #ffb347, transparent), radial-gradient(3px 3px at 86% 90%, #ff3a47, transparent);
  animation: fx-monte 4.4s linear 1.4s infinite;
}
.fx-orage::before { background: linear-gradient(105deg, transparent 40%, rgb(190 215 255 / .9) 44%, transparent 47%, transparent 58%, rgb(190 215 255 / .5) 60%, transparent 62%); animation: fx-eclair 4s linear infinite; mix-blend-mode: screen; }
.fx-orage::after { background: radial-gradient(circle at 30% 20%, rgb(120 160 255 / .35), transparent 60%); animation: fx-eclair 4s linear .12s infinite; }
.fx-neon { animation: fx-neon 3s steps(1) infinite; }
.fx-neon::before { inset: 10% 8%; border: 2px solid rgb(255 58 71 / .55); border-radius: 12px; filter: blur(.5px); }

/* ---------- Cadres animés : un anneau autour de l'avatar ---------- */
.fx-anneau { position: relative; display: inline-grid; place-items: center; border-radius: 50%; }
.fx-anneau::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; pointer-events: none; }
.fx-cadre-pulse::before { border: 3px solid var(--fx-c, #ff2b38); box-shadow: 0 0 16px var(--fx-c, #ff2b38); animation: fx-bat 1.4s ease-in-out infinite; }
.fx-cadre-arc::before, .fx-cadre-aura::before {
  padding: 4px; animation: fx-tourne 2.2s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.fx-cadre-arc::before { background: conic-gradient(from 0deg, transparent 0 55%, #38bdf8 75%, #e0f2fe 82%, transparent 90%); filter: drop-shadow(0 0 6px #38bdf8); }
.fx-cadre-aura::before { background: conic-gradient(#fbbf24, #fff1a8, #f59e0b, #fbbf24, #fff1a8, #fbbf24); filter: drop-shadow(0 0 10px rgb(251 191 36 / .8)); animation-duration: 4s; }

/* ---------- Pseudo stylé ---------- */
.pseudo-fx { display: inline; font-weight: 800; }
.pseudo-fx[data-fx="brillant"] { background: linear-gradient(110deg, #fff 35%, #9db0c8 45%, #fff 50%, #fff 100%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-reflet 2.8s linear infinite; }
.pseudo-fx[data-fx="degrade"] { background: linear-gradient(90deg, #ff3a47, #fbbf24, #ff3a47) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-ondule 3s linear infinite; }
.pseudo-fx[data-fx="flamme"] { color: #ffd08a; animation: fx-feu 1.2s ease-in-out infinite; }
.pseudo-fx[data-fx="flamme"]::after { content: "🔥"; margin-left: 3px; font-size: .85em; }

/* ---------- Raretés ---------- */
.rarete-b { justify-self: start; width: fit-content; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--r) 18%, transparent); border: 1px solid color-mix(in srgb, var(--r) 55%, transparent); color: var(--r); font: 800 11px/1.3 var(--f-titre); letter-spacing: .05em; text-transform: uppercase; }
.r-commun { --r: #9db0c8; }
.r-rare { --r: #38bdf8; }
.r-epique { --r: #a855f7; }
.r-legendaire { --r: #fbbf24; }
html.da2 .article[data-rarete="epique"] { border-color: rgb(168 85 247 / .45); }
html.da2 .article[data-rarete="legendaire"] { border-color: rgb(251 191 36 / .55); box-shadow: 0 0 0 1px rgb(251 191 36 / .15), 0 14px 34px rgb(251 191 36 / .12); }
.vitrine .pseudo-apercu { font: 800 24px/1.2 var(--f-titre); }

@media (prefers-reduced-motion: reduce) {
  .fx-ban::before, .fx-ban::after, .fx-neon, .fx-anneau::before, .pseudo-fx { animation: none !important; }
}
