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

.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.emoji-btn {
  width: 34px;
  height: 34px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  padding: 0;
}

.emoji-btn:hover { background: var(--bg-card-hover); transform: scale(1.1); }
.emoji-btn.active {
  border-color: var(--accent);
  background: rgba(16,185,129,0.12);
}

.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  outline: none;
}

.color-swatch:hover { transform: scale(1.18); }
.color-swatch.active {
  border-color: white;
  box-shadow: 0 0 0 2px var(--accent);
  transform: scale(1.1);
}

.day-selector {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.day-btn {
  min-width: 38px;
  height: 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: none;
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  padding: 0 var(--space-2);
}

.day-btn:hover { border-color: var(--accent); color: var(--accent); }
.day-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ===== LAYOUT COMMUN ===== */

.hb-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-5);
}

.hb-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.hb-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.hb-empty {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--text-muted);
}

.hb-empty-icon { font-size: 36px; margin-bottom: var(--space-3); }
.hb-empty p    { font-size: var(--text-sm); }

/* ===== 4 PANELS ===== */

.hb-panels-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

@media (max-width: 640px) {
  .hb-panels-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hb-panel {
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
  animation: dashFadeIn 0.35s ease forwards;
  opacity: 0;
}

.hb-panel:hover { transform: translateY(-2px); }

.hb-panel:nth-child(1) { animation-delay: 0ms;   }
.hb-panel:nth-child(2) { animation-delay: 60ms;  }
.hb-panel:nth-child(3) { animation-delay: 120ms; }
.hb-panel:nth-child(4) { animation-delay: 180ms; }

.hb-panel-green  {
  background: linear-gradient(135deg, var(--bg-card) 50%, rgba(16,185,129,0.08));
  border-color: rgba(16,185,129,0.4);
}
.hb-panel-orange {
  background: linear-gradient(135deg, var(--bg-card) 50%, rgba(245,158,11,0.08));
  border-color: rgba(245,158,11,0.4);
}
.hb-panel-red    {
  background: linear-gradient(135deg, var(--bg-card) 50%, rgba(239,68,68,0.08));
  border-color: rgba(239,68,68,0.3);
}

.hb-panel-emoji {
  font-size: 22px;
  margin-bottom: var(--space-2);
  line-height: 1;
}

.hb-panel-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}

.hb-panel-green  .hb-panel-value { color: #10B981; }
.hb-panel-orange .hb-panel-value { color: #F59E0B; }
.hb-panel-red    .hb-panel-value { color: #EF4444; }

.hb-panel-denom {
  font-size: 0.65em;
  font-weight: 600;
  color: var(--text-muted);
}

.hb-panel-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.hb-panel-sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* ===== NAVIGATION MOIS ===== */

.hb-month-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hb-month-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-transform: capitalize;
  min-width: 130px;
  text-align: center;
}

/* ===== GRILLE MENSUELLE ===== */

.hbg-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: var(--space-4);
}

.hbg-header {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: var(--space-1) 0;
}

.hbg-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 3px 2px;
  background: var(--hbg-bg, transparent);
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}

.hbg-cell:not(.hbg-empty):not(.is-future):hover {
  filter: brightness(1.15);
  transform: scale(1.06);
  z-index: 1;
  border-color: rgba(255,255,255,0.15);
}

.hbg-cell.is-today {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.2);
}

.hbg-cell.is-future { opacity: 0.2; cursor: default; }
.hbg-cell.hbg-empty { cursor: default; }

.hbg-cell.is-selected {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.25);
}

.hbg-day-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1;
}

.hbg-cell.is-today .hbg-day-num { color: var(--accent); font-weight: 800; }

.hbg-score {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hbg-dots {
  display: flex;
  gap: 1px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}

.hbg-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.9;
}

/* Légende */
.hbg-legend {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
}

.hbg-leg {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hbg-leg-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ===== DÉTAIL D'UN JOUR ===== */

#habits-day-detail {
  margin-bottom: var(--space-5);
}

.hbd-panel {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  box-shadow: 0 0 0 4px rgba(16,185,129,0.1);
  animation: dashFadeIn 0.25s ease forwards;
}

.hbd-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.hbd-date {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  text-transform: capitalize;
  margin-bottom: var(--space-1);
}

.hbd-score {
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 600;
}

.hbd-close {
  width: 28px;
  height: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.hbd-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.hbd-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.hbd-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.hbd-item:hover { background: var(--bg-secondary); }

.hbd-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.hbd-check:hover  { border-color: var(--hc, var(--accent)); }
.hbd-check.checked { background: var(--hc, var(--accent)); border-color: var(--hc, var(--accent)); }

.hbd-check svg { opacity: 0; transition: opacity var(--transition-fast); }
.hbd-check.checked svg { opacity: 1; }

.hbd-icon { font-size: 16px; }

.hbd-name {
  font-size: var(--text-sm);
  color: var(--text-primary);
  flex: 1;
  transition: all var(--transition-fast);
}

.hbd-name.done {
  text-decoration: line-through;
  color: var(--text-muted);
}

.hbd-empty {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-4) 0;
  font-style: italic;
}

