/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }

:root {
  --brand:        #C4521A;
  --brand-dark:   #A34116;
  --brand-light:  #F5DDD0;
  --brand-xlight: #FBF1EC;
  --accent:       #F5C200;
  --accent-light: #FFF7CC;
  --cream:        #FBF8F2;
  --black:        #111111;
  --white:        #FFFFFF;

  --lv1: #6b7280; --lv1-bg: #f3f4f6;
  --lv2: #059669; --lv2-bg: #d1fae5;
  --lv3: #0284c7; --lv3-bg: #e0f2fe;
  --lv4: #7c3aed; --lv4-bg: #ede9fe;
  --lv5: #C4521A; --lv5-bg: #F5DDD0;
  --lv6: #dc2626; --lv6-bg: #fee2e2;
  --lv7: #111111; --lv7-bg: #F5C200;

  --gray-50:  #f9f9f7;
  --gray-100: #f2f1ee;
  --gray-200: #e5e3de;
  --gray-300: #d0cdc7;
  --gray-400: #9e9b95;
  --gray-500: #6e6b64;
  --gray-600: #4d4a44;
  --gray-700: #3a3834;
  --gray-800: #252320;
  --gray-900: #111111;

  --success:       #16a34a;
  --success-light: #dcfce7;
  --danger:        #dc2626;
  --danger-light:  #fee2e2;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 28px rgba(0,0,0,.14);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--black);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  max-width: 100%;
}

/* ===== AUTH SCREEN ===== */
.auth-screen {
  min-height: 100vh;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-container {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px; justify-content: center;
}
.auth-logo-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--brand); color: white;
  font-size: 24px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.auth-logo-name {
  font-size: 28px; font-weight: 900; color: var(--black); letter-spacing: -.5px;
}
.auth-tabs {
  display: flex; border-bottom: 2px solid var(--gray-200);
  margin-bottom: 28px; gap: 0;
}
.auth-tab {
  flex: 1; padding: 10px; background: none; border: none;
  font-size: 14px; font-weight: 700; color: var(--gray-400);
  cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all .15s;
}
.auth-tab:hover { color: var(--black); }
.auth-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-error {
  background: var(--danger-light); color: var(--danger);
  border: 1px solid #fca5a5; border-radius: var(--radius-xs);
  padding: 10px 14px; font-size: 13px; font-weight: 600;
  margin-bottom: 16px;
}
.auth-error.hidden { display: none; }
.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.auth-hint { text-align: center; font-size: 13px; color: var(--gray-500); margin-top: 16px; }
.auth-hint a { color: var(--brand); font-weight: 700; text-decoration: none; }

/* ===== QUESTIONNAIRE ===== */
.reg-step { display: none; }
.reg-step.active { display: block; }
.reg-step-title { font-size: 18px; font-weight: 800; margin-bottom: 20px; color: var(--black); }
.questionnaire { display: flex; flex-direction: column; gap: 20px; }
.q-progress {
  height: 5px; background: var(--gray-100); border-radius: 999px; overflow: hidden;
}
.q-progress-bar {
  height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .3s ease;
}
.q-step-label { font-size: 12px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .8px; }
.q-question { font-size: 17px; font-weight: 700; color: var(--black); margin-bottom: 16px; line-height: 1.4; }
.q-options { display: flex; flex-direction: column; gap: 10px; }
.q-option {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); cursor: pointer; transition: all .15s;
  font-size: 14px; font-weight: 500; color: var(--gray-700);
}
.q-option:hover { border-color: var(--brand-light); background: var(--brand-xlight); }
.q-option.selected { border-color: var(--brand); background: var(--brand-xlight); color: var(--brand); font-weight: 700; }
.q-option-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--gray-300); flex-shrink: 0; transition: all .15s;
}
.q-option.selected .q-option-dot {
  border-color: var(--brand); background: var(--brand);
  box-shadow: inset 0 0 0 3px white;
}
.q-nav { display: flex; justify-content: space-between; gap: 12px; }
.q-nav .btn { flex: 1; justify-content: center; }

/* Level result */
.level-result { text-align: center; padding: 12px 0; }
.level-result-icon { font-size: 52px; margin-bottom: 12px; }
.level-result h3 { font-size: 20px; font-weight: 800; margin-bottom: 16px; color: var(--black); }
.level-result-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 999px;
  font-size: 18px; font-weight: 800; margin-bottom: 16px;
}
.level-result-desc { color: var(--gray-500); font-size: 14px; margin-bottom: 8px; line-height: 1.6; }
.level-result-hint { font-size: 12px; color: var(--gray-400); margin-bottom: 24px; }

/* ===== APP WRAPPER ===== */
#app-wrapper.hidden { display: none; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--black);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 64px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  width: 100%; box-sizing: border-box;
}
.navbar-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-icon {
  width: 36px; height: 36px; background: var(--brand); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: white; flex-shrink: 0;
}
.brand-name { font-size: 18px; font-weight: 800; color: var(--white); letter-spacing: -.5px; }
.brand-dot { color: var(--accent); }
.navbar-links { display: flex; gap: 2px; overflow-x: auto; flex-shrink: 1; }
.navbar-links::-webkit-scrollbar { display: none; }
.nav-btn {
  padding: 8px 12px; border: none; background: none; cursor: pointer;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.55); transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
.nav-btn:hover  { background: rgba(255,255,255,.08); color: var(--white); }
.nav-btn.active { background: var(--brand); color: var(--white); }
.navbar-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

@media (max-width: 768px) {
  .navbar { padding: 0 12px; }
  .brand-name { display: none; }
  .user-chip span { display: none; }
  .nav-btn { padding: 8px 10px; font-size: 12px; }
}
.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); border-radius: 999px;
  padding: 5px 12px 5px 5px; color: white; font-size: 13px; font-weight: 600;
}
.user-chip-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); font-size: 11px; font-weight: 800; color: white;
  display: flex; align-items: center; justify-content: center;
}
.btn-logout {
  background: rgba(255,255,255,.1); border: none; color: rgba(255,255,255,.6);
  padding: 6px 12px; border-radius: var(--radius-xs); font-size: 12px;
  font-weight: 600; cursor: pointer; transition: all .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.2); color: white; }

