/* MINUIT — les succès (js/succes.js). Classes préfixées .sx- ; couleurs par les jetons de base.css.
   Couches : plaques des potes 1165, annonce 1180 (jamais cliquables) ; cabinet 1095 (sous les modales 1100 et les toasts 1200). */

/* ---------- raretés : métal, reflet, ruban ---------- */
.sx-r-bronze { --m1: #4e2a12; --m2: #b06d36; --m3: #f3c48f; --glow: rgba(214, 138, 72, .55); --rc: #e9a96d; --rb1: #6b1d24; --rb2: #c98a4b; --ray-o: .45; }
.sx-r-argent { --m1: #434b58; --m2: #aeb8c6; --m3: #ffffff; --glow: rgba(205, 218, 238, .5); --rc: #dfe6f0; --rb1: #1d2a55; --rb2: #cfd6e0; --ray-o: .6; }
.sx-r-or { --m1: #5e4411; --m2: #d9b04e; --m3: #fff3c2; --glow: rgba(247, 221, 143, .65); --rc: #f7dd8f; --rb1: #7d1d2b; --rb2: #deb85c; --ray-o: .85; }
.sx-r-legendaire { --m1: #2c1860; --m2: #b27cff; --m3: #ffe2fb; --glow: rgba(255, 79, 216, .55); --rc: #ff9fe8; --rb1: #1c0f3e; --rb2: #3be8ff; --ray-o: 1; }

/* ---------- la médaille ---------- */
.sx-medal { --sz: 64px; position: relative; flex: none; width: var(--sz); height: calc(var(--sz) * 1.3); perspective: calc(var(--sz) * 6); }
.sx-xs { --sz: 22px; height: 22px; }
.sx-sm { --sz: 40px; }
.sx-md { --sz: 64px; }
.sx-xl { --sz: 176px; }
.sx-ribbon { position: absolute; left: 50%; top: 0; width: calc(var(--sz) * .56); height: calc(var(--sz) * .5); transform: translateX(-50%); }
.sx-ribbon::before, .sx-ribbon::after {
  content: ''; position: absolute; top: 0; width: 52%; height: 100%; transform-origin: 50% 100%;
  background: linear-gradient(90deg, var(--rb1) 0 28%, var(--rb2) 28% 40%, var(--rb1) 40% 60%, var(--rb2) 60% 72%, var(--rb1) 72%);
  box-shadow: inset 0 -6px 8px rgba(0, 0, 0, .35);
}
.sx-ribbon::before { left: 0; transform: skewX(16deg); }
.sx-ribbon::after { right: 0; transform: skewX(-16deg); }
.sx-xs .sx-ribbon { display: none; }
.sx-coin { position: absolute; left: 0; bottom: 0; width: var(--sz); height: var(--sz); transform-style: preserve-3d; }
.sx-xs .sx-coin { position: relative; }
.sx-face {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: radial-gradient(circle at 34% 28%, var(--m3) 0 7%, var(--m2) 44%, var(--m1) 100%);
  box-shadow: inset 0 0 0 calc(var(--sz) * .045) var(--m1), inset 0 0 0 calc(var(--sz) * .075) var(--m3),
    inset 0 calc(var(--sz) * -.06) calc(var(--sz) * .14) rgba(0, 0, 0, .35), 0 calc(var(--sz) * .05) calc(var(--sz) * .14) rgba(0, 0, 0, .5);
}
.sx-r-legendaire .sx-face {
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95) 0 6%, rgba(255, 255, 255, 0) 34%),
    conic-gradient(from 200deg, #3be8ff, #9b6bff, #ff4fd8, #f7dd8f, #3be8ff);
}
.sx-face.sx-back { transform: rotateY(180deg); }
.sx-back-mark { width: 36%; height: 36%; transform: rotate(45deg); border: calc(var(--sz) * .035) solid var(--m1); box-shadow: inset 0 0 0 calc(var(--sz) * .05) var(--m3); opacity: .75; }
.sx-ico {
  position: relative; z-index: 1; font-size: calc(var(--sz) * .46); line-height: 1; transform: translateY(3%);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .35)) drop-shadow(0 -1px 0 rgba(0, 0, 0, .45));
}
.sx-xs .sx-ico { font-size: calc(var(--sz) * .5); filter: none; color: var(--m1); font-weight: 700; }
.is-secret .sx-ico { font-family: var(--font-display); color: var(--m1); font-size: calc(var(--sz) * .52); }
.sx-front::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .72) 50%, rgba(255, 255, 255, 0) 60%) no-repeat;
  background-size: 260% 100%; background-position: 150% 0;
}
.sx-medal.is-locked .sx-face {
  background: radial-gradient(circle at 34% 28%, #3a3f58 0 6%, #1f2440 45%, #0f1328 100%);
  box-shadow: inset 0 0 0 calc(var(--sz) * .045) #0b0e1c, inset 0 0 0 calc(var(--sz) * .075) rgba(222, 184, 92, .2), 0 2px 6px rgba(0, 0, 0, .5);
}
.sx-medal.is-locked .sx-ico { opacity: .24; filter: grayscale(1); }
.sx-medal.is-locked.is-secret .sx-ico { opacity: .5; color: var(--gold-lo); filter: none; }
.sx-medal.is-locked .sx-ribbon { opacity: .2; filter: grayscale(1); }
.sx-medal.is-locked .sx-front::after { display: none; }

/* ---------- bouton du cabinet, dans la barre du haut ---------- */
.sx-btn {   /* épinglée sur l'avatar de « moi » (js : left/top) ; hors du flux de la barre : aucune largeur prise */
  position: fixed; left: -100px; top: 0; z-index: 956; display: grid; place-items: center; width: 26px; height: 26px; margin: 0; padding: 0;
  border-radius: 50%; border: 1px solid rgba(247, 221, 143, .75); cursor: pointer; color: var(--gold-hi);
  background: radial-gradient(circle at 50% 30%, #2a2f55, #0d1122 75%); box-shadow: 0 2px 8px rgba(0, 0, 0, .6), 0 0 0 2px var(--bg-1);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.sx-btn[hidden] { display: none; }
.sx-btn:hover { border-color: var(--gold-hi); box-shadow: 0 0 0 2px var(--bg-1), 0 0 16px -2px rgba(247, 221, 143, .8); transform: scale(1.12); }
.sx-btn-ico { display: grid; width: 19px; height: 19px; }
.sx-btn-ico svg { display: block; width: 100%; height: 100%; }
.sx-btn-n {
  position: absolute; right: -9px; top: -7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; box-sizing: border-box;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1406; font: 700 10px/17px var(--font-num); text-align: center;
  line-height: 16px; box-shadow: 0 0 0 2px var(--bg-1); pointer-events: none;
}
.sx-btn[data-n="0"] .sx-btn-n { display: none; }
.sx-btn.is-ping { animation: sx-ping .9s cubic-bezier(.2, .8, .3, 1); }
.sx-btn:focus-visible, .sx-tab:focus-visible, .sx-x:focus-visible, .sx-pote:focus-visible, .sx-back-btn:focus-visible {
  outline: 2px solid var(--gold-hi); outline-offset: 2px;
}
@keyframes sx-ping {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(247, 221, 143, .9); }
  30% { transform: scale(1.22); }
  100% { transform: scale(1); box-shadow: 0 0 0 18px rgba(247, 221, 143, 0); }
}

/* ---------- l'annonce, chez soi : la médaille tombe, tourne, brille ---------- */
.sx-stage { position: fixed; inset: 0; z-index: 1180; pointer-events: none; overflow: hidden; }
.sx-veil { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 55% at 50% 44%, rgba(5, 6, 11, .3), rgba(5, 6, 11, .86)); animation: sx-fade .35s ease-out both; }
.sx-rays {
  position: absolute; left: 50%; top: 40%; width: 780px; height: 780px; margin: -390px 0 0 -390px; border-radius: 50%; opacity: 0;
  background: repeating-conic-gradient(from 0deg, var(--glow) 0deg 5deg, rgba(0, 0, 0, 0) 5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 10%, rgba(0, 0, 0, 0) 62%); mask-image: radial-gradient(circle, #000 10%, rgba(0, 0, 0, 0) 62%);
  animation: sx-rays-in .7s .95s ease-out forwards, sx-turn 22s linear infinite;
}
.sx-shock {
  position: absolute; left: 50%; top: 40%; width: 210px; height: 210px; margin: -105px 0 0 -105px; border-radius: 50%; opacity: 0;
  border: 3px solid var(--m3); box-shadow: 0 0 30px var(--glow), inset 0 0 30px var(--glow);
  animation: sx-shock .85s 1s cubic-bezier(.2, .7, .3, 1) both;
}
.sx-drop { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -62%); transition: transform .6s cubic-bezier(.55, .05, .7, .2), opacity .25s; }
.sx-fall { animation: sx-fall 1.15s cubic-bezier(.3, .05, .35, 1) both; }
.sx-stage .sx-xl .sx-coin { animation: sx-spin 1.75s cubic-bezier(.12, .55, .3, 1) both; }
.sx-stage .sx-xl .sx-ribbon { animation: sx-fade .45s 1.05s both; }
.sx-stage .sx-xl .sx-front::after { animation: sx-sheen 1.25s 1.4s ease-in-out both; }
.sx-stage .sx-xl::after {
  content: ''; position: absolute; left: 50%; bottom: -12%; width: 130%; height: 34%; transform: translateX(-50%);
  background: radial-gradient(ellipse, var(--glow), rgba(0, 0, 0, 0) 70%); opacity: 0; animation: sx-fade .6s 1s forwards;
}
.sx-sparks { position: absolute; left: 50%; top: 40%; }
.sx-sparks i {
  position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #fff, var(--m3) 40%, rgba(255, 255, 255, 0) 70%);
  animation: sx-spark 1s calc(1s + var(--t, 0s)) cubic-bezier(.2, .7, .3, 1) both;
}
.sx-card { position: absolute; left: 50%; top: calc(40% + 128px); transform: translateX(-50%); width: min(700px, 92vw); text-align: center; transition: opacity .3s; }
.sx-card::before {   /* une nappe sombre derrière le texte : lisible par-dessus n'importe quel jeu */
  content: ''; position: absolute; inset: -34px -80px -26px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(5, 6, 11, .8), rgba(5, 6, 11, 0) 100%); animation: sx-fade .5s .9s both;
}
.sx-card > * { animation: sx-rise .55s cubic-bezier(.2, .8, .3, 1) both; }
.sx-card > :nth-child(1) { animation-delay: .95s; }
.sx-card > :nth-child(2) { animation-delay: 1.05s; }
.sx-card > :nth-child(3) { animation-delay: 1.18s; }
.sx-card > :nth-child(4) { animation-delay: 1.3s; }
.sx-kicker { display: flex; align-items: center; justify-content: center; gap: 14px; font: 600 13px var(--font-ui); letter-spacing: .42em; text-transform: uppercase; color: var(--rc); }
.sx-kicker::before, .sx-kicker::after { content: ''; width: 76px; height: 1px; background: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--m2)); }
.sx-kicker::after { transform: scaleX(-1); }
.sx-name {
  margin: 10px 0 6px; font-family: var(--font-display); font-size: clamp(42px, 5vw, 70px); line-height: 1.04; letter-spacing: .01em;
  background: linear-gradient(180deg, var(--m3) 12%, var(--m2) 58%, var(--m1) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .65));
}
.sx-r-legendaire .sx-name { background: linear-gradient(90deg, #3be8ff, #b27cff 35%, #ff4fd8 65%, #f7dd8f); -webkit-background-clip: text; background-clip: text; }
.sx-phrase { font: 400 19px/1.4 var(--font-ui); color: var(--text); text-shadow: 0 2px 10px rgba(0, 0, 0, .85); }
.sx-tag {
  display: inline-flex; gap: 2px; margin-top: 12px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--m2);
  background: rgba(5, 6, 11, .6); font: 600 12px var(--font-num); letter-spacing: .16em; text-transform: uppercase; color: var(--rc);
}
.sx-tag span { color: var(--text-dim); letter-spacing: .08em; }
.sx-extras { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 10px; margin-top: 14px; }
.sx-card > .sx-extras { animation-delay: 1.45s; }
.sx-extras-lab { font: 600 11px var(--font-ui); letter-spacing: .3em; text-transform: uppercase; color: var(--text-dim); }
.sx-extra { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 5px; border-radius: 999px; border: 1px solid var(--m2); background: rgba(5, 6, 11, .66); }
.sx-extra b { font: 600 13px var(--font-ui); color: var(--rc); }
.sx-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -6px 0 18px; padding: 0 4px; }
.sx-stage.is-fly .sx-drop { transform: translate(calc(-50% + var(--fx, 0px)), calc(-62% + var(--fy, 0px))) scale(var(--fs, .2)); }
.sx-stage.is-fly .sx-card, .sx-stage.is-fly .sx-rays, .sx-stage.is-fly .sx-veil, .sx-stage.is-fly .sx-sparks, .sx-stage.is-fly .sx-shock { opacity: 0 !important; transition: opacity .35s; }
.sx-stage.is-gone .sx-drop { opacity: 0; }
.sx-stage.is-out { opacity: 0; transition: opacity .3s; }

