/* =============================================================
   MISA SHOP — design system 2026-05-02
   Palette : violet vif sur noir profond. Animations discrètes
   mais impactantes (pulse, glow, gradient drift, hover lift).
   ============================================================= */

:root {
  /* Couleurs marque */
  --purple:        #B57BFF;
  --purple-vivid:  #A855F7;
  --purple-dim:    #7C3AED;
  --purple-deep:   #5B21B6;
  --purple-glow:   rgba(181, 123, 255, 0.18);
  --purple-soft:   rgba(168, 85, 247, 0.08);
  --magenta:       #E879F9;

  --green:  #34C759;
  --orange: #FF9500;
  --red:    #FF4D6D;
  --red-dim: #C2185B;

  /* Fonds — noir teinté violet pour cohérence */
  --bg:          #07050B;
  --bg-card:     #110A1F;
  --bg-raised:   #1A1030;
  --bg-input:    #0E0818;
  --bg-nav:      #060309;
  --bg-overlay:  rgba(7, 5, 11, 0.92);

  --white:     #F5F0FF;
  --grey:      #9789B0;
  --grey-dim:  #5C4F77;
  --line:        rgba(181,123,255,0.06);
  --line-light:  rgba(181,123,255,0.12);

  /* Compat anciens noms (pour pas casser ce qui hérite) */
  --gold:       var(--purple);
  --gold-dim:   var(--purple-dim);
  --gold-glow:  var(--purple-glow);

  --r:    14px;
  --r-sm: 10px;
  --r-lg: 18px;
  --r-xl: 22px;

  --nav-h:  64px;
  --head-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  --shadow-purple: 0 8px 32px -8px rgba(168, 85, 247, 0.35);
  --shadow-card:   0 6px 24px -10px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 800px 500px at 20% 10%, rgba(168,85,247,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 700px 600px at 90% 80%, rgba(232,121,249,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: bgDrift 30s ease-in-out infinite alternate;
}

@keyframes bgDrift {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  50%  { transform: translate(-2%, 3%) scale(1.05); opacity: 0.85; }
  100% { transform: translate(2%, -2%) scale(1.02); opacity: 1; }
}

#app { display: flex; flex-direction: column; height: 100%; position: relative; z-index: 1; }
.app-hidden { display: none !important; }

/* =============================================================
   GATE (écran de chargement)
   ============================================================= */

.tg-gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  overflow: hidden;
  transition: opacity .5s cubic-bezier(.4,0,.2,1), transform .5s cubic-bezier(.4,0,.2,1);
}

.tg-gate::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 40%, rgba(168,85,247,.12) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 30% 80%, rgba(232,121,249,.08) 0%, transparent 60%);
  pointer-events: none;
  animation: bgDrift 25s ease-in-out infinite alternate;
}

.tg-gate.tg-gate-pass {
  opacity: 0; transform: scale(1.05); pointer-events: none;
}

.tg-gate-inner {
  text-align: center; position: relative; z-index: 1;
  animation: gateIn .6s cubic-bezier(.16,1,.3,1) both;
}

@keyframes gateIn {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tg-gate-logo {
  width: 80px; height: 80px; margin: 0 auto 24px;
  border-radius: 22px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(168,85,247,.18), rgba(232,121,249,.08));
  border: 1px solid rgba(168,85,247,.20);
  animation: gatePulse 2s ease-in-out infinite;
}

@keyframes gatePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168,85,247,.25); }
  50%      { box-shadow: 0 0 40px 12px rgba(168,85,247,.10); }
}

.tg-gate-logo svg { width: 40px; height: 40px; color: var(--purple); }

.tg-gate-brand {
  font-size: 24px; font-weight: 900; letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  animation: gradientShift 4s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.tg-gate-text {
  font-size: 14px; font-weight: 500; color: var(--grey);
  letter-spacing: .01em; margin-bottom: 28px;
}

.tg-gate-bar {
  width: 180px; height: 3px; margin: 0 auto; border-radius: 3px;
  background: var(--line-light); overflow: hidden;
}

.tg-gate-bar span {
  display: block; width: 40%; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--purple-vivid), var(--magenta));
  animation: gateBar 1.2s ease-in-out infinite;
}

