/* ===== Footix — Style jeu v3 ===== */
/* Light + Dark mode, green gazon / stadium theme */
/* Aligné design-system.css — Motusro/Litere */
/* Fonts chargées via preload HTML (index/joueur/mystere/equipe.html) */

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body, input, button, select, textarea { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== CSS VARIABLES — LIGHT MODE ===== */
:root {
  --bg:              #F4F0E0;
  --bg-secondary:    #EBE6D4;
  --surface:         #FAF7EE;
  --surface-warm:    #F0ECD8;
  --text:            #2A2D1C;
  --text-secondary:  #5A5C40;
  --text-muted:      #8A8A60;
  --border:          #D4D0B8;

  --accent:          #565F1E;
  --accent-hover:    #3D4216;
  --accent-light:    #CABE5A;
  --accent-dim:      rgba(86, 95, 30, 0.10);
  --gold:            #CABE5A;
  --gold-light:      #DDD070;

  --success:         #565F1E;
  --close:           #CABE5A;
  --wrong:           #DC2626;
  --blue:            #2563EB;

  --radius:          12px;
  --radius-sm:       8px;
  --radius-xs:       4px;
  --shadow:          0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg:       0 8px 32px rgba(0, 0, 0, 0.12);
  --transition:      0.25s ease;

  /* Espacements — alignés Motusro/Litere */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  48px;
  --space-xxl: 72px;

  /* Typo token — aligné Litere */
  --font-mono: 'Space Mono', 'JetBrains Mono', monospace;

  /* Footer accent — vert mousse Footix */
  --footer-accent: #565F1E;

  /* Score level colors (-100..+100) */
  --level-0:  #5C6BC0;  /* indigo — hors-jeu */
  --level-1:  #42A5F5;  /* blue — en touche */
  --level-2:  #26C6DA;  /* cyan — dégagement */
  --level-3:  #FDD835;  /* yellow — milieu */
  --level-4:  #FFA726;  /* orange — coup franc */
  --level-5:  #FF7043;  /* deep orange — frappe */
  --level-6:  #EF5350;  /* red — poteau */
  --level-7:  #D32F2F;  /* dark red — tap-in */
  --level-8:  #2E7D32;  /* green — buuuut */
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --bg:              #14160E;
  --bg-secondary:    #1A1C10;
  --surface:         #1E2010;
  --surface-warm:    #252818;
  --text:            #D0CE98;
  --text-secondary:  #A0A070;
  --text-muted:      #808060;
  --border:          #3A3D20;

  --accent:          #7A8530;
  --accent-hover:    #8F9A38;
  --accent-light:    #CABE5A;
  --accent-dim:      rgba(122, 133, 48, 0.18);
  --gold:            #CABE5A;
  --gold-light:      #DDD070;

  /* Footer accent — vert clair dark mode */
  --footer-accent: #7A8530;

  --shadow:          0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg:       0 8px 32px rgba(0, 0, 0, 0.5);

  /* Brighter level colors for dark backgrounds */
  --level-0:  #7986CB;
  --level-1:  #64B5F6;
  --level-2:  #4DD0E1;
  --level-3:  #FFF176;
  --level-4:  #FFB74D;
  --level-5:  #FF8A65;
  --level-6:  #EF5350;
  --level-7:  #E53935;
  --level-8:  #66BB6A;
}

/* ===== BODY — grain papier aligné Motusro/Litere ===== */
body {
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.012) 2px,
      rgba(0, 0, 0, 0.012) 3px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 3px,
      rgba(0, 0, 0, 0.008) 3px,
      rgba(0, 0, 0, 0.008) 4px
    );
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
}

[data-theme="dark"] body {
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.008) 2px,
      rgba(255, 255, 255, 0.008) 3px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.005) 3px,
      rgba(255, 255, 255, 0.005) 4px
    );
}