/* UX-OVERLAYS 30/09 — la grande scène ne s'affiche que si le centre est libre (js : placerScene) : son voile assombrit le centre,
   derrière le texte, et s'efface vers les bords (plus rien d'assombri sur les commandes du pourtour). */
.sx-veil { background: radial-gradient(ellipse 58% 52% at 50% 46%, rgba(5, 6, 11, .62), rgba(5, 6, 11, .3) 62%, rgba(5, 6, 11, 0) 100%); }
/* Médaillon : quand le centre porte une commande ou un résultat, la scène se resserre dans la boîte libre choisie par js
   (Casino.ux.libre) : --bx, --by = coin haut-gauche ; --bw, --bh = taille. Médaille à gauche, texte à droite, aucun voile. */
.sx-stage.is-compact .sx-veil { display: none; }
.sx-stage.is-compact .sx-xl { --sz: 88px; }
.sx-stage.is-compact .sx-drop, .sx-stage.is-compact .sx-rays, .sx-stage.is-compact .sx-shock, .sx-stage.is-compact .sx-sparks {
  left: calc(var(--bx) + 64px); top: calc(var(--by) + var(--bh) / 2);
}
.sx-stage.is-compact .sx-drop { transform: translate(-50%, -56%); }
.sx-stage.is-compact.is-fly .sx-drop { transform: translate(calc(-50% + var(--fx, 0px)), calc(-56% + var(--fy, 0px))) scale(var(--fs, .2)); }
.sx-stage.is-compact .sx-rays { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
.sx-stage.is-compact .sx-shock { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.sx-stage.is-compact .sx-sparks i { --d: 74px !important; }
.sx-stage.is-compact .sx-xl::after { display: none; }
.sx-stage.is-compact .sx-card {
  left: calc(var(--bx) + 128px); top: var(--by); transform: none; width: calc(var(--bw) - 140px); min-height: var(--bh);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left;
}
.sx-stage.is-compact .sx-card::before {
  inset: 0 -12px 0 -128px; border-radius: 18px; border: 1px solid var(--m2);
  background: linear-gradient(135deg, rgba(26, 32, 64, .96), rgba(8, 10, 20, .96)); box-shadow: 0 18px 44px rgba(0, 0, 0, .6), 0 0 34px -10px var(--glow);
}
.sx-stage.is-compact .sx-kicker { justify-content: flex-start; gap: 8px; font-size: 10.5px; letter-spacing: .3em; }
.sx-stage.is-compact .sx-kicker::before { display: none; }
.sx-stage.is-compact .sx-kicker::after { width: 34px; transform: none; background: linear-gradient(90deg, var(--m2), rgba(0, 0, 0, 0)); }
.sx-stage.is-compact .sx-name { margin: 4px 0 3px; font-size: 30px; }
.sx-stage.is-compact .sx-phrase { font-size: 13.5px; line-height: 1.32; }
.sx-stage.is-compact .sx-tag { margin-top: 7px; padding: 3px 10px; font-size: 10.5px; }
.sx-stage.is-compact .sx-extras { justify-content: flex-start; gap: 5px 6px; margin-top: 7px; }
.sx-stage.is-compact .sx-extras-lab { display: none; }
.sx-stage.is-compact .sx-extra { padding: 2px 9px 2px 3px; }
.sx-stage.is-compact .sx-extra b { font-size: 11.5px; }
/* petit médaillon : écran plein, on garde la médaille, le nom et la rareté (la phrase et « Et aussi » restent au cabinet) */
.sx-stage.is-compact.is-mini .sx-xl { --sz: 60px; }
.sx-stage.is-compact.is-mini .sx-drop, .sx-stage.is-compact.is-mini .sx-rays, .sx-stage.is-compact.is-mini .sx-shock,
.sx-stage.is-compact.is-mini .sx-sparks { left: calc(var(--bx) + 44px); }
.sx-stage.is-compact.is-mini .sx-rays { width: 140px; height: 140px; margin: -70px 0 0 -70px; }
.sx-stage.is-compact.is-mini .sx-sparks i { --d: 52px !important; }
.sx-stage.is-compact.is-mini .sx-card { left: calc(var(--bx) + 88px); width: calc(var(--bw) - 98px); }
.sx-stage.is-compact.is-mini .sx-card::before { inset: 0 -10px 0 -88px; border-radius: 14px; }
.sx-stage.is-compact.is-mini .sx-name { font-size: 22px; margin: 2px 0 1px; }
.sx-stage.is-compact.is-mini .sx-phrase, .sx-stage.is-compact.is-mini .sx-extras { display: none; }
.sx-stage.is-compact.is-mini .sx-tag { margin-top: 4px; }

/* ACCUEIL 01/10 — chez soi aussi, une carte de coin (« trop invasives et contraignantes », Selman 30/09) : en haut à droite sous la
   barre, ou à la place propre la plus proche (js : placerScene) ; ni voile, ni rayons, ni médaille tombée du ciel, le jeu reste
   visible. Même information : rareté, nom, phrase (2 lignes), rang du trophée, « Et aussi ». La médaille fait un tour, puis file
   vers le cabinet. --bx, --by : coin haut-gauche ; --bw : largeur ; la hauteur suit le contenu. */
.sx-stage.is-coin { inset: auto; left: var(--bx); top: var(--by); width: var(--bw, 340px); overflow: visible;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; padding: 12px 14px 12px 12px;
  animation: sx-coin-in .3s cubic-bezier(.25, 1, .5, 1) both; }
.sx-stage.is-coin::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 14px; border: 1px solid var(--m2);
  background: linear-gradient(135deg, rgba(26, 32, 64, .97), rgba(8, 10, 20, .97)); box-shadow: 0 12px 28px rgba(0, 0, 0, .55), 0 0 24px -10px var(--glow);
  transition: opacity .3s; }
.sx-stage.is-coin .sx-drop { position: relative; left: auto; top: auto; transform: none; }
.sx-stage.is-coin .sx-fall { animation: none; }
.sx-stage.is-coin .sx-medal { --sz: 50px; }
.sx-stage.is-coin .sx-medal .sx-coin { animation: sx-flip 1.1s .15s cubic-bezier(.3, .1, .3, 1) both; }
.sx-stage.is-coin .sx-card { position: static; left: auto; top: auto; transform: none; width: auto; min-width: 0; text-align: left; }
.sx-stage.is-coin .sx-card::before { display: none; }
.sx-stage.is-coin .sx-card > * { animation: sx-fade .3s .08s both; }
.sx-stage.is-coin .sx-kicker { justify-content: flex-start; gap: 0; font-size: 10px; letter-spacing: .24em; }
.sx-stage.is-coin .sx-kicker::before, .sx-stage.is-coin .sx-kicker::after { display: none; }
/* le nom en couleur pleine de sa rareté : à cette taille, le dégradé métallique se lisait mal */
.sx-stage.is-coin .sx-name { margin: 3px 0 2px; font-size: 20px; line-height: 1.12; background: none; -webkit-background-clip: border-box; background-clip: border-box;
  color: var(--rc); filter: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sx-stage.is-coin .sx-phrase { font-size: 12.5px; line-height: 1.32; text-shadow: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sx-stage.is-coin .sx-tag { margin-top: 6px; padding: 2px 8px; font-size: 10px; letter-spacing: .12em; }
/* « Et aussi » : une ligne de texte (chaque nom dans la couleur de sa rareté) au lieu d'une pile de pastilles */
.sx-stage.is-coin .sx-extras { margin-top: 6px; font: 400 11.5px/1.35 var(--font-ui); color: var(--text-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sx-stage.is-coin .sx-extras-lab { display: inline; font: inherit; letter-spacing: 0; text-transform: none; color: var(--text-dim); }
.sx-stage.is-coin .sx-extras-lab::after { content: ' : '; }
.sx-stage.is-coin .sx-extra { display: inline; padding: 0; border: 0; background: none; }
.sx-stage.is-coin .sx-extra .sx-medal { display: none; }
.sx-stage.is-coin .sx-extra b { font: 600 11.5px/1.35 var(--font-ui); color: var(--rc); }
.sx-stage.is-coin .sx-extra + .sx-extra::before { content: ' · '; color: var(--text-dim); }
/* petit format (écran chargé) : médaille, nom, rareté */
.sx-stage.is-coin.is-mini { padding: 9px 12px 9px 10px; column-gap: 10px; }
.sx-stage.is-coin.is-mini .sx-medal { --sz: 38px; }
.sx-stage.is-coin.is-mini .sx-name { font-size: 17px; -webkit-line-clamp: 1; }
.sx-stage.is-coin.is-mini .sx-phrase, .sx-stage.is-coin.is-mini .sx-extras { display: none; }
.sx-stage.is-coin.is-mini .sx-tag { margin-top: 4px; }
/* la sortie : la carte s'efface, la médaille file vers le cabinet (--fx, --fy, --fs : js) */
.sx-stage.is-coin.is-fly::before { opacity: 0; }
.sx-stage.is-coin.is-fly .sx-drop { transform: translate(var(--fx, 0px), var(--fy, 0px)) scale(var(--fs, .3)); }
@keyframes sx-coin-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
html.reduce-motion .sx-stage.is-coin, html.reduce-motion .sx-stage.is-coin .sx-medal .sx-coin { animation: none; }
/* MESSAGES 04/10 (revue n° 3, défaut 1) — dans un jeu à l'échelle (js : is-ancre), la carte est ANCRÉE au coin bas droit, à 24 px des
   bords : aucune recherche de place ne la renvoie au milieu de l'écran. Elle prend le palier du jeu (css/base.css, « la coque à
   l'échelle ») ; aucun texte sous 12 px de feuille (16 à 2560), la phrase à 14, entière ; la pastille tient sur une ligne et donne sa
   largeur à la carte (la phrase et « Et aussi » s'y plient : largeur 0, puis toute la colonne). */
.coque-a-l-echelle .sx-stage.is-coin.is-ancre { left: auto; top: auto; right: 24px; bottom: 24px; width: max-content; min-width: 340px; max-width: min(520px, calc(100 * var(--vw, 1vw) - 48px));
  column-gap: 16px; padding: 16px 20px 16px 16px; }
.coque-a-l-echelle .sx-stage.is-coin.is-ancre .sx-medal { --sz: 56px; }
.coque-a-l-echelle .sx-stage.is-coin.is-ancre .sx-kicker { font-size: 12px; letter-spacing: .14em; }
.coque-a-l-echelle .sx-stage.is-coin.is-ancre .sx-name { margin: 4px 0; font-size: 24px; }
.coque-a-l-echelle .sx-stage.is-coin.is-ancre .sx-phrase { display: block; width: 0; min-width: 100%; overflow: visible; -webkit-line-clamp: unset; line-clamp: unset; font-size: 14px; line-height: 1.5; }
.coque-a-l-echelle .sx-stage.is-coin.is-ancre .sx-tag { margin-top: 8px; padding: 4px 12px; font-size: 12px; letter-spacing: .08em; white-space: nowrap; }
.coque-a-l-echelle .sx-stage.is-coin.is-ancre .sx-tag span { letter-spacing: .04em; }
.coque-a-l-echelle .sx-stage.is-coin.is-ancre .sx-extras { display: block; width: 0; min-width: 100%; overflow: visible; -webkit-line-clamp: unset; line-clamp: unset; margin-top: 8px; font-size: 13px; line-height: 1.4; }
.coque-a-l-echelle .sx-stage.is-coin.is-ancre .sx-extra b { font-size: 13px; }
.coque-a-l-echelle .sx-plaques.is-ancre { left: auto; top: auto; right: 24px; bottom: 24px; }

@keyframes sx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sx-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes sx-rays-in { from { opacity: 0; } to { opacity: var(--ray-o, .8); } }
@keyframes sx-turn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes sx-shock { 0% { transform: scale(.35); opacity: .95; } 100% { transform: scale(2.7); opacity: 0; } }
@keyframes sx-fall { 0% { transform: translateY(-78vh); } 58% { transform: translateY(24px); } 72% { transform: translateY(-12px); } 86% { transform: translateY(5px); } 100% { transform: none; } }
@keyframes sx-spin { from { transform: rotateY(-1080deg); } to { transform: rotateY(0deg); } }
@keyframes sx-sheen { from { background-position: 150% 0; } to { background-position: -60% 0; } }
@keyframes sx-spark { 0% { opacity: 1; transform: rotate(var(--a)) translateX(40px) scale(1.2); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d, 180px)) scale(.3); } }
@keyframes sx-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes sx-flip { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }

/* ---------- l'annonce d'un pote : plaque discrète en haut à droite ---------- */
.sx-plaques { position: fixed; right: 14px; top: calc(var(--topbar-h, 64px) + 12px); z-index: 1165; display: grid; gap: 8px; width: min(310px, calc(100vw - 28px)); pointer-events: none; }
.sx-plaque {
  display: flex; align-items: center; gap: 12px; padding: 9px 14px 9px 10px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(26, 32, 64, .96), rgba(10, 13, 24, .96)); border: 1px solid var(--line-strong); border-left: 3px solid var(--m2);
  box-shadow: var(--shadow-1), 0 0 26px -8px var(--glow); animation: sx-pl-in .5s cubic-bezier(.2, .9, .3, 1.15) both;
}
.sx-plaque .sx-coin { animation: sx-flip 1.3s .25s cubic-bezier(.3, .1, .3, 1) 2 both; }
.sx-plaque.is-out { animation: sx-pl-out .4s ease-in both; }
.sx-pl-txt { min-width: 0; }
.sx-pl-who { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.sx-pl-who b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sx-pl-nom { margin-top: 2px; font-family: var(--font-display); font-size: 18px; line-height: 1.15; color: var(--rc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-pl-rar { margin-top: 1px; font: 600 10.5px var(--font-num); letter-spacing: .16em; text-transform: uppercase; color: var(--text-faint); }
/* UX-OVERLAYS 30/09 : la plaque entre et sort SUR PLACE (elle glissait de 40 px et passait sur le bouton voisin, « Prêt » de la roulette) */
@keyframes sx-pl-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes sx-pl-out { to { opacity: 0; transform: scale(.96); } }

/* ---------- avatars ---------- */
.sx-av { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; font-size: 14px; line-height: 1; background: rgba(5, 6, 11, .6); box-shadow: 0 0 0 2px var(--pc, var(--gold)); }
.sx-av-lg { width: 44px; height: 44px; font-size: 24px; }
.sx-av-xl { width: 66px; height: 66px; font-size: 36px; box-shadow: 0 0 0 3px var(--pc, var(--gold)), 0 0 30px -4px var(--pc, var(--gold)); }

/* ---------- le cabinet des trophées (voile .sx-overlay ; .sx-back est le revers des médailles) ---------- */
.sx-overlay { position: fixed; inset: 0; z-index: 1095; display: grid; place-items: center; background: rgba(3, 4, 9, .74); animation: sx-fade .2s both; }
.sx-overlay.is-out { animation: sx-fade-out .18s both; }
.sx-cab {
  position: relative; display: flex; flex-direction: column; width: min(1120px, calc(94 * var(--vw, 1vw))); height: min(780px, calc(90 * var(--vh, 1vh))); overflow: hidden; border-radius: 18px;
  background: radial-gradient(ellipse 70% 40% at 50% -6%, rgba(222, 184, 92, .13), rgba(0, 0, 0, 0) 60%), linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-2), inset 0 0 0 6px rgba(5, 6, 11, .45);
  animation: sx-cab-in .3s cubic-bezier(.2, .9, .3, 1.1) both; color: var(--text); font-family: var(--font-ui);
}
.sx-cab::before { content: ''; position: absolute; inset: 9px; border: 1px solid rgba(222, 184, 92, .16); border-radius: 12px; pointer-events: none; }
.sx-cab::after {   /* éventail art déco au-dessus du titre */
  content: ''; position: absolute; left: 50%; top: -120px; width: 420px; height: 240px; margin-left: -210px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 90deg at 50% 50%, rgba(222, 184, 92, .10) 0deg 3deg, rgba(0, 0, 0, 0) 3deg 12deg);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, rgba(0, 0, 0, 0) 70%); mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, rgba(0, 0, 0, 0) 70%);
}
@keyframes sx-cab-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.sx-cab-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.sx-cab-title { display: grid; }
.sx-cab-kicker { font-size: 11px; letter-spacing: .38em; color: var(--gold-lo); }
.sx-cab-title h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 31px; line-height: 1.1; color: var(--gold-hi); letter-spacing: .015em; }
.sx-tabs { display: flex; gap: 4px; margin-left: auto; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(5, 6, 11, .5); }
.sx-tab { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text-dim); cursor: pointer; font: 600 14px var(--font-ui); transition: color .15s, background .15s; }
.sx-tab:hover { color: var(--text); }
.sx-tab.is-on { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1406; }
.sx-tab-n { margin-left: 8px; font-size: 12px; opacity: .78; }
.sx-x { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(5, 6, 11, .4); color: var(--gold-hi); cursor: pointer; font-size: 15px; }
.sx-x:hover { background: rgba(222, 184, 92, .12); }
.sx-body { position: relative; z-index: 1; flex: 1; overflow: auto; padding: 18px 24px 26px; scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }
.sx-empty { margin: 18px 0; text-align: center; font-style: italic; color: var(--text-dim); }
.sx-host { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--text-faint); }
.sx-host-wipe { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 90, 103, .4); background: transparent; color: var(--lose); cursor: pointer; font: 600 12.5px var(--font-ui); }
.sx-host-wipe:hover, .sx-host-wipe.is-armed { background: rgba(255, 90, 103, .12); border-color: var(--lose); }
.sx-host-wipe[disabled] { opacity: .6; cursor: default; }