@keyframes gateBar {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.tg-gate-success .tg-gate-logo {
  background: linear-gradient(135deg, rgba(52,199,89,.15), rgba(52,199,89,.05));
  border-color: rgba(52,199,89,.2);
  animation: gateSuccessPop .5s cubic-bezier(.16,1,.3,1);
}

@keyframes gateSuccessPop {
  0%   { transform: scale(.8); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.tg-gate-success .tg-gate-logo svg { color: var(--green); }
.tg-gate-success .tg-gate-text { color: var(--green); }
.tg-gate-success .tg-gate-bar span {
  width: 100%; background: var(--green); animation: none;
}

.tg-gate-blocked .tg-gate-logo {
  background: linear-gradient(135deg, rgba(255,77,109,.15), rgba(255,77,109,.04));
  border-color: rgba(255,77,109,.18); animation: gateShake .5s ease;
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.tg-gate-blocked .tg-gate-brand {
  background: linear-gradient(135deg, var(--red), var(--magenta));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.tg-gate-blocked .tg-gate-text { color: var(--grey); margin-bottom: 12px; }
.tg-gate-blocked .tg-gate-bar { display: none; }

.tg-gate-sub {
  font-size: 13px; color: var(--grey-dim); line-height: 1.6;
  max-width: 280px; margin: 0 auto;
}

.tg-gate-sub a {
  color: var(--purple); text-decoration: none; font-weight: 700;
  border-bottom: 1px dashed rgba(181,123,255,0.4);
}

.tg-gate-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px; padding: 8px 16px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 100px; font-size: 12px; font-weight: 600; color: var(--grey);
}

.tg-gate-badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  animation: dotBlink 1.5s ease infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}

/* =============================================================
   ICÔNES
   ============================================================= */

.ico { width: 20px; height: 20px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.ico-nav { width: 22px; height: 22px; stroke: var(--grey-dim); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.2s, transform 0.2s; }
.ico-24 { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.ico-sm { width: 16px; height: 16px; }

/* =============================================================
   HEADER
   ============================================================= */

#app-header {
  flex-shrink: 0;
  height: var(--head-h);
  padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(17,10,31,0.95), rgba(7,5,11,0.85));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 20;
  position: relative;
}

#app-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  opacity: 0.4;
}

.h-left { display: flex; align-items: center; gap: 12px; }

.h-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff;
  overflow: hidden; flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 16px -4px var(--purple-glow);
  animation: avatarPulse 3s ease-in-out infinite;
}

.h-avatar::before {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--purple-vivid), var(--magenta), var(--purple-vivid));
  z-index: -1;
  filter: blur(6px);
  opacity: 0.5;
  animation: avatarRotate 6s linear infinite;
}

@keyframes avatarPulse {
  0%, 100% { box-shadow: 0 4px 16px -4px var(--purple-glow); }
  50%      { box-shadow: 0 4px 28px -2px rgba(168,85,247,0.45); }
}

@keyframes avatarRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.h-name { font-weight: 800; font-size: 14px; letter-spacing: -0.3px; }
.h-sub {
  font-size: 9.5px; color: var(--purple); font-weight: 800; letter-spacing: 1.6px;
  text-transform: uppercase;
}

.h-bal {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-raised));
  border: 1px solid var(--line-light);
  border-radius: 100px;
  font-size: 12.5px; font-weight: 800; color: var(--purple);
  position: relative;
  overflow: hidden;
}

.h-bal::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(232,121,249,0.15) 50%, transparent 70%);
  animation: shimmer 3.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* =============================================================
   MAIN CONTENT
   ============================================================= */

#app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
  -webkit-overflow-scrolling: touch;
}

#app-content::-webkit-scrollbar { display: none; }

.page-pad { padding: 16px; }

/* =============================================================
   NAVBAR
   ============================================================= */

#app-navbar {
  flex-shrink: 0;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex; align-items: center; justify-content: space-around;
  background: linear-gradient(0deg, var(--bg-nav) 60%, rgba(6,3,9,0.92));
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 20;
  position: relative;
}

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 12px; border-radius: var(--r-sm);
  cursor: pointer; user-select: none;
  transition: all 0.2s ease; position: relative;
  min-width: 0;
}