/* ===== MAIN ===== */
main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 36px 28px; overflow-x: hidden; }
.view { display: none; }
.view.active { display: block; }

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.page-header h1 { font-size: 28px; font-weight: 800; color: var(--black); letter-spacing: -.5px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; transition: all .15s; text-decoration: none;
}
.btn-primary { background: var(--brand); color: var(--white); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--gray-700); border-color: var(--gray-300); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ===== CARDS ===== */
.card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 24px; box-shadow: var(--shadow);
  width: 100%; max-width: 100%; min-width: 0;
}
.card-title { font-size: 16px; font-weight: 700; color: var(--black); margin-bottom: 18px; letter-spacing: -.2px; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 22px 24px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 4px; height: 100%; background: var(--brand);
}
.stat-label { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.stat-value { font-size: 36px; font-weight: 800; color: var(--black); letter-spacing: -1px; }

/* ===== DASHBOARD ===== */
.dashboard-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .dashboard-columns { grid-template-columns: 1fr; } }
.dash-hero {
  background: linear-gradient(135deg, var(--black) 0%, #2a1a0e 100%);
  border-radius: var(--radius); padding: 28px 32px; margin-bottom: 28px;
  display: flex; align-items: center; justify-content: space-between;
  overflow: hidden; position: relative;
}
.dash-hero::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--brand); opacity: .12;
}
.dash-hero-text h2 { font-size: 22px; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.dash-hero-text p { font-size: 14px; color: rgba(255,255,255,.5); font-weight: 500; }
.dash-hero-accent { font-size: 48px; font-weight: 900; color: var(--brand); letter-spacing: -2px; line-height: 1; }

/* ===== SEARCH BAR ===== */
.search-bar { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.search-bar input, .search-bar select {
  padding: 10px 14px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 16px; font-weight: 500;
  outline: none; background: var(--white); color: var(--black); transition: all .15s;
}
.search-bar input { flex: 1 1 160px; min-width: 0; }
.search-bar select { flex: 0 0 auto; }
.search-bar input:focus, .search-bar select:focus { border-color: var(--brand); }

/* ===== PLAYER GRID ===== */
.player-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px;
}
.player-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 20px;
  box-shadow: var(--shadow); cursor: pointer; transition: all .18s;
  display: flex; flex-direction: column; gap: 14px;
}
.player-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--brand); }
.player-card-header { display: flex; align-items: flex-start; gap: 12px; }
.player-avatar {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}
.player-info { flex: 1; }
.player-name { font-size: 15px; font-weight: 700; color: var(--black); }
.player-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.player-stats { display: flex; gap: 0; border-top: 1px solid var(--gray-100); padding-top: 12px; }
.player-stat { flex: 1; text-align: center; }
.player-stat:not(:last-child) { border-right: 1px solid var(--gray-100); }
.player-stat-val { font-size: 17px; font-weight: 800; color: var(--black); }
.player-stat-lbl { font-size: 10px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; margin-top: 1px; }
.player-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ===== LEVEL BADGE ===== */
.level-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.level-1 { background: var(--lv1-bg); color: var(--lv1); }
.level-2 { background: var(--lv2-bg); color: var(--lv2); }
.level-3 { background: var(--lv3-bg); color: var(--lv3); }
.level-4 { background: var(--lv4-bg); color: var(--lv4); }
.level-5 { background: var(--lv5-bg); color: var(--lv5); }
.level-6 { background: var(--lv6-bg); color: var(--lv6); }
.level-7 { background: var(--lv7-bg); color: var(--lv7); font-weight: 800; }

/* ===== PROGRESS BAR ===== */
.progress-container { display: flex; flex-direction: column; gap: 6px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--gray-500); }
.progress-bar-bg { height: 6px; border-radius: 999px; background: var(--gray-100); overflow: hidden; }
.progress-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

/* ===== PLAYER DETAIL ===== */
.detail-layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-avatar {
  width: 80px; height: 80px; border-radius: 50%; font-size: 28px; font-weight: 800;
  color: white; background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex; align-items: center; justify-content: center;
}
.detail-name { font-size: 22px; font-weight: 800; color: var(--black); letter-spacing: -.4px; }
.detail-info-row { display: flex; flex-direction: column; gap: 10px; }
.detail-info-item { display: flex; gap: 10px; font-size: 14px; align-items: baseline; }
.detail-info-label { color: var(--gray-400); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; min-width: 80px; }
.detail-info-val { color: var(--black); font-weight: 600; }
.detail-stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.detail-stat-box {
  background: var(--cream); border-radius: var(--radius-sm);
  padding: 14px 12px; text-align: center; border: 1px solid var(--gray-200);
  min-width: 0; overflow: hidden;
}
.detail-stat-val { font-size: 24px; font-weight: 800; color: var(--black); }
.detail-stat-lbl { font-size: 10px; font-weight: 700; color: var(--gray-400); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

/* ===== TOP PARTENAIRES ===== */
.top-partner-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background .15s; border-radius: var(--radius-sm);
}
.top-partner-row:last-child { border-bottom: none; }
.top-partner-row:hover { background: var(--gray-50); }
.top-partner-medal { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.top-partner-info { flex: 1; min-width: 0; }
.top-partner-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-partner-sub  { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.top-partner-wr   { font-size: 17px; font-weight: 800; text-align: center; flex-shrink: 0; line-height: 1.1; }
.top-partner-wr-lbl { font-size: 9px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; }

/* ===== MATCH TABLE ===== */
.match-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.match-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 400px; }
.match-table th {
  text-align: left; padding: 10px 14px; border-bottom: 2px solid var(--gray-100);
  font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .8px;
}
.match-table td { padding: 13px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.match-table tr:last-child td { border-bottom: none; }
.match-table tr:hover td { background: var(--cream); }
.match-result-win  { color: var(--success); font-weight: 800; }
.match-result-loss { color: var(--danger);  font-weight: 800; }
.match-points-pos  { color: var(--brand);   font-weight: 700; }

/* ===== FORMS ===== */
.form-container { max-width: 720px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 16px; font-weight: 500; outline: none;
  transition: all .15s; font-family: inherit; background: var(--white); color: var(--black);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.form-group textarea { resize: vertical; }
.optional { color: var(--gray-400); font-weight: 500; font-size: 12px; text-transform: none; letter-spacing: 0; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }

/* ===== MATCH FORM ===== */
.match-teams { display: grid; grid-template-columns: 1fr 56px 1fr; gap: 16px; align-items: start; margin-bottom: 20px; }
@media (max-width: 700px) { .match-teams { grid-template-columns: 1fr; } }
.team-block { background: var(--cream); border-radius: var(--radius); padding: 18px; border: 2px solid var(--gray-200); }
.team-title { font-size: 12px; font-weight: 800; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .8px; }
.team-a .team-title { color: var(--brand); }
.team-b .team-title { color: var(--black); }
.vs-block {
  display: flex; align-items: center; justify-content: center; padding-top: 52px;
  font-size: 14px; font-weight: 900; color: var(--gray-400); letter-spacing: 1px;
}

/* ===== SETS ===== */
.sets-section { margin-bottom: 20px; }
.sets-title { font-size: 13px; font-weight: 800; color: var(--gray-700); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 14px; }
.sets-grid { display: flex; flex-direction: column; gap: 10px; }
.set-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--cream); border-radius: var(--radius-sm); padding: 12px 16px;
  border: 2px solid var(--gray-200);
}
.set-label { font-size: 13px; font-weight: 700; color: var(--gray-600); min-width: 80px; }
.set-scores { display: flex; align-items: center; gap: 10px; }
.set-input {
  width: 60px !important; text-align: center; font-size: 20px !important; font-weight: 800 !important;
  padding: 6px 8px !important; margin: 0;
}
.score-separator { font-size: 18px; font-weight: 800; color: var(--gray-300); }
.set-winner { font-size: 13px; font-weight: 700; margin-left: auto; }
.set-winner.a { color: var(--brand); }
.set-winner.b { color: var(--black); }
.sets-summary {
  margin-top: 14px; background: var(--brand-xlight);
  border: 2px solid var(--brand-light); border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
}
.sets-summary.hidden { display: none; }
.sets-summary-winner { color: var(--brand); font-size: 15px; }
.sets-summary-score { color: var(--gray-500); font-size: 13px; }

/* ===== MATCH PREVIEW ===== */
.match-preview {
  background: var(--cream); border: 2px solid var(--brand-light);
  border-radius: var(--radius); padding: 18px; margin-bottom: 20px;
}
.match-preview.hidden { display: none; }
.match-preview h3 { font-size: 12px; font-weight: 800; color: var(--gray-500); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 12px; }
.preview-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--gray-200); font-size: 14px;
}
.preview-row:last-child { border-bottom: none; }
.preview-player { font-weight: 600; color: var(--black); }
.preview-right { display: flex; align-items: center; gap: 10px; }
.preview-pts { font-weight: 800; font-size: 15px; }
.preview-pts.win  { color: var(--brand); }
.preview-pts.loss { color: var(--gray-400); }
.preview-pts-detail { font-size: 12px; color: var(--gray-400); font-weight: 500; }