/* ===== ANALYSE — TABLEAU ===== */

.ha-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ha-head {
  display: flex;
  align-items: center;
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--border);
  margin-bottom: var(--space-1);
}

.ha-head .ha-cell {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.ha-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: var(--space-2) 0;
  min-width: 540px;
  transition: background var(--transition-fast);
}

.ha-row:last-child { border-bottom: none; }
.ha-row:hover { background: rgba(255,255,255,0.02); }

.ha-cell {
  display: flex;
  align-items: center;
  padding: 0 var(--space-2);
}

/* Colonnes */
.ha-col-habit  { flex: 1; min-width: 160px; gap: var(--space-2); }
.ha-col-streak { width: 80px; justify-content: center; }
.ha-col-best   { width: 80px; justify-content: center; }
.ha-col-rate   { width: 90px; }
.ha-col-dots   { width: 110px; gap: 3px; }
.ha-col-edit   { width: 36px; justify-content: center; }

/* Checkbox dans le tableau */
.ha-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.ha-check:not(:disabled):hover {
  border-color: var(--hc, var(--accent));
  transform: scale(1.1);
}

.ha-check.checked { background: var(--hc, var(--accent)); border-color: var(--hc, var(--accent)); }
.ha-check.inactive { cursor: default; opacity: 0.35; }
.ha-check svg { opacity: 0; transition: opacity var(--transition-fast); }
.ha-check.checked svg { opacity: 1; }

/* Barre couleur + icône + nom */
.ha-color-bar {
  width: 3px;
  height: 28px;
  border-radius: 2px;
  flex-shrink: 0;
}