.nav-item .ico-nav { width: 22px; height: 22px; }
.nav-item span { font-size: 9px; font-weight: 700; color: var(--grey-dim); letter-spacing: 0.5px; text-transform: uppercase; transition: color 0.2s; }

.nav-item:active { transform: scale(0.92); }

.nav-item.active .ico-nav {
  stroke: var(--purple);
  filter: drop-shadow(0 0 6px var(--purple-glow));
}
.nav-item.active span { color: var(--purple); }
.nav-item.active::after {
  content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 2px;
  background: linear-gradient(90deg, var(--purple-vivid), var(--magenta));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--purple-glow);
}

/* =============================================================
   HERO (bannière home)
   ============================================================= */

.hero {
  position: relative;
  height: 240px;
  overflow: hidden;
  animation: heroIn 0.7s cubic-bezier(.16,1,.3,1);
  border-bottom: 1px solid var(--line);
}

.hero img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  animation: kenBurns 22s ease-in-out infinite alternate;
  filter: saturate(1.2) brightness(0.95);
}

@keyframes kenBurns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.10) translate(-1.5%, -1%); }
}

.hero-fade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,5,11,0) 30%, rgba(7,5,11,0.65) 65%, rgba(7,5,11,1) 100%),
    radial-gradient(ellipse at 50% 100%, rgba(168,85,247,0.15) 0%, transparent 60%);
}

.hero-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0 20px 20px;
  z-index: 1;
}

.hero-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  border-radius: 100px;
  font-size: 9.5px; font-weight: 800; color: #fff;
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 10px;
  box-shadow: 0 6px 20px -6px rgba(168,85,247,0.5);
  animation: slideLeft 0.5s cubic-bezier(0.22,1,0.36,1) 0.3s backwards;
}

.hero-title {
  font-size: 30px; font-weight: 900;
  letter-spacing: -1.2px; line-height: 1.05;
  animation: slideUp 0.6s cubic-bezier(0.22,1,0.36,1) 0.4s backwards;
  text-shadow: 0 4px 24px rgba(0,0,0,0.6);
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 13px; color: var(--grey);
  margin-top: 6px; font-weight: 500;
}

@keyframes heroIn {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   FIDÉLITÉ banner
   ============================================================= */

.fidelity-banner {
  display: flex; align-items: center;
  margin: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-dim));
  border-radius: var(--r);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: slideUp 0.5s ease 0.2s backwards;
  box-shadow: var(--shadow-purple);
  position: relative;
  overflow: hidden;
}

.fidelity-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(232,121,249,0.25) 0%, transparent 60%);
  pointer-events: none;
}

.fidelity-banner:active { transform: scale(0.98); }

.fid-left { flex: 1; position: relative; z-index: 1; }
.fid-badge {
  display: inline-block; padding: 2px 8px;
  background: rgba(255,255,255,0.18);
  border-radius: 100px;
  font-size: 9px; font-weight: 800; color: #fff;
  letter-spacing: 0.6px; text-transform: uppercase;
  margin-bottom: 4px;
}
.fid-title { font-size: 14px; font-weight: 800; color: #fff; }
.fid-desc { font-size: 10.5px; color: rgba(255,255,255,0.75); margin-top: 2px; }
.fid-arrow { font-size: 22px; color: rgba(255,255,255,0.55); margin-left: 8px; position: relative; z-index: 1; }

/* =============================================================
   SECTION HEAD
   ============================================================= */

.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; margin-bottom: 12px;
}

.sec-title { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; }
.sec-count {
  font-size: 10px; font-weight: 700; color: var(--grey);
  padding: 3px 9px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 100px;
}

.sort-toggle {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 100px; cursor: pointer;
  transition: all 0.2s;
}

.sort-toggle:active { background: var(--bg-raised); transform: scale(0.95); }

.sort-toggle span {
  font-size: 10px; font-weight: 700; color: var(--grey);
  letter-spacing: 0.4px;
}

.sort-ico {
  width: 14px; height: 14px;
  stroke: var(--purple); fill: none; stroke-width: 2;
  transition: transform 0.3s ease;
}

.sort-ico.sort-desc { transform: rotate(180deg); }

/* =============================================================
   PRODUITS — grille 2 colonnes + vidéos thumbnails
   ============================================================= */