/* ===== TYPOGRAPHY ===== */
.font-display { font-family: 'Russo One', sans-serif; font-weight: 400; }
.font-mono { font-family: 'Space Mono', monospace; }

h1, h2, h3 { font-family: 'Russo One', sans-serif; font-weight: 400; letter-spacing: 0.02em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

/* ===== LAYOUT ===== */
.page-wrapper {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 80px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Footer pleine largeur */
.laludora-footer {
  width: 100%;
  max-width: none;
  margin-top: auto;
}

/* Conteneur centré pour le contenu de jeu */
.game-content {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  color: inherit;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  transition: all var(--transition);
}
.btn-back:hover { border-color: var(--accent); background: var(--accent-dim); }

/* Logo */
.logo {
  font-family: 'Russo One', sans-serif;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #565F1E, #CABE5A);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  line-height: 1.15;
}

/* Logo icon — carré stylisé (harmonisé Motusro/Litere) */
.logo-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #565F1E, #6A7528);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Russo One', sans-serif;
  font-size: 1.5rem;
  color: #F0ECE0;
  flex-shrink: 0;
}

/* Logo tagline — harmonisé Motusro/Litere */
.logo-tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  margin-top: 4px;
}

/* Nav tabs */
.nav-tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-tab:hover { color: var(--text); background: var(--accent-dim); }
.nav-tab.active { color: var(--accent); background: var(--accent-dim); font-weight: 700; }
.nav-tab.coming-soon {
  opacity: 0.45;
  pointer-events: none;
  position: relative;
}
.nav-tab.coming-soon::after {
  content: "bientôt";
  position: absolute;
  top: -8px;
  right: -4px;
  font-size: 0.55rem;
  background: #F59E0B;
  color: #000;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* Header icon buttons */
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary, #4a4a5e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
[data-theme="dark"] .icon-btn {
  color: var(--text, #D0CE98);
  background: var(--surface-warm, #252818);
}
[data-theme="dark"] .icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Lang select override */
.icon-btn.lang-select {
  width: auto;
  min-width: 44px;
  font-size: 0.75rem;
  padding: 0 6px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text-secondary, #4a4a5e);
}
[data-theme="dark"] .icon-btn.lang-select {
  color: var(--text, #e6edf3);
}

/* ===== DIFFICULTY SELECTOR ===== */
.difficulty-selector {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 20px;
}

.diff-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.diff-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--text-secondary); }
.diff-btn.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.diff-btn.locked, .diff-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.diff-btn.completed { position: relative; }
.diff-btn.completed::after { content: ''; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--success, #565F1E); }
.diff-btn.started { position: relative; }
.diff-btn.started::after { content: ''; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--close, #F59E0B); }

/* ===== SEARCH BAR ===== */
.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: stretch;
}

.search-wrap { flex: 1; position: relative; }

.search-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-input:disabled { opacity: 0.5; cursor: not-allowed; }
.search-input::placeholder { color: var(--text-muted); }

.btn-guess {
  padding: 14px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #565F1E, #6A7528);
  color: #F0ECE0;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-guess:hover:not(:disabled) { background: linear-gradient(135deg, #3D4216, #565F1E); transform: translateY(-1px); }
.btn-guess:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-guess.loading { position: relative; color: transparent; }
.btn-guess.loading::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px; border: 2px solid #fff; border-top-color: transparent;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}

/* ===== AUTOCOMPLETE ===== */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: var(--shadow-lg);
}
.autocomplete-dropdown.active { display: block; }

.autocomplete-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.highlighted { background: var(--surface-warm); }
.autocomplete-item-name { font-weight: 600; }
.autocomplete-item-detail { color: var(--text-muted); font-size: 0.8rem; margin-left: auto; }
.autocomplete-item-club { color: var(--text-muted); font-size: 0.8rem; margin-left: auto; white-space: nowrap; }

/* ===== STATUS BAR ===== */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.status-bar strong { color: var(--accent); font-family: 'Space Mono', monospace; }
.status-bar .sep { color: var(--border); }

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

/* ===== RESULTS TABLE ===== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 24px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.results-table thead th {
  padding: 10px 12px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--bg-secondary);
}

.results-table tbody tr {
  transition: background var(--transition);
}
.results-table tbody tr:hover { background: var(--surface-warm); }
.results-table tbody tr.latest-guess { background: var(--surface-warm); }
.results-table tbody tr.victory-row { background: rgba(86, 95, 30, 0.08); }

.results-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 0.82rem;
}
.results-table tbody tr:last-child td { border-bottom: none; }

/* Cell states */
.cell-match { background: rgba(86, 95, 30, 0.12); color: var(--success); }
.cell-partial { background: rgba(202, 190, 90, 0.15); color: var(--close); }
.cell-none { background: rgba(220, 38, 38, 0.08); color: var(--wrong); }

/* ===== VICTORY OVERLAY ===== */
.victory-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.victory-overlay.active { display: flex; }

.victory-card {
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  width: 100%;
  box-shadow: 0 0 60px rgba(212, 160, 23, 0.15);
  animation: slideUp 0.5s ease;
}
.victory-emoji { font-size: 3.5rem; margin-bottom: 12px; }
.victory-title { font-family: 'Russo One', sans-serif; font-size: 1.8rem; color: var(--gold); margin-bottom: 8px; }
.victory-subtitle { color: var(--text-secondary); margin-bottom: 24px; }
.victory-playtime { font-size: 0.82rem; color: var(--text-muted); margin: -16px 0 16px; text-align: center; }

/* Bouton partage unifié LaLudoraShare */
.btn-share-unified {
  display: block;
  width: 100%;
  padding: 12px 20px;
  margin-bottom: 12px;
  background: var(--accent);
  color: #0d1117;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.btn-share-unified:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.share-group {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 16px;
}
.share-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  transition: all var(--transition);
  text-decoration: none;
}
.share-btn:hover { border-color: var(--text-muted); color: var(--text); }
.share-btn.share-wa:hover { border-color: #25d366; color: #25d366; }
.share-btn.share-tg:hover { border-color: #0088cc; color: #0088cc; }
.share-btn.share-fb:hover { border-color: #1877f2; color: #1877f2; }
.share-btn.share-x:hover { border-color: var(--text); color: var(--text); }
.share-btn.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Countdown harmonisé Motusro/Litere */
.countdown-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 10px 0 12px;
  text-align: center;
}
.countdown-label .countdown {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--accent);
}

.btn-close-overlay {
  color: var(--text-muted); font-size: 0.85rem; padding: 8px 16px;
  transition: color var(--transition);
}
.btn-close-overlay:hover { color: var(--text); }

/* ===== CONFETTI ===== */
#confetti-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1001;
}

/* ===== MASCOTTE ===== */
.mascot-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mascot-container svg {
  width: 120px; height: 120px;
  transition: all 0.3s ease;
}

.mascot-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.mascot-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
}
.mascot-bubble.visible { opacity: 1; }

/* Mascot animations */
@keyframes mascotFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes mascotJump { 0% { transform: translateY(0); } 40% { transform: translateY(-20px); } 100% { transform: translateY(0); } }
@keyframes mascotShiver { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
@keyframes mascotSlide { 0% { transform: translateX(0); } 50% { transform: translateX(30px); } 100% { transform: translateX(0); } }

.mascot-state-neutral svg { animation: mascotFloat 3s ease-in-out infinite; }
.mascot-state-search svg { animation: mascotFloat 2s ease-in-out infinite; }
.mascot-state-hot svg { animation: mascotShiver 0.15s ease 5; }
.mascot-state-cold svg { animation: mascotShiver 0.1s ease 5; }
.mascot-state-victory svg { animation: mascotJump 0.5s ease; }
.mascot-state-celebration svg { animation: mascotSlide 0.6s ease; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); max-height: 0; } to { opacity: 1; transform: translateY(0); max-height: 500px; } }
@keyframes slideRow { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes popIn { 0% { transform: scale(0.5); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
@keyframes countUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 8px var(--accent-dim); } 50% { box-shadow: 0 0 20px var(--accent-dim); } }

.anim-slide-in { animation: slideDown 0.3s ease forwards; }
.anim-fade-in { animation: fadeIn 0.3s ease; }
.anim-pop-in { animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* ===== AUDIO (music icon uses .icon-btn) ===== */

/* ===== RADIO BAR ===== */
.radio-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 44px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  z-index: 999;
  font-size: 0.8rem;
}
.radio-bar.active { display: flex; }
.radio-icon { font-size: 1rem; }
.radio-track { flex: 1; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-btn { color: var(--text); font-size: 1rem; padding: 4px; transition: color var(--transition); }
.radio-btn:hover { color: var(--accent); }

/* ===== COMBO BADGE (aligné Motusro) ===== */
.combo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 5px 18px;
  font-weight: 400;
  font-size: 12px;
  color: var(--gold);
  margin: var(--space-md) auto;
  width: fit-content;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== FEEDBACK MESSAGE (aligné Motusro/Litere) ===== */
.feedback-message {
  text-align: center;
  padding: 10px 16px;
  margin: 8px 0;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  animation: fadeIn 0.2s ease;
}
.feedback-message.info { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-light); }
.feedback-message.error { background: rgba(220, 38, 38, 0.08); color: var(--wrong); border: 1px solid rgba(220, 38, 38, 0.2); }
.feedback-message.success { background: rgba(86, 95, 30, 0.10); color: var(--success); border: 1px solid rgba(86, 95, 30, 0.22); }
.hidden { display: none !important; }

/* ===== HELP MODAL (aligné Motusro/Litere) ===== */
.help-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.help-modal.active { display: flex; }

.help-modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 460px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.help-modal-content h2 {
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.help-body p {
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.help-body h3 {
  margin: 1rem 0 0.5rem;
  color: var(--gold);
  font-size: 0.95rem;
  font-family: 'Russo One', sans-serif;
  font-weight: 400;
}
.help-body ul {
  list-style: disc;
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
}
.help-body ul li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.help-modal-close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}
.help-modal-close:hover { color: var(--text); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== MOBILE BOTTOM NAV (harmonisé Motusro/Litere) ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 50;
}

.bottom-nav-tabs {
  display: flex;
  align-items: stretch;
  height: 56px;
}

.bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition), background var(--transition);
  border: none;
  background: none;
  cursor: pointer;
  border-right: 1px solid var(--border);
}
.bottom-tab:last-child { border-right: none; }
.bottom-tab:hover { color: var(--text); background: var(--bg-secondary); }
.bottom-tab.active { color: var(--accent); background: var(--accent-dim); }
.bottom-tab .tab-icon { font-size: 1.25rem; line-height: 1; }
.bottom-tab .tab-label { line-height: 1.2; text-align: center; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  .page-wrapper { padding: 0 12px 72px; }
  .header-nav { display: none; }
  .mobile-bottom-nav { display: block; }
  .logo { font-size: 1.3rem; }
  .mascot-container svg { width: 80px; height: 80px; }
  .search-row { flex-wrap: wrap; }
  .search-wrap { min-width: 100%; }
  .btn-guess { flex: 1; }
  .difficulty-selector { gap: 6px; }
  .diff-btn { padding: 6px 12px; font-size: 0.78rem; }
  .status-bar { gap: 12px; font-size: 0.75rem; flex-wrap: wrap; justify-content: center; }
  .results-table thead th, .results-table tbody td { padding: 8px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .logo { font-size: 1.1rem; }
  .status-bar { flex-direction: column; gap: 4px; }
}

/* ===== YESTERDAY REVEAL — aligné Motusro/Litere ===== */
.yesterday-reveal {
  max-width: 560px;
  margin: 0 auto var(--space-md);
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.yesterday-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--space-md);
  cursor: pointer;
}

