/* ============================================================
 *  Mots-Cachés — Styles pour pages /mots-meles/[niveau]
 *  Fichier : /assets/css/niveau.css
 * ============================================================ */

/* --- Sommaire ancré --- */
.niv-sommaire {
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2.5rem;
}
.niv-sommaire-label {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: .5rem;
}
.niv-sommaire ul {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.niv-sommaire a {
  display: inline-block;
  padding: .35rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: var(--text);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.niv-sommaire a:hover {
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  border-color: var(--brand);
}

/* --- Section stats --- */
.niv-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin: 1.75rem 0;
}
@media (min-width: 640px) {
  .niv-stats { grid-template-columns: repeat(4, 1fr); }
}
.niv-stat {
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem .75rem;
  text-align: center;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.niv-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.07);
  border-color: var(--brand);
}
.niv-stat-ico {
  display: block;
  font-size: 1.6rem;
  margin-bottom: .35rem;
}
.niv-stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1.1;
}
.niv-stat-label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-soft);
  line-height: 1.3;
  margin-top: .15rem;
}

/* --- Grille de conseils --- */
.niv-conseils {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.75rem 0;
}
@media (min-width: 640px) {
  .niv-conseils { grid-template-columns: 1fr 1fr; }
}
.niv-conseil {
  position: relative;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.25rem 1.25rem;
  overflow: hidden;
}
.niv-conseil::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%,
              color-mix(in srgb, var(--brand) 30%, transparent) 100%);
}
.niv-conseil h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .5rem;
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text);
}
.niv-conseil-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-radius: 10px;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.niv-conseil p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: var(--fs-sm);
}

/* --- Tableau comparatif des niveaux --- */
.niv-compare {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: var(--fs-sm);
}
.niv-compare th {
  background: color-mix(in srgb, var(--brand) 8%, var(--bg-soft));
  padding: .75rem .85rem;
  text-align: left;
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.niv-compare td {
  padding: .75rem .85rem;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.niv-compare tr[aria-current="true"] td {
  background: color-mix(in srgb, var(--brand) 6%, transparent);
  font-weight: 600;
}
.niv-compare tr[aria-current="true"] td:first-child::before {
  content: '▸ ';
  color: var(--brand);
}

/* --- Encadré profil --- */
.niv-profil {
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--brand) 8%, transparent) 0%,
              color-mix(in srgb, var(--brand) 2%, transparent) 100%);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  margin: 1.75rem 0;
}
.niv-profil strong { color: var(--brand); }
.niv-profil ul {
  margin: .75rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.7;
}
.niv-profil li { margin-bottom: .25rem; }