.tranche {
  margin-bottom: 22px;
  animation: slideUp 0.4s ease backwards;
}

.tranche-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-raised));
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.tranche-head::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--purple-vivid), var(--magenta));
  border-radius: 0 2px 2px 0;
}

.tranche-pts {
  font-size: 22px; font-weight: 900;
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.6px;
}

.tranche-pts span {
  font-size: 11px; font-weight: 700; color: var(--grey);
  text-transform: uppercase; letter-spacing: 0.5px;
  -webkit-text-fill-color: var(--grey);
}

.tranche-stock {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.3px;
}

.stk-ok  { background: rgba(52,199,89,0.12);  color: var(--green); border: 1px solid rgba(52,199,89,0.25); }
.stk-low { background: rgba(255,149,0,0.12);  color: var(--orange); border: 1px solid rgba(255,149,0,0.25); }
.stk-out { background: rgba(255,77,109,0.12); color: var(--red);    border: 1px solid rgba(255,77,109,0.25); }

.tranche-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.p-card {
  position: relative;
  border-radius: var(--r);
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  overflow: hidden;
  cursor: pointer;
  animation: cardIn 0.5s cubic-bezier(.16,1,.3,1) backwards;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-card);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.p-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168,85,247,0.35);
  box-shadow: 0 12px 36px -10px rgba(168,85,247,0.35);
}

.p-card:active { transform: scale(0.97); }

.p-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 14;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-deep), var(--bg-raised));
}

.p-thumb video,
.p-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.p-thumb video {
  pointer-events: none;
}

.p-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7,5,11,0.85) 100%);
  pointer-events: none;
}

.p-thumb-pts {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  background: rgba(7,5,11,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-light);
  border-radius: 100px;
  font-size: 10px; font-weight: 800; color: var(--purple);
  letter-spacing: 0.3px;
  z-index: 2;
}

.p-thumb-stock {
  position: absolute;
  top: 8px; right: 8px;
  padding: 3px 7px;
  border-radius: 100px;
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.p-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px 12px;
  z-index: 2;
}

.p-name {
  font-size: 13px; font-weight: 700; color: var(--white);
  letter-spacing: -0.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  margin-bottom: 4px;
}

.p-price {
  font-size: 18px; font-weight: 900;
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(168,85,247,0.4);
}

/* Quand le stock est épuisé : opacity réduite + badge */
.p-card.is-out .p-thumb video,
.p-card.is-out .p-thumb img { filter: grayscale(0.7) brightness(0.6); }
.p-card.is-out .p-price { opacity: 0.6; }

/* =============================================================
   PAGE DÉTAIL PRODUIT
   ============================================================= */

.det {
  display: flex; flex-direction: column;
  min-height: 100%;
  animation: fadeIn 0.4s ease;
}

.det-img {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 11;
  max-height: 60vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-deep), var(--bg));
}

.det-img video,
.det-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  animation: kenBurns 18s ease-in-out infinite alternate;
}

.det-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7,5,11,0.4) 70%, var(--bg) 100%);
  pointer-events: none;
}

.det-body {
  padding: 16px 20px 28px;
  position: relative;
  margin-top: -24px;
  z-index: 2;
}

.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: rgba(7,5,11,0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12px; font-weight: 600; color: var(--white);
  cursor: pointer;
  margin-bottom: 18px;
  transition: all 0.2s;
  position: absolute; top: 16px; left: 16px;
  z-index: 10;
}

.btn-back:active { transform: scale(0.95); }
.det-body .btn-back {
  position: static; margin-bottom: 16px;
}

.det-name {
  font-size: 26px; font-weight: 900;
  letter-spacing: -0.7px;
  margin-bottom: 8px;
}

.det-desc {
  font-size: 13px; color: var(--grey);
  line-height: 1.5; margin-bottom: 14px;
}

.det-price {
  font-size: 32px; font-weight: 900;
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.det-unit {
  font-size: 13px; font-weight: 600; color: var(--grey);
  -webkit-text-fill-color: var(--grey);
}

/* =============================================================
   QUANTITY ROW
   ============================================================= */

.qty-row {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  margin-bottom: 16px;
}

.qty-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-light);
  background: var(--bg-raised);
  color: var(--purple);
  font-size: 22px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

