/* V8-103 — le challenge, côté membre. Le geste reprend le dessin de l'action du jour (.race-task, .day-action*,
   .day-streak — app.css et day.css) ; ne vit ici que ce que Bootstrap et ces classes ne donnent pas : le bandeau
   de score, le podium, les étoiles, les onglets de semaine, le compteur d'un geste. Jetons seulement. */

/* L'annonce : « Je participe » respire, sur toute la largeur en mobile. */
.challenge-join { margin-top: .9rem; }
.challenge-join .btn { width: 100%; padding: .7rem 1.25rem; }
@media (min-width: 576px) {
    .challenge-join .btn { width: auto; }
}

/* L'étiquette d'un jour (« Octobre Rose », « Groupes à 3 ») et « Aujourd'hui ». */
.challenge-tag { display: inline-block; margin-top: .3rem; padding: .15rem .65rem; border-radius: var(--brand-radius-pill); background: var(--brand-surface-soft); border: 1px solid var(--brand-line); font-size: .7rem; font-weight: 700; color: var(--brand-secondary); }
.challenge-tag.is-today { background: var(--brand-accent); border-color: var(--brand-accent); }

/* Le compteur d'un geste fait : un champ court et « Noter ». */
.challenge-units { margin-top: .5rem; }
.challenge-units-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .2rem; }
.challenge-units-row .form-control { width: 5.5rem; flex: 0 0 auto; }
.challenge-units-row .btn { padding-inline: 1rem; }

/* « Mes challenges » : une ligne par challenge, « Voir » à droite. */
.challenge-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 0; border-bottom: 1px dashed var(--brand-line-soft); line-height: 1.6; }
.challenge-row:last-child { border-bottom: 0; }
.challenge-row-body { flex: 1; min-width: 0; }
.challenge-row .btn { padding-inline: 1rem; }
.challenge-section-title { margin: 1.25rem 0 .6rem; font-size: 1rem; font-weight: 800; color: var(--brand-secondary); }

/* Le bandeau de score : le total en grand, puis une information par ligne. */
.challenge-score { margin: .75rem 0; padding: .9rem 1rem; border-radius: var(--brand-radius); background: var(--brand-secondary); color: var(--brand-on-dark); text-align: center; }
.challenge-score-num { font-family: var(--brand-font-display); font-size: 2rem; font-weight: 600; line-height: 1.15; }
.challenge-score-sub { font-size: .8rem; color: var(--brand-on-dark-muted); }
.challenge-facts { display: grid; gap: .3rem; font-size: .88rem; line-height: 1.6; }
.challenge-subtitle { margin: 1rem 0 .4rem; font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-muted); }

/* Le podium de la semaine : trois prénoms et leurs points, jamais le classement complet. */
.challenge-podium { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.challenge-podium li { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border-radius: var(--brand-radius); background: var(--brand-surface-soft); font-size: .88rem; }
.challenge-podium-rank { flex: 0 0 auto; font-size: 1.1rem; }
.challenge-podium-name { flex: 1; min-width: 0; font-weight: 700; color: var(--brand-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.challenge-podium-points { flex: 0 0 auto; font-weight: 700; color: var(--brand-accent-deep); }

/* L'objectif en étoiles. */
.challenge-stars { display: flex; flex-wrap: wrap; gap: .25rem; margin: .35rem 0; font-size: 1.6rem; line-height: 1; }
.challenge-star { color: var(--brand-line); }
.challenge-star.is-on { color: var(--brand-accent); }

/* « Mon score pour le groupe » : le texte tel qu'il sera collé, ligne par ligne. */
.challenge-share { white-space: pre-line; line-height: 1.6; }
.challenge-share-button { width: 100%; padding: .7rem 1.25rem; }
@media (min-width: 576px) {
    .challenge-share-button { width: auto; }
}

/* Les semaines en onglets : des liens, défilables au doigt sous 360 px. */
.challenge-weeks { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 0 .4rem; scrollbar-width: none; }
.challenge-weeks::-webkit-scrollbar { display: none; }
.challenge-week { flex: 0 0 auto; padding: .5rem 1rem; border-radius: var(--brand-radius-pill); border: 1px solid var(--brand-line); background: var(--brand-surface); font-size: .8rem; font-weight: 700; color: var(--brand-secondary); text-decoration: none; white-space: nowrap; }
.challenge-week:hover, .challenge-week:focus-visible { border-color: var(--brand-accent); color: var(--brand-secondary); }
.challenge-week.active { background: var(--brand-secondary); border-color: var(--brand-secondary); color: var(--brand-on-dark); }

/* Les règles du jeu et le tableau d'honneur : une phrase, une ligne. */
.challenge-rules { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: .88rem; line-height: 1.6; }
.challenge-honor { padding: .6rem 0; border-bottom: 1px dashed var(--brand-line-soft); line-height: 1.6; }
.challenge-honor:last-child { border-bottom: 0; }
