@import url('fonts/fonts.css');

:root {
  color-scheme: dark;
  --ink: #fff8ff;
  --muted: #c7b8e5;
  --panel: rgba(36, 16, 74, 0.72);
  --panel-strong: rgba(29, 11, 64, 0.92);
  --stroke: rgba(255, 255, 255, 0.13);
  --pink: #ff4fc8;
  --purple: #9858ff;
  --cyan: #46e9ff;
  --gold: #ffd84d;
  font-family: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #100326; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 22%, rgba(125, 53, 238, 0.28), transparent 32%),
    radial-gradient(circle at 12% 75%, rgba(39, 202, 255, 0.13), transparent 25%),
    linear-gradient(145deg, #0d0320 0%, #190735 48%, #09021c 100%);
  -webkit-user-select: none; -moz-user-select: none; user-select: none;
  -webkit-touch-callout: none; touch-action: manipulation;
}
/* On réautorise la sélection uniquement là où c'est utile (saisie, lecture des CGV). */
input, textarea, select, [contenteditable="true"], .legal-page {
  -webkit-user-select: text; -moz-user-select: text; user-select: text;
}
/* Verrouillage portrait dans le navigateur (la PWA installée est déjà bridée par le manifeste). */
.rotate-lock { display: none; }
@media (max-width: 920px) and (orientation: landscape) {
  .rotate-lock { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; text-align: center; background: #0d0320; }
  .rotate-lock .rotate-icon { display: block; font-size: 56px; margin-bottom: 14px; animation: rotateHint 1.9s ease-in-out infinite; }
  .rotate-lock p { margin: 0 auto; max-width: 320px; font-family: 'Fredoka', sans-serif; font-size: 18px; color: var(--ink); }
}
@keyframes rotateHint { 0%, 100% { transform: rotate(0); } 55% { transform: rotate(-90deg); } }
.auth-page { min-height:100vh; display:grid; place-items:center; padding:20px; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(125,215,255,.7) 0 1px, transparent 1.5px);
  background-position: 0 0, 47px 83px;
  background-size: 113px 113px, 157px 157px;
}

.aurora {
  position: fixed;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .18;
  pointer-events: none;
}

.aurora-a { top: -18vw; right: -8vw; background: #ff3dcc; }
.aurora-b { bottom: -24vw; left: -9vw; background: #1fdfff; }

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.app { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 20px 0 28px; position: relative; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.account-button { padding: 9px 12px; border: 1px solid var(--stroke); border-radius: 12px; color: white; background: rgba(255,255,255,.07); cursor: pointer; font-size: 10px; font-weight: 900; }
.wallet { display: flex; gap: 7px; }
.wallet span { min-width: 54px; padding: 7px 9px; border: 1px solid var(--stroke); border-radius: 12px; color: var(--gold); background: rgba(255,255,255,.06); font-size: 12px; text-align: center; }
.wallet span:first-child { color: #ff70b8; }
.wallet span:last-child { color: var(--cyan); }
.wallet b { color: white; }
.lang-select { padding: 8px 7px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(255,255,255,.07); color: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; }
.lang-select option { color: #10022a; }

.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand strong { display: block; font-family: 'Fredoka', sans-serif; font-size: clamp(18px, 3vw, 25px); letter-spacing: .035em; line-height: .9; }
.brand strong i { color: var(--pink); font-size: .5em; font-style: normal; vertical-align: .2em; }
.brand small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; letter-spacing: .28em; }

.brand-orbit { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid rgba(113,233,255,.72); border-radius: 50%; transform: rotate(-17deg); box-shadow: 0 0 18px rgba(70,233,255,.25), inset 0 0 14px rgba(70,233,255,.15); }
.brand-orbit::after { content: ''; position: absolute; width: 56px; height: 18px; border: 2px solid rgba(255,79,200,.8); border-top-color: transparent; border-radius: 50%; }
.brand-orbit span { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, white, var(--pink) 30%, #7a2aff 72%); box-shadow: 0 0 15px var(--pink); }

.icon-button, .rotate-button {
  border: 1px solid var(--stroke);
  color: var(--ink);
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 22px rgba(5,0,20,.22);
  cursor: pointer;
}

.icon-button { width: 42px; height: 42px; border-radius: 14px; font-size: 21px; }
.icon-button[aria-pressed="true"] { color: var(--cyan); box-shadow: 0 0 20px rgba(70,233,255,.2), inset 0 1px 0 rgba(255,255,255,.12); }

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 22px; align-items: start; }

.play-column, .mission-panel {
  border: 1px solid var(--stroke);
  background: linear-gradient(155deg, rgba(49,20,96,.64), rgba(21,7,51,.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 30px 80px rgba(5,0,20,.35);
  backdrop-filter: blur(18px);
}

.play-column { border-radius: 28px; padding: 13px; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.mission-panel { border-radius: 28px; padding: 28px 24px 22px; }

.hud { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; margin-bottom: 8px; }
.hud-item { min-width: 0; padding: 8px 14px; text-align: center; border-right: 1px solid var(--stroke); }
.hud-item:last-child { border-right: 0; }
.hud-label { display: block; color: var(--muted); font-size: 9px; letter-spacing: .18em; }
.hud strong { font-family: 'Fredoka', sans-serif; font-size: 22px; }
.hud-score strong { color: var(--gold); text-shadow: 0 0 16px rgba(255,216,77,.35); }
.hud-energy { display: none; }
.hud-energy strong { color: var(--gold); }
#worldName[data-difficulty="hard"] { color: var(--gold); text-shadow: 0 0 14px rgba(255,216,77,.35); }
#worldName[data-difficulty="extreme"] { color: #ff83d5; text-shadow: 0 0 16px rgba(255,77,189,.48); }
#worldName[data-difficulty="boss"] { color: #ff825f; text-shadow: 0 0 18px rgba(255,116,79,.58); }

.board-card {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 23px;
  background:
    radial-gradient(circle at 50% 50%, rgba(150,64,255,.21), transparent 34%),
    linear-gradient(150deg, rgba(7,2,29,.58), rgba(24,5,57,.74));
}

.board-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 52%, rgba(4,0,17,.55) 100%);
}

#gameCanvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#gameCanvas:active { cursor: grabbing; }

.booster-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px auto 0; max-width: calc(100% - 16px); }
.booster-bar[hidden] { display: none; }
.booster-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 82px; padding: 7px 10px; border: 1px solid var(--stroke); border-radius: 14px; background: rgba(255,255,255,.05); color: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.booster-btn:not(:disabled):hover { border-color: var(--cyan); background: rgba(70,233,255,.1); }
.booster-btn:disabled { opacity: .4; cursor: default; }
.booster-btn .b-icon { font-size: 17px; line-height: 1; }
.booster-btn .b-label { font-size: 10px; font-weight: 800; }
.booster-btn .b-cost { font-size: 11px; font-weight: 900; color: #6cc6ff; }
.result-secondary { margin-top: 10px; padding: 9px 18px; border: 1px solid var(--stroke); border-radius: 12px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.result-secondary[hidden] { display: none; }
.result-secondary:hover { color: #fff; background: rgba(255,255,255,.08); }
.hint-pill {
  margin: 10px auto 0;
  width: fit-content;
  max-width: calc(100% - 24px);
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  color: #e9dfff;
  background: rgba(15,4,39,.72);
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  font-size: 11px;
  text-align: center;
  line-height: 1.35;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.combo-banner {
  position: absolute;
  top: 12%;
  left: 50%;
  z-index: 4;
  transform: translate(-50%, -12px) scale(.82);
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(24px, 5vw, 42px);
  color: white;
  text-shadow: 0 0 12px var(--pink), 0 3px 0 #7b23c8;
  opacity: 0;
  pointer-events: none;
}

.combo-banner.show { animation: combo-pop .9s ease-out; }
@keyframes combo-pop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.75); } 25% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -18px) scale(1); } }

.ring-controls { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 13px 8px 2px; }
.rotate-button { width: 48px; height: 42px; border-radius: 14px; font-size: 23px; transition: transform .15s ease, background .15s ease; }
.rotate-button:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.rotate-button:active { transform: scale(.95); }
.selected-ring { min-width: 128px; text-align: center; }
.selected-ring span { display: block; color: var(--muted); font-size: 8px; letter-spacing: .14em; }
.selected-ring strong { color: var(--cyan); font-family: 'Fredoka', sans-serif; font-size: 19px; }

.eyebrow { margin: 0 0 9px; color: var(--pink); font-size: 10px; font-weight: 800; letter-spacing: .19em; }
.mission-panel h1 { margin: 0 0 8px; font-family: 'Fredoka', sans-serif; font-size: 29px; line-height: 1; }
.mission-copy { margin: 0 0 26px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.energy-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 9px; letter-spacing: .11em; }
.energy-head strong { color: var(--gold); font-size: 13px; }
.progress-track { position: relative; height: 13px; margin-bottom: 24px; overflow: visible; border: 1px solid rgba(255,255,255,.11); border-radius: 99px; background: rgba(6,1,24,.58); }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--purple) 48%, var(--cyan)); box-shadow: 0 0 16px rgba(255,79,200,.5); transition: width .35s cubic-bezier(.2,.9,.3,1); }
.progress-spark { position: absolute; top: 50%; left: 0; transform: translate(-50%,-50%); color: white; font-size: 18px; text-shadow: 0 0 11px var(--cyan); transition: left .35s cubic-bezier(.2,.9,.3,1); }

.objective-card { display: flex; align-items: center; gap: 13px; padding: 15px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,.11); border-radius: 18px; background: rgba(255,255,255,.055); }
.objective-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--gold); background: radial-gradient(circle, rgba(255,216,77,.25), rgba(255,216,77,.04)); box-shadow: inset 0 0 13px rgba(255,216,77,.25), 0 0 18px rgba(255,216,77,.1); font-size: 23px; }
.objective-card small { display: block; color: var(--muted); font-size: 8px; letter-spacing: .16em; }
.objective-card strong { font-size: 13px; }