.qty-btn:active { transform: scale(0.9); background: var(--purple-soft); }

.qty-val {
  font-size: 22px; font-weight: 900; color: var(--white);
  min-width: 36px; text-align: center;
}

.qty-val.bump { animation: bumpKey 0.25s ease; }

@keyframes bumpKey {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}

/* =============================================================
   INFO CARDS
   ============================================================= */

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  padding: 4px 14px;
  margin-bottom: 14px;
}

.info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.info-row:last-child { border-bottom: none; }

.info-label {
  font-size: 12px; color: var(--grey); font-weight: 600;
}

.info-val {
  font-size: 13px; color: var(--white); font-weight: 700;
}

.info-val-gold {
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =============================================================
   BOUTONS
   ============================================================= */

.btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--r);
  font-size: 13px; font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-gold,
.btn-purple {
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  color: #fff;
  box-shadow: 0 8px 24px -6px rgba(168,85,247,0.5);
}

.btn-gold::after,
.btn-purple::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

.btn-red {
  background: linear-gradient(135deg, var(--red), var(--red-dim));
  color: #fff;
  box-shadow: 0 8px 24px -6px rgba(255,77,109,0.5);
}

.btn-ghost {
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  color: var(--white);
}

.btn-ghost:active { background: var(--bg-raised); }

.btn-paypal {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(135deg, #003087, #0070BA);
  color: #fff;
  border-radius: var(--r);
  font-size: 13px; font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 8px 24px -6px rgba(0,112,186,0.4);
  transition: transform 0.2s;
}

.btn-paypal:active { transform: scale(0.97); }

.spin {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinAnim 0.7s linear infinite;
}

@keyframes spinAnim { to { transform: rotate(360deg); } }

/* =============================================================
   COMMANDES (orders cards)
   ============================================================= */

.o-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  animation: slideUp 0.35s ease backwards;
}

.o-card:active { transform: scale(0.98); background: var(--bg-raised); }

.o-ico {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.o-ico.completed { background: rgba(52,199,89,0.12); color: var(--green); }
.o-ico.failed    { background: rgba(255,77,109,0.12); color: var(--red); }
.o-ico.pending   { background: rgba(255,149,0,0.12); color: var(--orange); }

.o-info { flex: 1; min-width: 0; }
.o-name { font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 2px; }
.o-date { font-size: 10.5px; color: var(--grey); }

.o-status {
  font-size: 9.5px; font-weight: 800;
  padding: 4px 9px;
  border-radius: 100px;
  letter-spacing: 0.4px; text-transform: uppercase;
  flex-shrink: 0;
}

.o-status.completed { background: rgba(52,199,89,0.12); color: var(--green); }
.o-status.failed    { background: rgba(255,77,109,0.12); color: var(--red); }
.o-status.pending   { background: rgba(255,149,0,0.12); color: var(--orange); }

/* =============================================================
   PROFIL
   ============================================================= */

.prof-head {
  text-align: center;
  padding: 20px 0 28px;
  position: relative;
}

.prof-av {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 900; color: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 36px -8px rgba(168,85,247,0.5);
  animation: avatarFloat 4s ease-in-out infinite;
}

.prof-av::before {
  content: '';
  position: absolute; inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--purple-vivid), var(--magenta), var(--purple-deep), var(--purple-vivid));
  z-index: -1;
  filter: blur(10px);
  opacity: 0.55;
  animation: avatarRotate 8s linear infinite;
}

@keyframes avatarFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.prof-name { font-size: 22px; font-weight: 900; letter-spacing: -0.6px; margin-bottom: 2px; }
.prof-tag {
  font-size: 12px; color: var(--purple); font-weight: 700; letter-spacing: 0.4px;
}

.set-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  animation: slideUp 0.35s ease backwards;
}

.set-row:active { transform: scale(0.98); background: var(--bg-raised); }

.set-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--purple-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
  flex-shrink: 0;
}

.set-label {
  flex: 1;
  font-size: 13px; font-weight: 700; color: var(--white);
}

.set-chev {
  font-size: 18px; color: var(--grey-dim); font-weight: 400;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

/* =============================================================
   WALLET / RECHARGE
   ============================================================= */

.bal-card {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-dim));
  border-radius: var(--r-lg);
  padding: 24px 20px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-purple);
  animation: slideUp 0.5s ease backwards;
}

