/* ============================================================
   BOUTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Loading state */
.btn.loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  color: inherit;
}

.btn-primary.loading::after  { border-top-color: var(--bg-primary); }
.btn-ghost.loading::after    { border-top-color: var(--text-secondary); }
.btn-danger.loading::after   { border-top-color: #fff; }

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* Variantes */
.btn-primary {
  background: var(--gold);
  color: var(--bg-primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Tailles */
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }
.btn-xl { padding: 14px 28px; font-size: 14px; font-weight: 700; }

/* Direction Toggle */
.direction-toggle { display: flex; gap: 6px; }

.dir-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-align: center;
}

.dir-btn.long.active  { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.dir-btn.short.active { background: var(--red-dim);   border-color: var(--red);   color: var(--red); }
.dir-btn:not(.active):hover { border-color: var(--border-light); color: var(--text-primary); }

/* ============================================================
   FORMULAIRES
============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.form-input,
.form-textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-dim);
}

.form-input.valid   { border-color: var(--success); }
.form-input.invalid { border-color: var(--danger); }

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.form-error {
  font-size: 11px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group.full { grid-column: 1 / -1; }
.form-group.third { grid-column: span 1; }

/* ============================================================
   CUSTOM SELECT — remplace le select natif
============================================================ */
.custom-select-wrap {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s;
  user-select: none;
}

.custom-select-wrap:hover { border-color: var(--border-light); }
.custom-select-wrap.open  { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-dim); }

.custom-select-display {
  padding: 9px 32px 9px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  min-height: 38px;
  gap: 6px;
}

.custom-select-display.placeholder { color: var(--text-muted); }

.custom-select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: transform 0.2s;
}

.custom-select-wrap.open .custom-select-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  z-index: 500;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: none;
  max-height: 240px;
  overflow-y: auto;
}

.custom-select-wrap.open .custom-select-dropdown { display: block; }

.custom-select-option {
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-select-option:last-child { border-bottom: none; }
.custom-select-option:hover { background: var(--bg-hover); color: var(--text-primary); }

.custom-select-option.selected {
  color: var(--gold);
  background: var(--gold-glow);
}

.custom-select-option.selected::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* ============================================================
   CUSTOM DATE-TIME PICKER — remplace l'input datetime-local natif
============================================================ */
.dt-picker-wrap {
  position: relative;
}

.dt-picker-display {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  min-height: 38px;
}

.dt-picker-display:hover { border-color: var(--border-light); }
.dt-picker-display.open  { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-dim); }
.dt-picker-display.placeholder { color: var(--text-muted); }

.dt-picker-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: none;
  min-width: 280px;
  padding: 16px;
}

.dt-picker-dropdown.open { display: block; }

.dt-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dt-picker-month-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.dt-picker-nav {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 0.15s;
}

.dt-picker-nav:hover { background: var(--bg-hover); color: var(--text-primary); }

.dt-picker-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.dt-picker-day-label {
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 0;
}

.dt-picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dt-picker-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.12s;
  border: 1px solid transparent;
}

.dt-picker-day:hover { background: var(--bg-hover); color: var(--text-primary); }
.dt-picker-day.today { border-color: var(--gold); color: var(--gold); }
.dt-picker-day.selected { background: var(--gold); color: var(--bg-primary); font-weight: 700; }
.dt-picker-day.other-month { color: var(--text-muted); opacity: 0.4; }
.dt-picker-day.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