.yesterday-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.yesterday-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  padding: 2px 4px;
}

.yesterday-content {
  padding: 0 var(--space-md) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.yesterday-content.hidden { display: none; }

.yesterday-answer-name {
  font-family: 'Russo One', sans-serif;
  font-size: 1.3rem;
  color: var(--text);
}

.yesterday-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.yesterday-stats {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.yesterday-top3 {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.yesterday-top3-item {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 8px;
}

.yesterday-top3-item .rank { color: var(--accent); font-weight: 700; margin-right: 4px; }

/* ===== CLASAMENT — aligné Motusro/Litere ===== */
.clasament-section {
  max-width: 560px;
  margin: var(--space-xl) auto var(--space-lg);
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.clasament-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-sm);
}

.clasament-tab {
  flex: 1;
  padding: 6px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--transition);
}

.clasament-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.clasament-tab.active {
  background: linear-gradient(135deg, #565F1E, #6A7528);
  border-color: #565F1E;
  color: #F0ECE0;
}

.clasament-section h2 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--text);
  font-weight: 600;
}

.clasament-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.clasament-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: var(--space-sm);
  padding: 7px var(--space-sm);
  background: var(--bg-secondary);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 12px;
  transition: background var(--transition), border-color var(--transition);
}

.clasament-row:hover { background: var(--surface-warm); }

