/* ===================================================================
   Bahamas VIP Club — thème violet / or, glassmorphism, animations douces
   =================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-0: #0b0414;
  --bg-1: #150829;
  --bg-2: #1e0f3a;
  --violet-900: #2e1065;
  --violet-700: #5b21b6;
  --violet-600: #7c3aed;
  --violet-500: #9333ea;
  --violet-400: #a855f7;
  --violet-300: #c084fc;
  --gold: #fbbf24;
  --gold-soft: #fde68a;
  --turquoise: #2dd4bf;
  --turquoise-soft: #5eead4;
  --text: #f3eaff;
  --text-muted: #b6a6d9;
  --text-faint: #8677ad;
  --border: rgba(168, 85, 247, 0.25);
  --card-bg: rgba(30, 15, 58, 0.55);
  --card-bg-solid: #1a0e33;
  --success: #34d399;
  --error: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-glow: 0 0 40px rgba(147, 51, 234, 0.35);
}

html, body { height: 100%; }

body {
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% -10%, #3b1370 0%, transparent 45%),
              radial-gradient(circle at 90% 10%, #1c3b5e 0%, transparent 40%),
              linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 40%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
  animation: floatBlob 18s ease-in-out infinite alternate;
}
body::before {
  width: 420px; height: 420px;
  background: var(--violet-600);
  top: -120px; left: -100px;
}
body::after {
  width: 380px; height: 380px;
  background: var(--turquoise);
  bottom: -140px; right: -80px;
  animation-delay: -6s;
}

@keyframes floatBlob {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 60px) scale(1.15); }
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--violet-500); color: white; }

/* ── LAYOUT ─────────────────────────────────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ── NAVBAR ─────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(11, 4, 20, 0.65);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.3px;
}
.navbar-brand .emoji { font-size: 22px; filter: drop-shadow(0 0 8px var(--gold)); }
.navbar-brand .brand-gold { color: var(--gold); }
.navbar-brand .brand-logo { height: 40px; width: auto; filter: drop-shadow(0 0 10px rgba(192, 132, 252, 0.55)); }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: rgba(168, 85, 247, 0.12); }
.nav-link.active { color: white; background: linear-gradient(135deg, var(--violet-600), var(--violet-400)); box-shadow: var(--shadow-glow); }
.nav-link.nav-cta { color: var(--gold); border: 1px solid rgba(251, 191, 36, 0.4); }

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
.navbar-user img.avatar-sm { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--violet-400); }
.navbar-user .avatar-placeholder-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-600), var(--turquoise));
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}

/* ── BOUTONS ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--violet-600), var(--violet-400));
  color: white;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(124, 58, 237, 0.6); transform: translateY(-1px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  color: #2b1400;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.35);
}
.btn-gold:hover { box-shadow: 0 8px 28px rgba(251, 191, 36, 0.55); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-danger { background: rgba(248, 113, 113, 0.15); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.35); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.25); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn-block { width: 100%; }

.btn-discord {
  background: #5865F2;
  color: white;
  box-shadow: 0 6px 24px rgba(88, 101, 242, 0.5);
}
.btn-discord:hover { box-shadow: 0 8px 30px rgba(88, 101, 242, 0.7); transform: translateY(-1px); }

/* ── CARTES ─────────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.5s ease both;
}

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

.card-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── CARTE DE FIDÉLITÉ ──────────────────────────────────────────────── */
.loyalty-card {
  position: relative;
  border-radius: 22px;
  padding: 30px 28px;
  background: linear-gradient(135deg, #2e1065 0%, #6d28d9 45%, #9333ea 100%);
  box-shadow: 0 20px 60px rgba(88, 28, 135, 0.55), inset 0 1px 0 rgba(255,255,255,0.15);
  overflow: hidden;
  color: white;
  animation: fadeInUp 0.6s ease both;
}
.loyalty-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 0%, rgba(251, 191, 36, 0.35), transparent 55%),
              radial-gradient(circle at 0% 100%, rgba(45, 212, 191, 0.3), transparent 55%);
}
.loyalty-card-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.loyalty-card-label { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-soft); font-weight: 600; }
.loyalty-card-name { font-size: 20px; font-weight: 700; margin-top: 4px; }
.loyalty-card-chip { width: 42px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, var(--gold), #f59e0b); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.loyalty-card-points { margin-top: 26px; position: relative; z-index: 1; }
.loyalty-card-points .value { font-size: 44px; font-weight: 800; letter-spacing: -1px; text-shadow: 0 0 24px rgba(251,191,36,0.6); }
.loyalty-card-points .label { font-size: 13px; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 1.5px; }
.loyalty-card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; position: relative; z-index: 1; font-size: 12.5px; color: rgba(255,255,255,0.75); }
.loyalty-card-spins {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); padding: 6px 12px; border-radius: 999px; font-weight: 600; color: white;
}