.bal-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,121,249,0.4) 0%, transparent 70%);
  pointer-events: none;
}

.bal-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  animation: shimmer 4s ease-in-out infinite;
}

.bal-label {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.7);
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 6px;
  position: relative;
}

.bal-amount {
  font-size: 38px; font-weight: 900;
  color: #fff;
  letter-spacing: -1.4px;
  line-height: 1.1;
  position: relative;
}

.bal-cur {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.65);
  margin-top: 4px;
  position: relative;
}

.pay-methods {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pay-method-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  font-size: 12px; font-weight: 700; color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}

.pay-method-btn.active {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-dim));
  border-color: rgba(168,85,247,0.5);
  color: #fff;
  box-shadow: 0 6px 20px -8px var(--purple-glow);
}

.pay-steps {
  margin-bottom: 18px;
}

.pay-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
}

.pay-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-vivid), var(--magenta));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 12px;
  flex-shrink: 0;
}

.pay-step-text { font-size: 12.5px; color: var(--white); }

.pay-info-card {
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  padding: 14px;
}

.pay-info-title {
  font-size: 11px; font-weight: 800; color: var(--purple);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 10px;
}

.pay-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}

.pay-info-row:last-of-type { border-bottom: none; }

.pay-info-row span:first-child { color: var(--grey); font-weight: 600; }
.pay-info-amount { color: var(--purple); font-weight: 800; }
.pay-info-addr { color: var(--white); font-weight: 700; font-size: 11px; word-break: break-all; max-width: 60%; text-align: right; font-family: ui-monospace, monospace; }

.pay-info-note {
  font-size: 10.5px; color: var(--grey-dim); text-align: center;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line);
}

.crypto-tabs {
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.crypto-tabs::-webkit-scrollbar { display: none; }

.crypto-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: 100px;
  font-size: 11px; font-weight: 700; color: var(--white);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.crypto-tab.active {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-dim));
  border-color: rgba(168,85,247,0.4);
  color: #fff;
}

/* =============================================================
   INPUTS / FORMS
   ============================================================= */

.input-group { margin-bottom: 14px; }

.input-label {
  display: block;
  font-size: 11px; font-weight: 700; color: var(--grey);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.input-field,
.input-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  font-size: 13px; color: var(--white);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus,
.input-textarea:focus {
  outline: none;
  border-color: rgba(168,85,247,0.5);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
}

.input-textarea { resize: vertical; min-height: 90px; }

.input-row { display: flex; gap: 8px; align-items: center; }

/* File zone */

.file-zone {
  position: relative;
  background: var(--bg-input);
  border: 1.5px dashed var(--line-light);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.file-zone:hover { border-color: rgba(168,85,247,0.4); }

.file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

.file-zone-inner {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}

.file-zone-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--purple-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
}

.file-zone-text { font-size: 12px; color: var(--grey); font-weight: 600; }

.file-preview {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
}

.file-preview-img {
  width: 44px; height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.file-preview-name {
  flex: 1;
  font-size: 12px; color: var(--white); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.file-remove {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--line-light);
  color: var(--grey);
  cursor: pointer;
  font-size: 14px;
}

/* Toast */

#toast-container {
  position: fixed;
  top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 9998;
  pointer-events: none;
  display: flex; flex-direction: column; gap: 8px;
}

.toast {
  pointer-events: auto;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  font-size: 12.5px; font-weight: 700; color: var(--white);
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
  animation: toastIn 0.4s cubic-bezier(.16,1,.3,1), toastOut 0.4s ease 2.6s forwards;
  max-width: 90vw;
}

.toast-success { border-color: rgba(52,199,89,0.4); color: var(--green); }
.toast-error   { border-color: rgba(255,77,109,0.4); color: var(--red); }
.toast-info    { border-color: rgba(168,85,247,0.4); color: var(--purple); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-20px); }
}

/* =============================================================
   SUPPORT / TICKET
   ============================================================= */

.ticket-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}

.ticket-head-ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-dim));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 6px 20px -6px var(--purple-glow);
}