.clasament-row.my-row {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.clasament-row .poz {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.clasament-row .poz.top3 { color: var(--gold); }

.clasament-row .name {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clasament-row .ora {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.clasament-row .pts {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.no-data {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: var(--space-md);
}

@media (max-width: 480px) {
  .clasament-tab { font-size: 12px; padding: 6px 4px; }
  .clasament-row { font-size: 12px; padding: 7px 8px; }
}

.hidden { display: none; }

/* ===== HOME PAGE — tout dans home.css v2 ===== */

/* ===== SHARED — Jeux 1 & 3 (Joueur + Equipe) ===== */

.hints-zone { margin-bottom: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.hints-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.hint-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  transition: all var(--transition);
}
.hint-badge .hint-label { color: var(--text-muted); font-weight: 500; }
.hint-badge .hint-value { color: var(--text); font-weight: 700; }
.hint-badge.locked { opacity: 0.35; }
.hint-badge.locked .hint-value { filter: blur(6px); user-select: none; }
.hint-badge.revealed { border-color: var(--accent); background: var(--accent-dim); animation: fadeIn 0.5s ease; }

.mascot-inline { display: flex; justify-content: center; margin: 8px 0; }
.results-zone { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding-bottom: 24px; }

.guess-card { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; animation: slideDown 0.3s ease; }
.guess-card.victory-row { border-color: var(--gold); border-width: 2px; animation: pulse 0.5s ease; }
.guess-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.guess-attempt-num { font-size: 0.75rem; font-family: 'Space Mono', monospace; color: var(--text-muted); background: var(--bg-secondary); padding: 2px 8px; border-radius: var(--radius-xs); }

.comparison-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }

.comp-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: var(--radius-xs); text-align: center; transition: all var(--transition); border: 1px solid transparent; }
.comp-cell-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 500; }
.comp-cell-value { font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; gap: 2px; }

.comp-cell.match { background: rgba(86, 95, 30, 0.12); border-color: rgba(86, 95, 30, 0.25); }
.comp-cell.match .comp-cell-value { color: var(--success); }
[data-theme="dark"] .comp-cell.match { background: rgba(122, 133, 48, 0.18); border-color: rgba(122, 133, 48, 0.30); }
[data-theme="dark"] .comp-cell.match .comp-cell-value { color: var(--accent-light); }
.comp-cell.partial { background: rgba(202, 190, 90, 0.15); border-color: rgba(202, 190, 90, 0.30); }
.comp-cell.partial .comp-cell-value { color: var(--close); }
.comp-cell.no-match { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.15); }
.comp-cell.no-match .comp-cell-value { color: var(--wrong); }

/* Empty state — partagé Jeux 1, 2, 3 */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.9rem; }