/* ── STAT CARDS ─────────────────────────────────────────────────────── */
.stat-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; animation: fadeInUp 0.5s ease both;
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: linear-gradient(135deg, var(--violet-600), var(--turquoise)); flex-shrink: 0;
}
.stat-value { font-size: 24px; font-weight: 800; display: block; }
.stat-label { font-size: 12.5px; color: var(--text-muted); }

/* ── FORMULAIRES ────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-control, select.form-control, textarea.form-control {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,0.05); color: var(--text);
  font-family: inherit; font-size: 14px; transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--violet-400); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 14px; }
.form-row > * { flex: 1; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.form-hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }

/* ── BADGES ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
}
.badge-violet { background: rgba(168, 85, 247, 0.18); color: var(--violet-300); }
.badge-gold { background: rgba(251, 191, 36, 0.18); color: var(--gold); }
.badge-turquoise { background: rgba(45, 212, 191, 0.18); color: var(--turquoise-soft); }
.badge-success { background: rgba(52, 211, 153, 0.18); color: var(--success); }
.badge-error { background: rgba(248, 113, 113, 0.18); color: var(--error); }
.badge-muted { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* ── TABLES ─────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; padding: 12px 16px; background: rgba(255,255,255,0.04);
  color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.data-table td { padding: 12px 16px; border-top: 1px solid var(--border); }
.data-table tr:hover td { background: rgba(255,255,255,0.03); }

/* ── FLASH ──────────────────────────────────────────────────────────── */
.flash { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; font-weight: 500; animation: fadeInUp 0.3s ease both; }
.flash-success { background: rgba(52, 211, 153, 0.15); color: var(--success); border: 1px solid rgba(52, 211, 153, 0.3); }
.flash-error { background: rgba(248, 113, 113, 0.15); color: var(--error); border: 1px solid rgba(248, 113, 113, 0.3); }

/* ── SECTION HEADER ─────────────────────────────────────────────────── */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 26px; font-weight: 800; }
.page-title .accent { color: var(--gold); }
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* ── HERO (landing) ─────────────────────────────────────────────────── */
.hero { text-align: center; padding: 90px 20px 60px; position: relative; z-index: 1; }
.hero-logo { width: 220px; height: auto; margin: 0 auto 24px; filter: drop-shadow(0 0 34px rgba(192, 132, 252, 0.6)); animation: fadeInUp 0.5s ease both, floatLogo 6s ease-in-out infinite; }
@keyframes floatLogo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px;
  background: rgba(168, 85, 247, 0.15); border: 1px solid var(--border); color: var(--violet-300);
  font-size: 13px; font-weight: 600; margin-bottom: 24px; animation: fadeInUp 0.5s ease both;
}
.hero h1 {
  font-size: clamp(32px, 6vw, 56px); font-weight: 800; line-height: 1.15; margin-bottom: 20px;
  animation: fadeInUp 0.6s ease both;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--gold) 0%, var(--violet-300) 55%, var(--turquoise) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { max-width: 620px; margin: 0 auto 34px; color: var(--text-muted); font-size: 17px; line-height: 1.6; animation: fadeInUp 0.7s ease both; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; animation: fadeInUp 0.8s ease both; }

.section { padding: 60px 0; position: relative; z-index: 1; }
.section-title { text-align: center; font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 40px; font-size: 15px; }

.feature-card { text-align: center; padding: 28px 22px; }
.feature-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  background: linear-gradient(135deg, var(--violet-600), var(--turquoise)); display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: var(--shadow-glow);
}
.feature-title { font-weight: 700; margin-bottom: 8px; font-size: 15.5px; }
.feature-text { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }

/* ── LOGIN ──────────────────────────────────────────────────────────── */
.auth-wrap { min-height: 90vh; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; text-align: center; padding: 42px 32px; }
.auth-logo { font-size: 44px; margin-bottom: 14px; }
.auth-logo-img { width: 160px; height: auto; margin: 0 auto 18px; filter: drop-shadow(0 0 24px rgba(192, 132, 252, 0.55)); animation: fadeInUp 0.5s ease both; }
.auth-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.auth-text { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; line-height: 1.5; }