/* compteur par rareté */
.sx-count { display: grid; grid-template-columns: repeat(4, auto) minmax(180px, 1fr); align-items: center; gap: 12px 22px; margin-bottom: 18px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(5, 6, 11, .35); }
.sx-count-it { display: flex; align-items: center; gap: 10px; }
.sx-count-it b { display: block; font-size: 18px; color: var(--rc); }
.sx-count-it span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.sx-count-bar { position: relative; height: 26px; overflow: hidden; border-radius: 999px; border: 1px solid var(--line); background: rgba(222, 184, 92, .07); }
.sx-count-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold-lo), var(--gold), var(--gold-hi)); box-shadow: 0 0 14px rgba(247, 221, 143, .5); transition: width .6s; }
.sx-count-bar span { position: relative; display: block; line-height: 24px; text-align: center; font-size: 12px; letter-spacing: .05em; color: var(--text); text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }

/* étagères de la vitrine */
.sx-shelf { margin: 6px 0 22px; }
.sx-shelf h3 { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; font-family: var(--font-display); font-weight: 400; font-size: 21px; color: var(--rc); }
.sx-shelf h3::before, .sx-shelf h3::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--m2)); }
.sx-shelf h3::after { transform: scaleX(-1); }
.sx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 12px; }
.sx-cell {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(26, 32, 64, .55), rgba(10, 13, 24, .6)); border: 1px solid rgba(222, 184, 92, .12);
}
.sx-cell.is-got { border-color: var(--m2); box-shadow: 0 10px 28px -16px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .05); }
.sx-cell.is-got:hover .sx-coin { animation: sx-flip .9s cubic-bezier(.3, .1, .3, 1); }
.sx-cell.is-got:hover .sx-front::after { animation: sx-sheen .9s ease-in-out; }
.sx-cell-txt { min-width: 0; flex: 1; }
.sx-cell h4 { margin: 0 0 3px; font: 600 15px var(--font-ui); color: var(--text); }
.sx-cell p { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--text-dim); }
.sx-cell.is-locked h4 { color: var(--text-dim); }
.sx-cell.is-locked p { color: var(--text-faint); }
.sx-cell-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 7px; font-size: 11px; color: var(--text-faint); }
.sx-chip { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim); white-space: nowrap; }
.sx-chip.is-all { color: var(--text-faint); }
.sx-cell-who { margin-left: auto; text-align: right; white-space: nowrap; }
.sx-cell.is-got .sx-cell-who { color: var(--rc); }