/* ===== RANKING ===== */
.ranking-filters { margin-bottom: 24px; }
.ranking-filters select {
  padding: 10px 16px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; outline: none; background: var(--white);
}
.ranking-filters select:focus { border-color: var(--brand); }
.ranking-group { margin-bottom: 32px; }
.ranking-group-title {
  font-size: 12px; font-weight: 800; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 12px 18px; background: var(--white);
  border: 1px solid var(--gray-200); border-bottom: 2px solid var(--brand);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex; align-items: center; gap: 10px;
}
.ranking-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background .15s;
}
.ranking-row:hover { background: var(--gray-50); }
.ranking-pos { width: 28px; text-align: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.ranking-pos.gold   { color: #F5C200; }
.ranking-pos.silver { color: #9ca3af; }
.ranking-pos.bronze { color: #cd7c2f; }
/* Colonne nom + barre de progression */
.ranking-name-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ranking-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-progress-wrap { height: 4px; background: var(--gray-200); border-radius: 2px; overflow: hidden; }
.ranking-progress-bar { height: 100%; background: var(--gray-400); border-radius: 2px; }
.ranking-progress-bar.me { background: var(--brand); }
.ranking-progress-label { font-size: 10px; color: var(--gray-400); }
.ranking-matches { font-size: 12px; color: var(--gray-400); flex-shrink: 0; display: none; }
.ranking-winrate { font-size: 12px; font-weight: 600; flex-shrink: 0; }
.ranking-pts { font-size: 13px; font-weight: 800; color: var(--black); flex-shrink: 0; white-space: nowrap; }
@media (min-width: 600px) { .ranking-matches { display: block; } }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--white); border-radius: var(--radius);
  padding: 32px; max-width: 400px; width: 90%; box-shadow: var(--shadow-lg);
}
.modal h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.modal p { color: var(--gray-500); font-size: 14px; margin-bottom: 24px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 2000;
  background: var(--black); color: var(--white);
  padding: 14px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease;
}
.toast.hidden { display: none; }
.toast.success { background: var(--brand); }
.toast.error   { background: var(--danger); }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-300); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 14px; }
.empty-state p { font-size: 15px; font-weight: 600; }

/* ===== DASHBOARD LIST ===== */
.dash-player-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--gray-100); cursor: pointer;
}
.dash-player-row:last-child { border-bottom: none; }
.dash-player-row:hover .dash-player-name { color: var(--brand); }
.dash-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--white); font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dash-player-info { flex: 1; }
.dash-player-name { font-size: 14px; font-weight: 700; color: var(--black); transition: color .15s; }
.dash-player-sub  { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.dash-player-pts  { font-size: 14px; font-weight: 800; color: var(--black); }

/* ===== RECENT MATCH ===== */
.recent-match-row { padding: 11px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
.recent-match-row:last-child { border-bottom: none; }
.recent-match-teams { font-weight: 700; color: var(--black); margin-bottom: 2px; }
.recent-match-score { color: var(--brand); font-weight: 800; }
.recent-match-date  { color: var(--gray-400); font-size: 11px; margin-top: 1px; }

/* ===== TOGGLE GROUP ===== */
.toggle-group { display: flex; gap: 0; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--gray-200); }
.toggle-btn {
  flex: 1; padding: 9px 14px; border: none; background: white;
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--gray-500);
  transition: all .15s;
}
.toggle-btn:hover { background: var(--gray-100); }
.toggle-btn.active { background: var(--brand); color: white; }

