/** * CritereCard — Sprint 3.6b. * * Carte critère enrichie : nom, score /5, commentaire, exemple, suggestion, * astuce + badges des codes d'erreurs taxonomie correspondants. * * Visible pour Standard et Premium (gate `detailed_report`). Le floutage est * géré par le parent via BlurredSection — CritereCard ne connaît pas le plan. * * Règle L : tokens Direction H exclusivement. * Règle H : purement présentationnel — aucune logique plan ici. */ import ReactMarkdown from 'react-markdown' import { Card } from '@/shared/ui/Card' import { Badge } from '@/shared/ui/Badge' import type { Critere, ErreurCode } from '@/entities/report/types' interface Props { critere: Critere erreursCodes: ErreurCode[] } export function CritereCard({ critere, erreursCodes }: Props) { return (

{critere.nom}

{critere.score}/5
{critere.commentaire && (
{critere.commentaire}
)} {critere.exemple && (

Exemple tiré de votre texte

« {critere.exemple} »

)} {critere.suggestion && (

Reformulation suggérée

{critere.suggestion}

)} {critere.astuce && (
{critere.astuce}
)} {erreursCodes.length > 0 && (
{erreursCodes.map((e) => ( {e.description ?? e.code.replace(/_/g, ' ')} ))}
)}
) }