/* les potes */
.sx-potes { display: grid; gap: 10px; }
.sx-pote {
  display: grid; grid-template-columns: auto minmax(160px, 1fr) auto auto auto; align-items: center; gap: 18px; width: 100%; min-height: 66px; padding: 12px 18px;
  border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(90deg, rgba(26, 32, 64, .6), rgba(10, 13, 24, .5));
  color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sx-pote:hover { border-color: var(--line-strong); transform: translateX(3px); box-shadow: 0 8px 26px -18px rgba(247, 221, 143, .7); }
.sx-pote-id b { font-size: 16px; }
.sx-pote-id em { font-style: normal; font-weight: 400; color: var(--text-faint); }
.sx-pote-sub { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-dim); }
.sx-mini { display: flex; align-items: center; gap: 4px; }
.sx-more { margin-left: 4px; font-size: 12px; color: var(--text-dim); }
.sx-none { font-size: 12px; font-style: italic; color: var(--text-faint); }
.sx-pote-n { display: grid; justify-items: center; min-width: 64px; }
.sx-pote-n b { font-size: 22px; color: var(--gold-hi); }
.sx-pote-n span { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.sx-go { font-size: 13px; letter-spacing: .04em; color: var(--gold); }

/* le carnet de bal */
.sx-carnet { --pc: var(--gold); }
.sx-c-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.sx-back-btn { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--gold-hi); cursor: pointer; font: 600 13px var(--font-ui); }
.sx-back-btn:hover { border-color: var(--line-strong); }
.sx-c-id { display: grid; min-width: 0; }
.sx-c-kicker { font-size: 11px; letter-spacing: .36em; text-transform: uppercase; color: var(--gold-lo); }
.sx-c-id h3 { margin: 1px 0 2px; font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.1; color: var(--text); }
.sx-c-sub { font-size: 13px; color: var(--text-dim); }
.sx-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sx-tile { display: grid; gap: 2px; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(5, 6, 11, .42); }
.sx-tile-lab { font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--text-faint); }
.sx-tile-v { overflow: hidden; font-size: 24px; color: var(--text); white-space: nowrap; text-overflow: ellipsis; }
.sx-tile-sub { overflow: hidden; font-size: 12px; color: var(--text-dim); white-space: nowrap; text-overflow: ellipsis; }
.sx-tile.is-win .sx-tile-v { color: var(--win); }
.sx-tile.is-lose .sx-tile-v { color: var(--lose); }
.sx-tile.is-fav .sx-tile-v { font-family: var(--font-display); font-size: 21px; line-height: 1.35; color: var(--gold-hi); }
.sx-curve-box, .sx-c-tro-box { margin-bottom: 14px; padding: 12px 16px 10px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(5, 6, 11, .45), rgba(17, 21, 42, .35)); }
.sx-curve-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.sx-curve-box h4, .sx-c-tro-box h4 { margin: 0 0 8px; font: 600 14px var(--font-ui); letter-spacing: .04em; color: var(--gold-hi); }
.sx-curve-head h4 { margin: 0; }
.sx-curve-leg { font-size: 11px; color: var(--text-faint); }
.sx-curve { display: block; width: 100%; height: auto; max-height: 232px; overflow: visible; }
.sx-cv-grid { stroke: rgba(222, 184, 92, .10); stroke-width: 1; }
.sx-cv-lab { fill: var(--text-faint); font: 500 11px var(--font-num); }
.sx-cv-base { stroke: rgba(247, 221, 143, .55); stroke-width: 1.2; stroke-dasharray: 5 5; }
.sx-cv-line { fill: none; stroke: var(--pc); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--pc)); }
.sx-cv-line.is-draw { stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: sx-draw 1.3s cubic-bezier(.3, .1, .3, 1) forwards; }
.sx-cv-area { opacity: .95; }
.sx-cv-dot { stroke: var(--bg-1); stroke-width: 2; }
.sx-cv-dot.is-hi, .sx-cv-mark.is-hi { fill: var(--win); }
.sx-cv-dot.is-lo, .sx-cv-mark.is-lo { fill: var(--lose); }
.sx-cv-mark { font: 600 12px var(--font-num); }
.sx-cv-now { fill: var(--pc); stroke: #fff; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: sx-now 1.6s ease-in-out infinite; }
.sx-cv-empty { fill: var(--text-dim); font: 14px var(--font-ui); }
@keyframes sx-draw { to { stroke-dashoffset: 0; } }
@keyframes sx-now { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.45); } }
.sx-c-tro { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; }
.sx-c-it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(222, 184, 92, .12); background: rgba(5, 6, 11, .35); }
.sx-c-it b { display: block; font-size: 13.5px; font-weight: 600; }
.sx-c-it span { font-size: 11.5px; color: var(--rc); }