/* ===== DEMANDES DE MATCH ===== */
.requests-grid { display: flex; flex-direction: column; gap: 16px; }
.request-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); box-shadow: var(--shadow);
  overflow: hidden; transition: box-shadow .15s;
}
.request-card:hover { box-shadow: var(--shadow-md); }
.request-card.full { opacity: .65; }
.request-header {
  background: linear-gradient(135deg, var(--black), #2a1a0e);
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
}
.request-header-left { display: flex; align-items: center; gap: 12px; }
.request-creator-name { font-size: 15px; font-weight: 800; color: white; }
.request-datetime { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 2px; }
.request-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.req-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.req-badge-mixte  { background: rgba(245,194,0,.2); color: var(--accent); border: 1px solid rgba(245,194,0,.4); }
.req-badge-terrain { background: rgba(22,163,74,.2); color: #4ade80; border: 1px solid rgba(22,163,74,.3); }
.req-badge-full    { background: rgba(220,38,38,.2); color: #f87171; border: 1px solid rgba(220,38,38,.3); }
.req-badge-open    { background: rgba(196,82,26,.2); color: var(--brand-light); border: 1px solid rgba(196,82,26,.3); }
.request-body { padding: 16px 20px; }
.request-message {
  font-size: 14px; color: var(--gray-600); line-height: 1.6;
  white-space: pre-line; margin-bottom: 16px;
  padding: 12px; background: var(--cream); border-radius: var(--radius-sm);
}
.request-spots { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.spot-avatar {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.spot-avatar-circle {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
}
.spot-avatar-circle.filled {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white; font-size: 16px; overflow: hidden;
}
.spot-avatar-circle.empty {
  background: var(--gray-100); color: var(--gray-300);
  border: 2px dashed var(--gray-300); font-size: 22px;
}
.spot-avatar-name { font-size: 11px; font-weight: 600; color: var(--gray-500); max-width: 52px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.request-footer {
  padding: 12px 20px; border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.request-spots-left { font-size: 13px; font-weight: 600; color: var(--gray-500); }
.request-spots-left strong { color: var(--brand); }
.req-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 6px;
  background: #25D366; color: white; border: none;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: background .15s;
}
.btn-whatsapp:hover { background: #1ebe5c; }
.btn-join {
  background: var(--brand); color: white; border: none;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.btn-join:hover { background: var(--brand-dark); }
.btn-join:disabled { background: var(--gray-300); cursor: not-allowed; }
.btn-leave {
  background: var(--danger-light); color: var(--danger); border: none;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.btn-leave:hover { background: #fca5a5; }
.btn-cancel-req {
  background: none; border: none; color: var(--gray-400);
  font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 8px;
}
.btn-cancel-req:hover { color: var(--danger); }
.empty-requests {
  text-align: center; padding: 80px 20px; color: var(--gray-300);
}
.empty-requests .empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-requests p { font-size: 15px; font-weight: 600; }
.empty-requests .empty-sub { font-size: 13px; margin-top: 6px; }

/* ===== LEVELUP BADGE ===== */
.levelup-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-light); color: #92620a;
  border: 1px solid var(--accent); border-radius: 999px;
  font-size: 11px; font-weight: 800; padding: 2px 8px; margin-left: 8px;
}

/* ===== PHOTO UPLOAD ===== */
.photo-upload-wrap {
  display: flex; align-items: center; gap: 20px; margin-bottom: 20px;
}
.photo-preview {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: white;
  overflow: hidden; border: 3px solid var(--brand-light);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload-actions { display: flex; flex-direction: column; gap: 8px; }
.photo-upload-label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--brand-xlight); color: var(--brand);
  border: 2px solid var(--brand-light); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.photo-upload-label:hover { background: var(--brand-light); }
.photo-upload-label input { display: none; }
.photo-upload-hint { font-size: 11px; color: var(--gray-400); }
.photo-remove-btn {
  background: none; border: none; color: var(--danger); font-size: 12px;
  font-weight: 700; cursor: pointer; padding: 0; text-align: left;
}

/* ===== COUPS FAVORIS ===== */
.coups-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px;
}
.coup-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  border: 2px solid var(--gray-200); background: white;
  font-size: 13px; font-weight: 600; color: var(--gray-600);
  cursor: pointer; transition: all .15s; user-select: none;
}
.coup-chip:hover { border-color: var(--brand-light); background: var(--brand-xlight); color: var(--brand); }
.coup-chip.selected { border-color: var(--brand); background: var(--brand-xlight); color: var(--brand); }
.coup-chip-display {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--brand-xlight); color: var(--brand);
  border: 1px solid var(--brand-light); font-size: 12px; font-weight: 600;
}

/* ===== AVATAR (photo ou initiales) ===== */
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ===== SEARCHABLE SELECT ===== */
.search-select { position: relative; }
.search-select-input-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); background: var(--white);
  cursor: text; transition: all .15s;
}
.search-select-input-wrap:focus-within {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light);
}
.search-select-input-wrap.has-value { border-color: var(--brand); background: var(--brand-xlight); }
.search-select-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; font-weight: 500; color: var(--black); font-family: inherit;
}
.search-select-clear {
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--gray-400); font-size: 16px; line-height: 1;
  display: none; flex-shrink: 0;
}
.search-select-input-wrap.has-value .search-select-clear { display: block; }
.search-select-chevron { color: var(--gray-400); font-size: 12px; flex-shrink: 0; transition: transform .15s; }
.search-select-input-wrap.open .search-select-chevron { transform: rotate(180deg); }
.search-select-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: var(--white); border: 2px solid var(--brand);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  max-height: 240px; overflow-y: auto; display: none;
}
.search-select-dropdown.open { display: block; }
.search-select-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: background .1s;
  font-size: 14px;
}
.search-select-option:hover { background: var(--brand-xlight); }
.search-select-option.selected { background: var(--brand-xlight); font-weight: 700; }
.search-select-option-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.search-select-option-info { flex: 1; }
.search-select-option-name { font-weight: 600; color: var(--black); }
.search-select-option-sub { font-size: 11px; color: var(--gray-400); margin-top: 1px; }
.search-select-empty { padding: 14px; text-align: center; color: var(--gray-400); font-size: 13px; font-weight: 500; }
.search-select-none-option {
  padding: 10px 14px; font-size: 13px; color: var(--gray-400);
  cursor: pointer; border-bottom: 1px solid var(--gray-100);
}
.search-select-none-option:hover { background: var(--gray-50); }

/* ===== POINTS INFO BOX ===== */
.pts-info-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px;
}
.pts-info-box {
  background: var(--cream); border-radius: var(--radius-sm);
  padding: 12px; border: 1px solid var(--gray-200);
}
.pts-info-title { font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.pts-info-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.pts-info-row span:first-child { color: var(--gray-600); }
.pts-info-row span:last-child { font-weight: 700; color: var(--brand); }

/* ── MODAL BOX (récompense) ── */
.modal-box {
  background: var(--white); border-radius: var(--radius);
  padding: 32px; max-width: 460px; width: 90%; box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 20px; font-weight: 800; margin-bottom: 20px; color: var(--black); }

/* ── FIDÉLITÉ ADMIN ── */
.loyalty-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .loyalty-layout { grid-template-columns: 1fr; } }