.dt-picker-time {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.dt-picker-time-label {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.dt-picker-time-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 5px 8px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  outline: none;
  width: 60px;
  text-align: center;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.dt-picker-time-input:focus { border-color: var(--gold); }
.dt-picker-time-input::-webkit-outer-spin-button,
.dt-picker-time-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.dt-picker-time-sep {
  font-size: 16px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.dt-picker-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}

/* ============================================================
   TOGGLE SWITCH
============================================================ */
.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle-switch input { display: none; }

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--gold);
  border-color: var(--gold);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.toggle-switch input:checked ~ .toggle-thumb {
  transform: translateX(16px);
}

/* ============================================================
   BADGES
============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-long  { background: var(--green-dim);  color: var(--green); }
.badge-short { background: var(--red-dim);    color: var(--red); }
.badge-win   { background: var(--green-dim);  color: var(--green); }
.badge-loss  { background: var(--red-dim);    color: var(--red); }
.badge-be    { background: var(--blue-dim);   color: var(--blue); }

.badge-plan-free  { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.badge-plan-pro   { background: var(--blue-dim);    color: var(--blue); }
.badge-plan-elite { background: var(--gold-dim);    color: var(--gold); border: 1px solid rgba(201,168,76,0.3); }

.badge-critical    { background: var(--red-dim);     color: var(--red); }
.badge-important   { background: var(--gold-dim);    color: var(--gold); }
.badge-recommended { background: var(--info-dim);    color: var(--blue); }

/* ============================================================
   CARTES
============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.card-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* ============================================================
   BARRES DE PROGRESSION
============================================================ */
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease, background-color 0.3s ease;
}

.progress-bar.low    { background: var(--green); }
.progress-bar.medium { background: var(--warning); }
.progress-bar.high   { background: var(--danger); }

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 11px;
  color: var(--text-secondary);
}

.progress-value {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ============================================================
   SKELETON SCREENS (jamais de spinners)
============================================================ */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

.skeleton {
  background: var(--bg-elevated);
  border-radius: 4px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text {
  height: 1rem;
  border-radius: 4px;
  background: var(--bg-elevated);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-text.lg { height: 1.5rem; }
.skeleton-text.xl { height: 2rem; }
.skeleton-text.sm { height: 0.75rem; }

.skeleton-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-elevated);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-badge {
  width: 60px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg-elevated);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-metric {
  height: 80px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* ============================================================
   MODALS
============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,9,13,0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 24px;
  padding-top: calc(24px + var(--sat));
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: calc(90vh - var(--sat));
  overflow-y: auto;
  animation: modal-in 0.25s cubic-bezier(0.32,0.72,0,1) forwards;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.15s;
}

.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================================
   TOASTS
============================================================ */
#toast-container {
  position: fixed;
  bottom: calc(16px + var(--sab));
  right: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  pointer-events: all;
  animation: toast-in 0.3s ease forwards;
  border: 1px solid;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(24px); }
}

.toast.dismissing { animation: toast-out 0.3s ease forwards; }

.toast-success {
  background: var(--bg-elevated);
  border-color: var(--success);
}

.toast-error {
  background: var(--bg-elevated);
  border-color: var(--danger);
}

.toast-warning {
  background: var(--bg-elevated);
  border-color: var(--warning);
}

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-text {
  flex: 1;
}

.toast-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.toast-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.15s;
}

.toast-dismiss:hover { color: var(--text-primary); }

/* ============================================================
   TAGS / CHIPS
============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: default;
  transition: border-color 0.15s;
}

.chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.15s;
}

.chip-remove:hover { color: var(--danger); }

.chips-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  min-height: 38px;
  cursor: text;
  transition: border-color 0.15s;
}

.chips-input-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-dim); }

.chips-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  min-width: 100px;
  flex: 1;
}

.chips-input::placeholder { color: var(--text-muted); }

.chip-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  z-index: 200;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  display: none;
}

.chip-suggestions.open { display: block; }

.chip-suggestion {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--border);
}

.chip-suggestion:last-child { border-bottom: none; }
.chip-suggestion:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ============================================================
   EMOTION GRID
============================================================ */
.emotion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

@media (max-width: 480px) {
  .emotion-grid { grid-template-columns: repeat(3, 1fr); }
}

.emotion-btn {
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
}

.emotion-btn:hover { border-color: var(--border-light); color: var(--text-primary); }

.emotion-btn.active {
  border-color: var(--gold);
  background: var(--gold-glow);
  color: var(--gold);
}

