/* ═══════════════════════════════════════════════════════════════
   LORCANA DASHBOARD — Styles personnalisés
   Les utilitaires de layout/spacing/couleurs sont gérés par Tailwind.
   Ce fichier ne contient que :
   - Variables CSS (référencées dans le JS généré)
   - Animations et effets visuels complexes
   - Composants non exprimables en Tailwind seul
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;800&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

/* ── Variables (utilisées aussi dans le JS généré) ── */
:root {
  --ink:        #0a0b14;
  --deep:       #0f1020;
  --surface:    #141628;
  --raised:     #1c1f38;
  --border:     #2a2f55;
  --gold:       #c9a84c;
  --gold-light: #f0cc6e;
  --amethyst:   #9b59b6;
  --sapphire:   #3498db;
  --ruby:       #e74c3c;
  --emerald:    #2ecc71;
  --win:        #4ecca3;
  --loss:       #e85d7a;
  --text:       #d4c9f0;
  --muted:      #7a7fa0;
  --radius:     14px;
}

/* ── Accessibilité : masquage visuel pour lecteurs d'écran (U3) ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ── Accessibilité : focus clavier visible (U6) ── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Exceptions pour les éléments avec leur propre style de focus */
.filter-date:focus-visible { outline: none; border-color: var(--gold); }
.goal-input:focus-visible   { outline: none; border-color: var(--gold); }

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Utilitaires de couleur exposés aux classes Tailwind arbitraires ── */
.text-win  { color: var(--win);  }
.text-loss { color: var(--loss); }
.text-gold { color: var(--gold-light); }
.text-muted{ color: var(--muted); }

/* Delta inline pour comparaisons hebdo */
.delta.positive { color: var(--win);  font-size: 12px; }
.delta.negative { color: var(--loss); font-size: 12px; }

/* ── Fond étoilé (atmosphère) ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(201,168,76,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 10%, rgba(155,89,182,.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 72% 35%, rgba(52,152,219,.3) 0%, transparent 100%),
    radial-gradient(600px 600px at 15% 15%, rgba(155,89,182,.04) 0%, transparent 60%),
    radial-gradient(600px 600px at 85% 85%, rgba(52,152,219,.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-gem {
  0%, 100% { transform: rotate(45deg) scale(1);   opacity: 1; }
  50%       { transform: rotate(45deg) scale(1.3); opacity: .6; }
}

/* ── Loader gem ── */
.loader-gem {
  width: 40px; height: 40px;
  background: var(--gold);
  transform: rotate(45deg);
  animation: pulse-gem 1.2s ease-in-out infinite;
}

/* ── Header texte dégradé ── */
.gradient-title {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 45%, #8b6914 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Header divider ── */
.header-divider {
  display: flex; align-items: center; gap: 16px;
  margin-top: 24px; justify-content: center;
}
.header-divider::before, .header-divider::after {
  content: ''; width: 100px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.header-divider-gem {
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ── Card component ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  position: relative; overflow: hidden;
  animation: fadeUp .45s ease both;
}
.card-title {
  font-family: 'Cinzel', serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 4px;
}
.card-subtitle {
  font-size: 13px; color: var(--muted);
  font-style: italic; margin-bottom: 22px;
}

/* ── KPI cards ── */
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  position: relative; overflow: hidden;
  transition: border-color .25s, transform .2s;
  animation: fadeUp .45s ease both;
}
.kpi:hover { border-color: var(--gold); transform: translateY(-2px); }
.kpi::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--kpi-color, var(--gold));
}
.kpi-value {
  font-family: 'Cinzel', serif;
  font-size: 26px; font-weight: 600;
  color: var(--kpi-color, var(--gold-light));
  display: block; line-height: 1; margin-bottom: 5px;
}
.kpi-label {
  font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.kpi:nth-child(1) { animation-delay: .04s; }
.kpi:nth-child(2) { animation-delay: .08s; }
.kpi:nth-child(3) { animation-delay: .12s; }
.kpi:nth-child(4) { animation-delay: .16s; }
.kpi:nth-child(5) { animation-delay: .20s; }
.kpi:nth-child(6) { animation-delay: .24s; }

/* ── Section label ── */
.section-label {
  font-family: 'Cinzel', serif;
  font-size: 10px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--muted);
  margin: 40px 0 20px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Filter bar ── */
.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
}
.filter-label {
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold); flex-shrink: 0;
}
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 16px; border-radius: 20px;
  font-size: 13px; font-family: 'Cinzel', serif; letter-spacing: .03em;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--raised); color: var(--muted);
  transition: all .2s ease; user-select: none;
}
.filter-pill:hover { border-color: var(--gold); color: var(--text); }
.filter-pill.active {
  background: linear-gradient(135deg, rgba(201,168,76,.2), rgba(201,168,76,.1));
  border-color: var(--gold); color: var(--gold-light);
}
.filter-count {
  font-family: 'Cinzel', serif;
  font-size: 12px; color: var(--muted);
  margin-left: auto; white-space: nowrap; flex-shrink: 0;
}
.filter-count span { color: var(--gold-light); font-weight: 600; }