.rewards-list { display: flex; flex-direction: column; gap: 12px; }
.reward-tier {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--gray-50); border: 1px solid var(--gray-200);
  gap: 12px; flex-wrap: wrap;
}
.reward-inactive { opacity: .45; }
.reward-tier-left { display: flex; align-items: center; gap: 14px; }
.reward-matches-badge {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white; font-weight: 900; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.reward-label { font-weight: 700; font-size: 14px; color: var(--black); }
.reward-sub   { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.reward-tier-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pending-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: white;
  border-radius: 999px; font-size: 11px; font-weight: 800;
  width: 20px; height: 20px; margin-left: 6px; vertical-align: middle;
}
.pending-list { display: flex; flex-direction: column; gap: 12px; }
.pending-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; border-radius: var(--radius-sm);
  background: var(--gray-50); border: 1px solid var(--gray-200); gap: 12px;
}
.pending-left { display: flex; align-items: center; gap: 12px; }
.pending-name { font-weight: 700; font-size: 14px; }
.pending-sub  { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* ── CARTE FIDÉLITÉ JOUEUR ── */
/* ── LOYALTY CARD (joueur) ── */
.loyalty-card {
  margin-top: 20px; padding: 18px;
  background: linear-gradient(135deg, #1a0e06, #2d1a09);
  border-radius: var(--radius); border: 1px solid rgba(196,82,26,.3);
}
.loyalty-card-full { padding: 20px; }
.loyalty-card-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.loyalty-card-title { font-size: 14px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.loyalty-card-sub   { font-size: 12px; color: rgba(255,255,255,.4); }

/* Anciens styles (conservés pour compatibilité) */
.loyalty-reward-target { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 8px; }
.loyalty-reward-label    { font-size: 14px; font-weight: 700; color: white; }
.loyalty-reward-remaining { font-size: 12px; color: rgba(255,255,255,.5); white-space: nowrap; }

/* Tampons */
.loyalty-stamps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.loyalty-stamps-sm .loyalty-stamp { width: 28px; height: 28px; }
.loyalty-stamp {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  color: white; transition: all .2s;
}
.loyalty-stamp.filled {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(196,82,26,.4);
}

/* Barre de progression */
.loyalty-progress-bar-bg   { height: 4px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.loyalty-progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 99px; }
.loyalty-done { color: var(--accent); font-weight: 700; font-size: 14px; text-align: center; padding: 12px 0; }

/* Liste des paliers */
.loyalty-tiers-list { display: flex; flex-direction: column; gap: 12px; }
.loyalty-tier-card {
  border-radius: 12px; padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  transition: border-color .2s;
}
.loyalty-tier-card.tier-active {
  border-color: rgba(196,82,26,.5);
  background: rgba(196,82,26,.08);
}
.loyalty-tier-card.tier-complete {
  border-color: rgba(255,200,60,.3);
  background: rgba(255,200,60,.05);
  opacity: .8;
}
.loyalty-tier-card.tier-locked {
  opacity: .45;
}
.loyalty-tier-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.loyalty-tier-icon { font-size: 20px; flex-shrink: 0; }
.loyalty-tier-info { flex: 1; min-width: 0; }
.loyalty-tier-label { font-size: 14px; font-weight: 700; color: white; }
.loyalty-tier-sub   { font-size: 11px; color: rgba(255,255,255,.45); margin-top: 2px; }
.loyalty-tier-check { font-size: 18px; color: #ffc83c; font-weight: 800; flex-shrink: 0; }
.loyalty-tier-pct   { font-size: 13px; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.loyalty-tier-remaining { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 6px; text-align: right; }

/* ── BOTTOM NAV (joueurs) — style Instagram ── */
.bottom-nav {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 420px;
  background: rgba(22,22,22,.96);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  z-index: 200;
  display: flex; align-items: center; justify-content: space-around;
  height: 60px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.bottom-nav.hidden { display: none; }
.bottom-nav-btn {
  display: flex; align-items: center; justify-content: center;
  flex: 1; height: 100%; background: none; border: none;
  color: rgba(255,255,255,.45); cursor: pointer;
  transition: color .15s, transform .1s;
  padding: 0; position: relative;
}
.bottom-nav-btn svg { width: 26px; height: 26px; }
.bottom-nav-btn.active { color: white; }
.bottom-nav-btn.active svg { stroke-width: 2.5; }
.bottom-nav-btn:active { transform: scale(.88); }

/* Indicateur point actif sous l'icône */
.bottom-nav-btn.active::after {
  content: ''; position: absolute; bottom: 4px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--brand);
}

/* Bouton central Match */
.bottom-nav-center-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 12px rgba(196,82,26,.6);
  transition: transform .15s, box-shadow .15s;
}
.bottom-nav-btn.bottom-nav-center { color: white; }
.bottom-nav-btn.bottom-nav-center::after { display: none; }
.bottom-nav-btn.bottom-nav-center:active .bottom-nav-center-icon { transform: scale(.9); }
.bottom-nav-btn.bottom-nav-center.active .bottom-nav-center-icon { background: var(--brand-dark); }

/* Padding bas quand la bottom nav est visible */
body.player-mode main { padding-bottom: 96px; }

/* ===== NOTIFICATIONS ===== */
.notif-bell-wrap {
  position: relative; display: inline-flex; align-items: center;
}
.notif-bell-btn {
  background: rgba(255,255,255,.1); border: none; color: rgba(255,255,255,.7);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: all .15s;
}
.notif-bell-btn:hover { background: rgba(255,255,255,.2); color: white; }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: white;
  border-radius: 999px; font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--black);
}
.notif-badge.hidden { display: none; }
.notif-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
  background: var(--white); transition: background .15s;
}
.notif-item.unread { background: var(--brand-xlight); }
.notif-item:last-child { border-bottom: none; }
.notif-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.notif-content { flex: 1; }
.notif-message { font-size: 14px; font-weight: 600; color: var(--black); line-height: 1.4; }
.notif-date { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.notif-unread-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); flex-shrink: 0; margin-top: 6px;
}

/* ===== ANNONCES ===== */
.announcement-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 18px 20px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.announcement-card.pinned {
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
}
.announcement-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.announcement-title { font-size: 16px; font-weight: 800; color: var(--black); }
.announcement-pin-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent); color: #7a5700;
  border-radius: 999px; font-size: 11px; font-weight: 800;
  padding: 2px 8px; flex-shrink: 0;
}
.announcement-body { font-size: 14px; color: var(--gray-600); line-height: 1.6; margin-bottom: 10px; }
.announcement-footer { display: flex; align-items: center; justify-content: space-between; }
.announcement-date { font-size: 12px; color: var(--gray-400); font-weight: 500; }
.announcement-actions { display: flex; gap: 8px; }

/* ===== STATS AVANCÉES ===== */
.adv-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .adv-stats-grid { grid-template-columns: 1fr; } }
.adv-stat-item {
  background: var(--cream); border-radius: var(--radius-sm);
  padding: 14px; border: 1px solid var(--gray-200);
}
.adv-stat-label { font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.adv-stat-value { font-size: 15px; font-weight: 800; color: var(--black); }
.adv-stat-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.form-pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.form-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 11px; font-weight: 800;
}
.form-pill.win  { background: var(--success-light); color: var(--success); }
.form-pill.loss { background: var(--danger-light); color: var(--danger); }

