/* ============================================================
   NeoTraderUniversity — Espace Membre CSS
   Palette alignée avec style.css (teal #0c1e22 / #122d34)
   ============================================================ */

/* ── Design system — tokens calqués sur le site principal ──── */
:root {
  --bg-primary:    #0c1e22;
  --bg-card:       #122d34;
  --bg-card-hover: #1a3840;
  --bg-input:      #0c1e22;

  /* Accent bleu — identique à --blue-mid / --blue-dark / --blue-light */
  --accent:        #4A7FA7;
  --accent-dark:   #1A3D63;
  --accent-light:  #B3CFE5;

  /* Couleurs fonctionnelles — identiques au site principal */
  --gold:          #c8a46a;   /* --warning */
  --green:         #6ab87a;   /* --success */
  --red:           #c87070;   /* --danger  */
  --grey:          #a8abb2;   /* --text-muted */
  --white:         #ffffff;
  --text-muted:    rgba(168,171,178,0.7);

  /* Bordures — identiques au site principal */
  --border:        #2c4951;
  --border-hover:  #3a5460;

  /* Géométrie — idem style.css */
  --radius-card:  12px;
  --radius-btn:    6px;
  --radius-pill:  50px;

  --sidebar-w: 220px;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--grey);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ── App shell ────────────────────────────────────────────── */
#app { display: flex; min-height: 100vh; }

/* ── SIDEBAR ──────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #090f12;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 0 0 32px;
  transition: width 0.3s ease, transform 0.3s ease;
  scrollbar-width: none;
}
#sidebar::-webkit-scrollbar { display: none; }
#sidebar.collapsed { width: 0; overflow: hidden; }

.sidebar-logo {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  flex-shrink: 0;
}

/* Logo gradient — identique à .logo dans style.css */
.sidebar-logo-text {
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(180deg, #c8d8e4 0%, #8fa4b2 40%, #516070 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
.sidebar-logo-text span {
  background: inherit;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav { flex: 1; }

.nav-group { margin-top: 4px; }

.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--grey);
  opacity: 0.5;
  padding: 16px 16px 6px;
  display: block;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--grey);
  font-size: 13px;
  font-weight: 500;
  border-radius: 0 8px 8px 0;
  margin-right: 8px;
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
  border-left: 3px solid transparent;
}
.nav-item:hover {
  color: var(--white);
  background: rgba(44,73,81,0.35);
}
.nav-item.active {
  color: var(--white);
  background: rgba(44,73,81,0.45);
  border-left-color: var(--accent);
}
.nav-item .nav-icon { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.nav-item--danger { color: var(--red); }
.nav-item--danger:hover { background: rgba(200,112,112,0.08); color: var(--red); }

.badge-new {
  font-size: 8px;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

/* ── MAIN WRAPPER ─────────────────────────────────────────── */
#main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}
#main-wrapper.sidebar-collapsed { margin-left: 0; }

/* ── TOP BAR — style navbar du site principal ─────────────── */
#top-bar {
  position: sticky;
  top: 0;
  height: 56px;
  background: rgba(18,45,52,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
  gap: 16px;
}

#sidebar-toggle {
  background: none;
  border: none;
  color: var(--grey);
  font-size: 20px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
#sidebar-toggle:hover { color: var(--white); background: rgba(255,255,255,0.05); }

.breadcrumb { color: var(--white); font-size: 14px; font-weight: 600; flex: 1; }

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.level-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(44,73,81,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  cursor: pointer;
}
.level-icon { font-size: 16px; }
.level-info { display: flex; flex-direction: column; gap: 2px; }
.level-title { font-size: 11px; font-weight: 700; color: var(--white); }
.level-bar {
  width: 60px; height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px; overflow: hidden;
}
.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.plan-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  letter-spacing: 0.5px;
}

.user-dropdown { position: relative; }
.user-avatar-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--white);
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.user-avatar-btn:hover { background: rgba(255,255,255,0.05); }
.user-avatar-circle {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--white);
  flex-shrink: 0;
}
.user-pseudo-text { font-size: 13px; font-weight: 600; }

