/* ═══════════════════════════════════════════════════════
   AREA Quiz Defense — dashboard.css
═══════════════════════════════════════════════════════ */

/* ── KPI bar ── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--ink);
  border: 2px solid var(--ink);
  margin-bottom: 1.8rem;
}

.stat-card {
  background: var(--surface);
  padding: 1.2rem 0.9rem;
  text-align: center;
}

.stat-val {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.stat-label {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-top: 0.3rem;
}

/* ── Grilles ── */
.dash-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.4rem;
  margin-bottom: 1.8rem;
}

/* ── Histogrammes ── */
.histo-block {
  background: var(--surface);
  border: 2px solid var(--border);
}

.histo-header {
  background: var(--ink);
  color: var(--paper);
  padding: 0.55rem 0.9rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.histo-chart { padding: 1rem 0.9rem 0.7rem; }

.histo-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 100px;
}

.histo-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.histo-bar-wrap {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 88px;
}

.histo-bar {
  width: 100%;
  border-radius: 1px 1px 0 0;
  transition: height 0.7s ease;
  position: relative;
  min-height: 4px;
  cursor: default;
}

.histo-bar:hover::after {
  content: attr(data-val);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.58rem;
  padding: 0.1rem 0.35rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

.histo-label {
  font-size: 0.9rem;
  text-align: center;
}

.histo-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.9rem 0.7rem;
  font-size: 0.6rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.histo-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Succès récents ── */
.achievements-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.achievements-section-title .title-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.achievements-section-title .title-sub {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  text-transform: none;
  letter-spacing: 0;
}

.achievements-section-title .title-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Responsive */
@media (max-width: 900px) {
  .dash-stats { grid-template-columns: repeat(3, 1fr); }
  .dash-3col  { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .achievements-recent { grid-template-columns: repeat(3, 1fr); }
}