/* ===== JEU 1 — 1 Jour 1 Joueur ===== */

.teammates-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.teammates-label { font-size: 0.8rem; color: var(--text-muted); width: 100%; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.teammates-counter { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--accent); font-size: 0.75rem; }

.teammate-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; color: var(--text-muted);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}
.teammate-circle.revealed { border-color: var(--accent); background: var(--accent-dim); font-weight: 700; color: var(--accent); }
.teammate-circle .teammate-silhouette { font-size: 1.2rem; opacity: 0.25; }
.teammate-circle.revealed .teammate-silhouette { opacity: 1; font-size: 0.7rem; }
.guess-player-name { font-weight: 700; font-size: 1rem; color: var(--text); }

/* ===== JEU 2 — Joueur Mystère ===== */

.score-box {
  display: none; align-items: center; gap: 20px;
  padding: 20px 24px; margin-bottom: 16px;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.score-box.visible { display: flex; animation: slideDown 0.3s ease; }
.score-box-content { flex: 1; }
.score-box-player { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.score-box-value { font-family: 'Space Mono', monospace; font-size: 3rem; font-weight: 700; line-height: 1; margin-bottom: 6px; transition: color 0.3s ease; }
.score-box-rank { font-family: 'Space Mono', monospace; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); display: block; margin-top: 2px; }
.score-box-term { font-size: 0.9rem; font-weight: 600; opacity: 0; transition: opacity 0.2s ease; }
.score-box-term.visible { opacity: 1; }
.score-box-bar { width: 100%; height: 8px; background: var(--bg-secondary); border-radius: 4px; overflow: hidden; margin-top: 10px; display: none; }
.score-box-bar.visible { display: block; }
.score-box-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; background: var(--accent); }