.tips { display: grid; gap: 10px; margin-bottom: 23px; }
.tips > div { display: flex; align-items: center; gap: 12px; }
.tips p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.25; }
.tips p strong { color: var(--ink); }
.tip-gem { width: 29px; text-align: center; font-size: 21px; }
.gem-4 { color: var(--pink); text-shadow: 0 0 11px var(--pink); }
.gem-chain { color: var(--cyan); text-shadow: 0 0 11px var(--cyan); }

.level-route { position: relative; display: flex; align-items: center; justify-content: space-between; margin: 0 8px 25px; }
.level-route::before { content: ''; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: rgba(255,255,255,.12); }
.route-node { position: relative; z-index: 1; width: 26px; height: 26px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.2); border-radius: 50%; color: var(--muted); background: #271050; font-size: 9px; }
.route-node.done { border-color: var(--purple); color: white; background: var(--purple); }
.route-node.current { width: 35px; height: 35px; border-color: var(--cyan); color: #14042f; background: var(--cyan); box-shadow: 0 0 19px rgba(70,233,255,.55); font-weight: 900; }

.primary-button, .secondary-button { width: 100%; border-radius: 15px; padding: 12px 16px; color: white; cursor: pointer; font-weight: 800; }
.primary-button { border: 0; background: linear-gradient(110deg, #ff3bbd, #8d43ff 52%, #27dffa); box-shadow: 0 10px 25px rgba(144,55,255,.38); }
.secondary-button { border: 1px solid var(--stroke); background: rgba(255,255,255,.06); }
.keyboard-help { margin: 12px 0 0; color: rgba(199,184,229,.58); font-size: 9px; text-align: center; }
.hub-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.hub-button { flex: 1 1 82px; max-width: 132px; min-width: 76px; padding: 12px 8px; border: 1px solid var(--stroke); border-radius: 14px; color: var(--muted); background: rgba(255,255,255,.055); cursor: pointer; font-size: 12px; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; line-height: 1.15; transition: background .2s, color .2s, transform .1s; }
.hub-button span[aria-hidden] { color: var(--cyan); font-size: 19px; line-height: 1; }
.hub-button:hover { color: #fff; background: rgba(255,255,255,.1); transform: translateY(-1px); }

/* Écrans (boutique, carte, succès, collection…) : vraie page plein écran, aérée. */
.panel-backdrop { position: fixed; inset: 0; z-index: 30; overflow-y: auto; overflow-x: hidden; background: radial-gradient(120% 80% at 50% -8%, #2c1358, #0d0320 62%); -webkit-overflow-scrolling: touch; }
.panel-backdrop[hidden] { display: none; }
.meta-panel { position: relative; width: min(860px, 100%); min-height: 100%; margin: 0 auto; padding: 46px 20px 96px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.meta-panel h2 { margin: 4px 0 8px; font-family: 'Fredoka', sans-serif; font-size: clamp(28px, 6vw, 40px); }
.meta-panel .eyebrow:not(#panelEyebrow) { margin-top: 34px !important; margin-bottom: 6px; font-size: 13px; letter-spacing: 2px; }
.panel-close { position: fixed; top: 16px; right: 16px; z-index: 35; width: 42px; height: 42px; border: 1px solid var(--stroke); border-radius: 13px; color: white; background: rgba(20,8,44,.72); backdrop-filter: blur(6px); cursor: pointer; font-size: 24px; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.meta-card { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--stroke); border-radius: 18px; background: rgba(255,255,255,.055); }
/* Contenus "étroits" recadrés et centrés pour ne pas s'étirer sur la page large. */
.auth-tabs, .auth-form, .account-summary { max-width: 460px; margin-left: auto; margin-right: auto; }
.world-head, .campaign-map, .map-summary { max-width: 540px; margin-left: auto; margin-right: auto; }
.share-link, .share-buttons { max-width: 480px; margin-left: auto; margin-right: auto; }
/* Récap des soldes en haut de la boutique */
.wallet-recap { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 4px; }
.wallet-chip { display: flex; align-items: center; gap: 12px; flex: 1 1 170px; padding: 14px 16px; border: 1px solid var(--stroke); border-radius: 16px; background: rgba(255,255,255,.05); }
.wallet-chip .wc-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; font-size: 18px; background: rgba(255,216,77,.12); color: var(--gold); }
.wallet-chip .wc-copy { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.wallet-chip b { font-size: 21px; font-family: 'Fredoka', sans-serif; }
.wallet-chip small { color: var(--muted); font-size: 11px; }
.wallet-chip.wc-crystal .wc-icon { color: #6cc6ff; background: rgba(108,198,255,.16); }
.wallet-chip.wc-life .wc-icon { color: #ff5f8f; background: rgba(255,95,143,.14); }
.wallet-chip .wc-icon { font-size: 27px; }
/* Icônes de monnaie inline : +50% et couleurs FIXES (indépendantes du thème) */
.ci { font-size: 1.5em; line-height: 1; vertical-align: -.14em; }
.ci-dust { color: #ffd84d; }
.ci-crystal { color: #6cc6ff; }
.ci-life { color: #ff6f9d; }
.meta-card button .ci, .price .ci, .pill-muted .ci { color: inherit; }
/* Explication des monnaies : repliable (show/hide) */
.shop-explain { margin-top: 8px; border: 1px solid var(--stroke); border-radius: 16px; background: rgba(255,255,255,.04); overflow: hidden; }
.shop-explain > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; color: var(--gold); font-weight: 800; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.shop-explain > summary::-webkit-details-marker { display: none; }
.shop-explain > summary::after { content: '▾'; transition: transform .15s; }
.shop-explain[open] > summary::after { transform: rotate(180deg); }
.shop-explain .meta-grid { padding: 0 16px 16px; }
.pill-muted { padding: 9px 13px; border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.07); font-weight: 800; font-size: 11px; white-space: nowrap; }
/* Différenciation visuelle des types d'achat de la boutique */
.shop-refill .meta-card, .shop-exchange .meta-card, .shop-pack .meta-card, .shop-theme .meta-card, .shop-premium .meta-card { position: relative; padding-right: 26px; }
.shop-refill .meta-card { border-left: 3px solid var(--cyan); }
.shop-exchange .meta-card { border-left: 3px solid var(--purple); }
.shop-pack .meta-card { border-left: 3px solid var(--pink); }
.shop-theme .meta-card { border-left: 3px solid var(--gold); }
.shop-premium .meta-card { border-left: 3px solid var(--gold); background: linear-gradient(120deg, rgba(255,216,77,.10), rgba(152,88,255,.13)); }
.shop-refill .meta-card::after { content: '⚡'; }
.shop-exchange .meta-card::after { content: '🔄'; }
.shop-pack .meta-card::after { content: '🎲'; }
.shop-theme .meta-card::after { content: '🎨'; }
.shop-premium .meta-card::after { content: '★'; color: var(--gold); }
.shop-refill .meta-card::after, .shop-exchange .meta-card::after, .shop-pack .meta-card::after, .shop-theme .meta-card::after, .shop-premium .meta-card::after { position: absolute; top: 7px; right: 9px; font-size: 12px; opacity: .9; line-height: 1; pointer-events: none; }
.shop-exchange .meta-icon { color: var(--purple); background: rgba(152,88,255,.15); }
.shop-pack .meta-icon { color: var(--pink); background: rgba(255,79,200,.15); }
.shop-theme .meta-icon { color: var(--cyan); background: rgba(70,233,255,.13); }
.meta-card .meta-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--gold); background: rgba(255,216,77,.12); font-size: 20px; }
.meta-card .meta-copy { flex: 1; min-width: 0; }
.meta-card strong, .meta-card small { display: block; }
.meta-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.meta-card button { padding: 8px 11px; border: 0; border-radius: 10px; color: #17052f; background: var(--cyan); cursor: pointer; font-weight: 900; font-size: 10px; }
.meta-card button:disabled { color: var(--muted); background: rgba(255,255,255,.09); cursor: default; }
/* États des succès : obtenu / à réclamer / verrouillé */
.meta-card.ach-done { border-color: rgba(45,212,167,.55); background: linear-gradient(120deg, rgba(45,212,167,.16), rgba(45,212,167,.05)); }
.meta-card.ach-done .meta-icon { color: #7df3cd; background: rgba(45,212,167,.18); }
.meta-card.ach-done .progress-mini i { background: linear-gradient(90deg, #2dd4a7, #7df3cd); }
.meta-card.ach-done button:disabled { color: #0c2a22; background: #7df3cd; }
.meta-card.ach-ready { border-color: rgba(255,216,77,.7); background: linear-gradient(120deg, rgba(255,216,77,.16), rgba(255,79,200,.07)); box-shadow: 0 0 22px rgba(255,216,77,.22); }
.meta-card.ach-ready .meta-icon { color: #ffe9a3; background: rgba(255,216,77,.2); }
.meta-card.ach-locked { opacity: .72; }
.meta-card.ach-locked .meta-icon { color: var(--muted); background: rgba(255,255,255,.07); }
.progress-mini { height: 5px; margin-top: 8px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.1); }
.progress-mini i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--cyan)); }
.streak { margin-bottom: 14px; padding: 13px 15px; border-radius: 15px; color: var(--gold); background: rgba(255,216,77,.08); font-weight: 800; }
.price { white-space: nowrap; color: var(--gold); font-weight: 900; }
.legal-note { margin: 15px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.social-auth { max-width:460px; margin:0 auto 4px; display:grid; gap:9px; }
.social-button { display:flex; align-items:center; justify-content:center; gap:10px; padding:11px 14px; border:1px solid var(--stroke); border-radius:11px; color:white; background:rgba(255,255,255,.06); cursor:pointer; font-size:14px; font-weight:600; transition:background .15s, border-color .15s; }
.social-button:hover { background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.35); }
.social-button .social-icon { width:18px; height:18px; flex:0 0 auto; }
.social-button.social-facebook { background:#1877f2; border-color:#1877f2; }
.social-button.social-facebook:hover { background:#1466d4; }
.auth-sep { max-width:460px; margin:14px auto; display:flex; align-items:center; gap:12px; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.auth-sep::before, .auth-sep::after { content:""; flex:1; height:1px; background:var(--stroke); }
.auth-tabs { display: grid; grid-template-columns:1fr 1fr; gap: 8px; margin-bottom: 15px; }
.auth-tabs button { padding: 9px; border: 1px solid var(--stroke); border-radius: 11px; color: white; background: rgba(255,255,255,.06); cursor:pointer; }
.auth-tabs button.active { color:#160630; background:var(--cyan); }
.auth-form { display:grid; gap:12px; }
.auth-form label { color:var(--muted); font-size:11px; }
.auth-form input { width:100%; margin-top:5px; padding:11px; border:1px solid var(--stroke); border-radius:10px; color:white; background:rgba(5,0,20,.45); }
.auth-form .text-button { border:0; color:var(--cyan); background:none; cursor:pointer; font-size:11px; }
.account-summary { display:grid; gap:10px; }
.world-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:15px; }
.world-head button { width:36px; height:36px; border:1px solid var(--stroke); border-radius:11px; color:white; background:rgba(255,255,255,.07); cursor:pointer; }
.world-head strong { text-align:center; font-family:Fredoka,sans-serif; }
.campaign-map { display:grid; grid-template-columns:repeat(5,1fr); gap:11px; }
.level-node { position:relative; aspect-ratio:1; border:2px solid rgba(255,255,255,.16); border-radius:50%; color:var(--muted); background:#25104d; cursor:pointer; font-weight:900; }
.level-node:disabled { opacity:.35; cursor:default; }
.level-node.current { border-color:var(--cyan); color:#13042d; background:var(--cyan); box-shadow:0 0 18px rgba(70,233,255,.45); }
.level-node.boss { border-radius:13px; border-color:var(--pink); }
.level-node .stars { position:absolute; left:50%; bottom:-8px; width:48px; transform:translateX(-50%); color:var(--gold); font-size:8px; letter-spacing:-1px; }
.map-summary { margin-top:20px; padding:12px 15px; border-radius:14px; color:var(--muted); background:rgba(255,255,255,.055); font-size:11px; text-align:center; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 50; max-width: calc(100% - 30px); padding: 11px 17px; border: 1px solid var(--stroke); border-radius: 999px; color: white; background: #341364; box-shadow: 0 12px 40px #050013; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: .25s ease; font-size: 12px; font-weight: 800; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
body.theme-solar { --pink: #ff8a3d; --purple: #ca3eff; --cyan: #ffe466; }
body.theme-ocean { --pink: #37d4ff; --purple: #3568ff; --cyan: #5cffc7; }
body.theme-emeraude { --pink: #2dd4a7; --purple: #22c55e; --cyan: #bbf7d0; }
body.theme-crimson { --pink: #ff5470; --purple: #ff2d55; --cyan: #ff9e3d; }
body.theme-amethyste { --pink: #c77dff; --purple: #9d4edd; --cyan: #e0aaff; }
body.theme-givre { --pink: #7dd3fc; --purple: #818cf8; --cyan: #cffafe; }

.result-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px;
  text-align: center;
  background: radial-gradient(circle at 50% 43%, rgba(146,60,255,.4), rgba(11,2,32,.91) 58%);
  backdrop-filter: blur(8px);
}
.result-overlay[hidden] { display: none; }
.result-star { width: 94px; height: 94px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 50%; color: white; background: radial-gradient(circle, white 0 7%, #ffe660 14%, #ff4fc8 39%, rgba(151,70,255,.16) 70%); box-shadow: 0 0 35px #ff4fc8, 0 0 85px rgba(70,233,255,.55); font-size: 46px; animation: star-breathe 1.8s ease-in-out infinite; }
@keyframes star-breathe { 50% { transform: scale(1.08) rotate(5deg); filter: brightness(1.18); } }
.result-overlay h1 { margin: 0 0 9px; font-family: 'Fredoka', sans-serif; font-size: clamp(34px,7vw,56px); }
.result-overlay p:not(.eyebrow) { max-width: 320px; margin: 0 0 23px; color: var(--muted); }
.result-overlay .primary-button { width: min(260px, 100%); }

@media (max-width: 860px) {
  .game-layout { grid-template-columns: minmax(0, 1fr); }
  .mission-panel { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; align-items: start; }
  .mission-panel > .eyebrow, .mission-panel > h1, .mission-panel > .mission-copy, .mission-panel > .secondary-button, .mission-panel > .keyboard-help { grid-column: 1 / -1; }
  .mission-copy { margin-bottom: 19px; }
  .objective-card { grid-column: 2; grid-row: 4 / span 2; margin-top: 0; }
}

@media (max-width: 560px) {
  .app { width: min(100% - 8px, 620px); padding-top: 12px; }
  .app-header { margin-inline: 7px; margin-bottom: 11px; }
  .brand small { display: none; }
  .app-header { flex-wrap: wrap; gap: 10px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
  .wallet { gap: 6px; }
  .wallet span { min-width: 0; padding: 6px 8px; font-size: 10px; }
  .account-button { padding: 8px 10px; font-size: 10px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .play-column { padding: 4px; border-radius: 22px; }
  .board-card { border-radius: 18px; }
  .hud { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .hud-energy { display: block; }
  .hud-item { padding: 7px 3px; }
  .hud-label { font-size: 8px; letter-spacing: .08em; }
  .hud strong { font-size: 16px; }
  .energy-head { display: none; }
  .hint-pill { font-size: 9px; padding: 6px 10px; margin-top: 8px; }
  .ring-controls { display: none; }
  .panel-close { top: 38px; }
  .mission-panel { display: block; padding: 24px 20px 20px; }
  .keyboard-help { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Pages légales */
.legal-page { max-width: 820px; margin: 0 auto; padding: 40px 22px 80px; }
.legal-page .legal-back { display:inline-block; margin-bottom: 22px; color: var(--cyan); text-decoration:none; font-weight:700; }
.legal-page h1 { font-family:'Fredoka',sans-serif; font-size: clamp(28px,5vw,40px); margin: 6px 0 4px; }
.legal-page h2 { font-family:'Fredoka',sans-serif; font-size: 20px; margin: 32px 0 10px; color: var(--ink); }
.legal-page p, .legal-page li { color: var(--muted); line-height: 1.6; }
.legal-page a { color: var(--cyan); }
.legal-page .updated { font-size: 13px; color: rgba(199,184,229,.7); }
.legal-page ul { padding-left: 20px; }
.legal-page section { border-top: 1px solid var(--stroke); }
.legal-topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 10px 16px; background: rgba(9, 2, 24, 0.72); backdrop-filter: blur(6px); border-bottom: 1px solid var(--stroke); }
.legal-footer { margin-top: 28px; padding: 26px 22px calc(24px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--stroke); background: linear-gradient(180deg, transparent, rgba(9, 2, 24, 0.55)); }
.legal-footer-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.legal-copyright { margin: 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.legal-copyright .footer-orbit { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe96c, #ff50c8 55%, #8a43ff); box-shadow: 0 0 12px rgba(255, 80, 200, .5); flex: none; }
.legal-copyright strong { color: var(--ink); font-weight: 800; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.legal-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.legal-links a:hover { color: var(--ink); background: rgba(255, 255, 255, .07); }
@media (max-width: 620px) { .legal-footer-inner { flex-direction: column; text-align: center; } .legal-links { justify-content: center; } }

/* Bannière cookies */
.cookie-banner {
  position: fixed; inset: auto 16px 16px 16px; z-index: 60;
  max-width: 720px; margin: 0 auto;
  background: var(--panel-strong); border: 1px solid var(--stroke); border-radius: 18px;
  padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.45);
  display: grid; gap: 12px;
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.cookie-banner a { color: var(--cyan); }
.cookie-banner .cookie-actions { display:flex; flex-wrap:wrap; gap: 10px; }
.cookie-banner button { flex: 1 1 auto; min-width: 150px; }
.cookie-banner .cookie-refuse { background: rgba(255,255,255,.08); color: var(--ink); border: 1px solid var(--stroke); border-radius: 12px; padding: 12px 16px; cursor: pointer; font-weight: 700; }
@media (min-width: 620px) { .cookie-banner { grid-template-columns: 1fr auto; align-items: center; } .cookie-banner .cookie-actions { justify-content: flex-end; } }

/* Bénéfices d'offre dans la boutique */
.shop-perks { display: block; margin-top: 4px; color: var(--gold); font-weight: 800; font-size: 12px; }

/* Partage / parrainage */
.share-link { display: block; margin-bottom: 14px; }
.share-link span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.share-link input { width: 100%; padding: 11px; border: 1px solid var(--stroke); border-radius: 12px; background: #160630; color: #fff; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; padding: 12px 15px; border-radius: 12px; border: 1px solid var(--stroke); background: rgba(255,255,255,.06); color: #fff; font-weight: 800; font-size: 13px; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.share-btn.x { font-size: 17px; }
.share-btn.x:hover { background: #000; }
.share-btn.fb:hover { background: #1877f2; }
.share-btn.wa:hover { background: #25d366; color: #04121a; }
.share-btn.tg:hover { background: #28a8e9; color: #04121a; }
.share-btn.copy:hover, .share-btn.native:hover { background: rgba(255,255,255,.12); }

/* Cartes collector */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 10px; margin-top: 8px; }
.collector-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 3 / 4; border-radius: 14px; border: 1px solid var(--stroke); background: rgba(255,255,255,.05); overflow: hidden; padding: 6px; }
.collector-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.collector-card .card-noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; opacity: .5; }
.collector-card .card-name { position: relative; z-index: 1; width: 100%; text-align: center; font-size: 11px; font-weight: 800; padding: 3px 4px; border-radius: 8px; background: rgba(6,2,18,.74); }
.collector-card .card-qty { position: absolute; top: 5px; right: 5px; z-index: 1; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 999px; background: rgba(6,2,18,.82); color: var(--gold); }
.collector-card.owned { cursor: zoom-in; }
.collector-card.locked .card-noimg, .collector-card.locked .card-name { opacity: .55; }
.collector-card.rarity-speciale { border-color: rgba(70,233,255,.6); }
.collector-card.rarity-legendaire { border-color: rgba(255,216,77,.75); }
.collector-card.owned.rarity-speciale { box-shadow: 0 0 14px rgba(70,233,255,.28); }
.collector-card.owned.rarity-legendaire { box-shadow: 0 0 20px rgba(255,216,77,.4); }

/* Zoom plein écran d'une carte possédée */
.cardzoom-overlay { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; background: rgba(6,2,18,.9); backdrop-filter: blur(8px); animation: revealFade .25s ease; }
.cardzoom-overlay[hidden] { display: none !important; }
.cardzoom-card { position: relative; width: min(80vw, 330px); aspect-ratio: 3 / 4; border-radius: 20px; border: 1px solid var(--stroke); background: linear-gradient(165deg, #1d0f3a, #10061f); overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.6); animation: lootPop .5s cubic-bezier(.2, 1.4, .4, 1); }
.cardzoom-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cardzoom-card .card-noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 70px; opacity: .5; }
.cardzoom-name { position: absolute; left: 0; right: 0; bottom: 34px; z-index: 1; text-align: center; font-size: 18px; font-weight: 800; padding: 6px; text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.cardzoom-rar { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 1; text-align: center; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.cardzoom-card.rarity-speciale { border-color: rgba(70,233,255,.7); box-shadow: 0 0 40px rgba(70,233,255,.35), 0 24px 70px rgba(0,0,0,.6); }
.cardzoom-card.rarity-legendaire { border-color: rgba(255,216,77,.85); box-shadow: 0 0 54px rgba(255,216,77,.5), 0 24px 70px rgba(0,0,0,.6); }
.cardzoom-close { width: min(80vw, 330px); }
/* Modale de confirmation (suppression de compte) */
.confirm-overlay { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; background: rgba(5,1,16,.88); backdrop-filter: blur(8px); }
.confirm-overlay[hidden] { display: none !important; }
.confirm-box { width: min(420px, 100%); padding: 26px 24px; border: 1px solid var(--stroke); border-radius: 22px; background: linear-gradient(160deg, #2a0f4e, #17072f); box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.confirm-box h2 { margin: 0 0 10px; font-family: 'Fredoka', sans-serif; font-size: 24px; }
.confirm-warn { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.confirm-field { display: block; margin-bottom: 20px; color: var(--muted); font-size: 12px; }
.confirm-field input { width: 100%; margin-top: 6px; padding: 12px; border: 1px solid var(--stroke); border-radius: 11px; color: #fff; background: rgba(5,0,20,.5); }
.confirm-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; color: var(--muted); font-size: 13px; line-height: 1.4; cursor: pointer; }
.confirm-check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; accent-color: #ff5c8a; cursor: pointer; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.confirm-cancel { padding: 11px 18px; border: 1px solid var(--stroke); border-radius: 12px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.confirm-cancel:hover { color: #fff; background: rgba(255,255,255,.08); }
.confirm-danger { padding: 11px 18px; border: 0; border-radius: 12px; background: #ff4d6d; color: #2a0410; font-weight: 900; cursor: pointer; }
.confirm-danger:hover { background: #ff2d55; }

/* Bouton d'aide sur le plateau */
.help-button { position: absolute; top: 12px; right: 12px; z-index: 6; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--stroke); background: rgba(10,4,28,.72); color: #fff; font-family: 'Fredoka', sans-serif; font-size: 18px; font-weight: 800; cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(4px); transition: background .15s, transform .15s; }
.help-button:hover { background: rgba(159,97,255,.55); transform: scale(1.08); }

/* Tutoriel / onboarding */
.tuto-overlay { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; padding: 20px; background: rgba(5,1,16,.88); backdrop-filter: blur(8px); }
.tuto-overlay[hidden] { display: none !important; }
.tuto-box { width: min(440px, 100%); padding: 30px 26px 24px; border: 1px solid var(--stroke); border-radius: 24px; background: linear-gradient(160deg, #2a0f4e, #17072f); box-shadow: 0 30px 90px rgba(0,0,0,.6); text-align: center; }
.tuto-visual { width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; line-height: 1; background: radial-gradient(circle at 50% 40%, rgba(159,97,255,.5), rgba(82,232,255,.14) 70%, transparent); box-shadow: 0 0 40px rgba(159,97,255,.35); }
.tuto-box h2 { margin: 0 0 12px; font-family: 'Fredoka', sans-serif; font-size: 24px; }
.tuto-box p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.tuto-dots { display: flex; gap: 7px; justify-content: center; margin-bottom: 20px; }
.tuto-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.22); transition: background .2s, transform .2s; }
.tuto-dot.on { background: var(--cyan); transform: scale(1.25); }
.tuto-actions { display: flex; gap: 10px; align-items: center; justify-content: center; }
.tuto-next { min-width: 150px; }
.tuto-skip { padding: 11px 16px; border: 0; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }
.tuto-skip:hover { color: #fff; }
.tuto-skip[hidden] { display: none; }

/* Classement */
.lb-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; }
.lb-row, .lb-me { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(255,255,255,.04); }
.lb-row:nth-child(1) { border-color: rgba(255,216,77,.5); background: rgba(255,216,77,.08); }
.lb-row:nth-child(2) { border-color: rgba(210,222,255,.4); }
.lb-row:nth-child(3) { border-color: rgba(255,145,120,.4); }
.lb-me { margin-top: 12px; border-color: var(--cyan); background: rgba(82,232,255,.1); }
.lb-rank { font-family: 'Fredoka', sans-serif; font-weight: 800; font-size: 18px; text-align: center; }
.lb-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-detail { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Season Pass */
.season-passcta { color: var(--cyan); margin: 8px 0 0; }
.season-track { display: grid; gap: 9px; margin-top: 16px; }
.season-tier { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 8px; align-items: stretch; padding: 8px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(255,255,255,.03); opacity: .62; }
.season-tier.reached { opacity: 1; border-color: rgba(82,232,255,.35); }
.season-tier-n { display: grid; place-items: center; font-family: 'Fredoka', sans-serif; font-weight: 800; font-size: 16px; color: var(--muted); }
.season-lane { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 8px 6px; border-radius: 9px; background: rgba(5,0,20,.35); }
.season-lane small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.season-lane-prem { background: linear-gradient(160deg, rgba(159,97,255,.18), rgba(82,232,255,.08)); }
.season-reward { font-weight: 800; font-size: 13px; }
.season-lane button { padding: 6px 12px; font-size: 12px; }
.season-lane .pill-muted { font-size: 12px; }
.confirm-danger:disabled { opacity: .5; cursor: default; }

/* Révélation de carte (coffre / boss / pack) */
.reveal-overlay { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 20px; background: rgba(6, 2, 18, 0.88); backdrop-filter: blur(8px); animation: revealFade .3s ease; overflow: hidden; }
.reveal-overlay[hidden] { display: none !important; }
.reveal-title { color: var(--gold); font-size: 15px; letter-spacing: 3px; }
.reveal-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.9), rgba(255,255,255,0) 55%); animation: revealFlash .85s ease-out; }
.reveal-flash.flash-legendaire { background: radial-gradient(circle at 50% 42%, rgba(255,216,77,.95), rgba(255,120,0,0) 62%); }
.reveal-flash.flash-speciale { background: radial-gradient(circle at 50% 42%, rgba(70,233,255,.92), rgba(70,233,255,0) 60%); }
.reveal-title, .reveal-close { position: relative; z-index: 2; }
.reveal-cards { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; max-width: 640px; }
.reveal-card { position: relative; overflow: hidden; width: min(46vw, 156px); padding: 12px; border-radius: 18px; border: 1px solid var(--stroke); background: linear-gradient(165deg, #1d0f3a, #10061f); text-align: center; transform: scale(.35) rotateY(90deg); opacity: 0; animation: revealCard .6s cubic-bezier(.2, 1.35, .4, 1) forwards; }
.reveal-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.3) 48%, transparent 64%); transform: translateX(-130%); animation: revealShimmer 1.5s ease-in-out .5s; }
.reveal-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.reveal-emoji { display: grid; place-items: center; aspect-ratio: 3 / 4; font-size: 54px; }
.reveal-name { margin-top: 8px; font-weight: 800; font-size: 14px; }
.reveal-rar { font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.reveal-card .reveal-new { margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--gold); }
.reveal-card .reveal-dust { margin-top: 4px; font-size: 12px; color: var(--cyan); }
.reveal-card.rarity-speciale { border-color: rgba(70,233,255,.7); box-shadow: 0 0 22px rgba(70,233,255,.4); }
.reveal-card.rarity-legendaire { border-color: rgba(255,216,77,.85); animation: revealCard .6s cubic-bezier(.2, 1.35, .4, 1) forwards, legendPulse 1.9s ease-in-out .7s infinite; }
.reveal-rays { position: absolute; z-index: 0; top: 50%; left: 50%; width: 150vmax; height: 150vmax; margin: -75vmax 0 0 -75vmax; pointer-events: none; opacity: 0; transition: opacity .5s; background: repeating-conic-gradient(from 0deg, rgba(255,216,77,.13) 0deg 7deg, transparent 7deg 20deg); animation: raysSpin 16s linear infinite; }
.reveal-rays.show { opacity: 1; }
.reveal-sparks { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.reveal-spark { position: absolute; opacity: 0; text-shadow: 0 0 8px currentColor; animation: sparkPop 1.5s ease-out forwards; }
@keyframes revealFade { from { opacity: 0; } }
@keyframes revealFlash { 0% { opacity: 0; } 14% { opacity: 1; } 100% { opacity: 0; } }
@keyframes revealCard { to { transform: scale(1) rotateY(0); opacity: 1; } }
@keyframes revealShimmer { to { transform: translateX(130%); } }
@keyframes legendPulse { 0%, 100% { box-shadow: 0 0 30px rgba(255,216,77,.55); } 50% { box-shadow: 0 0 54px rgba(255,216,77,.95); } }
@keyframes raysSpin { to { transform: rotate(360deg); } }
@keyframes sparkPop { 0% { opacity: 0; transform: scale(0) translateY(6px); } 22% { opacity: 1; transform: scale(1.15) translateY(-4px); } 100% { opacity: 0; transform: scale(.3) translateY(-46px); } }
@media (prefers-reduced-motion: reduce) { .reveal-card, .reveal-flash, .reveal-overlay, .reveal-rays, .reveal-spark, .reveal-card::after { animation: none; transform: none; opacity: 1; } .reveal-spark, .reveal-card::after { display: none; } }

/* Révélation des récompenses classiques (poussière / cristaux / vies) — distincte des cartes */
.loot-overlay { position: fixed; inset: 0; z-index: 82; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 20px; background: radial-gradient(circle at 50% 45%, rgba(40,20,80,.85), rgba(6,2,18,.94)); backdrop-filter: blur(6px); animation: revealFade .3s ease; overflow: hidden; }
.loot-overlay[hidden] { display: none !important; }
.loot-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.9), rgba(255,255,255,0) 55%); animation: revealFlash .85s ease-out; }
.loot-glow { position: absolute; top: 45%; left: 50%; width: 60vmax; height: 60vmax; transform: translate(-50%,-50%); pointer-events: none; border-radius: 50%; background: radial-gradient(circle, rgba(255,216,77,.26), rgba(255,216,77,0) 62%); animation: lootGlowPulse 2.4s ease-in-out infinite; }
.loot-title { color: var(--gold); font-size: 15px; letter-spacing: 3px; position: relative; z-index: 2; }
.loot-items { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; }
.loot-item { display: flex; flex-direction: column; align-items: center; gap: 8px; transform: scale(0); animation: lootPop .6s cubic-bezier(.2, 1.5, .4, 1) forwards; }
.loot-item.loot-dust { color: #ffd84d; }
.loot-item.loot-crystals { color: #46e9ff; }
.loot-item.loot-lives { color: #ff5f8f; }
.loot-disc { position: relative; width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; font-size: 60px; background: radial-gradient(circle at 50% 36%, rgba(255,255,255,.22), rgba(255,255,255,.04)); border: 2px solid currentColor; box-shadow: 0 0 34px currentColor, inset 0 0 22px rgba(255,255,255,.15); }
.loot-disc::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: lootRing 1s ease-out .15s; }
.loot-amount { font-size: 30px; font-weight: 800; color: #fff; }
.loot-name { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
@keyframes lootPop { 0% { transform: scale(0) rotate(-12deg); } 60% { transform: scale(1.18) rotate(4deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes lootRing { 0% { opacity: .8; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes lootGlowPulse { 0%, 100% { opacity: .55; transform: translate(-50%,-50%) scale(.9); } 50% { opacity: .9; transform: translate(-50%,-50%) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .loot-item, .loot-flash, .loot-glow, .loot-disc::before { animation: none; transform: none; opacity: 1; } }