.user-dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  min-width: 180px;
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
}
.user-dropdown-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--grey);
  transition: background 0.15s, color 0.15s;
}
.dropdown-item:hover { background: rgba(44,73,81,0.35); color: var(--white); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: rgba(200,112,112,0.08); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── CONTENT ──────────────────────────────────────────────── */
#content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

/* ── SECTIONS ─────────────────────────────────────────────── */
.page-section { display: none; }
.page-section.active { display: block; animation: fadeInSection 0.25s ease; }

@keyframes fadeInSection {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── TYPOGRAPHIE ──────────────────────────────────────────── */
.section-title {
  font-family: 'Raleway', sans-serif;
  font-size: 26px; font-weight: 800;
  color: var(--white); letter-spacing: -0.5px;
}
.section-subtitle { font-size: 13px; color: var(--grey); margin-top: 4px; }
.section-subtitle strong { color: var(--white); font-weight: 600; }
.block-title { font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 16px; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── GRILLES ──────────────────────────────────────────────── */
.content-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.content-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.content-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
/* Barre d'accentuation top au hover — identique au site */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover::before { opacity: 1; }
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(74,127,167,0.15), 0 4px 16px rgba(0,0,0,0.3);
}
.card-thumbnail {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--accent-dark), var(--bg-primary));
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-thumbnail img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card-body { padding: 14px 16px; }
.card-title { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.card-meta  { font-size: 11px; color: var(--grey); display: flex; gap: 12px; margin-bottom: 4px; }
.card-desc  {
  font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── PROGRESS BAR ─────────────────────────────────────────── */
.progress-bar {
  height: 6px; background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden; margin-top: 10px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border-radius: 3px; transition: width 0.6s ease;
}
.progress-pct { font-size: 11px; color: var(--grey); margin-top: 4px; display: block; }

/* ── BOUTONS — calqués sur style.css ─────────────────────── */
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
  padding: 10px 20px; border-radius: var(--radius-btn);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.22s ease;
  display: inline-flex; align-items: center; gap: 6px;
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%) skewX(-15deg);
  pointer-events: none;
}
.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -10px rgba(74,127,167,.6);
}
.btn-primary:hover::after {
  animation: btn-shimmer 0.65s ease forwards;
}
.btn-primary.full { width: 100%; justify-content: center; }

@keyframes btn-shimmer {
  0%   { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(220%) skewX(-15deg); }
}

.btn-outline {
  background: transparent; color: var(--grey);
  border: 1px solid var(--border);
  padding: 9px 20px; border-radius: var(--radius-btn);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--white);
  background: rgba(44,73,81,0.3);
  transform: translateY(-1px);
}
.btn-outline.full { width: 100%; justify-content: center; }
.btn-sm { padding: 7px 16px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }

/* ── SEARCH INPUT ─────────────────────────────────────────── */
.search-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 8px 14px;
  color: var(--white);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 220px;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74,127,167,0.15);
}
.search-input::placeholder { color: rgba(168,171,178,0.5); }
.search-input--sm { min-width: 160px; font-size: 12px; padding: 6px 12px; }

/* ── STAT CARDS ───────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 14px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 20px; text-align: center;
  position: relative; overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* Barre bas bleue — identique stat-card du site */
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(74,127,167,0.14);
}
.stat-value {
  font-family: 'Raleway', sans-serif;
  font-size: 30px; font-weight: 800; color: var(--white); display: block;
}
.stat-label {
  font-size: 11px; color: var(--grey); margin-top: 4px;
  display: block; text-transform: uppercase; letter-spacing: 0.5px;
}

/* ── ACCUEIL ──────────────────────────────────────────────── */
.welcome-header {
  background: linear-gradient(135deg, rgba(44,73,81,0.25), rgba(26,61,99,0.12));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin-bottom: 24px;
}
.welcome-header h1 {
  font-family: 'Raleway', sans-serif;
  font-size: 22px; font-weight: 800; color: var(--white); margin-bottom: 6px;
}

.continue-card {
  background: linear-gradient(135deg, var(--accent-dark), var(--bg-primary));
  border: 1px solid rgba(74,127,167,0.35);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.continue-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent-light); display: block; margin-bottom: 6px;
}
.continue-card p { color: var(--white); font-weight: 600; font-size: 15px; margin-bottom: 10px; }