.ha-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.ha-name-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ha-name {
  font-size: var(--text-sm);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.ha-freq {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges streak/record */
.ha-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.ha-badge-high    { background: rgba(16,185,129,0.15); color: #10B981; }
.ha-badge-mid     { background: rgba(245,158,11,0.15); color: #F59E0B; }
.ha-badge-low     { background: rgba(239,68,68,0.12);  color: #EF4444; }
.ha-badge-neutral { background: var(--bg-secondary);   color: var(--text-secondary); }

/* Taux mensuel */
.ha-rate-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.ha-rate-val {
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ha-rate-val.ha-badge-high  { color: #10B981; }
.ha-rate-val.ha-badge-mid   { color: #F59E0B; }
.ha-rate-val.ha-badge-low   { color: #EF4444; }

.ha-rate-bar {
  height: 3px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  width: 100%;
}

.ha-rate-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
  min-width: 2px;
}

/* Dots 7 jours */
.ha-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.ha-dot.done    { background: var(--hc, var(--accent)); }
.ha-dot.empty   { border: 2px solid var(--border); }
.ha-dot.today   { border-color: var(--hc, var(--accent)); }
.ha-dot.na      { visibility: hidden; }

/* Bouton édition */
.ha-edit-btn {
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.ha-edit-btn:hover {
  background: var(--bg-card-hover);
  color: var(--accent);
}

/* Hint */
.ha-hint {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}

/* Mobile : colonnes cachées */
@media (max-width: 480px) {
  .ha-col-best { display: none; }
  .ha-col-rate { width: 70px; }
  .ha-col-dots { width: 90px; }
  .ha-dot { width: 11px; height: 11px; }
  .hbg-cell { border-radius: var(--radius-sm); }
  .hbg-score { display: none; }
}

/* ===== SUIVI MENSUEL — TABLEAU HABITUDES × JOURS ===== */

.hmt-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hmt-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
}

/* ---- En-tête ---- */

.hmt-habit-header {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg-card);
  width: 1px;
  padding: 0 var(--space-2) var(--space-2) var(--space-2);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.hmt-day-header {
  width: 32px;
  min-width: 32px;
  padding: 0 0 var(--space-2) 0;
  text-align: center;
  border-bottom: 2px solid var(--border);
  vertical-align: bottom;
}

.hmt-day-header.today .hmt-dnum { color: var(--accent); font-weight: 800; }
.hmt-day-header.future           { opacity: 0.35; }

.hmt-dnum {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.hmt-dname {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
}

/* ---- Lignes habitude ---- */

.hmt-row { }
.hmt-row:not(:last-child) td { border-bottom: 1px solid var(--border); }

.hmt-row:hover .hmt-habit-cell { background: var(--bg-secondary); }

.hmt-habit-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg-card);
  width: 1px;
  padding: var(--space-2) var(--space-2);
  vertical-align: middle;
  transition: background var(--transition-fast);
}

.hmt-habit-inner {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.hmt-habit-bar {
  width: 3px;
  border-radius: 2px;
  flex-shrink: 0;
  align-self: stretch;
  min-height: 36px;
}

/* Bloc info (2 lignes) */
.hmt-habit-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.hmt-habit-top {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hmt-habit-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  line-height: 1;
}

.hmt-habit-name {
  font-size: var(--text-sm);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  max-width: 100px;
}

.hmt-streak {
  font-size: 10px;
  font-weight: 700;
  color: #F59E0B;
  white-space: nowrap;
  flex-shrink: 0;
}

.hmt-edit {
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.35;
  transition: all var(--transition-fast);
  padding: 0;
}

.hmt-row:hover .hmt-edit { opacity: 1; }
.hmt-edit:hover           { background: var(--bg-card-hover); color: var(--accent); }

/* Ligne inférieure : score + barre + % + record */
.hmt-habit-bottom {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hmt-score {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  width: 40px;
}

.hmt-score-done {
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.hmt-score-sep {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 1px;
}

.hmt-score-sched {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.hmt-mini-bar {
  width: 48px;
  flex-shrink: 0;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.hmt-mini-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
  min-width: 2px;
}

.hmt-rate-pct {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  width: 28px;
}

.hmt-best {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Cellules des jours ---- */

.hmt-cell {
  width: 32px;
  min-width: 32px;
  padding: 0 2px;
  text-align: center;
  vertical-align: middle;
}

.hmt-cell.is-today { background: rgba(16,185,129,0.05); }
.hmt-cell.na       { background: transparent; }

.hmt-cell.future .hmt-btn {
  opacity: 0.18;
  cursor: default;
}

/* ---- Bouton coche ---- */

.hmt-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  margin: 0 auto;
  flex-shrink: 0;
}

.hmt-btn:not(:disabled):not(.checked):hover {
  border-color: #10B981;
  background: rgba(16,185,129,0.1);
  transform: scale(1.12);
}

.hmt-btn.checked {
  background: #10B981;
  border-color: #10B981;
}

.hmt-btn:disabled { cursor: default; }

/* Colonne aujourd'hui : tirets verts si non cochée */
.hmt-cell.is-today .hmt-btn:not(.checked) {
  border-color: #10B981;
  border-style: dashed;
}

@media (max-width: 480px) {
  .hmt-habit-name { font-size: var(--text-xs); max-width: 70px; }
  .hmt-best       { display: none; }
  .hmt-mini-bar   { width: 36px; }
  .hmt-day-header,
  .hmt-cell       { width: 26px; min-width: 26px; }
  .hmt-btn        { width: 20px; height: 20px; }
}

/* ===== TABLEAU D'ANALYSE PAR HABITUDE ===== */

.hst-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hst-table {
  width: 100%;
  border-collapse: collapse;
}

.hst-th {
  padding: 0 var(--space-3) var(--space-2) var(--space-2);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.hst-th-score,
.hst-th-streak,
.hst-th-best  { text-align: center; }

.hst-th-rate  { min-width: 110px; }

.hst-row { height: 44px; }
.hst-row:not(:last-child) td { border-bottom: 1px solid var(--border); }
.hst-row:hover td { background: rgba(255,255,255,0.02); }

/* Colonne habitude */
.hst-habit {
  padding: 0 var(--space-3) 0 var(--space-2);
  white-space: nowrap;
}

.hst-habit {
  display: flex;   /* flex sur la cellule td — nécessite display:flex via CSS */
}

/* Contournement : le td ne peut pas être flex, on utilise inline-flex sur un wrapper */
.hst-habit {
  display: table-cell;
  vertical-align: middle;
}

.hst-bar {
  display: inline-block;
  width: 3px;
  height: 22px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}

.hst-icon {
  font-size: 14px;
  margin-right: 6px;
  vertical-align: middle;
}

.hst-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  vertical-align: middle;
}

/* Colonne score x/y */
.hst-score {
  text-align: center;
  vertical-align: middle;
  padding: 0 var(--space-4);
  white-space: nowrap;
}

.hst-score-val {
  font-size: var(--text-base);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hst-score-sep {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0 2px;
}

.hst-score-total {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Colonne taux */
.hst-rate {
  vertical-align: middle;
  padding: 0 var(--space-3);
  min-width: 110px;
}

.hst-rate-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hst-rate-pct {
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hst-rate-bar {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.hst-rate-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
  min-width: 2px;
}

/* Colonne streak */
.hst-streak {
  text-align: center;
  vertical-align: middle;
  padding: 0 var(--space-3);
  white-space: nowrap;
}

.hst-streak-val {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #F59E0B;
}

.hst-streak-empty {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Colonne record */
.hst-best {
  text-align: center;
  vertical-align: middle;
  padding: 0 var(--space-3);
  white-space: nowrap;
}

.hst-best-val {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 600;
}

@media (max-width: 480px) {
  .hst-th-best,
  .hst-best    { display: none; }
}