/* ===== TOURNOIS ===== */
.tournament-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 20px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.tournament-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tournament-name { font-size: 18px; font-weight: 800; color: var(--black); }
.tournament-meta { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.tournament-status {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.status-upcoming  { background: var(--brand-xlight); color: var(--brand); }
.status-ongoing   { background: var(--accent-light); color: #7a5700; }
.status-finished  { background: var(--gray-100); color: var(--gray-500); }
.bracket-grid { display: flex; flex-direction: column; gap: 10px; }
.bracket-match {
  display: flex; align-items: center; gap: 12px;
  background: var(--cream); border-radius: var(--radius-sm);
  padding: 12px 16px; border: 1px solid var(--gray-200);
}
.bracket-team { flex: 1; font-size: 14px; font-weight: 600; color: var(--black); }
.bracket-vs { font-size: 12px; font-weight: 800; color: var(--gray-400); padding: 0 4px; }
.bracket-score { font-size: 14px; font-weight: 800; color: var(--brand); min-width: 40px; text-align: center; }
.bracket-winner { color: var(--success); font-weight: 800; }
.bracket-actions { display: flex; gap: 6px; }
.trn-player-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; font-size: 14px;
  border-bottom: 1px solid var(--gray-100); transition: background .1s;
}
.trn-player-option:hover { background: var(--brand-xlight); }
.trn-player-option:last-child { border-bottom: none; }
.trn-player-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 6px; border-radius: 999px;
  background: var(--brand-xlight); color: var(--brand);
  border: 1px solid var(--brand-light); font-size: 13px; font-weight: 600;
}
.trn-player-chip button {
  background: none; border: none; cursor: pointer; color: var(--brand);
  font-size: 14px; padding: 0; line-height: 1; margin-left: 2px;
}
.round-label {
  font-size: 11px; font-weight: 800; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 8px 0 4px;
}

/* ===== DÉFIS ===== */
.challenge-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-200); margin-bottom: 20px; }
.challenge-tab {
  flex: 1; padding: 10px; background: none; border: none;
  font-size: 14px; font-weight: 700; color: var(--gray-400);
  cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all .15s;
}
.challenge-tab:hover { color: var(--black); }
.challenge-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.challenge-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 16px 20px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.challenge-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.challenge-title { font-size: 15px; font-weight: 700; color: var(--black); }
.challenge-msg { font-size: 13px; color: var(--gray-500); font-style: italic; margin-bottom: 8px; }
.challenge-status {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.cstatus-pending  { background: var(--accent-light); color: #7a5700; }
.cstatus-accepted { background: var(--success-light); color: var(--success); }
.cstatus-declined { background: var(--danger-light); color: var(--danger); }
.cstatus-played   { background: var(--gray-100); color: var(--gray-500); }
.challenge-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.challenge-date { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ===== QR CODE FIDÉLITÉ ===== */
#player-qr-code img { border-radius: 8px; }
#player-qr-code canvas { border-radius: 8px; }

/* ===== CHAT PAR NIVEAU ===== */
#view-chat {
  display: none;
  padding: 0;
}
#view-chat.active {
  display: flex; flex-direction: column;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  background: var(--gray-50);
}

#chat-header {
  padding: 14px 20px 12px;
  background: var(--white);
  color: var(--black);
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}
.chat-header-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  margin-top: 2px;
}