.score-box[data-level="0"] { border-color: var(--level-0); }
.score-box[data-level="1"] { border-color: var(--level-1); }
.score-box[data-level="2"] { border-color: var(--level-2); }
.score-box[data-level="3"] { border-color: var(--level-3); }
.score-box[data-level="4"] { border-color: var(--level-4); }
.score-box[data-level="5"] { border-color: var(--level-5); }
.score-box[data-level="6"] { border-color: var(--level-6); }
.score-box[data-level="7"] { border-color: var(--level-7); }
.score-box[data-level="8"] { border-color: var(--level-8); border-width: 3px; }
.score-box.victory { border-color: var(--gold); border-width: 3px; animation: pulse 0.5s ease; }
.score-box.victory .score-box-value { color: var(--gold); }
.score-box.victory .score-box-bar-fill { background: var(--gold); }

.mystere-table tbody tr { border-left: 4px solid transparent; transition: all var(--transition); }
.mystere-table tbody tr[data-level="0"] { border-left-color: var(--level-0); }
.mystere-table tbody tr[data-level="1"] { border-left-color: var(--level-1); }
.mystere-table tbody tr[data-level="2"] { border-left-color: var(--level-2); }
.mystere-table tbody tr[data-level="3"] { border-left-color: var(--level-3); }
.mystere-table tbody tr[data-level="4"] { border-left-color: var(--level-4); }
.mystere-table tbody tr[data-level="5"] { border-left-color: var(--level-5); }
.mystere-table tbody tr[data-level="6"] { border-left-color: var(--level-6); }
.mystere-table tbody tr[data-level="7"] { border-left-color: var(--level-7); }
.mystere-table tbody tr[data-level="8"] { border-left-color: var(--level-8); }
.mystere-table tbody tr:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); transform: translateY(-1px); }