.section-block { margin-bottom: 40px; }

.nouveautes-slider {
  display: flex; gap: 16px; overflow-x: auto;
  padding-bottom: 8px; scrollbar-width: none;
}
.nouveautes-slider::-webkit-scrollbar { display: none; }
.nouveautes-slider .card { min-width: 240px; flex-shrink: 0; cursor: pointer; }

/* ── FORMATION ────────────────────────────────────────────── */
.module-thumbnail-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; z-index: 2;
}
.module-number-badge {
  background: rgba(74,127,167,0.8);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.module-play-icon {
  font-size: 28px; color: rgba(255,255,255,0.9);
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.module-card { cursor: pointer; }

/* Module detail */
.module-back button {
  background: none; border: 1px solid var(--border);
  color: var(--grey); padding: 6px 14px;
  border-radius: var(--radius-btn); font-size: 13px;
  cursor: pointer; transition: all 0.2s; margin-bottom: 20px;
}
.module-back button:hover { color: var(--white); border-color: var(--accent); }
.module-header { margin-bottom: 24px; }
.module-header h1 { font-family: 'Raleway', sans-serif; font-size: 22px; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.module-header p { color: var(--grey); margin-bottom: 16px; }
.module-meta-bar {
  display: flex; gap: 24px; font-size: 13px; color: var(--grey); margin-bottom: 20px;
}
.module-meta-bar strong { color: var(--white); }

.module-quiz-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(200,164,106,0.07); border: 1px solid rgba(200,164,106,0.22);
  border-radius: var(--radius-card); padding: 14px 20px; margin-bottom: 24px; gap: 16px;
}
.module-quiz-banner strong { color: var(--gold); font-size: 14px; display: block; margin-bottom: 2px; }
.module-quiz-banner span { color: var(--grey); font-size: 12px; }

.lessons-list { display: flex; flex-direction: column; gap: 4px; }
.lesson-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: var(--radius-btn);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.lesson-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.lesson-status { flex-shrink: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.lesson-icon { font-size: 16px; }
.lesson-info { flex: 1; min-width: 0; }
.lesson-number { font-size: 11px; color: var(--accent-light); font-weight: 700; display: block; }
.lesson-title { font-size: 13px; color: var(--white); font-weight: 600; display: block; }
.lesson-desc { font-size: 11px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.lesson-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.lesson-duration { font-size: 12px; color: var(--grey); }

/* ── REPLAYS ──────────────────────────────────────────────── */
.filter-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.filter-tab {
  padding: 7px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent; color: var(--grey);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.filter-tab.active {
  background: var(--accent); border-color: var(--accent); color: var(--white);
}
.filter-tab:hover:not(.active) {
  border-color: var(--border-hover); color: var(--white); background: rgba(44,73,81,0.3);
}

.replay-thumbnail-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 6px;
}
.replay-duration-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.7); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 4px;
}
.replay-play-icon { font-size: 36px; color: rgba(255,255,255,0.85); text-shadow: 0 2px 16px rgba(0,0,0,0.6); }
.replay-card { cursor: pointer; }

.replay-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

.tag {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.tag--am      { background: rgba(106,184,122,0.15); color: #6ab87a; }
.tag--pm      { background: rgba(74,127,167,0.15);  color: #4a7fa7; }
.tag--forex   { background: rgba(200,164,106,0.15); color: #c8a46a; }
.tag--indices { background: rgba(155,89,182,0.15);  color: #9b59b6; }
.tag--masterclass { background: rgba(200,112,112,0.15); color: #c87070; }

/* ── BIBLIOTHÈQUE ─────────────────────────────────────────── */
.lib-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.lib-tab {
  padding: 10px 20px; background: transparent; border: none;
  color: var(--grey); font-size: 13px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all 0.2s; margin-bottom: -1px;
}
.lib-tab.active { color: var(--white); border-bottom-color: var(--accent); }
.lib-tab:hover:not(.active) { color: var(--white); }

.lib-header-right { display: flex; align-items: center; gap: 10px; }

.lib-categories-slider {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 8px; margin-bottom: 20px; scrollbar-width: none;
}
.lib-categories-slider::-webkit-scrollbar { display: none; }

.lib-category-banner {
  min-width: 160px; height: 90px;
  background: linear-gradient(135deg, var(--accent-dark), var(--bg-card));
  border: 2px solid transparent; border-radius: var(--radius-card);
  padding: 14px; cursor: pointer; flex-shrink: 0; transition: border-color 0.2s;
  display: flex; flex-direction: column; justify-content: center;
}
.lib-category-banner.active, .lib-category-banner:hover { border-color: var(--accent); }
.lib-cat-name { font-size: 13px; font-weight: 700; color: var(--white); display: block; margin-bottom: 4px; }
.lib-cat-desc { font-size: 11px; color: var(--grey); display: block; }

.lib-tag-filters {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 16px; font-size: 12px;
}
.lib-filter-label { color: var(--grey); font-weight: 600; }

.lib-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lib-table thead th {
  background: var(--accent-dark); color: var(--accent-light);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 10px 14px; text-align: left;
}
.lib-table tbody tr {
  border-bottom: 1px solid var(--border); transition: background 0.15s;
}
.lib-table tbody tr:hover { background: var(--bg-card-hover); }
.lib-table td { padding: 10px 14px; color: var(--white); vertical-align: middle; }

.lib-name-cell { display: flex; align-items: center; gap: 8px; }
.lib-filename { font-weight: 600; }
.lib-filesize { font-size: 11px; color: var(--grey); }
.lib-actions { display: flex; align-items: center; gap: 8px; }
.lib-fav-btn { background: none; border: none; font-size: 15px; cursor: pointer; opacity: 0.6; transition: opacity 0.2s; }
.lib-fav-btn:hover { opacity: 1; }

.compat-badge {
  font-size: 10px; font-weight: 600;
  background: rgba(44,73,81,0.5); color: var(--accent-light);
  padding: 2px 8px; border-radius: 4px;
}
.format-badge {
  font-size: 10px; font-weight: 800; padding: 3px 8px;
  border-radius: 4px; text-transform: uppercase;
}
.format-pine  { background: rgba(106,184,122,0.15); color: #6ab87a; }
.format-pdf   { background: rgba(200,112,112,0.15); color: #c87070; }
.format-xlsx  { background: rgba(106,184,122,0.15); color: #6ab87a; }
.format-mq4   { background: rgba(74,127,167,0.15);  color: #4a7fa7; }
.format-json  { background: rgba(200,164,106,0.15); color: #c8a46a; }

.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 20px; font-size: 13px;
}
.pagination button {
  background: none; border: 1px solid var(--border);
  color: var(--grey); padding: 6px 14px; border-radius: var(--radius-btn);
  cursor: pointer; transition: all 0.2s;
}
.pagination button:hover { border-color: var(--accent); color: var(--white); }

/* ── QUIZ ─────────────────────────────────────────────────── */
.quiz-progress-badge {
  background: rgba(44,73,81,0.4); border: 1px solid var(--border);
  color: var(--accent-light); font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: var(--radius-pill);
}
.quiz-module-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  color: var(--accent-light); display: block; margin-bottom: 6px; letter-spacing: 0.5px;
}
.quiz-meta { font-size: 12px; color: var(--grey); margin: 4px 0 10px; }
.quiz-status {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: var(--radius-pill); display: inline-block;
}
.quiz-status--todo   { background: rgba(168,171,178,0.12); color: var(--grey); }
.quiz-status--passed { background: rgba(106,184,122,0.12); color: var(--green); }
.quiz-status--failed { background: rgba(200,112,112,0.12); color: var(--red); }
.quiz-card { cursor: pointer; }

.leaderboard-section { margin-top: 40px; }
.leaderboard-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.leaderboard-table thead th {
  background: rgba(44,73,81,0.25); color: var(--grey);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border);
}
.leaderboard-table tbody tr { border-bottom: 1px solid rgba(44,73,81,0.3); }
.leaderboard-table tbody tr:hover { background: rgba(44,73,81,0.2); }
.leaderboard-table td { padding: 10px 14px; color: var(--white); }
.rank-badge {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.rank-1 { background: linear-gradient(135deg, #c8a46a, #a07a40); color: #000; }
.rank-2 { background: linear-gradient(135deg, #bdc3c7, #95a5a6); color: #000; }
.rank-3 { background: linear-gradient(135deg, #c87070, #a05050); color: #fff; }
.rank-other { background: rgba(168,171,178,0.12); color: var(--grey); }

/* ── JOURNAL ──────────────────────────────────────────────── */
.chart-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 20px; margin-bottom: 24px;
}

.direction-long  { color: var(--green); font-weight: 700; }
.direction-short { color: var(--red);   font-weight: 700; }
.pnl-pos { color: var(--green); font-weight: 700; }
.pnl-neg { color: var(--red);   font-weight: 700; }
.action-btn { background: none; border: none; color: var(--grey); font-size: 16px; cursor: pointer; transition: color 0.2s; }
.action-btn:hover { color: var(--red); }

/* Modal — z-index 500 > sidebar 200 > overlay 150 */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 500;
  align-items: center; justify-content: center;
}
.modal.open { display: flex; }
.modal-content {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 28px; width: 540px;
  max-width: 95vw; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
}
.modal-content h3 {
  font-family: 'Raleway', sans-serif; font-size: 18px; font-weight: 800;
  color: var(--white); margin-bottom: 20px;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--grey); }
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-btn); padding: 8px 12px;
  color: var(--white); font-size: 13px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74,127,167,0.15);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select option { background: var(--bg-card); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ── WALL OF FAME ─────────────────────────────────────────── */
.wof-tier { margin-bottom: 40px; }
.wof-tier-badge {
  font-size: 13px; font-weight: 800; padding: 6px 16px;
  border-radius: var(--radius-pill); display: inline-block; margin-bottom: 16px;
}
.wof-tier--funded  { background: rgba(44,73,81,0.4);  color: var(--accent-light); border: 1px solid var(--border); }
.wof-tier--elite   { background: rgba(200,164,106,0.1); color: var(--gold); border: 1px solid rgba(200,164,106,0.35); }
.wof-tier--legend  { background: rgba(155,89,182,0.1); color: #c39bd3; border: 1px solid rgba(155,89,182,0.35); }

.wof-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 16px; text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}
.wof-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.wof-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
  margin: 0 auto 10px;
  font-family: 'Raleway', sans-serif;
}
.wof-name { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.wof-firm { font-size: 11px; color: var(--accent-light); margin-bottom: 4px; }
.wof-amount { font-size: 16px; font-weight: 800; color: var(--green); }

.wof-submit-banner {
  text-align: center; padding: 32px;
  background: linear-gradient(135deg, rgba(44,73,81,0.15), rgba(26,61,99,0.1));
  border: 1px dashed var(--border); border-radius: var(--radius-card); margin-top: 16px;
}
.wof-submit-banner p { color: var(--grey); margin-bottom: 16px; font-size: 14px; }

/* ── RÉCOMPENSES ──────────────────────────────────────────── */
.levels-track {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px;
  margin-bottom: 32px; scrollbar-width: none;
}
.levels-track::-webkit-scrollbar { display: none; }
.level-step {
  min-width: 64px; height: 80px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; flex-shrink: 0;
  transition: border-color 0.2s;
}
.level-step.current { border-color: var(--accent); background: rgba(74,127,167,0.08); }
.level-step.done    { border-color: rgba(106,184,122,0.35); }
.level-step .step-num { font-size: 10px; color: var(--grey); font-weight: 700; }
.level-step .step-icon { font-size: 22px; }
.level-step .step-label { font-size: 9px; color: var(--grey); text-align: center; padding: 0 4px; }

.missions-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.mission-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 16px;
  display: flex; align-items: center; gap: 14px; transition: border-color 0.2s;
}
.mission-card[data-completed="true"] { border-color: rgba(106,184,122,0.35); opacity: 0.7; }
.mission-icon {
  width: 40px; height: 40px; background: rgba(44,73,81,0.4);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.mission-info { flex: 1; min-width: 0; }
.mission-xp { font-size: 11px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px; }
.mission-title { font-size: 13px; font-weight: 600; color: var(--white); margin: 2px 0; }
.mission-desc  { font-size: 11px; color: var(--grey); }

/* ── RESSOURCES ───────────────────────────────────────────── */
.ressources-category { margin-bottom: 36px; }

.resource-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.2s, border-color 0.2s;
}
.resource-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.resource-icon { font-size: 28px; }
.resource-title { font-size: 14px; font-weight: 700; color: var(--white); }
.resource-desc  { font-size: 12px; color: var(--grey); flex: 1; }

/* ── PARTENAIRES ──────────────────────────────────────────── */
.partner-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.partner-logo-placeholder {
  height: 32px; width: 80px;
  background: rgba(44,73,81,0.4); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--accent-light);
}
.partner-category {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  color: var(--accent-light); background: rgba(44,73,81,0.4);
  padding: 2px 8px; border-radius: 4px;
}
.partner-deal-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), #a07a40);
  color: #000; font-size: 11px; font-weight: 800;
  padding: 4px 12px; border-radius: var(--radius-pill); margin-top: 8px;
}

/* ── PROFIL ───────────────────────────────────────────────── */
.profil-grid { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.profil-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 24px; text-align: center;
}
.profil-avatar-wrapper {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 14px;
  cursor: pointer;
}
.profil-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: #fff;
  font-family: 'Raleway', sans-serif;
  overflow: hidden;
}
.profil-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  background: var(--accent);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  transition: background 0.2s;
  pointer-events: none;
}
.profil-avatar-wrapper:hover .profil-avatar-edit { background: var(--accent-light); }
.profil-name { font-size: 18px; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.profil-email { font-size: 12px; color: var(--grey); margin-bottom: 16px; }
.profil-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; }
.profil-form h3 { font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 20px; }

/* ── ABONNEMENT ───────────────────────────────────────────── */
.plan-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 24px; margin-bottom: 16px;
}
.plan-name { font-size: 18px; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.plan-status-active { color: var(--green); font-weight: 700; font-size: 13px; }

/* ── FAVORIS ──────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--grey);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.empty-state p  { font-size: 13px; }

/* ── NOTES ────────────────────────────────────────────────── */
.notes-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.notes-list { display: flex; flex-direction: column; gap: 8px; }
.note-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-btn); padding: 12px; cursor: pointer; transition: border-color 0.2s;
}
.note-item.active, .note-item:hover { border-color: var(--accent); }
.note-item-title { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 2px; }
.note-item-date  { font-size: 11px; color: var(--grey); }
.note-editor {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.note-editor textarea {
  flex: 1; min-height: 300px; background: transparent; border: none;
  color: var(--white); font-size: 14px; outline: none; resize: none; line-height: 1.7;
}
.note-title-input {
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  color: var(--white); font-size: 18px; font-weight: 700;
  padding-bottom: 10px; outline: none; width: 100%;
}

/* ── OVERLAY SIDEBAR MOBILE ───────────────────────────────── */
.sidebar-overlay {
  display: none;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .content-grid-4 { grid-template-columns: repeat(3,1fr); }
  .profil-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .content-grid-4, .content-grid-3 { grid-template-columns: repeat(2,1fr); }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .missions-grid { grid-template-columns: 1fr; }
  .notes-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w) !important;
    z-index: 200;
  }
  #sidebar.mobile-open { transform: translateX(0); }
  #top-bar { margin-left: 0 !important; }
  #main-wrapper { margin-left: 0 !important; }
  #content { padding: 16px; }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.65); z-index: 150;
  }
  .sidebar-overlay.visible { display: block; }
  #sidebar-toggle { display: flex !important; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .lib-header-right { flex-direction: column; align-items: flex-start; }
  .level-badge, .plan-badge { display: none; }
  .user-pseudo-text { display: none; }
  .user-dropdown-menu { right: 0; left: auto; min-width: 160px; }
}
@media (min-width: 769px) {
  #sidebar-toggle { display: none; }
  #main-wrapper { margin-left: var(--sidebar-w); transition: margin-left 0.3s; }
  #main-wrapper.sidebar-collapsed { margin-left: 0; }
}
@media (max-width: 560px) {
  .content-grid-4, .content-grid-3, .content-grid-2 { grid-template-columns: 1fr; }
}

/* ── SECTION VERROUILLÉE ──────────────────────────────────── */
.locked-section {
  text-align: center;
  padding: 60px 20px;
  max-width: 620px;
  margin: 0 auto;
}
.locked-icon {
  font-size: 56px;
  margin-bottom: 20px;
  display: block;
}
.locked-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
  text-align: left;
}
.locked-feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--grey);
}
@media (max-width: 560px) {
  .locked-features-grid { grid-template-columns: 1fr; }
}