.chat-messages-container {
  flex: 1; min-height: 0; overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 130px;
  background: var(--gray-50);
}
.chat-bubble {
  width: fit-content; max-width: 78%;
  display: flex; flex-direction: column; gap: 3px;
  margin-bottom: 10px;
  user-select: none; -webkit-user-select: none;
}
.chat-bubble.mine { margin-left: auto; align-items: flex-end; }
.chat-bubble.theirs { margin-left: 0; align-items: flex-start; }
.chat-bubble-content {
  padding: 10px 14px; border-radius: 20px; font-size: 14px; line-height: 1.45;
  word-break: break-word; cursor: pointer;
  transition: opacity .1s;
}
.chat-bubble-content:active { opacity: .75; }
.chat-bubble.mine .chat-bubble-content {
  background: var(--brand); color: white;
  border-bottom-right-radius: 5px;
  box-shadow: 0 1px 4px rgba(196,82,26,.25);
}
.chat-bubble.theirs .chat-bubble-content {
  background: var(--white); color: var(--black);
  border-bottom-left-radius: 5px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.chat-bubble-meta { font-size: 11px; color: var(--gray-400); padding: 0 4px; }
.chat-sender { font-weight: 700; font-size: 11px; color: var(--brand); margin-bottom: 3px; padding: 0 4px; }

/* ── Bloc citation (répondre à) ── */
.chat-quote {
  padding: 6px 11px 6px 10px;
  border-radius: 12px 12px 0 0;
  margin-bottom: -6px;
  font-size: 12px; line-height: 1.4;
  max-width: 100%;
}
.chat-bubble.mine .chat-quote {
  background: rgba(0,0,0,.15);
  border-left: 3px solid rgba(255,255,255,.6);
  color: rgba(255,255,255,.85);
}
.chat-bubble.theirs .chat-quote {
  background: var(--brand-xlight);
  border-left: 3px solid var(--brand);
  color: var(--gray-600);
}
.chat-quote-name { font-weight: 700; margin-bottom: 1px; font-size: 11px; }
.chat-quote-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── @mention highlight ── */
.chat-mention { color: var(--brand); font-weight: 700; }
.chat-bubble.mine .chat-bubble-content .chat-mention { color: var(--accent); font-weight: 700; }

/* ── Barre de réponse ── */
.chat-reply-bar {
  background: var(--brand-xlight);
  border-top: 1px solid var(--brand-light);
  padding: 8px 16px;
  display: flex; align-items: center; gap: 10px;
}
.chat-reply-bar.hidden { display: none; }
.chat-reply-preview { flex: 1; overflow: hidden; }
.chat-reply-name { font-size: 11px; font-weight: 700; color: var(--brand); margin-bottom: 1px; }
.chat-reply-text { font-size: 12px; color: var(--gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-reply-cancel {
  background: none; border: none; font-size: 17px; color: var(--gray-500);
  cursor: pointer; padding: 2px 4px; line-height: 1; flex-shrink: 0;
}

/* ── Liste @mentions ── */
.chat-mention-list {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  max-height: 180px; overflow-y: auto;
}
.chat-mention-list.hidden { display: none; }
.chat-mention-item {
  padding: 11px 16px;
  cursor: pointer;
  font-size: 14px; font-weight: 600;
  color: var(--black);
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 10px;
}
.chat-mention-item:last-child { border-bottom: none; }
.chat-mention-item:active { background: var(--brand-xlight); }
.chat-mention-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: white;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Barre de saisie principale (fixe) ── */
.chat-input-bar {
  position: fixed; bottom: calc(64px + env(safe-area-inset-bottom));
  left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  z-index: 50;
}
body.player-mode .chat-input-bar {
  bottom: calc(80px + env(safe-area-inset-bottom));
}
/* Ligne input + bouton */
.chat-input-row {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 16px;
}
.chat-input-row input {
  flex: 1; background: var(--gray-100); border: 1px solid var(--gray-200);
  border-radius: 22px; padding: 10px 16px; color: var(--black); font-size: 16px;
  outline: none; transition: border-color .15s;
}
.chat-input-row input:focus { border-color: var(--brand); }
.chat-input-row input::placeholder { color: var(--gray-400); }

/* Admin chats list */
.admin-chat-room {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 16px 20px;
  box-shadow: var(--shadow); margin-bottom: 12px;
  cursor: pointer; transition: all .15s;
}
.admin-chat-room:hover { box-shadow: var(--shadow-md); border-color: var(--brand); }
.admin-chat-room-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.admin-chat-room-name { font-size: 15px; font-weight: 700; color: var(--black); }
.admin-chat-room-count { font-size: 12px; color: var(--gray-400); font-weight: 500; }
.admin-chat-room-last { font-size: 13px; color: var(--gray-500); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Admin chat messages view */
.admin-chat-msg-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-100);
}
.admin-chat-msg-row:last-child { border-bottom: none; }
.admin-chat-msg-body { flex: 1; }
.admin-chat-msg-sender { font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 2px; }
.admin-chat-msg-text { font-size: 14px; color: var(--black); }
.admin-chat-msg-date { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.admin-chat-back { margin-bottom: 16px; }

/* ===== COACHING ===== */
.coaching-intro-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.coaching-intro-photo {
  width: 58px; height: 58px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--gray-200);
}
.coaching-intro-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; color: white; flex-shrink: 0;
}
.coaching-intro-name { font-weight: 800; font-size: 17px; margin-bottom: 8px; }
.coaching-intro-offers { display: flex; flex-wrap: wrap; gap: 6px; }
.coaching-offer-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.coaching-offer-badge.solo { background: var(--brand-light); color: var(--brand); }
.coaching-offer-badge.duo  { background: var(--accent-light); color: #92710B; }
.coaching-offer-badge.trio { background: #DCFCE7; color: #15803D; }
.coaching-offer-badge.quad { background: #EDE9FE; color: #6D28D9; }

/* Calendrier semaine */
.coaching-week-strip {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px;
  margin-bottom: 16px; scrollbar-width: none;
}
.coaching-week-strip::-webkit-scrollbar { display: none; }
.coaching-day-btn {
  display: flex; flex-direction: column; align-items: center;
  min-width: 50px; padding: 10px 6px; border-radius: var(--radius-sm);
  cursor: pointer; border: 2px solid var(--gray-200);
  background: var(--white); transition: all .15s; text-align: center; flex-shrink: 0;
}
.coaching-day-btn.has-slots { border-color: var(--brand-light); }
.coaching-day-btn:hover { border-color: var(--gray-400); }
.coaching-day-btn.selected { background: var(--black); border-color: var(--black); color: white; }
.coaching-day-name  { font-size: 10px; font-weight: 700; letter-spacing: .5px; margin-bottom: 4px; }
.coaching-day-num   { font-size: 20px; font-weight: 900; line-height: 1; }
.coaching-day-month { font-size: 10px; margin-top: 3px; opacity: .65; }

/* Toggle filtre */
.coaching-filter-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 16px; font-size: 14px; color: var(--gray-500);
  border-bottom: 1px solid var(--gray-100); margin-bottom: 16px;
}
.coaching-toggle {
  width: 48px; height: 28px; border-radius: 99px; background: var(--gray-300);
  position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0;
}
.coaching-toggle.on { background: #3B82F6; }
.coaching-toggle-knob {
  width: 22px; height: 22px; border-radius: 50%; background: white;
  position: absolute; top: 3px; left: 3px; transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.coaching-toggle.on .coaching-toggle-knob { transform: translateX(20px); }

/* Grille des créneaux */
.coaching-time-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
@media (max-width: 360px) { .coaching-time-grid { grid-template-columns: repeat(3, 1fr); } }

.coaching-time-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 6px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); cursor: pointer; transition: all .15s; text-align: center;
  min-height: 68px;
}
.coaching-time-slot:hover:not(.full) { border-color: var(--brand); background: var(--brand-xlight); }
.coaching-time-slot.booked   { border-color: var(--success); background: var(--success-light); cursor: default; }
.coaching-time-slot.duo-open { border-color: #F59E0B; background: #FEF3C7; }
.coaching-time-slot.full     { opacity: .4; cursor: not-allowed; }
.coaching-slot-time-big { font-size: 17px; font-weight: 900; line-height: 1; }
.coaching-slot-label    { font-size: 10px; font-weight: 700; margin-top: 5px; }
.coaching-slot-label.booked { color: var(--success); }
.coaching-slot-label.full   { color: var(--gray-400); }
.coaching-slot-label.duo    { color: #B45309; }

/* Carte créneau admin */
.coaching-slots-date {
  font-size: 12px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .6px; margin: 20px 0 8px;
}
.coaching-slot-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow); margin-bottom: 10px;
}
.coaching-slot-time  { font-size: 21px; font-weight: 900; color: var(--black); min-width: 56px; line-height: 1; }
.coaching-slot-info  { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.coaching-slot-price { font-size: 12px; color: var(--gray-400); }

/* Modal réservation */
.coaching-option {
  display: flex; align-items: center; justify-content: space-between;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 14px 16px; cursor: pointer; transition: border-color .15s, background .15s;
}
.coaching-option:hover   { border-color: var(--brand); }
.coaching-option.selected { border-color: var(--brand); background: var(--brand-xlight); }
.coaching-price { font-size: 22px; font-weight: 900; color: var(--brand); }

/* Chips admin */
.coaching-time-chip {
  padding: 8px 14px; border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s; user-select: none;
}
.coaching-time-chip:hover    { border-color: var(--brand); }
.coaching-time-chip.selected { border-color: var(--brand); background: var(--brand-xlight); color: var(--brand); }

/* Badge classement FFT */
.fft-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #EFF6FF; color: #1D4ED8;
  border: 1px solid #BFDBFE; border-radius: 20px;
  padding: 2px 10px; font-size: 12px; font-weight: 700;
}

/* Bouton FFT dans le profil */
.fft-profile-btn {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); padding: 14px 16px;
  cursor: pointer; margin-top: 16px; transition: border-color .15s;
}
.fft-profile-btn:hover { border-color: var(--brand); }

/* Mes cours à venir */
.coaching-my-section { margin-bottom: 20px; }
.coaching-my-card {
  display: flex; align-items: center; justify-content: space-between;
  background: #F0FDF4; border: 1.5px solid #86EFAC;
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px;
}

/* ===================================================
   NOUVELLES FONCTIONNALITÉS v71
   =================================================== */

/* ── Onglets Classement ── */
.ranking-tabs {
  display: flex; gap: 8px; padding: 0 16px 12px; flex-wrap: wrap;
}
.ranking-tab-btn {
  padding: 7px 16px; border-radius: 20px; border: 1.5px solid var(--gray-200);
  background: white; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--gray-500); transition: all .15s;
}
.ranking-tab-btn.active {
  background: var(--brand); color: white; border-color: var(--brand);
}

/* ── Podium saisonnier ── */
.season-podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 8px; padding: 20px 16px 0; margin-bottom: 16px;
}
.podium-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; max-width: 110px;
}
.podium-name { font-size: 12px; font-weight: 700; color: var(--gray-700); text-align: center; }
.podium-spts { font-size: 11px; color: var(--gray-400); font-weight: 600; }
.podium-medal { font-size: 22px; margin-top: 2px; }
.podium-bar {
  width: 100%; border-radius: 6px 6px 0 0; margin-top: 4px;
}
.podium-bar-1 { height: 60px; background: linear-gradient(180deg,#F5C200,#F59E0B); }
.podium-bar-2 { height: 44px; background: linear-gradient(180deg,#D1D5DB,#9CA3AF); }
.podium-bar-3 { height: 32px; background: linear-gradient(180deg,#CD7F32,#92400E); }

/* ── Battle Pass v2 ── */
.bp-wrapper {
  margin-top: 20px;
  background: #0f172a;
  border-radius: var(--radius);
  padding: 14px 12px 12px;
  overflow: hidden;
}
.bp-header-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.bp-title-wrap { display: flex; flex-direction: column; gap: 1px; }
.bp-badge-prem {
  background: linear-gradient(135deg,#F59E0B,#F97316);
  color: white; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 800;
}
.bp-badge-free {
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.6);
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.bp-badge-countdown {
  background: linear-gradient(135deg,#1e3a5f,#2563EB);
  color: #93C5FD; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 800; border: 1px solid #3B82F6;
}
/* Scroll container */
.bp-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 4px;
}
.bp-scroll::-webkit-scrollbar { display: none; }
/* Labels de piste */
.bp-track-label {
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .6px; padding: 3px 4px; width: max-content;
  min-width: 100%;
}
.bp-track-label-prem { color: #F59E0B; }
.bp-track-label-free { color: #4ADE80; margin-top: 3px; }
/* Rangées */
.bp-row {
  display: flex; gap: 4px; width: max-content; padding: 4px 0;
}
/* Cellule générique */
.bp-cell {
  width: 68px; border-radius: 10px; padding: 8px 4px 6px;
  text-align: center; position: relative;
  border: 1.5px solid transparent; flex-shrink: 0;
}
.bp-cell-emoji { font-size: 20px; line-height: 1; }
.bp-cell-label {
  font-size: 9px; font-weight: 600; margin-top: 4px;
  line-height: 1.2; word-break: break-word;
}
.bp-cell-xp {
  font-size: 8px; font-weight: 700; margin-top: 3px;
  opacity: .5;
}
.bp-cell-check {
  position: absolute; top: -5px; right: -5px;
  background: #22C55E; color: white; border-radius: 50%;
  width: 15px; height: 15px; font-size: 8px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #0f172a;
}
.bp-lock-icon {
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  font-size: 12px; opacity: .7;
}
/* Premium cells */
.bp-prem-cell { color: white; }
.bp-prem-on {
  background: linear-gradient(135deg, var(--pc,#F59E0B) 0%, color-mix(in srgb, var(--pc,#F59E0B) 60%, #000) 100%);
  border-color: var(--pc, #F59E0B);
  box-shadow: 0 0 8px color-mix(in srgb, var(--pc,#F59E0B) 40%, transparent);
}
.bp-prem-on .bp-cell-label { color: rgba(255,255,255,.9); }
.bp-prem-pend {
  background: linear-gradient(135deg, rgba(245,158,11,.15), rgba(249,115,22,.1));
  border-color: rgba(245,158,11,.35);
}
.bp-prem-pend .bp-cell-emoji { filter: saturate(.4); }
.bp-prem-pend .bp-cell-label { color: rgba(255,255,255,.4); }
.bp-prem-off {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}
.bp-prem-off .bp-cell-emoji { filter: grayscale(1); opacity: .3; }
.bp-prem-off .bp-cell-label { color: rgba(255,255,255,.2); }
/* Free cells */
.bp-free-on {
  background: rgba(34,197,94,.18);
  border-color: rgba(34,197,94,.6);
}
.bp-free-on .bp-cell-label { color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.bp-free-on .bp-cell-emoji { filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.bp-free-next {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.2);
}
.bp-free-next .bp-cell-label { color: rgba(255,255,255,.7); }
.bp-free-off {
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.06);
}
.bp-free-off .bp-cell-emoji { filter: grayscale(1); opacity: .3; }
.bp-free-off .bp-cell-label { color: rgba(255,255,255,.2); }
/* Track row avec ligne continue */
.bp-track-row {
  position: relative;
  padding: 4px 0;
  width: max-content;
}
.bp-line-wrap {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  left: 34px; right: 34px;
  height: 4px;
  background: rgba(255,255,255,.15);
  border-radius: 2px; overflow: hidden;
}
.bp-line-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg,#C4521A,#F5C200);
  transition: width .4s;
}
.bp-circles {
  display: flex; gap: 4px;
  position: relative; z-index: 1;
}
.bp-track-col {
  width: 68px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.bp-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.35);
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.1); z-index: 1;
}
.bp-num-done  { background: #22C55E; color: white; border-color: #16A34A; }
.bp-num-active { background: var(--brand); color: white; border-color: #9a3e10; }
/* Barre globale */
.bp-global-bar-wrap {
  height: 5px; background: rgba(255,255,255,.08);
  border-radius: 3px; overflow: hidden; margin-top: 10px;
}
.bp-global-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg,var(--brand),#F5C200);
  transition: width .5s;
}

/* ── Season Countdown ── */
.season-countdown {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: var(--radius); padding: 16px; margin-top: 16px;
  color: white; border: 1px solid rgba(255,255,255,.08);
}
.season-countdown.sc-expired {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
}
.sc-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.sc-title { font-size: 14px; font-weight: 800; color: white; }
.sc-sub   { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }
.sc-days-badge {
  text-align: center; background: rgba(255,255,255,.1);
  border-radius: 10px; padding: 6px 12px; min-width: 60px;
}
.sc-days-big  { display: block; font-size: 22px; font-weight: 900; color: #F5C200; line-height: 1; }
.sc-days-lbl  { font-size: 9px; color: rgba(255,255,255,.5); font-weight: 600; text-transform: uppercase; }
.sc-days-end  { color: #FCA5A5; }
.sc-dots-grid {
  display: grid; grid-template-columns: repeat(10, 1fr);
  gap: 3px; margin-bottom: 10px;
}
.sc-dot {
  height: 6px; border-radius: 3px;
}
.sc-dot-past    { background: #F5C200; }
.sc-dot-today   { background: var(--brand); animation: pulse-dot .8s ease-in-out infinite alternate; }
.sc-dot-future  { background: rgba(255,255,255,.15); }
@keyframes pulse-dot { from { opacity: .6; } to { opacity: 1; } }
.sc-bar-wrap {
  height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden;
}
.sc-bar-fill {
  height: 100%; background: linear-gradient(90deg,var(--brand),#F5C200);
  border-radius: 2px; transition: width .4s;
}
.sc-bar-labels {
  display: flex; justify-content: space-between;
  font-size: 9px; color: rgba(255,255,255,.35); margin-top: 5px;
}
/* Compact (admin dashboard) */
.sc-compact {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; background: var(--gray-50); border-radius: 8px;
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.sc-compact.sc-expired { background: #FEF2F2; border-color: #FCA5A5; }
.sc-label { flex: 1; }
.sc-days-num { font-weight: 800; color: var(--brand); }
