/* ============================================================
   FFCQ — badges
   Feuille additive. À charger APRÈS css/style.css et
   css/ffcq-v2.css. Aucune règle existante n'est modifiée :
   toutes les classes sont préfixées .bdg-.
   ============================================================ */

.bdg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --- Médaillon --- */
.bdg {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; text-decoration: none;
}
.bdg-disque {
  border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bdg-fond); border: 3px solid var(--bdg-anneau);
  color: var(--bdg-encre);
}
.bdg-disque svg { width: 55%; height: 55%; }
.bdg-initiale {
  font-family: var(--police-titre, inherit);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1;
  font-size: 0.42em;
}
.bdg.verrouille .bdg-disque { border-style: dashed; }

/* --- Tailles --- */
.bdg-sm .bdg-disque { width: 46px; height: 46px; border-width: 2px; font-size: 46px; }
.bdg-md .bdg-disque { width: 64px; height: 64px; font-size: 64px; }
.bdg-lg .bdg-disque { width: 76px; height: 76px; font-size: 76px; }

/* --- Pastilles de palier --- */
.bdg-pastilles { display: flex; gap: 4px; }
.bdg-pastille { width: 7px; height: 7px; border-radius: 50%; background: #ddd9d0; }
.bdg-pastille.on { background: var(--bdg-anneau); }
.bdg-sm .bdg-pastilles { display: none; }

/* --- Libellés --- */
.bdg-metal { font-family: var(--police-titre, inherit); font-size: 13px; font-weight: 700; color: var(--bdg-encre); }
.bdg-nom { font-family: var(--police-titre, inherit); font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: var(--navy, #0c1a3a); }
.bdg-seuil { font-size: 12.5px; font-weight: 700; color: var(--navy, #0c1a3a); }
.bdg-note { font-size: 11.5px; color: #7d8590; line-height: 1.45; }

/* Statut d'un badge à paliers débloqué : métal + titre sur une seule ligne
   (« Bronze · Sans faute ») plutôt que deux lignes empilées. */
.bdg-statut-ligne { display: flex; align-items: baseline; justify-content: center; gap: 5px; flex-wrap: wrap; }
.bdg-statut-sep { color: #c2bdb2; }

/* --- Bande compacte (profil) --- */
.bdg-bande { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 6px; }

/* --- Grille complète --- */
.bdg-section + .bdg-section { margin-top: 26px; }
.bdg-section-titre {
  font-family: var(--police-titre, inherit); font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: #7d8590;
  margin: 0 0 14px;
}
.bdg-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 13px; }
.bdg-carte {
  background: #fff; border: 1px solid var(--trait, #e8e5dd); border-radius: 14px;
  padding: 20px 16px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
/* display:block est essentiel ici : ce sont des <span>, donc inline par défaut, et
   width:100% est ignoré sur un élément inline -- sans ça la barre se réduisait à un
   carré de taille imprévisible au lieu de courir sur toute la largeur de la carte. */
.bdg-progression { display: block; width: 100%; margin-top: 2px; }
.bdg-jauge { display: block; width: 100%; height: 7px; background: #f0eee7; border-radius: 5px; overflow: hidden; }
.bdg-jauge span { display: block; height: 100%; border-radius: 5px; background: var(--bdg-anneau); }
.bdg-progression .bdg-note { margin-top: 6px; display: block; }

@media (max-width: 520px) {
  .bdg-grille { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); }
}