/* ── MODAL LEÇON ──────────────────────────────────────────── */
.modal-content--wide {
  width: 680px;
}
.lesson-video-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--accent-dark), var(--bg-primary));
  border-radius: var(--radius-btn);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--grey);
  font-size: 13px;
}
.lesson-play-icon {
  font-size: 44px;
  color: rgba(255,255,255,0.35);
}
.lesson-notes-area h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.lesson-notes-area textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 12px;
  color: var(--white);
  font-size: 13px;
  outline: none;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
  display: block;
}
.lesson-notes-area textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74,127,167,0.15);
}

/* ── RESOURCE CARD — layout horizontal (accueil) ─────────── */
.resource-card--row {
  flex-direction: row;
  align-items: center;
  padding: 14px 16px;
  gap: 14px;
}
.resource-card--row .resource-desc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 560px) {
  .resource-card--row { flex-direction: column; align-items: flex-start; }
  .resource-card--row .resource-desc { white-space: normal; }
}

/* ── MODULES EN PRODUCTION ────────────────────────────────────── */
.module-card--production {
  opacity: 0.75;
  cursor: not-allowed;
}
.module-card--production:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}
.module-card--production:hover::before { opacity: 0; }

.production-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(200,164,106,0.12);
  color: var(--gold);
  border: 1px solid rgba(200,164,106,0.25);
}

