/* Suivi séquence · Devoirs (D3) : la semaine jour par jour */

.devoirs__barre {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.devoirs__semaine {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.devoirs__fleche {
    width: 44px;
    padding: 0;
    border-radius: var(--rayon-champ);
}

.devoirs__titre-semaine {
    margin: 0;
    padding: 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.devoirs__legende {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: center;
    margin: 0;
    padding: 0;
    color: var(--texte-secondaire);
    font-size: 13px;
    list-style: none;
}

.devoirs__repere {
    display: flex;
    gap: 6px;
    align-items: center;
}

.devoirs__pastille {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--piste);
}

.devoirs__pastille--reussi {
    background: var(--valide-texte);
}

.devoirs__pastille--echoue {
    background: var(--a-reprendre-repere);
}

/* Une colonne par jour ; empilées sur petit écran */

.devoirs__jours {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.devoirs__jour {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 300px;
    padding: 12px;
    border: 1px solid var(--bordure);
    border-radius: 14px;
    background: var(--surface);
}

@media (max-width: 799px) {
    .devoirs__jour {
        min-height: 0;
    }
}

.devoirs__jour--aujourdhui {
    padding: 11px;
    border: 2px solid var(--accent);
    background: var(--accent-clair);
}

.devoirs__entete-jour {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    align-items: baseline;
    justify-content: space-between;
}

.devoirs__nom-jour {
    font-size: 14px;
    font-weight: 700;
}

.devoirs__jour--aujourdhui .devoirs__nom-jour {
    color: var(--accent);
}

.devoirs__resume-jour {
    color: var(--texte-secondaire);
    font-size: 12px;
}

/* « + Nouvelle affectation », sous les onglets de Suivi séquence. */
.devoirs__actions {
    display: flex;
    justify-content: flex-end;
}

.devoirs__affecter {
    display: flex;
    width: 100%;
    font-family: inherit;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: auto;
    border: 1px dashed var(--bordure-forte);
    border-radius: var(--rayon-champ);
    background: var(--surface);
    color: var(--texte-secondaire);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.devoirs__affecter:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Carte d'un exercice à rendre */

.devoir {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-champ);
    background: var(--surface);
}

.devoir__echeance,
.devoir__cible {
    color: var(--texte-secondaire);
    font-size: 11px;
}

.devoir__titre {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.devoir__barre {
    display: flex;
    height: 8px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--piste);
}

.devoir__part--reussi {
    background: var(--valide-texte);
}

.devoir__part--echoue {
    background: var(--a-reprendre-repere);
}

.devoir__nombres {
    display: flex;
    gap: 6px;
    color: var(--texte-secondaire);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.devoir__nombre--reussi {
    color: var(--valide-texte);
}

.devoir__nombre--echoue {
    color: var(--a-reprendre-texte);
}

.devoir__separateur {
    color: var(--bordure-forte);
}

/* Carte d'un devoir : lien vers sa synthèse (écran D5). */
a.devoir {
    color: inherit;
    text-decoration: none;
}

a.devoir:hover,
a.devoir:focus-visible {
    border-color: var(--accent);
}

/* Synthèse d'un devoir (écran D5, V7-Affectation-jour) */

.synthese {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
}

.synthese__entete {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    align-items: baseline;
    justify-content: space-between;
}

.synthese__titre {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.synthese__regle {
    margin: 0;
    color: var(--texte-secondaire);
    font-size: 13px;
}

.synthese__barre {
    height: 16px;
    border-radius: 8px;
}

.synthese__chiffres {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.synthese__chiffre {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--bordure);
    border-radius: 12px;
}

.synthese__libelle {
    font-size: 13px;
    font-weight: 600;
}

.synthese__valeur {
    font-size: 24px;
    font-weight: 700;
}

.synthese__valeur--reussi {
    color: var(--valide-texte);
}

.synthese__valeur--echoue {
    color: var(--a-reprendre-texte);
}

.synthese__detail {
    color: var(--texte-secondaire);
    font-size: 12px;
}

.synthese__colonnes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.synthese__colonne-titre {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
}

.synthese__colonne-titre::before {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--piste);
    content: "";
}

.synthese__colonne-titre--reussi::before {
    background: var(--valide-texte);
}

.synthese__colonne-titre--echoue::before {
    background: var(--a-reprendre-repere);
}

.synthese__eleves {
    margin: 0;
    padding: 0;
    list-style: none;
}

.synthese__eleve {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    border-top: 1px solid var(--separateur);
    font-size: 14px;
}

.synthese__eleve--vide {
    color: var(--texte-secondaire);
}

.synthese__pastille {
    padding: 1px 8px;
    border-radius: var(--rayon-pastille);
    background: var(--separateur);
    color: var(--texte-secondaire);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.synthese__pastille--reussi {
    background: var(--valide-fond);
    color: var(--valide-texte);
}

.synthese__pastille--echoue {
    background: var(--a-reprendre-fond);
    color: var(--a-reprendre-texte);
}

.synthese__pastille--commence {
    background: var(--accent-clair);
    color: var(--accent);
}