.ticket-head-title { font-size: 18px; font-weight: 800; }
.ticket-head-desc { font-size: 12px; color: var(--grey); margin-top: 2px; }

.ticket-form { margin-bottom: 18px; }

.ticket-subjects {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 6px;
}

.ticket-subj {
  padding: 7px 12px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: 100px;
  font-size: 11.5px; font-weight: 700; color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}

.ticket-subj.active {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-dim));
  border-color: rgba(168,85,247,0.4);
}

.ticket-history { margin-top: 22px; }

.ticket-item {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  margin-bottom: 8px;
}

.ticket-item-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}

.ticket-item-subj { font-size: 13px; font-weight: 700; color: var(--white); }
.ticket-item-date { font-size: 10px; color: var(--grey-dim); }
.ticket-item-msg { font-size: 11px; color: var(--grey); line-height: 1.4; }
.ticket-item-status {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.4px; text-transform: uppercase;
}

.ticket-item-status.sent {
  background: rgba(168,85,247,0.12);
  color: var(--purple);
}

/* =============================================================
   ADMIN PANEL
   ============================================================= */

.admin-nav {
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.admin-nav::-webkit-scrollbar { display: none; }

.admin-nav-btn {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: 100px;
  font-size: 11.5px; font-weight: 700; color: var(--grey);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.admin-nav-btn.active {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-dim));
  border-color: rgba(168,85,247,0.4);
  color: #fff;
}

.admin-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  padding: 14px;
  text-align: center;
}

.stat-card-wide { grid-column: span 2; }

.stat-val {
  font-size: 22px; font-weight: 900;
  color: var(--purple);
  letter-spacing: -0.6px;
  margin-bottom: 2px;
}

.stat-lbl {
  font-size: 10px; color: var(--grey); font-weight: 700;
  letter-spacing: 0.4px; text-transform: uppercase;
}

.adm-user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  margin-bottom: 6px;
}

.adm-user-info { flex: 1; min-width: 0; }
.adm-user-name { font-size: 12.5px; font-weight: 700; color: var(--white); }
.adm-user-meta { font-size: 10px; color: var(--grey); margin-top: 2px; }

.adm-user-actions { display: flex; gap: 5px; }

.adm-btn-sm {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--line-light);
  color: var(--grey);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
}

.adm-btn-sm:active { transform: scale(0.92); }

.adm-btn-bal { color: var(--purple); }
.adm-btn-del { color: var(--red); }
.adm-btn-dm  { color: var(--purple); }

.bc-result {
  padding: 10px 14px;
  border-radius: var(--r);
  font-size: 12px; font-weight: 600;
}

.bc-result-success {
  background: rgba(52,199,89,0.1);
  color: var(--green);
  border: 1px solid rgba(52,199,89,0.3);
}

.bc-result-error {
  background: rgba(255,77,109,0.1);
  color: var(--red);
  border: 1px solid rgba(255,77,109,0.3);
}

.admin-tabs { display: flex; gap: 4px; }
.admin-tab {
  flex: 1;
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r-sm);
  font-size: 11px; font-weight: 700; color: var(--grey);
  cursor: pointer;
  transition: all 0.2s;
}
.admin-tab.active {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-dim));
  color: #fff;
  border-color: rgba(168,85,247,0.4);
}

.admin-form { padding: 0; }
.admin-separator { height: 1px; background: var(--line); margin: 14px 0; }

/* =============================================================
   EMPTY STATE / LOADER
   ============================================================= */

.empty {
  text-align: center;
  padding: 50px 20px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.empty-ico {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: var(--purple-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
}

.empty-title {
  font-size: 16px; font-weight: 800; color: var(--white);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 12.5px; color: var(--grey);
  line-height: 1.5;
}

.loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px;
  gap: 14px;
}

.ld-dots {
  display: flex; gap: 6px;
}

.ld-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--purple);
  animation: ldDot 1.4s ease-in-out infinite;
}

.ld-dots span:nth-child(2) { animation-delay: 0.2s; }
.ld-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ldDot {
  0%, 80%, 100% { transform: scale(0.3); opacity: 0.3; }
  40%           { transform: scale(1); opacity: 1; }
}

.ld-text {
  font-size: 12px; font-weight: 700; color: var(--purple);
  letter-spacing: 1px; text-transform: uppercase;
}