.td-attempt { color: var(--text-muted); font-family: 'Space Mono', monospace; font-weight: 700; width: 40px; text-align: center; }
.td-player { font-weight: 600; min-width: 120px; }
.td-score { font-family: 'Space Mono', monospace; font-weight: 700; min-width: 65px; }
.td-thermo { font-size: 1.1rem; text-align: center; width: 40px; }
.td-rank { min-width: 70px; text-align: center; }
.td-bar { min-width: 100px; }

.rank-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-xs); font-size: 0.78rem; font-weight: 700; font-family: 'Space Mono', monospace; }
.rank-badge.in-top { background: rgba(245, 158, 11, 0.12); color: var(--close); }
.rank-badge.not-in-top { color: var(--text-muted); }

.mini-bar { width: 100%; height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.fill-level-0 { background: var(--level-0); }
.fill-level-1 { background: var(--level-1); }
.fill-level-2 { background: var(--level-2); }
.fill-level-3 { background: var(--level-3); }
.fill-level-4 { background: var(--level-4); }
.fill-level-5 { background: var(--level-5); }
.fill-level-6 { background: var(--level-6); }
.fill-level-7 { background: var(--level-7); }
.fill-level-8 { background: var(--level-8); }

.top100-panel { margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.btn-top100-toggle { width: 100%; padding: 12px 16px; text-align: left; font-weight: 600; font-size: 0.88rem; color: var(--text); background: transparent; border: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: background var(--transition); }
.btn-top100-toggle:hover { background: var(--bg-secondary); }
.top100-panel-list { display: none; max-height: 280px; overflow-y: auto; border-top: 1px solid var(--border); }
.top100-panel-list.open { display: block; }

.victory-top100 { margin: 8px 0 20px; text-align: left; }
.victory-top100-title { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); margin-bottom: 8px; text-align: center; }
.victory-top100-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-secondary); }

.top100-row { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-bottom: 1px solid var(--border); font-size: 0.82rem; }
.top100-row:last-child { border-bottom: none; }
.top100-row.top100-guessed { background: rgba(212, 160, 23, 0.1); font-weight: 700; }
.top100-rank { font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--text-muted); min-width: 26px; text-align: right; }
.top100-name { flex: 1; }
.top100-score { font-family: 'Space Mono', monospace; font-size: 0.78rem; font-weight: 700; }
.top100-loading { padding: 14px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
.top100-podium-1 { background: rgba(255, 215, 0, 0.08); }
.top100-podium-2 { background: rgba(192, 192, 192, 0.08); }
.top100-podium-3 { background: rgba(205, 127, 50, 0.08); }
.top100-podium .top100-name { font-weight: 700; }
.top100-tied { border-left: 3px solid var(--accent); }
.top100-tied .top100-rank { color: var(--accent); font-weight: 700; }
.victory-card.with-top100 { max-height: 90vh; overflow-y: auto; }

/* ===== JEU 3 — 1 Jour 1 Équipe ===== */

.silhouettes-section { margin-top: 12px; }
.silhouettes-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.silhouettes-counter { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--accent); font-size: 0.75rem; }
.silhouettes-row { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }

.silhouette-circle {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-secondary); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition);
  position: relative; flex-shrink: 0;
}
.silhouette-circle .silhouette-icon { opacity: 0.25; }
.silhouette-circle.revealed { border-color: var(--accent); background: var(--accent-dim); }
.silhouette-circle.revealed .silhouette-icon { opacity: 1; font-size: 0.7rem; font-weight: 700; color: var(--accent); }
.silhouette-circle.coach { border-style: dashed; }
.coach-section { margin-top: 16px; }

.two-step-search { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.search-step-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 4px; }

