/* Lexique VFG — dashboard cartes (Grimoire + Rapport) */
.lex-app {
  --bg: #0f1118;
  --surface: #1a1d28;
  --line: #2e3348;
  --text: #e8e6f0;
  --muted: #9a97ad;
  --accent: #7b9cff;
  --accent-soft: #243054;
  --gold: #e8c547;
  --radius: 10px;
  min-height: calc(100vh - 120px);
  padding: 12px 16px 32px;
  color: var(--text);
  background: radial-gradient(ellipse at top, #1a2040 0%, var(--bg) 55%);
}

.lex-hero {
  max-width: 1100px;
  margin: 0 auto 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lex-hero h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.lex-hero p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.lex-toolbar {
  max-width: 1100px;
  margin: 0 auto 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lex-toolbar input[type="search"] {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.lex-toolbar select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.lex-count {
  font-size: 0.8rem;
  color: var(--muted);
}

.lex-noyau {
  max-width: 1100px;
  margin: 0 auto 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lex-chip {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: #c5d4ff;
  cursor: pointer;
}

.lex-chip:hover,
.lex-chip.on {
  border-color: var(--gold);
  color: var(--gold);
}

.lex-section {
  max-width: 1100px;
  margin: 0 auto 18px;
}

.lex-section h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.lex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.lex-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.lex-card:hover {
  border-color: var(--accent);
}

.lex-emo {
  font-size: 2rem;
  line-height: 1;
  text-align: center;
  padding-top: 2px;
}

.lex-term {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.lex-grimoire {
  font-size: 0.78rem;
  font-style: italic;
  color: #b8a8e8;
  margin-bottom: 6px;
}

.lex-story {
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 4px;
}

.lex-hint {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

.lex-empty {
  max-width: 1100px;
  margin: 24px auto;
  text-align: center;
  color: var(--muted);
}

.lex-error {
  color: #ff8a8a;
}

/* Intégration FG_Grimoire (fond clair hérité) */
body:not(.skin-skyblog):not(.skin-y2k):not(.skin-weebkawai):not(.skin-brutaliste):not(.skin-terminal):not(.skin-candy-chaos):not(.skin-wireframe) .lex-app {
  --bg: #eef0f5;
  --surface: #fff;
  --line: #d4d8e4;
  --text: #1a1a22;
  --muted: #5c5c6e;
  --accent: #4a6fa5;
  --accent-soft: #e8eef8;
  --gold: #8b6914;
  background: var(--bg);
}

body:not(.skin-skyblog):not(.skin-y2k):not(.skin-weebkawai):not(.skin-brutaliste):not(.skin-terminal):not(.skin-candy-chaos):not(.skin-wireframe) .lex-grimoire {
  color: #5a4a78;
}

@media (max-width: 520px) {
  .lex-card {
    grid-template-columns: 44px 1fr;
  }
  .lex-emo {
    font-size: 1.6rem;
  }
}