/* =============================================================
   MODAL
   ============================================================= */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7,5,11,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.modal-visible { opacity: 1; }

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: var(--r-lg);
  max-width: 420px; width: 100%;
  max-height: 85vh;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(.16,1,.3,1);
  box-shadow: var(--shadow-purple);
}

.modal-overlay.modal-visible .modal-content { transform: scale(1); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-light);
}

.modal-title { font-size: 16px; font-weight: 800; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-raised);
  border: none; color: var(--grey);
  cursor: pointer;
  font-size: 14px;
}

.modal-body {
  padding: 18px;
  max-height: 70vh;
  overflow-y: auto;
}

.fidelity-img {
  width: 100%;
  border-radius: var(--r);
  display: block;
}

/* =============================================================
   UTILITAIRES
   ============================================================= */

.mb-10 { margin-bottom: 10px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-10 { margin-top: 10px; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s ease; }
.page-enter { animation: pageEnter 0.35s cubic-bezier(.16,1,.3,1); }

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   Entry modal — message garantie + recharge
   ============================================================= */

.entry-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: radial-gradient(140% 120% at 50% 50%, rgba(168,85,247,0.12), rgba(7,5,11,0.94));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 12000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s cubic-bezier(.16,1,.3,1);
}

.entry-modal.entry-modal-hidden { display: none; }

.entry-modal.show {
  opacity: 1;
  pointer-events: auto;
  display: flex;
}

.entry-card {
  position: relative;
  width: min(420px, 100%);
  padding: 22px 20px 20px;
  background: linear-gradient(145deg, rgba(17,10,31,0.9), rgba(17,10,31,0.8));
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: var(--r-xl);
  box-shadow:
    0 18px 48px -18px rgba(0,0,0,0.55),
    0 0 0 1px rgba(168,85,247,0.08);
  color: var(--white);
  text-align: center;
  animation: entryPop .65s cubic-bezier(.16,1,.3,1) both;
  overflow: hidden;
}

.entry-card::before,
.entry-card::after {
  content: '';
  position: absolute;
  inset: -30% -30%;
  background: radial-gradient(ellipse at center, rgba(168,85,247,0.16), transparent 60%);
  filter: blur(14px);
  animation: entryGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.entry-card::after {
  inset: -10% -20%;
  background: radial-gradient(ellipse at 20% 20%, rgba(232,121,249,0.15), transparent 55%);
  animation-direction: reverse;
}

@keyframes entryPop {
  0%   { transform: translateY(26px) scale(.92); opacity: 0; }
  50%  { transform: translateY(-6px) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); }
}

@keyframes entryGlow {
  0%   { transform: rotate(0deg) scale(1); opacity: .8; }
  100% { transform: rotate(8deg) scale(1.08); opacity: 1; }
}

.entry-logo {
  width: 118px;
  height: 118px;
  margin: 0 auto 12px;
  position: relative;
  display: grid;
  place-items: center;
}

.entry-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: radial-gradient(circle at 50% 50%, rgba(168,85,247,0.2), rgba(168,85,247,0.08) 65%, transparent 80%);
  animation: logoPulse 2.6s ease-in-out infinite;
}

.entry-logo::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 24px;
  border: 1px solid rgba(168,85,247,0.4);
  box-shadow: 0 0 24px rgba(168,85,247,0.35);
  opacity: 0.95;
}

.entry-logo img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.35));
}

@keyframes logoPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.85; }
  50%      { transform: scale(1.05); opacity: 1; }
}

.entry-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 6px;
}

.entry-sub {
  font-size: 13px;
  color: #dcd5f2;
  margin-bottom: 12px;
  line-height: 1.4;
}

.entry-list {
  text-align: left;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.entry-list li {
  list-style: none;
  color: #f6eefd;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.entry-list li:last-child { margin-bottom: 0; }

.entry-list .dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--magenta));
  box-shadow: 0 0 10px rgba(168,85,247,0.5);
}

.entry-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.entry-actions .btn {
  min-width: 120px;
  font-weight: 700;
}

.entry-actions .btn-ghost {
  border-color: rgba(168,85,247,0.35);
  color: var(--purple);
  background: rgba(168,85,247,0.08);
}
