/* ===== Catalogue fournisseur trié par région ===== */
.section-tile--regions .section-tile__art { background: radial-gradient(circle at 80% 25%, rgba(225, 29, 72, .9) 0, transparent 55%), radial-gradient(circle at 15% 85%, #0ea5e9 0, transparent 60%), #141a26; }
.pu-search { width: 100%; margin: .4rem 0 .8rem; padding: .8rem 1rem; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.pu-search:focus { outline: 2px solid rgba(225, 29, 72, .5); outline-offset: 0; }
#puBlock { min-width: 0; max-width: 100%; }
#puBlock > * { min-width: 0; }
.pu-regions { width: 100%; max-width: 100%; display: flex; gap: .5rem; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .4rem; scrollbar-width: thin; }
.pu-regions .chip { flex: none; white-space: nowrap; }
.pu-regions .chip small { opacity: .6; margin-left: .25rem; }
.pu-group { margin: 1.2rem 0 .4rem; font-size: 1.05rem; }
.pu-grid { margin-top: .6rem; }
.pu-grid .card__title { font-size: 1.05rem; }
.pu-loading { display: flex; align-items: center; gap: .7rem; padding: 2rem 0; color: var(--muted); }

/* Écran de livraison : rien ne dépasse sur téléphone */
.delivery, .delivery > *, .code > * { min-width: 0; }
.delivery { grid-template-columns: minmax(0, 1fr); }
.delivery__ref { flex-wrap: wrap; }
.code { grid-template-columns: minmax(0, 1fr) auto; }

/* ===== Fenêtre d'achat animée (même style que la connexion) ===== */
.modal:has(.pux), .modal:has(.pux-done) {
  --ax-bg: #161b26; --ax-hi: #212a3b; --ax-lo: #0a0d13; --ax-red: 225, 29, 72;
  --ax-out: 8px 8px 18px var(--ax-lo), -8px -8px 18px var(--ax-hi);
  --ax-outS: 4px 4px 9px var(--ax-lo), -4px -4px 9px var(--ax-hi);
  --ax-in: inset 4px 4px 9px var(--ax-lo), inset -4px -4px 9px var(--ax-hi);
  background: var(--ax-bg); border: 0; overflow: hidden auto; max-height: calc(100dvh - 24px); perspective: 1400px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(var(--ax-red), .12);
  width: min(440px, calc(100% - 24px));
}
.pux { position: relative; display: grid; gap: .85rem; padding-top: .8rem; transform-origin: center; }
.pux > :not(.ax-bubble) { position: relative; z-index: 1; }
/* Entrée : la carte se retourne puis les éléments arrivent un par un */
.pux--intro { animation: puxIn .8s cubic-bezier(.7, -.2, .3, 1.2) both; }
.pux--intro > :not(.ax-bubble) { opacity: 0; transform: translateY(12px); animation: axRise .5s var(--ease-out, ease) forwards; }
.pux--intro > :nth-child(3) { animation-delay: .25s; } .pux--intro > :nth-child(4) { animation-delay: .3s; }
.pux--intro > :nth-child(5) { animation-delay: .35s; } .pux--intro > :nth-child(6) { animation-delay: .4s; }
.pux--intro > :nth-child(7) { animation-delay: .45s; } .pux--intro > :nth-child(8) { animation-delay: .5s; }
.pux--intro > :nth-child(9) { animation-delay: .55s; } .pux--intro > :nth-child(n+10) { animation-delay: .6s; }
@keyframes puxIn { from { transform: rotateY(-100deg); opacity: 0; } 40% { opacity: 1; } }
/* Sortie vers l'écran suivant */
.pux--out { animation: puxOut .38s ease-in forwards; }
@keyframes puxOut { to { transform: rotateY(90deg); opacity: .2; } }
.pux-flipin { animation: puxFlipIn .75s cubic-bezier(.3, 1.3, .5, 1) both; transform-origin: center; }
@keyframes puxFlipIn { from { transform: rotateY(-90deg); opacity: .2; } }

.pux-avatar { width: 66px; height: 66px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem;
  box-shadow: var(--ax-outS); animation: axPulse 2.6s ease-in-out infinite; }
.pux--intro .pux-avatar { animation: axRise .5s var(--ease-out, ease) forwards, axPulse 2.6s ease-in-out .6s infinite; }
.pux-title { margin: 0; text-align: center; font-size: 1.45rem; }
.pux-sub { margin-top: -.55rem; text-align: center; color: var(--muted); font-size: .85rem; }
.pux-field { display: grid; gap: .4rem; }
.pux-field small { color: var(--muted); font-size: .8rem; padding-inline: .3rem; }
.pux input:not([type=radio]) { width: 100%; border: 0; outline: 0; background: var(--ax-bg); color: var(--text); font-size: 16px;
  border-radius: 13px; padding: .85rem 1rem; box-shadow: var(--ax-outS); transition: box-shadow .3s; }
.pux input:not([type=radio])::placeholder { color: var(--muted); }
.pux input:not([type=radio]):focus { box-shadow: var(--ax-in), 0 0 0 1px rgba(var(--ax-red), .4); }
.pux-uid { display: flex; gap: .6rem; align-items: center; }
.pux-round { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ax-bg); box-shadow: var(--ax-outS);
  color: rgb(var(--ax-red)); font-size: 1.1rem; font-weight: 800; transition: box-shadow .2s, scale .2s; }
.pux-round:active { box-shadow: var(--ax-in); scale: .92; }
.pux-round.is-loading { color: transparent; background: conic-gradient(rgb(var(--ax-red)) 0 25%, transparent 0) border-box; animation: axSpin .8s linear infinite; }
.pux-qty { grid-template-columns: 1fr auto; align-items: center; padding: .2rem .3rem; }
.pux-qty .stepper { box-shadow: var(--ax-outS); border-radius: 12px; border: 0; background: var(--ax-bg); }
.pux-qty .stepper input { box-shadow: none !important; width: 3.2rem; text-align: center; padding: .6rem .2rem; }
.pux-sum { display: grid; gap: .3rem; padding: .8rem 1rem; border-radius: 13px; box-shadow: var(--ax-in); }
.pux-pay { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.pux-opt { position: relative; display: block; padding: .75rem .8rem; border-radius: 13px; cursor: pointer; box-shadow: var(--ax-outS); transition: box-shadow .25s; }
.pux-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pux-opt strong { display: block; font-size: .9rem; }
.pux-opt small { display: block; color: var(--muted); font-size: .76rem; margin-top: .15rem; }
.pux-opt:has(input:checked) { box-shadow: var(--ax-in), 0 0 0 1px rgba(var(--ax-red), .45); }
.pux-opt:has(input:checked) strong { color: rgb(255, 120, 140); }
.pux-opt.is-disabled { opacity: .5; cursor: not-allowed; }
/* Bouton : le dégradé rouge se remplit pendant le paiement, comme à la connexion */
.pux-btn { position: relative; overflow: hidden; isolation: isolate; width: 100%; border: 0; border-radius: 13px; padding: 1rem;
  background: var(--ax-bg); color: rgb(255, 110, 130); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem;
  box-shadow: var(--ax-outS); transition: box-shadow .25s, color .3s .15s, scale .15s; }
.pux-btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #8f0d19, rgb(var(--ax-red)), #ff7a3c);
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.4, 0, .2, 1); }
.pux-btn:active { scale: .97; }
.pux-btn.is-loading { color: #fff; box-shadow: var(--ax-in); cursor: wait; }
.pux-btn.is-loading::before { transform: scaleX(1); }
.pux-btn.is-loading span::after { content: ""; display: inline-block; width: 11px; height: 11px; margin-left: 9px; vertical-align: -1px;
  border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: axSpin .7s linear infinite; }
.pux-err { min-height: 1em; margin-top: -.4rem; text-align: center; color: #ff8095; font-size: .88rem; }
.pux-err:empty { display: none; }
.pux-err a { color: inherit; font-weight: 700; }
.pux-hint { text-align: center; color: var(--muted); font-size: .78rem; margin-top: -.2rem; }
@media (max-width: 360px) { .pux-pay { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .pux--intro, .pux--intro > *, .pux--out, .pux-flipin, .pux-avatar { animation: none !important; opacity: 1 !important; }
}

/* ===== Solde qui change pendant un paiement ===== */
#balChip { transition: box-shadow .4s, border-color .4s, color .4s; }
#balChip.bal--down { color: #ff8095; border-color: rgba(225, 29, 72, .7); box-shadow: 0 0 0 3px rgba(225, 29, 72, .18), 0 0 26px rgba(225, 29, 72, .45); animation: balPulse .55s ease-out 2; }
#balChip.bal--up { color: #6fdc9a; border-color: rgba(111, 220, 154, .7); box-shadow: 0 0 0 3px rgba(111, 220, 154, .16), 0 0 26px rgba(111, 220, 154, .4); animation: balPulse .55s ease-out 2; }
@keyframes balPulse { 40% { scale: 1.1; } }
.bal-fly { position: fixed; z-index: 2147483000; translate: -50% 0; pointer-events: none; font-weight: 800; font-size: 1rem; padding: .2rem .55rem; border-radius: 999px;
  animation: balFly 1.5s cubic-bezier(.2, .8, .3, 1) forwards; }
.bal-fly--down { color: #fff; background: linear-gradient(90deg, #8f0d19, rgb(225, 29, 72)); box-shadow: 0 6px 20px rgba(225, 29, 72, .5); }
.bal-fly--up { color: #0d1017; background: #6fdc9a; box-shadow: 0 6px 20px rgba(111, 220, 154, .45); }
@keyframes balFly { 0% { opacity: 0; transform: translateY(6px) scale(.7); } 15% { opacity: 1; transform: translateY(14px) scale(1.08); } 70% { opacity: 1; transform: translateY(34px) scale(1); } 100% { opacity: 0; transform: translateY(54px) scale(.95); } }
.bal-change { display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; margin: -.2rem 0 0; color: var(--muted); font-size: .95rem; animation: axRise .5s var(--ease-out, ease) both; }
.bal-change s { opacity: .6; }
.bal-change strong { font-size: 1.15rem; color: var(--text); font-variant-numeric: tabular-nums; }
.bal-delta { font-weight: 800; font-size: .85rem; padding: .15rem .5rem; border-radius: 999px; animation: balPulse .55s ease-out .4s 2; }
.bal-change--down .bal-delta { color: #fff; background: linear-gradient(90deg, #8f0d19, rgb(225, 29, 72)); box-shadow: 0 4px 16px rgba(225, 29, 72, .45); }
.bal-change--up .bal-delta { color: #0d1017; background: #6fdc9a; }
.pux-opt strong, .balchip { font-variant-numeric: tabular-nums; }

/* ===== Couvertures du catalogue (images Free Fire) avec animation ===== */
.section-tile__art { height: 190px; isolation: isolate; }
.section-tile__art::before { content: ""; position: absolute; inset: -6%; z-index: -1; background: var(--cover) center 30% / cover no-repeat;
  animation: coverDrift 16s ease-in-out infinite alternate; transition: filter .4s; filter: saturate(1.05); }
.section-tile--code { --cover: url("../images/covers/codes.webp"); }
.section-tile--uid { --cover: url("../images/covers/uid.webp"); }
.section-tile--sub { --cover: url("../images/covers/abonnements.webp"); }
.section-tile--uid .section-tile__art::before { animation-delay: -5s; }
.section-tile--sub .section-tile__art::before { animation-delay: -10s; }
@keyframes coverDrift { 0% { transform: scale(1.04) translate(0, 0); } 50% { transform: scale(1.12) translate(-2.5%, 1.5%); } 100% { transform: scale(1.08) translate(2%, -1%); } }
.section-tile:hover .section-tile__art::before { filter: saturate(1.25) brightness(1.08); }
/* Reflet lumineux qui traverse la couverture */
.section-tile__art { background: #10141d !important; }
.section-tile__shine { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.section-tile__shine::before { content: ""; position: absolute; top: -20%; bottom: -20%; width: 35%; left: -50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); transform: skewX(-18deg); animation: coverShine 6s ease-in-out infinite; }
.section-tile--uid .section-tile__shine::before { animation-delay: 2s; }
.section-tile--sub .section-tile__shine::before { animation-delay: 4s; }
@keyframes coverShine { 0%, 60% { left: -50%; } 85%, 100% { left: 130%; } }
/* Petites cartes : plus discrètes, en bas à droite, pour laisser voir l'image */
.section-tile__art .chipcard { width: 64px; height: 40px; top: auto; bottom: 22px; align-items: center; justify-content: center; padding: .3rem; font-size: .72rem;
  background: rgba(10, 13, 20, .45); backdrop-filter: blur(6px); border-color: rgba(255, 255, 255, .25); z-index: 1; }
.section-tile__art .chipcard--a { right: 152px; } .section-tile__art .chipcard--b { right: 84px; } .section-tile__art .chipcard--c { right: 16px; }
.section-tile__icon { background: rgba(10, 13, 20, .45); border: 1px solid rgba(255, 255, 255, .2); }
@media (max-width: 640px) { .section-tile__art { height: 165px; } .section-tile__art .chipcard { width: 56px; height: 34px; } .section-tile__art .chipcard--a { right: 132px; } .section-tile__art .chipcard--b { right: 72px; } }
@media (prefers-reduced-motion: reduce) { .section-tile__art::before, .section-tile__shine::before { animation: none; } }
/* Bannière du rayon ouvert */
.pu-cover { position: relative; height: clamp(120px, 26vw, 220px); margin: 0 0 1rem; border-radius: 18px; overflow: hidden; isolation: isolate; border: 1px solid var(--border); }
.pu-cover::before { content: ""; position: absolute; inset: -6%; z-index: -1; background: url("../images/covers/uid.webp") center 30% / cover no-repeat; animation: coverDrift 16s ease-in-out infinite alternate; }
#puBlock[data-kind="code"] .pu-cover::before { background-image: url("../images/covers/codes.webp"); }
.pu-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(13, 16, 23, .7)); }
@media (prefers-reduced-motion: reduce) { .pu-cover::before { animation: none; } }
.pu-cover--sub::before { background-image: url("../images/covers/abonnements.webp") !important; }