@media (max-width: 1180px) {
  .sx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sx-count { grid-template-columns: repeat(4, auto); }
  .sx-count-bar { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .sx-cab-head { flex-wrap: wrap; }
  .sx-tabs { order: 3; margin-left: 0; width: 100%; }
  .sx-pote { grid-template-columns: auto 1fr auto; }
  .sx-pote .sx-mini, .sx-pote .sx-go { display: none; }
  .sx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- animations réduites, rendu sans accélération ---------- */
html.reduce-motion .sx-fall, html.reduce-motion .sx-stage .sx-xl .sx-coin, html.reduce-motion .sx-plaque .sx-coin,
html.reduce-motion .sx-cell.is-got:hover .sx-coin, html.reduce-motion .sx-cv-now, html.reduce-motion .sx-btn.is-ping { animation: none !important; }
html.reduce-motion .sx-rays, html.reduce-motion .sx-shock, html.reduce-motion .sx-sparks { display: none; }
html.reduce-motion .sx-plaque { animation: sx-fade .3s both; }
html.reduce-motion .sx-card > *, html.reduce-motion .sx-card::before { animation: sx-fade .3s both; }
html.reduce-motion .sx-cv-line.is-draw { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
html.perf-low .sx-rays { display: none; }
html.perf-low .sx-name, html.perf-low .sx-cv-line { filter: none; }

/* UX-OVERLAYS 30/09 — changement de salle : les plaques des potes s'effacent le temps que le jeu se monte, puis sont reposées */
.sx-plaques { transition: opacity .25s; }
.sx-plaques.is-routing { opacity: 0; transition: none; }   /* d'un coup : pas même 0,1 s sur le nouvel écran */
/* TÉLÉPHONE — N5 (annexe B remesurée sur d1cc705) : la médaille du cabinet des trophées (26 px, épinglée sur l'avatar par
   js/succes.js) : 34 × 34 px de zone de toucher par un cadre transparent hors de son bord, 4 px en haut et en bas, 8 px à droite (sur
   l'avatar qui la porte : « Mon profil », un bouton large dont le centre reste dans le solde), RIEN à gauche (« ♛ », « 👑 » de l'hôte et la
   pastille du réseau y sont : 4 px de ce côté rognaient « 👑 Hôte » à 30,5 px, à 360). La médaille dessinée, sa place et son compteur ne
   changent pas. Bornée au téléphone. */
@media (orientation: portrait) and (max-width: 480px), (orientation: landscape) and (max-height: 560px) {
  .sx-btn::after { content: ""; position: absolute; inset: -5px -9px -5px -1px; border-radius: 17px; }
}
/* TÉLÉPHONE — N11 (annexe A de la revue au téléphone, REMESURÉE sur 1bedc6a) : la carte « Succès débloqué » : le kicker, la rareté et le rang du trophée (10 px) : 12 px. Mêmes polices, même interlettrage,
   même couleur ; on agrandit le texte, on ne redessine pas. Bornée au téléphone : le PC ne change pas (dev/tests-client/s5-tel-textes.mjs, D et D2). */
@media (orientation: portrait) and (max-width: 480px), (orientation: landscape) and (max-height: 560px) {
  .sx-stage.is-coin .sx-kicker, .sx-stage.is-coin .sx-tag { font-size: 12px; }
}