.filter-bar-group { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: nowrap; }
.filter-bar-group[hidden] { display: none; }
.filter-sep { padding-left: 12px; border-left: 1px solid var(--border); margin-left: 4px; }
.filter-date {
  background: var(--raised); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 4px 10px;
  font-size: 13px; cursor: pointer; flex-shrink: 0;
}
.filter-date::-webkit-calendar-picker-indicator { filter: invert(.6); cursor: pointer; }
.filter-date:focus { outline: none; border-color: var(--gold); }
.filter-date-sep { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.filter-reset { padding: 4px 10px; opacity: .7; }
.filter-reset:hover { opacity: 1; }

/* Select de filtre (deck, version) */
.filter-select {
  background: var(--raised);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  font-family: 'Cinzel', serif;
  letter-spacing: .03em;
  cursor: pointer;
  flex-shrink: 0;
  outline: none;
  transition: border-color .2s;
  max-width: 220px;
}
.filter-select:focus        { border-color: var(--gold); }
.filter-select option       { background: var(--surface); font-family: 'Crimson Pro', serif; letter-spacing: 0; }

/* ── Chart containers ── */
.chart-wrap { position: relative; width: 100%; }

/* ── Win/Loss donut ── */
.donut-wrapper { display: flex; align-items: center; gap: 28px; }
.donut-chart   { flex-shrink: 0; }
.donut-legend  { flex: 1; }
.legend-item   { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.legend-dot    { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.legend-label  { color: var(--muted); font-size: 14px; }
.legend-value  { margin-left: auto; font-family: 'Cinzel', serif; font-size: 18px; color: var(--text); }
.legend-pct    { font-size: 12px; color: var(--muted); margin-left: 4px; }
.legend-sep    { border-top: 1px solid var(--border); margin: 8px 0; }

/* ── MMR badge ── */
.mmr-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 20px; padding: 4px 14px;
  font-size: 13px; color: var(--gold-light);
  margin-bottom: 18px;
}

/* ── Filtre queue local à une section (MMR, Momentum) ── */
.section-filter-wrap {
  border-top: 1px solid var(--border);
  padding: 10px 0 4px;
  margin-bottom: 14px;
}
.section-filter-wrap .filter-pills { gap: 6px; }
.section-filter-wrap .filter-pill  { padding: 3px 12px; font-size: 12px; }

/* ── Barres deck winrate ── */
.bar-row  { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar-label{ width: 50px; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.bar-track{ flex: 1; height: 8px; background: var(--raised); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width .9s cubic-bezier(.4,0,.2,1); }
.bar-stat { width: 68px; text-align: right; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.bar-count{ font-size: 11px; color: var(--muted); margin-left: 4px; }

/* ── Ordre de jeu ── */
.turn-cards { display: flex; gap: 16px; justify-content: center; margin-top: 16px; }
.turn-card  {
  flex: 1; text-align: center;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 10px;
}
.turn-badge {
  display: inline-block; padding: 3px 14px; border-radius: 20px;
  font-family: 'Cinzel', serif; font-size: 12px; font-weight: 600;
}
.turn-badge.otp { background: rgba(155,89,182,.2); color: var(--amethyst); border: 1px solid rgba(155,89,182,.4); }
.turn-badge.otd { background: rgba(52,152,219,.2);  color: var(--sapphire); border: 1px solid rgba(52,152,219,.4); }
.turn-value     { font-family: 'Cinzel', serif; font-size: 22px; margin: 8px 0 2px; }
.turn-sub       { font-size: 12px; color: var(--muted); }

/* ── Série ── */
.streak-row { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 14px; }
.streak-dot {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.streak-dot.w { background: rgba(78,204,163,.2); color: var(--win);  border: 1px solid rgba(78,204,163,.3); }
.streak-dot.l { background: rgba(232,93,122,.15); color: var(--loss); border: 1px solid rgba(232,93,122,.3); }

/* ── Tableau ── */
.table-wrap  { overflow-x: auto; }
.data-table  { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  font-family: 'Cinzel', serif; font-size: 10px;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold); border-bottom: 1px solid var(--border);
  padding: 8px 12px; text-align: left; white-space: nowrap;
}
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(42,47,85,.5);
  color: var(--text); white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover   td    { background: rgba(255,255,255,.025); }
.td-small  { font-size: 12px; }
.td-center { text-align: center; }
.td-right  { text-align: right; }
.td-win    { color: var(--win);  }
.td-loss   { color: var(--loss); }
.td-cinzel { font-family: 'Cinzel', serif; }

.win-badge {
  display: inline-block; padding: 2px 10px;
  border-radius: 20px; font-size: 11px;
  font-weight: 600; letter-spacing: .04em;
}
.win-badge.win  { background: rgba(78,204,163,.15); color: var(--win);  border: 1px solid rgba(78,204,163,.3); }
.win-badge.loss { background: rgba(232,93,122,.15); color: var(--loss); border: 1px solid rgba(232,93,122,.3); }

/* ── Message vide (analytics) ── */
.empty-msg {
  color: var(--muted); font-style: italic;
  text-align: center; padding: 24px 0;
}

/* ═══════════════════════════════════════════════════════════════
   ÉCRAN D'UPLOAD
   ═══════════════════════════════════════════════════════════════ */

.upload-wrapper {
  width: 100%; max-width: 520px;
  display: flex; flex-direction: column; gap: 20px;
  animation: fadeUp .5s ease both;
}

/* Gems animés (images SVG) */
.gem-icon {
  width: 28px; height: 28px;
  animation: pulse-gem 2s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(201,168,76,.3));
}

/* Icônes d'encres inline (tableau, barres, pills) */
.ink-icon {
  display: inline-block; vertical-align: middle;
  filter: drop-shadow(0 0 3px rgba(255,255,255,.15));
}
.ink-unknown {
  font-size: 11px; color: var(--muted); font-style: italic;
}


/* Gems anciens (keep pour compatibilité loader) */
.gem {
  width: 14px; height: 14px;
  transform: rotate(45deg);
  animation: pulse-gem 2s ease-in-out infinite;
}
.gem-amethyst { background: var(--amethyst); animation-delay: 0s; }
.gem-sapphire { background: var(--sapphire); animation-delay: .2s; }
.gem-gold     { background: var(--gold);     animation-delay: .4s; width: 18px; height: 18px; }
.gem-emerald  { background: var(--emerald);  animation-delay: .6s; }
.gem-ruby     { background: var(--ruby);     animation-delay: .8s; }

/* Drop zone */
.drop-zone {
  position: relative;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color .25s, background .25s;
  overflow: hidden;
}
.drop-zone:hover,
.drop-zone.dragover { border-color: var(--gold); background: rgba(201,168,76,.05); }
.drop-zone.dragover .drop-overlay { opacity: 1; pointer-events: all; }
.drop-icon { font-size: 48px; margin-bottom: 16px; display: block; transition: transform .3s; }
.drop-zone:hover .drop-icon { transform: scale(1.1) rotate(-5deg); }
.drop-title { font-family: 'Cinzel', serif; font-size: 16px; color: var(--text); margin-bottom: 8px; }
.drop-sub   { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.drop-btn {
  background: linear-gradient(135deg, rgba(201,168,76,.2), rgba(201,168,76,.1));
  border: 1px solid var(--gold); border-radius: 24px;
  color: var(--gold-light); font-family: 'Cinzel', serif;
  font-size: 13px; letter-spacing: .1em;
  padding: 8px 24px; cursor: pointer;
  transition: background .2s, transform .15s;
  margin-bottom: 16px; display: inline-block;
}
.drop-btn:hover { background: rgba(201,168,76,.25); transform: translateY(-1px); }
.drop-hint   { font-size: 12px; color: var(--muted); }
.drop-hint a { color: var(--gold); text-decoration: none; }
.drop-hint a:hover { text-decoration: underline; }

.drop-overlay {
  position: absolute; inset: 0;
  background: rgba(201,168,76,.12);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s; border-radius: 18px;
}
.drop-overlay-text {
  font-family: 'Cinzel', serif; font-size: 20px;
  color: var(--gold-light); letter-spacing: .1em;
}

/* Banner données sauvegardées */
.saved-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 12px; padding: 16px 20px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
  animation: fadeUp .4s ease both;
}
.saved-info   { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.saved-icon   { color: var(--gold); font-size: 16px; }
.saved-actions{ display: flex; gap: 8px; }

.saved-btn-primary {
  background: linear-gradient(135deg, rgba(201,168,76,.25), rgba(201,168,76,.12));
  border: 1px solid var(--gold); border-radius: 20px;
  color: var(--gold-light); font-family: 'Cinzel', serif;
  font-size: 12px; letter-spacing: .08em;
  padding: 6px 18px; cursor: pointer; transition: background .2s;
}
.saved-btn-primary:hover { background: rgba(201,168,76,.3); }

.saved-btn-ghost {
  background: transparent; border: 1px solid var(--border);
  border-radius: 20px; color: var(--muted);
  font-size: 12px; padding: 6px 14px;
  cursor: pointer; transition: border-color .2s, color .2s;
}
.saved-btn-ghost:hover { border-color: var(--loss); color: var(--loss); }

/* Erreur upload */
.upload-error {
  background: rgba(232,93,122,.1);
  border: 1px solid rgba(232,93,122,.35);
  border-radius: 10px; padding: 12px 18px;
  color: var(--loss); font-size: 14px;
}

/* Bouton changer de fichier */
.change-file-btn {
  background: var(--raised);
  border: 1px solid var(--border); border-radius: 20px;
  color: var(--muted); font-size: 12px;
  padding: 5px 14px; cursor: pointer;
  transition: border-color .2s, color .2s; white-space: nowrap;
}
.change-file-btn:hover { border-color: var(--gold); color: var(--gold-light); }

.footer-link {
  background: none; border: none;
  color: var(--gold); cursor: pointer;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 13px; font-style: italic;
  padding: 0; text-decoration: none;
}
.footer-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   HEATMAP
   ═══════════════════════════════════════════════════════════════ */

.heatmap-wrap { margin-top: 8px; }
.heatmap-grid {
  display: grid;
  grid-template-columns: 44px repeat(6, 1fr);
  gap: 4px;
}
.hm-header {
  text-align: center; font-size: 10px;
  letter-spacing: .05em; color: var(--muted); padding: 4px 0;
}
.hm-day {
  display: flex; align-items: center;
  font-family: 'Cinzel', serif; font-size: 11px;
  color: var(--muted); padding-right: 4px;
}
.hm-cell {
  border-radius: 6px; border: 1px solid var(--border);
  padding: 6px 4px; text-align: center; cursor: default;
  transition: transform .15s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.hm-cell:hover { transform: scale(1.08); z-index: 2; }
.hm-empty { color: var(--border); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.hm-pct   { font-family: 'Cinzel', serif; font-size: 11px; font-weight: 600; color: #fff; line-height: 1; }
.hm-games { font-size: 9px; color: rgba(255,255,255,.5); }
.heatmap-legend {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; justify-content: flex-end;
}
.hm-leg-bad, .hm-leg-good { font-size: 11px; color: var(--muted); }
.hm-leg-bar {
  width: 80px; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, hsl(0,60%,35%), hsl(45,70%,40%), hsl(130,65%,35%));
}

/* ═══════════════════════════════════════════════════════════════
   MOMENTUM
   ═══════════════════════════════════════════════════════════════ */

.streak-badge {
  display: inline-block; padding: 3px 12px;
  border-radius: 20px; font-size: 12px;
}
.streak-badge.win  { background: rgba(78,204,163,.15); color: var(--win);  border: 1px solid rgba(78,204,163,.3); }
.streak-badge.loss { background: rgba(232,93,122,.15); color: var(--loss); border: 1px solid rgba(232,93,122,.3); }

/* ═══════════════════════════════════════════════════════════════
   MATCHUP PREDICTOR
   ═══════════════════════════════════════════════════════════════ */

.predictor-deck-label { font-size: 13px; color: var(--muted); margin-bottom: 16px; font-style: italic; }
.predictor-deck-label strong { color: var(--text); font-style: normal; }
.predictor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.predictor-card {
  background: var(--raised); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px;
  transition: border-color .2s, transform .15s;
}
.predictor-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.predictor-opp-icons { display: flex; gap: 4px; margin-bottom: 6px; }
.predictor-opp     { font-size: 12px; color: var(--muted); margin-bottom: 6px; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.predictor-rate    { font-family: 'Cinzel', serif; font-size: 28px; font-weight: 600; line-height: 1; margin-bottom: 2px; }
.predictor-verdict { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.predictor-record  { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.predictor-last5   { font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════
   COMPARAISON HEBDOMADAIRE
   ═══════════════════════════════════════════════════════════════ */

.week-comp-grid { display: flex; gap: 0; align-items: flex-start; }
.week-col       { flex: 1; padding: 8px; }
.week-col-current {
  background: rgba(201,168,76,.05);
  border-radius: 10px; border: 1px solid rgba(201,168,76,.15);
}
.week-divider   { padding: 24px 12px; color: var(--border); font-size: 20px; align-self: center; }
.week-label {
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 12px; line-height: 1.4;
}
.week-label span { color: var(--muted); font-size: 10px; display: block; margin-top: 2px; }
.week-stat { font-size: 14px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.week-stat span { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   OBJECTIF MMR
   ═══════════════════════════════════════════════════════════════ */

.goal-input-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.goal-label { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.goal-input {
  background: var(--raised); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text);
  font-family: 'Cinzel', serif; font-size: 18px;
  padding: 8px 14px; width: 120px; outline: none;
  transition: border-color .2s;
}
.goal-input:focus { border-color: var(--gold); }
.goal-hint { font-size: 13px; color: var(--muted); }
.goal-bar-track {
  position: relative; height: 12px; border-radius: 6px;
  background: var(--raised); border: 1px solid var(--border); overflow: hidden;
}
.goal-bar-fill   { height: 100%; border-radius: 6px; transition: width .8s cubic-bezier(.4,0,.2,1); }
.goal-bar-marker {
  position: absolute; top: -2px; width: 2px; height: 16px;
  background: #fff; transform: translateX(-1px); border-radius: 1px;
}
.goal-bar-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted); margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   MEILLEUR / PIRE DECK
   ═══════════════════════════════════════════════════════════════ */

.bw-row     { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 8px; }
.bw-medal   { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; }
.bw-deck    { font-size: 13px; color: var(--text); flex-shrink: 0; min-width: 130px; }
.bw-bar-wrap{ flex: 1; height: 6px; background: var(--raised); border-radius: 3px; overflow: hidden; }
.bw-bar     { height: 100%; border-radius: 3px; transition: width .8s ease; }
.bw-rate    { font-family: 'Cinzel', serif; font-size: 15px; flex-shrink: 0; width: 42px; text-align: right; }
.bw-record  { font-size: 11px; color: var(--muted); flex-shrink: 0; width: 50px; text-align: right; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .filter-bar { padding: 14px 16px; }
}

/* ═══════════════════════════════════════════════════════════════
   STATS PAR ENCRE — WINRATES
   ═══════════════════════════════════════════════════════════════ */

.ink-stat-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.ink-stat-row:last-child { border-bottom: none; }
.ink-stat-icon { flex-shrink: 0; display: flex; align-items: center; }
.ink-stat-body { flex: 1; min-width: 0; }
.ink-stat-header {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px;
}
.ink-stat-name  { font-family: 'Cinzel', serif; font-size: 14px; font-weight: 600; }
.ink-stat-pct   { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; margin-left: auto; }
.ink-stat-games { font-size: 11px; color: var(--muted); }
.ink-bar-track  { height: 6px; background: var(--raised); border-radius: 3px; overflow: hidden; }
.ink-bar-fill   { height: 100%; border-radius: 3px; transition: width .8s ease; }

/* ═══════════════════════════════════════════════════════════════
   MATRICE DE MATCHUPS
   ═══════════════════════════════════════════════════════════════ */

.matrix-scroll  { overflow-x: auto; }
.matchup-table  { width: 100%; border-collapse: collapse; font-size: 12px; }
.matchup-table th,
.matchup-table td { padding: 6px 4px; text-align: center; border: 1px solid var(--border); }
.matrix-head    { vertical-align: bottom; }
.matrix-row-head{ text-align: center; white-space: nowrap; }
.matrix-corner  {
  text-align: left; padding: 4px 6px; font-size: 10px;
  color: var(--muted); line-height: 1.3; background: var(--raised);
}
.matrix-corner-my, .matrix-corner-opp { display: block; }
.matrix-corner-opp { color: var(--gold); }
.matrix-cell    {
  font-family: 'Cinzel', serif; font-size: 12px; font-weight: 600;
  min-width: 52px; border-radius: 0;
}
.matrix-mirror  { color: var(--border); background: var(--raised); }
.matrix-na      { color: var(--border); font-size: 14px; }
.matrix-note    { font-size: 11px; color: var(--muted); margin-top: 8px; font-style: italic; }
/* Icônes bicolor dans les en-têtes de la matrice (combinaison de 2 encres) */
.matrix-combo-head {
  display: flex; justify-content: center; gap: 2px; flex-wrap: wrap;
  padding: 2px 0;
}
/* V/D sous le pourcentage dans les cellules de la matrice */
.matrix-vd { font-size: 10px; color: var(--muted); font-family: 'Cinzel', serif; margin-top: 1px; }

/* ── Pagination du tableau ── */
.pagination-bar {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.pagination-btn {
  background: var(--raised); border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 5px 14px; font-size: 13px; font-family: 'Cinzel', serif;
  cursor: pointer; transition: all .2s ease;
}
.pagination-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--text); }
.pagination-btn:disabled { opacity: .35; cursor: not-allowed; }
.pagination-info {
  font-family: 'Cinzel', serif; font-size: 12px; color: var(--muted);
  min-width: 100px; text-align: center;
}
/* Style ligne prédicteur OTP/OTD */
.predictor-order { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════
   PAGE DECKS
   ═══════════════════════════════════════════════════════════════ */

/* Bouton retour */
.decks-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--raised); border: 1px solid var(--border);
  border-radius: 20px; color: var(--muted); font-size: 13px;
  padding: 6px 16px; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.decks-back-btn:hover { border-color: var(--gold); color: var(--gold-light); }

/* Carte de deck */
.deck-profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
  animation: fadeUp .4s ease both;
}

.deck-profile-header {
  display: flex; align-items: center; gap: 20px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(201,168,76,.04), transparent);
  flex-wrap: wrap;
}
.deck-profile-icons { display: flex; gap: 6px; flex-shrink: 0; }
.deck-profile-meta  { flex: 1; min-width: 200px; }

.deck-profile-name {
  font-family: 'Cinzel', serif;
  font-size: 16px; font-weight: 600;
  color: var(--text); margin-bottom: 8px;
}
.deck-profile-stats {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.deck-stat-pill {
  background: var(--raised); border: 1px solid var(--border);
  border-radius: 12px; padding: 2px 10px;
  font-size: 12px; color: var(--muted);
}
.deck-profile-dates {
  font-size: 11px; color: var(--muted); font-style: italic;
}

/* Badge de version */
.deck-version-badge {
  display: inline-block;
  background: rgba(155,89,182,.2); border: 1px solid rgba(155,89,182,.4);
  color: var(--amethyst); border-radius: 10px;
  font-size: 10px; letter-spacing: .08em; font-weight: 600;
  padding: 1px 8px; margin-left: 8px; vertical-align: middle;
  text-transform: uppercase;
}

/* Diff entre versions */
.deck-diff {
  padding: 12px 26px;
  background: rgba(42,47,85,.3);
  border-bottom: 1px solid var(--border);
}
.deck-diff-label {
  font-family: 'Cinzel', serif; font-size: 10px;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 8px;
}
.deck-diff-list { display: flex; flex-wrap: wrap; gap: 6px; }
.deck-diff-added, .deck-diff-removed, .deck-diff-changed {
  font-size: 12px; border-radius: 6px; padding: 2px 8px;
}
.deck-diff-added   { background: rgba(78,204,163,.12); color: var(--win);  border: 1px solid rgba(78,204,163,.3); }
.deck-diff-removed { background: rgba(232,93,122,.12); color: var(--loss); border: 1px solid rgba(232,93,122,.3); }
.deck-diff-changed {
  background: rgba(201,168,76,.1); color: var(--gold-light);
  border: 1px solid rgba(201,168,76,.3);
}

/* Grille de cartes */
.deck-profile-body {
  padding: 20px 26px;
}
.deck-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px 16px;
}
.deck-card-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 0; border-bottom: 1px solid rgba(42,47,85,.4);
  font-size: 13px;
}
.deck-card-row:last-child { border-bottom: none; }
.deck-card-count {
  font-family: 'Cinzel', serif; font-size: 12px; font-weight: 600;
  color: var(--gold); flex-shrink: 0; width: 22px; text-align: right;
}
.deck-card-name { color: var(--text); }
.deck-card-summary {
  margin-top: 12px; font-size: 11px; color: var(--muted);
  font-style: italic; text-align: right;
}