.emotion-btn.active-confident { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.emotion-btn.active-neutral   { border-color: var(--blue);  background: var(--blue-dim);  color: var(--blue); }
.emotion-btn.active-stressed  { border-color: var(--red);   background: var(--red-dim);   color: var(--red); }
.emotion-btn.active-fomo      { border-color: var(--warning);background:var(--warning-dim);color: var(--warning); }
.emotion-btn.active-tired     { border-color: var(--text-muted); background: var(--bg-hover); color: var(--text-muted); }
.emotion-btn.active-revenge   { border-color: #8B0000; background: rgba(139,0,0,0.12); color: #FF6B6B; }

/* ============================================================
   SLIDER CUSTOM
============================================================ */
.range-wrap {
  position: relative;
  padding-bottom: 18px;
}

.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.range-input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--pct, 50%), var(--bg-hover) var(--pct, 50%), var(--bg-hover) 100%);
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  margin-top: -6px;
  transition: transform 0.15s;
}

.range-input::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range-input::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.range-value {
  position: absolute;
  top: -24px;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--bg-primary);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  transition: left 0.1s;
}

/* ============================================================
   BOTTOM NAV MOBILE
============================================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + var(--sab));
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 90;
  align-items: flex-start;
  justify-content: space-around;
  padding: 0 4px;
  padding-top: 4px;
}

@media (max-width: 768px) { .bottom-nav { display: flex; } }

.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  flex: 1;
  color: var(--text-muted);
  transition: color 0.15s;
  position: relative;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  border: none;
  background: none;
}

.bn-item.active { color: var(--gold); }

.bn-item .bn-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 16px);
  background: var(--gold);
  color: var(--bg-primary);
  font-size: 8px;
  font-weight: 700;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

/* Bouton central Dashboard */
.bn-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  flex: 1;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  border: none;
  background: none;
  font-family: var(--font-body);
}

.bn-center-btn {
  width: 46px;
  height: 46px;
  background: var(--gold);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
  margin-top: -14px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.bn-center-btn:active { transform: scale(0.93); }

.bn-center.active .bn-center-btn {
  box-shadow: 0 4px 20px rgba(201,168,76,0.55);
}

.bn-center-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1px;
}

.bn-center.active .bn-center-label { color: var(--gold); }

/* ============================================================
   MOBILE TABLE ROWS
============================================================ */
.mobile-table-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-table-row:last-child { border-bottom: none; }
.mobile-table-row:active { background: var(--bg-hover); }

.mobile-table-symbol {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  width: 64px;
  flex-shrink: 0;
}

.mobile-table-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.mobile-table-setup { font-size: 11px; color: var(--gold); }
.mobile-table-session { font-size: 10px; color: var(--text-muted); }

.mobile-table-right { text-align: right; flex-shrink: 0; }

.mobile-table-pnl {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.mobile-table-rr {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Mobile Tx Row */
.mobile-tx-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-tx-row:last-child { border-bottom: none; }
.mobile-tx-row:active { background: var(--bg-hover); }

/* ============================================================
   REFERRAL BLOCK
============================================================ */
.referral-code-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.referral-code-text {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* ============================================================
   TRANSACTION TABLE BADGES
============================================================ */
.tx-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tx-badge.depot    { background: var(--green-dim); color: var(--green); }
.tx-badge.retrait  { background: var(--red-dim);   color: var(--red); }
.tx-badge.commission { background: var(--gold-dim); color: var(--gold); }
.tx-badge.abonnement { background: var(--blue-dim); color: var(--blue); }
.tx-badge.remboursement { background: var(--warning-dim); color: var(--warning); }

/* ============================================================
   AI ACTION ITEMS
============================================================ */
.ai-action-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.ai-action-item:last-child { border-bottom: none; }

.ai-action-num {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--gold);
  opacity: 0.35;
  font-weight: 300;
  line-height: 1;
  width: 28px;
  flex-shrink: 0;
}

.ai-action-text {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 6px;
}

/* ============================================================
   AI QUALITY SCORES
============================================================ */
.ai-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ai-score-row:last-child { margin-bottom: 0; }

.ai-score-symbol {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  width: 60px;
  flex-shrink: 0;
}

.ai-score-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.ai-score-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.ai-score-val {
  font-family: var(--font-mono);
  font-size: 11px;
  width: 32px;
  text-align: right;
}