.season-select {
  width: 100%; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.95rem; outline: none;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23565F1E' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
.season-select:focus { border-color: var(--accent); background-color: var(--surface-warm); }
.season-select:disabled { opacity: 0.4; cursor: not-allowed; }
.season-select option { background: var(--surface); color: var(--text); }

.selected-club-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--accent-dim); border: 1px solid var(--accent); border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.selected-club-tag .clear-club { cursor: pointer; opacity: 0.6; transition: opacity var(--transition); font-size: 1rem; line-height: 1; }
.selected-club-tag .clear-club:hover { opacity: 1; }
.guess-row { display: flex; gap: 8px; align-items: center; }
.guess-team-name { font-weight: 700; font-size: 1rem; color: var(--text); }
.guess-team-season { font-weight: 400; color: var(--text-muted); font-size: 0.85rem; margin-left: 8px; }

/* ===== RESPONSIVE — Game-specific ===== */
@media (max-width: 768px) {
  /* Game cards responsive → home.css v2 */

  .hint-badge { padding: 6px 10px; font-size: 0.75rem; }
  .comparison-grid { grid-template-columns: repeat(3, 1fr); }
  .teammate-circle { width: 34px; height: 34px; }
  .silhouette-circle { width: 36px; height: 36px; }
  .two-step-search { gap: 8px; }

  .score-box { flex-direction: column; text-align: center; gap: 12px; padding: 16px; }
  .score-box-value { font-size: 2.2rem; }
  .score-box-rank { margin-left: 0; display: block; margin-top: 4px; }
  .td-bar { display: none; }
  .mystere-table thead th:last-child { display: none; }
}

@media (max-width: 500px) {
  .td-rank { display: none; }
  .mystere-table thead th:nth-child(5) { display: none; }
}

@media (max-width: 400px) {
  .comparison-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Sidebar burger ── */
.sidebar-overlay { position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:949;transition:opacity .3s; }
.sidebar-overlay.hidden { display:none; }
.sidebar { position:fixed;top:0;left:-280px;width:280px;height:100vh;background:var(--surface);box-shadow:4px 0 20px rgba(0,0,0,.15);z-index:950;transition:left .3s ease;display:flex;flex-direction:column;overflow-y:auto; }
.sidebar.open { left:0; }
.sidebar-header { display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border); }
.sidebar-title { font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:1px;color:var(--text-muted); }
.sidebar-close { background:none;border:none;font-size:24px;color:var(--text-muted);cursor:pointer;line-height:1;padding:0; }
.sidebar-close:hover { color:var(--accent); }
.sidebar-nav { list-style:none;padding:8px 0;flex:1; }
.sidebar-nav li { padding:0 12px; }
.sidebar-item { display:flex;align-items:center;gap:10px;width:100%;padding:10px 14px;background:none;border:none;border-radius:8px;color:var(--text);font-family:inherit;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s;text-decoration:none;text-align:left; }
.sidebar-item:hover { background:var(--accent-dim);color:var(--accent); }
.sidebar-item.active { background:var(--accent-dim);color:var(--accent);font-weight:600; }
.sidebar-divider { padding:16px 14px 4px;font-size:10px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:var(--text-muted);opacity:.55; }
.sidebar-item.sidebar-sub { font-size:13px;padding-left:34px;color:var(--text-muted); }
.sidebar-item.sidebar-sub:hover { color:var(--accent); }
.sidebar-item.sidebar-sub.active { color:var(--accent);background:var(--accent-dim);font-weight:600; }
.sidebar-footer { margin-top:auto;padding:12px 20px;border-top:1px solid var(--border);font-size:12px;color:var(--text-muted); }
.sidebar-icon { flex-shrink:0;opacity:.7; }
.sidebar-item:hover .sidebar-icon { opacity:1; }
.sidebar-item.active .sidebar-icon { opacity:1;stroke:var(--accent); }
.sidebar-item.sidebar-sub { font-size:13px;padding-left:20px;color:var(--text-muted);gap:10px; }