.production-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(200,164,106,0.07);
  border: 1px solid rgba(200,164,106,0.22);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 4px;
  font-size: 13px;
}
.production-banner span { font-size: 28px; flex-shrink: 0; }
.production-banner strong { color: var(--white); display: block; margin-bottom: 2px; }
.production-banner p { color: var(--grey); font-size: 12px; margin: 0; }

/* ── XP BADGE (récompenses) ───────────────────────────────────── */
.xp-badge-display {
  background: rgba(44,73,81,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
  white-space: nowrap;
}

/* ── LEVEL STEP XP ────────────────────────────────────────────── */
.level-step { min-width: 72px; height: 90px; }
.level-step .step-xp {
  font-size: 9px;
  color: var(--grey);
  opacity: 0.7;
  text-align: center;
  padding: 0 4px;
}

/* ── JOURNAL SETTINGS ─────────────────────────────────────────── */
.journal-settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.journal-settings-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
}
.journal-settings-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.journal-setting-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.journal-setting-item label {
  font-size: 11px;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.capital-input-wrap {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  overflow: hidden;
  background: var(--bg-input);
}
.capital-input-wrap select {
  background: rgba(44,73,81,0.4);
  border: none;
  border-right: 1px solid var(--border);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 10px;
  outline: none;
  cursor: pointer;
}
.capital-number-input {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 13px;
  padding: 7px 12px;
  outline: none;
  width: 120px;
}
.capital-number-input::-webkit-inner-spin-button,
.capital-number-input::-webkit-outer-spin-button { opacity: 0.4; }

.propfirm-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--grey);
  cursor: pointer;
  padding-bottom: 8px;
}
.propfirm-check-label input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}
.propfirm-check-label:hover { color: var(--white); }

@media (max-width: 640px) {
  .journal-settings-row { flex-direction: column; align-items: flex-start; }
}

/* Évite le zoom iOS sur les inputs de petite taille */
@media (max-width: 768px) {
  .search-input,
  .search-input--sm,
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  select,
  textarea { font-size: 16px !important; }
}
