/*
 * IMMGO — Écrans du cahier Vol. 2, sections 07 à 10 et 15 (suite) : choix de période, étoiles, grade du score,
 * textes colorés, aperçus de documents (reçu, attestation), réglages du téléphone
 * Auteur : Jacks Ngalangala
 */

/* ─── Choix de période (bouton « Période ▾ » et sa liste) ─── */
.fb-periode {
  position: relative;
}
.fb-periode-liste {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: var(--e-2);
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: var(--r-moyen);
  box-shadow: var(--ombre-3);
}
.fb-periode-liste[hidden] {
  display: none;
}
.fb-periode-option {
  display: block;
  width: 100%;
  padding: var(--e-2) var(--e-3);
  border: 0;
  border-radius: var(--r-petit);
  background: transparent;
  color: var(--texte);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fb-periode-option:hover,
.fb-periode-option:focus-visible {
  background: var(--surface-douce);
  outline: none;
}
.fb-periode-option[aria-checked='true'] {
  background: var(--or-pale);
  color: var(--or-texte);
  font-weight: var(--graisse-forte);
}

/* ─── Étoiles, grade de score, titres de section ─── */
.fb-etoiles {
  display: inline-flex;
  gap: 2px;
  padding: 2px var(--e-2);
  border-radius: 6px;
  background: var(--succes-pale);
  color: var(--succes);
}
.fb-etoiles[data-niveau='moyen'] {
  background: var(--attention-pale);
  color: var(--attention);
}
.fb-etoiles svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.fb-grade {
  font-size: 56px;
  letter-spacing: -0.02em;
  line-height: 1;
  font-weight: 800;
  color: var(--fb-teinte, var(--succes));
}
.fb-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--e-2);
}
.fb-centre .jauge {
  width: 100%;
  margin-top: var(--e-2);
}
.fb-sur {
  color: var(--texte-second);
}
.fb-valeur-forte {
  font-size: 36px;
  font-weight: var(--graisse-titre);
  font-variant-numeric: tabular-nums;
}
.fb-liste-puces {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
  padding-left: var(--e-5);
  list-style: disc;
}
.fb-resolution {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fb-resolution-numero {
  color: var(--or-texte);
  font-weight: var(--graisse-titre);
  margin-right: var(--e-2);
}
.fb-montant-irl {
  color: var(--succes);
}
.fb-option-actif {
  color: var(--succes);
  font-size: var(--taille-petit);
  font-weight: var(--graisse-forte);
  text-transform: uppercase;
  margin-left: var(--e-2);
}

/* ─── Texte coloré d'un niveau (score, variation) ─── */
.fb-texte-succes {
  color: var(--succes);
}
.fb-texte-info {
  color: var(--info);
}
.fb-texte-attention {
  color: var(--attention);
}
.fb-texte-danger {
  color: var(--danger);
}
.fb-texte-or {
  color: var(--or-texte);
}

/* ─── Aperçu d'un reçu (visibilité IRL) et d'une attestation ─── */
.fb-document {
  padding: var(--e-6);
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
}
.fb-document-tete {
  display: flex;
  justify-content: space-between;
  gap: var(--e-4);
  padding-bottom: var(--e-4);
  margin-bottom: var(--e-4);
  border-bottom: 2px solid var(--texte);
}
.fb-document-entete {
  padding-bottom: var(--e-4);
  margin-bottom: var(--e-4);
  border-bottom: 2px solid var(--texte);
}
.fb-droite {
  text-align: right;
  align-items: flex-end;
}
.fb-document > * + * {
  margin-top: var(--e-4);
}
.fb-document-titre {
  font-size: 22px;
  font-weight: var(--graisse-titre);
  letter-spacing: 0.02em;
}
.fb-document-mention {
  padding: var(--e-3) var(--e-4);
  border-radius: var(--r-petit);
  background: var(--succes-pale);
  font-size: var(--taille-petit);
}

/* ─── Téléphone : marges et chiffres plus serrés ─── */
@media (max-width: 599px) {
  .fb-chiffre-valeur {
    font-size: 22px;
  }
  .fb-grade {
    font-size: 44px;
  }
  .fb-document {
    padding: var(--e-4);
  }
  .fb-periode-liste {
    right: auto;
    left: 0;
  }
}
