diff --git a/frontend/assets/images/ours_endormi.png b/frontend/assets/images/ours_endormi.png new file mode 100644 index 0000000..ec71876 Binary files /dev/null and b/frontend/assets/images/ours_endormi.png differ diff --git a/frontend/lib/widgets/quotidien/cartes_feed.dart b/frontend/lib/widgets/quotidien/cartes_feed.dart index 0573d34..02ec780 100644 --- a/frontend/lib/widgets/quotidien/cartes_feed.dart +++ b/frontend/lib/widgets/quotidien/cartes_feed.dart @@ -442,17 +442,7 @@ class _CartesFeedState extends State { ); } if (_items.isEmpty) { - return Center( - child: Text( - 'Aucune bulle pour le moment.\nLa file d’attention est vide — c’est normal.', - textAlign: TextAlign.center, - style: GoogleFonts.merriweather( - fontSize: 13, - color: QuotidienTheme.muted, - height: 1.4, - ), - ), - ); + return const _CartesEmptyState(); } return NotificationListener( @@ -1191,6 +1181,65 @@ class _RefuseDialogState extends State<_RefuseDialog> { } } +/// État vide de la file d'attention — ours endormi (#212). +class _CartesEmptyState extends StatelessWidget { + const _CartesEmptyState(); + + static const _asset = 'assets/images/ours_endormi.png'; + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, constraints) { + final maxW = constraints.maxWidth; + // ~160–200 px, réduit si colonne étroite. + final imgW = + maxW.isFinite ? maxW.clamp(100.0, 200.0) : 180.0; + return Center( + child: SingleChildScrollView( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: ConstrainedBox( + constraints: BoxConstraints(maxWidth: maxW), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Image.asset( + _asset, + width: imgW, + fit: BoxFit.contain, + filterQuality: FilterQuality.high, + semanticLabel: 'Ours endormi', + ), + const SizedBox(height: 12), + Text( + 'File d’attention au repos.', + textAlign: TextAlign.center, + style: GoogleFonts.merienda( + fontSize: 16, + fontWeight: FontWeight.w600, + color: QuotidienTheme.ink, + ), + ), + const SizedBox(height: 6), + Text( + 'Pas de bulle en attente — on respire.', + textAlign: TextAlign.center, + style: GoogleFonts.merriweather( + fontSize: 13, + color: QuotidienTheme.muted, + height: 1.4, + ), + ), + ], + ), + ), + ), + ); + }, + ); + } +} + /// CTA « Ajouter une carte » — pilule aquarelle en bas du feed (#175). class _AjouterCarteCta extends StatelessWidget { final VoidCallback onTap;