/* ── ROUE DE LA CHANCE ──────────────────────────────────────────────── */
.wheel-zone { display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 20px 0 10px; }
.wheel-frame { position: relative; width: 340px; height: 340px; max-width: 90vw; max-height: 90vw; }
.wheel-pointer {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 28px solid var(--gold); z-index: 5; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}
.wheel-svg-wrap {
  width: 100%; height: 100%; border-radius: 50%;
  box-shadow: 0 0 0 8px var(--card-bg-solid), 0 0 0 11px var(--gold), 0 20px 60px rgba(124,58,237,0.5);
  transition: transform 4.5s cubic-bezier(0.12, 0.72, 0.15, 1);
}
.wheel-center-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #f59e0b); color: #2b1400;
  border: 4px solid var(--card-bg-solid); font-weight: 800; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer;
  box-shadow: 0 8px 24px rgba(251,191,36,0.5); z-index: 6; transition: transform 0.15s;
}
.wheel-center-btn:hover { transform: translate(-50%, -50%) scale(1.06); }
.wheel-center-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: translate(-50%, -50%); }
.wheel-spins-left { font-size: 14px; color: var(--text-muted); }
.wheel-spins-left strong { color: var(--gold); }

.spin-result-overlay {
  position: fixed; inset: 0; background: rgba(5, 2, 12, 0.75); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.spin-result-overlay.visible { display: flex; animation: fadeIn 0.25s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.spin-result-card {
  max-width: 380px; width: 100%; text-align: center; padding: 40px 32px;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }
.spin-result-emoji { font-size: 54px; margin-bottom: 14px; }
.spin-result-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.spin-result-text { color: var(--text-muted); margin-bottom: 24px; }

/* ── RÉCOMPENSES ────────────────────────────────────────────────────── */
.reward-card { display: flex; flex-direction: column; gap: 14px; }
.reward-card .reward-img { width: 100%; height: 130px; border-radius: var(--radius-sm); object-fit: cover; background: linear-gradient(135deg, var(--violet-700), var(--violet-900)); }
.reward-cost { font-size: 20px; font-weight: 800; color: var(--gold); }

/* ── TIMELINE (historique) ──────────────────────────────────────────── */
.timeline-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: none; }
.timeline-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.timeline-body { flex: 1; }
.timeline-title { font-weight: 600; font-size: 14px; }
.timeline-date { font-size: 12px; color: var(--text-faint); }
.timeline-delta { font-weight: 700; font-size: 14px; }
.timeline-delta.positive { color: var(--success); }
.timeline-delta.negative { color: var(--error); }

/* ── SEARCH WIDGET (comptoir staff) ─────────────────────────────────── */
.search-box { position: relative; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--card-bg-solid); border: 1px solid var(--border); border-radius: var(--radius-sm);
  max-height: 260px; overflow-y: auto; box-shadow: 0 12px 30px rgba(0,0,0,0.4); display: none;
}
.search-results.visible { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; transition: background 0.15s;
}
.search-result-item:hover { background: rgba(168, 85, 247, 0.15); }
.search-result-item img { width: 28px; height: 28px; border-radius: 50%; }
.selected-client-chip {
  display: none; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(45, 212, 191, 0.1); border: 1px solid rgba(45, 212, 191, 0.3); margin-top: 10px;
}
.selected-client-chip.visible { display: flex; }
.selected-client-chip img { width: 30px; height: 30px; border-radius: 50%; }

/* ── FOOTER ─────────────────────────────────────────────────────────── */
.site-footer { text-align: center; padding: 34px 20px; color: var(--text-faint); font-size: 12.5px; position: relative; z-index: 1; }

/* ── ERROR PAGES ────────────────────────────────────────────────────── */
.error-wrap { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; position: relative; z-index: 1; padding: 20px; }
.error-code { font-size: 90px; font-weight: 800; background: linear-gradient(135deg, var(--gold), var(--violet-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── MISC ───────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 8px; } .gap-3 { gap: 14px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state .emoji { font-size: 40px; margin-bottom: 12px; }

.progress-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--violet-600), var(--turquoise)); border-radius: 999px; transition: width 0.5s ease; }

.color-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); cursor: pointer; }

@media (max-width: 720px) {
  .navbar { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .navbar-links { gap: 2px; }
  .nav-link { padding: 7px 10px; font-size: 13px; }
  .page-wrap { padding: 20px 14px 60px; }
}
