# ๐Ÿ“ฑ APPLICATION IOS/ANDROID โ€“ SPร‰CIFICATION UX/UI Dร‰TAILLร‰E **Document technique pour implรฉmentation โ€ข Version 1.0 โ€ข 25 avril 2026** --- ## ๐ŸŽฏ PRINCIPES FONDATEURS (GUIDING PRINCIPLES) > **Ces rรจgles priment sur toute dรฉcision d'implรฉmentation.** | # | Principe | Rรจgle stricte | |---|----------|---------------| | P1 | **2 taps max** | L'action scanner est accessible en โ‰ค 2 taps depuis n'importe quel รฉcran | | P2 | **Verdict immรฉdiat** | Aprรจs scan, le verdict de sรฉcuritรฉ s'affiche en < 500ms (perรงues) | | P3 | **Feu tricolore** | 3 couleurs sรฉmantiques max + neutres โ€“ jamais de bleu | | P4 | **Icรดnes + couleurs** | Aucune information critique ne repose uniquement sur la couleur | | P5 | **Guidage positif** | Pas de messages d'erreur bruts โ€“ toujours une action de repli proposรฉe | | P6 | **Mobile-first** | Conception pour une main, pouce accessible (zone de confort infรฉrieure) | --- ## ๐ŸŽจ DESIGN SYSTEM ### 2.1 Palette de couleurs ``` COULEURS Sร‰MANTIQUES (Systรจme feu tricolore) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐ŸŸข Vert sรฉcuritรฉ #2ECC71 โ†’ Produit compatible, OK famille ๐ŸŸ  Orange attention #E67E22 โ†’ Allergรจne dรฉtectรฉ, vigilance ๐Ÿ”ด Rouge danger #E74C3C โ†’ Allergรจne critique, interdit NEUTRES โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Fond principal #F5F5F0 โ†’ Gris chaud (rรฉduit la fatigue oculaire) Surface carte #FFFFFF โ†’ Blanc pur pour les cartes Texte principal #2D3436 โ†’ Noir doux (pas #000, trop agressif) Texte secondaire #636E72 โ†’ Gris moyen Sรฉparateurs #DFE6E9 โ†’ Gris clair ร‰TATS โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Appui (pressed) Assombrir de 15% la couleur de base Dรฉsactivรฉ Opacitรฉ 40% + grisรฉ Focus (accessibilitรฉ) Anneau #2ECC71 de 2px (offset 2px) ``` ### 2.2 Typographie ```yaml platform_android: font_family: "Google Sans" # ou Inter en fallback scale: display: {size: 28sp, weight: 700, line_height: 36sp, usage: "Titre รฉcran"} headline: {size: 22sp, weight: 600, line_height: 28sp, usage: "Titre section"} body: {size: 16sp, weight: 400, line_height: 24sp, usage: "Texte principal"} caption: {size: 13sp, weight: 400, line_height: 18sp, usage: "Lรฉgende, mรฉta"} button: {size: 15sp, weight: 600, line_height: 20sp, usage: "CTA, boutons"} platform_ios: font_family: "SF Pro" # Mรชmes รฉchelles, adaptรฉes en pt ``` ### 2.3 Iconographie ```yaml system_icons: โœ… sรฉcuritรฉ_ok: "checkmark.shield.fill" # Vert - Produit sรปr โš ๏ธ vigilance: "exclamationmark.shield.fill" # Orange - Attention โŒ danger: "xmark.shield.fill" # Rouge - Interdit ๐Ÿ“ท scanner: "camera.viewfinder" # Action principale ๐Ÿ“‹ listes: "list.clipboard" # Onglet listes ๐Ÿ“Š suivi: "chart.bar.fill" # Onglet suivi ๐Ÿ‘ค profil: "person.circle" # Onglet famille/profil icon_principles: - Toujours accompagner la couleur d'une forme distincte - Formes : cercle (OK), triangle (โš ๏ธ), losange (โŒ) - Taille minimale des zones tactiles : 48x48dp (WCAG) ``` ### 2.4 ร‰lรฉvation & Ombres (Android) ```css /* Carte standard */ .card { elevation: 2dp; /* Ombre: 0 1px 3px rgba(0,0,0,0.08) */ } /* Bouton flottant (FAB) */ .fab { elevation: 6dp; /* Ombre: 0 3px 8px rgba(0,0,0,0.16) */ } /* Bottom sheet */ .bottom-sheet { elevation: 16dp; /* Ombre: 0 8px 24px rgba(0,0,0,0.20) */ } ``` --- ## ๐Ÿ—๏ธ ARCHITECTURE DE NAVIGATION ### 3.1 Structure globale ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ APPLICATION โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Scanner โ”‚ โ”‚ Listes โ”‚ โ”‚ Suivi โ”‚ โ”‚Familleโ”‚ โ”‚ โ”‚ โ”‚ ๐Ÿ“ท โ”‚ โ”‚ ๐Ÿ“‹ โ”‚ โ”‚ ๐Ÿ“Š โ”‚ โ”‚ ๐Ÿ‘ค โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ–ฒ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” <-- Bouton flottant central โ”‚ โ”‚ โ”‚ SCANNER โ”‚ (FAB, 56dp, toujours visible)โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ Sauf pendant le scan lui-mรชmeโ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ Navigation: BottomNavigationView (4 items) FAB: FloatingActionButton centrรฉ, lรฉgรจrement au-dessus de la barre ``` ### 3.2 Bottom Navigation Bar โ€“ Spรฉcification ```kotlin // Spรฉcification technique BottomNavigation data class BottomNavItem( val id: String, val icon: ImageVector, // Icรดne remplie (selected) / outline (unselected) val label: String, val contentDescription: String // Obligatoire pour TalkBack ) val bottomNavItems = listOf( BottomNavItem("scanner", Icons.Filled.Camera, "Scanner", "Scanner un produit"), BottomNavItem("listes", Icons.Filled.List, "Listes", "Mes listes de courses"), BottomNavItem("suivi", Icons.Filled.Chart, "Suivi", "Statistiques et historique"), BottomNavItem("famille", Icons.Filled.Person, "Famille", "Profils et rรฉglages") ) // ร‰tat visuel // Selected : icon color = #2D3436 (noir doux), label visible, indicator top // Unselected : icon color = #B2BEC3, label visible // Badge : point rouge 8dp si notification non lue ``` ### 3.3 FAB (Floating Action Button) โ€“ Spรฉcification ```yaml fab: size: 56dp # Standard Material Design icon: ๐Ÿ“ท camera_viewfinder (24dp) color: "#2D3436" # Noir doux โ€“ contraste avec le fond icon_color: "#FFFFFF" elevation: 6dp position: horizontal: center # Centrรฉ horizontalement vertical_offset: -28dp # Chevauchant la bottom bar behavior: - Visible sur tous les onglets SAUF pendant le scan actif - Disparition: scale_down + fade_out (200ms) - Apparition: scale_up + fade_in (200ms) - Haptique lรฉgรจre (15ms) au tap accessibility: label: "Scanner un produit" hint: "Appuyez deux fois pour ouvrir le scanner" ``` --- ## ๐Ÿ“ฑ FLUX UTILISATEUR Dร‰TAILLร‰S ### FLOW 1 : Premier lancement (Onboarding) ``` [ร‰CRAN 1] โ€”โ”€โ”€โ”€โ”€โ€”โ€” "Bienvenue !" โ€”โ”€โ”€โ”€โ”€โ€”โ€” [ร‰CRAN 2] "Qui รชtes-vous ?" "Des allergies ?" โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Logo โ”‚ โ”‚ Grille photos โ”‚ โ”‚ โ”‚ โ”‚ (pas de texte) โ”‚ โ”‚ "Votre prรฉnom" โ”‚ โ”‚ โ”‚ โ”‚ [Input text] โ”‚ โ”‚ [๐Ÿฅœ] [๐Ÿฅ›] [๐Ÿž] โ”‚ โ”‚ โ”‚ โ”‚ [๐Ÿฆ] [๐Ÿฅš] [๐ŸŸ] โ”‚ โ”‚ [Continuer โ†’] โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ [Continuer โ†’] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ–ผ โ–ผ [ร‰CRAN 3] โ€”โ”€โ”€โ”€โ”€โ€”โ€” "Un objectif ?" โ€”โ”€โ”€โ”€โ”€โ€”โ€” [ร‰CRAN 4] "Scannez !" โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Animation โ”‚ โ”‚ โ—‹ Mieux manger โ”‚ โ”‚ scanner qui โ”‚ โ”‚ โ—‹ ร‰viter additifsโ”‚ โ”‚ pulse โ”‚ โ”‚ โ—‹ Sans importanceโ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ Pointez l'appareilโ”‚ โ”‚ [Ignorer] [OK] โ”‚ โ”‚ vers un code- โ”‚ โ”‚ โ”‚ โ”‚ barres โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ [Commencer] โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ–ผ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ–ผ [DASHBOARD] ``` **Rรจgles onboarding :** - Maximum 4 รฉcrans, 60 secondes cumulรฉes - Progression : indicateur en haut (4 points) - Skip possible ร  chaque รฉtape (sauf รฉcran 4 : CTA seul) - Pas de permissions demandรฉes avant le scan effectif - Stockage local uniquement (pas de compte obligatoire) --- ### FLOW 2 : Scan produit (Parcours principal โ€“ 80% des usages) ```yaml flow_scan_complete: # โ”€โ”€ ร‰TAPE 1 : Activation scanner โ”€โ”€ step_1_open: trigger: "Tap sur FAB OU tap sur onglet Scanner" animation: "Expansion depuis le centre (Material ContainerTransform)" duration: 300ms state: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Zone de scan (70% รฉcran) โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ [reticule] โ”‚ โ”‚ Camera preview โ”‚ โ”‚ โ”‚ โ”‚ + overlay rรฉticule โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ "Placez le code-barres โ”‚ โ”‚ dans le cadre" โ”‚ โ”‚ โ”‚ โ”‚ โšก Dรฉtection auto โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ [Saisie manuelle] [๐Ÿ’ก] โ”‚ Bottom bar locale โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ permissions: camera: rationale: "Pour scanner les codes-barres" on_denied: "Saisie manuelle proposรฉe" on_permanently_denied: "Lien vers Rรฉglages + saisie manuelle" # โ”€โ”€ ร‰TAPE 2 : Dรฉtection et analyse โ”€โ”€ step_2_processing: trigger: "Code-barres ou OCR dรฉtectรฉ automatiquement" duration_max: 500ms # Perรงues states: detection: haptique: "Vibration lรฉgรจre 15ms" son: "Dรฉclic discret (optionnel, dรฉsactivรฉ par dรฉfaut)" animation: | Le rรฉticule pulse briรจvement (scale 1.0 โ†’ 1.05 โ†’ 1.0, 200ms) Puis transition vers l'รฉcran rรฉsultat loading: type: "SKELETON SCREEN (jamais de spinner)" layout_skeleton: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ (nom) โ”‚ โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ (marque) โ”‚ โ”‚ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ (verdict) โ”‚ Background colorรฉ โ”‚ โ”‚ โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ”‚ โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ animation: "Shimmer wave, gauche โ†’ droite, 1.5s loop" timeout: after_3s: "Afficher 'Analyse en cours...' + option annuler" after_8s: "โ†’ FLOW 7 (Gestion d'erreur)" # โ”€โ”€ ร‰TAPE 3 : Verdict immรฉdiat โ”€โ”€ step_3_verdict: transition: "Slide up from bottom, 250ms, ease-out" layout: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ† Retour scan โ‹ฎ Options โ”‚ Top bar โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โ”‚ โ”‚ [Image produit] โ”‚ โ”‚ (120dp, coins ronds) โ”‚ โ”‚ โ”‚ โ”‚ Biscuit Choco Lait โ”‚ โ”‚ Marque X โ€“ 200g โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ โœ… OK pour toute la โ”‚ โ”‚ โ† Verdict banner โ”‚ โ”‚ famille โ”‚ โ”‚ Fond vert #2ECC71 โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ Icรดne cercle blanc โ”‚ โ”‚ โ”‚ [โ†’ Voir dรฉtails] โ”‚ โ”‚ [โ†’ Alternatives] โ”‚ โ”‚ [โ†’ Ajouter ร  la liste] โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ verdict_variants: ok: | โœ… "OK pour toute la famille" Fond: #E8F8F5 (vert trรจs clair) Icรดne: checkmark.shield.fill, #2ECC71 warning: | โš ๏ธ "Contient : NOISETTES" "โš ๏ธ Attention pour Julie" Fond: #FEF5E7 (orange trรจs clair) Icรดne: exclamationmark.shield.fill, #E67E22 Allergรจne affichรฉ en bold, #E67E22 danger: | โŒ "Contient : ARACHIDES" "โŒ Interdit pour Julie (anaphylaxie)" Fond: #FDEDEC (rouge trรจs clair) Icรดne: xmark.shield.fill, #E74C3C Allergรจne affichรฉ en bold, #E74C3C + Message explicite : "Ne pas consommer" actions_disponibles: - {id: "details", label: "Voir dรฉtails", icon: "info.circle", priority: primary} - {id: "alternatives", label: "Voir alternatives", icon: "arrow.triangle.swap", priority: secondary} - {id: "add_list", label: "Ajouter ร  une liste", icon: "plus.circle", priority: secondary} - {id: "scan_again", label: "Scanner un autre produit", icon: "camera", priority: tertiary} accessibility: verdict_announcement: "Verdict : {status}. {details}. Actions disponibles : voir dรฉtails, voir alternatives, ajouter ร  la liste." # Ex: "Verdict : Attention pour Julie. Contient noisettes. Actions disponibles : ..." ``` --- ### FLOW 3 : Fiche produit dรฉtaillรฉe ```yaml flow_product_details: trigger: "Tap 'Voir dรฉtails' depuis le verdict OU depuis l'historique" transition: "Slide up (Bottom Sheet) โ†’ Plein รฉcran au scroll" structure_tabs: - id: "resume" label: "Rรฉsumรฉ" icon: "list.bullet" content: | - Verdict sรฉcuritรฉ (rรฉpรฉtรฉ en haut) - Nutri-Score visuel (A ร  E, grandes pastilles colorรฉes) - Calories / 100g - Taux de sucre, sel, gras (jauges visuelles horizontales) - id: "allergenes" label: "Allergรจnes" icon: "exclamationmark.shield" content: | - Liste des 14 allergรจnes rรฉglementaires - Chaque allergรจne : โ†’ Prรฉsent โŒ / Traces โš ๏ธ / Absent โœ… - Les allergรจnes de la famille sont mis en avant (highlight #FEF5E7) - id: "additifs" label: "Additifs" icon: "flask" content: | - Liste des additifs avec code E - Barรจme couleur : Vert (naturel) / Orange (discutable) / Rouge (รฉviter) - Description courte de chaque additif - Lien "En savoir plus" โ†’ WebView interne - id: "alternatives" label: "Alternatives" icon: "arrow.triangle.swap" priority: "high" # Affichรฉ si verdict != OK content: | - Carousel horizontal de produits alternatifs - Critรจre : mรชme catรฉgorie, sans l'allergรจne dรฉtectรฉ - Chaque carte : photo, nom, verdict mini (couleur fond) - Tap โ†’ Verdict du produit alternatif ``` --- ### FLOW 4 : Dashboard contextuel ```yaml flow_dashboard: # Le dashboard n'est plus un onglet mais un overlay intelligent # accessible depuis l'onglet "Scanner" (รฉcran principal) states: store_mode: | # Dรฉtectรฉ via gรฉolocalisation ou heure (8h-20h en semaine) โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐Ÿ›’ Vous รชtes en magasin ? โ”‚ โ”‚ โ”‚ โ”‚ [Scanner rapide] โ† Large โ”‚ โ”‚ โ”‚ โ”‚ Votre liste en cours : โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ ๐Ÿฅ› Lait demi-รฉcrรฉmรฉ โ”‚ โ”‚ โ”‚ โ”‚ ๐Ÿž Pain complet โ”‚ โ”‚ โ”‚ โ”‚ ๐ŸŽ Pommes x6 โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ "3 produits restants" โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ home_mode: | # Soirรฉe / weekend โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐Ÿ‘‹ Bonjour, Sophie โ”‚ โ”‚ โ”‚ โ”‚ ๐Ÿ“Š Cette semaine : โ”‚ โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘ 78% produits OK โ”‚ โ”‚ โ”‚ โ”‚ ๐Ÿ” Derniers scans : โ”‚ โ”‚ โœ… Biscuit Choco โ”‚ โ”‚ โš ๏ธ Sauce Curry โ”‚ โ”‚ โ”‚ โ”‚ [Scanner] [Mes listes] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ first_time: | # Dashboard vide, guidรฉ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐ŸŽ‰ Prรชt ร  commencer ! โ”‚ โ”‚ โ”‚ โ”‚ ๐Ÿ“ท Scannez votre premier โ”‚ โ”‚ produit โ”‚ โ”‚ โ”‚ โ”‚ [Commencer โ†’] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` --- ### FLOW 5 : Listes intelligentes ```yaml flow_lists: trigger: "Onglet ๐Ÿ“‹ Listes" default_view: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Listes + Nouvelle โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ ๐Ÿ›’ Courses semaine โ”‚ โ”‚ โ”‚ โ”‚ 8 produits โ€ข 3 achetรฉs โ”‚ โ”‚ โ”‚ โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘ 37% โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ ๐ŸŽ‰ Anniv Lucas โ”‚ โ”‚ โ”‚ โ”‚ 12 produits โ€ข 0 achetรฉ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ list_detail: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ† Courses semaine โ‹ฎ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ ๐Ÿ” Filtrer par rayon โ”‚ โ† Chips horizontaux โ”‚ [Tous] [Frais] [ร‰picerie] โ”‚ โ”‚ โ”‚ โ”‚ โ˜ Lait demi-รฉcrรฉmรฉ โœ… โ”‚ โ”‚ โ˜ Pain complet โš ๏ธ โ”‚ โ†’ Attention allergies โ”‚ โ˜‘ Pommes x6 โœ… โ”‚ โ†’ Cochรฉ = achetรฉ โ”‚ โ˜ Yaourt nature โœ… โ”‚ โ”‚ โ˜ Sauce tomate โŒ โ”‚ โ†’ Interdit (allergรจne) โ”‚ โ”‚ โ”‚ [Tout dรฉcocher] [Partager] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ swipe_actions: swipe_right: "Cocher/dรฉcocher (achetรฉ)" swipe_left: "Supprimer de la liste (avec undo 5s)" smart_features: auto_categorize: "Dรฉtection rayon automatique (frais, รฉpicerie, etc.)" allergy_alert: "Icรดne โš ๏ธ/โŒ visible directement sur la ligne" merge_lists: "Fusion de plusieurs listes en une" share: "Partage via lien ou PDF (sms, email, etc.)" ``` --- ### FLOW 6 : Suivi & Historique ```yaml flow_tracking: trigger: "Onglet ๐Ÿ“Š Suivi" layout: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Suivi Pรฉriode โ–ผโ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ 78% produits OK โ”‚ โ”‚ โ† Cercle de progression โ”‚ โ”‚ cette semaine โ”‚ โ”‚ (donut chart) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ ๐Ÿ“ˆ ร‰volution (graphique) โ”‚ โ”‚ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ โ”‚ โ† Sparkline ou mini graph โ”‚ โ”‚ โ”‚ ๐Ÿท๏ธ Top allergรจnes dรฉtectรฉs โ”‚ โ”‚ ๐Ÿฅœ Noisettes : 4 fois โ”‚ โ”‚ ๐Ÿฅ› Lactose : 2 fois โ”‚ โ”‚ โ”‚ โ”‚ ๐Ÿ“‹ Historique rรฉcent โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ โœ… Biscuit Choco โ”‚ โ”‚ โ”‚ โ”‚ Il y a 2h โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โ”‚ โ”‚ โš ๏ธ Sauce Curry โ”‚ โ”‚ โ”‚ โ”‚ Hier โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ time_filters: - {id: "week", label: "Cette semaine"} - {id: "month", label: "Ce mois"} - {id: "year", label: "Cette annรฉe"} - {id: "all", label: "Tout"} empty_state: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐Ÿ“Š โ”‚ โ”‚ Aucune statistique โ”‚ โ”‚ Scannez vos premiers โ”‚ โ”‚ produits ! โ”‚ โ”‚ โ”‚ โ”‚ [Scanner โ†’] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` --- ### FLOW 7 : Gestion des erreurs & cas limites ```yaml flow_errors: # โ”€โ”€ CAS 1 : Produit non trouvรฉ en base โ”€โ”€ product_not_found: trigger: "Code-barres scannรฉ, mais absent de la base" layout: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐Ÿ“ท โ”‚ โ”‚ โ”‚ โ”‚ "Produit non reconnu" โ”‚ โ”‚ โ”‚ โ”‚ "Photographiez l'รฉtiquette โ”‚ โ”‚ pour nous aider ร  โ”‚ โ”‚ l'identifier" โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ [Zone photo รฉtiquette]โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ [Prendre une photo] โ”‚ โ”‚ [Saisie manuelle] โ”‚ โ”‚ [Annuler] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ actions: photo_label: camera: "Prendre photo รฉtiquette (ingrรฉdients)" crop_guide: "Cadrez la liste d'ingrรฉdients" on_success: "Merci ! Nous analysons votre photo. Le produit sera ajoutรฉ sous 24h." manual_entry: fields: ["Nom produit", "Marque", "Code-barres (prรฉ-rempli)"] on_submit: "Produit enregistrรฉ localement. Analyse basique des ingrรฉdients si fournis." # โ”€โ”€ CAS 2 : Pas de connexion โ”€โ”€ no_connection: detection: "Vรฉrification avant chaque scan" behavior: | Mode dรฉgradรฉ transparent : - Scan fonctionne avec base locale (produits dรฉjร  scannรฉs) - Nouveau produit : message "Connexion requise pour les nouveaux produits" - Listes : synchronisation diffรฉrรฉe - Pas de popup bloquante, un bandeau discret en haut banner: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐Ÿ“ก Mode hors-ligne โ”‚ โ† Bandeau 40dp, fond #FEF5E7 โ”‚ Produits dรฉjร  scannรฉs dispo. โ”‚ Non bloquant โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ # โ”€โ”€ CAS 3 : OCR illisible โ”€โ”€ ocr_unreadable: trigger: "L'OCR n'a pas pu lire les ingrรฉdients sur la photo" layout: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐Ÿ’ก โ”‚ โ”‚ โ”‚ โ”‚ "L'image est trop floue" โ”‚ โ”‚ โ”‚ โ”‚ "Essayez avec plus de โ”‚ โ”‚ lumiรจre ou rapprochez-vous โ”‚ โ”‚ de l'รฉtiquette" โ”‚ โ”‚ โ”‚ โ”‚ [Rรฉessayer] โ”‚ โ”‚ [Saisie manuelle] โ”‚ โ”‚ [Ignorer] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ tips_displayed: - "Placez le produit sur une surface plane" - "ร‰vitez les reflets" - "Utilisez le flash si nรฉcessaire" # โ”€โ”€ CAS 4 : Permissions refusรฉes โ”€โ”€ permission_denied: camera: rationale_dialog: | Titre: "Accรจs ร  l'appareil photo" Message: "L'appareil photo est nรฉcessaire pour scanner les codes-barres." Boutons: [Aller aux Rรฉglages] [Pas maintenant] fallback: "Saisie manuelle du code-barres toujours disponible" notification: rationale: | Titre: "Notifications de sรฉcuritรฉ" Message: "Recevez les alertes uniquement en cas d'allergรจne critique dรฉtectรฉ." Boutons: [Activer] [Plus tard] behavior: "Fonctionnalitรฉs non-bloquantes sans notification" ``` --- ### FLOW 8 : Profils famille ```yaml flow_family: trigger: "Onglet ๐Ÿ‘ค Famille" layout: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Ma famille โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ ๐Ÿ‘ฉ Sophie (moi) โ”‚ โ”‚ โ† Profil principal โ”‚ โ”‚ Allergies: - โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ ๐Ÿ‘ง Julie, 7 ans โ”‚ โ”‚ โ”‚ โ”‚ โš ๏ธ Noisettes, arachidesโ”‚ โ”‚ โ”‚ โ”‚ โŒ Anaphylaxie arachideโ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ ๐Ÿ‘ฆ Lucas, 10 ans โ”‚ โ”‚ โ”‚ โ”‚ โš ๏ธ Lactose โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ [+ Ajouter un membre] โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ profile_detail: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ† Julie โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Photo [๐Ÿ“ท] โ”‚ โ”‚ Prรฉnom [Julie] โ”‚ โ”‚ ร‚ge [7] โ”‚ โ”‚ โ”‚ โ”‚ ALLERGIES โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ ๐Ÿฅœ Noisettes [โš ๏ธ] โ”‚ โ”‚ โ† Niveau : traces (โš ๏ธ) โ”‚ โ”‚ ๐Ÿฅœ Arachides [โŒ] โ”‚ โ”‚ ou critique (โŒ) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ [+ Ajouter une allergie] โ”‚ โ”‚ โ”‚ โ”‚ ALERTES โ”‚ โ”‚ โ˜‘ Alerte critique (anaphyl.)โ”‚ โ”‚ โ˜ Alerte traces โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ allergen_selection: | # Sรฉlecteur visuel (pas de liste texte) Grille 3x5 de : โ”Œโ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ” โ”‚๐Ÿฅœโ”‚ โ”‚๐Ÿฅ›โ”‚ โ”‚๐Ÿžโ”‚ โ””โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”˜ โ”Œโ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ” โ”‚๐Ÿฆโ”‚ โ”‚๐Ÿฅšโ”‚ โ”‚๐ŸŸโ”‚ โ””โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”˜ ... Tap once: sรฉlectionne (โš ๏ธ traces/intolรฉrance) Tap again: critique (โŒ allergie sรฉvรจre) Tap third: dรฉsรฉlectionne Couleur fond change selon sรฉlection (โš ๏ธ #FEF5E7, โŒ #FDEDEC) ``` --- ### FLOW 9 : Notifications ```yaml flow_notifications: # Rรจgle : seules les notifications de Sร‰CURITร‰ sont push # Tout le reste est in-app uniquement push_notifications: security_alert: trigger: "Allergรจne critique dรฉtectรฉ pour un membre de la famille" title: "โš ๏ธ Attention : {allergรจne} dรฉtectรฉ" body: "{nom_produit} contient {allergรจne}. Interdit pour {membre}." tap_action: "Ouvre la fiche produit avec le verdict danger" new_alternative: trigger: "Nouveau produit alternatif disponible" title: "๐Ÿ’ก Alternative trouvรฉe" body: "Un produit similaire sans {allergรจne} est disponible." frequency: "Max 1/semaine" user_control: "Dรฉsactivable dans Rรฉglages" in_app_notifications: types: - "Rappel liste de courses (si produits restants)" - "Rรฉsumรฉ hebdomadaire (chaque lundi matin)" - "Nouvelle fonctionnalitรฉ" display: "Centre de notifications intรฉgrรฉ (cloche dans top bar)" ``` --- ## โšก PERFORMANCE & ANIMATIONS ### 5.1 Spรฉcifications de performance perรงue | Mรฉtrique | Cible | Mรฉthode | |----------|-------|---------| | Temps d'ouverture scanner | < 300ms | Prรฉ-initialiser la camรฉra en arriรจre-plan | | Affichage rรฉsultat scan | < 500ms | Skeleton screen immรฉdiat, donnรฉes async | | Transition entre รฉcrans | 200-300ms | Courbes ease-out, jamais > 400ms | | Scroll FPS | 60fps constants | RecyclerView + pagination | | Taille APK | < 25 Mo | Optimisation ressources, ProGuard | ### 5.2 Animations standardisรฉes ```yaml animations: screen_transition: push: "Slide from right, 250ms, decelerate" pop: "Slide to right, 200ms, accelerate" fab_morph: to_scanner: "ContainerTransform (Material), 300ms" scan_success: reticule_pulse: "scale 1.0 โ†’ 1.08 โ†’ 1.0, 200ms, ease-in-out" haptic: "Vibration 15ms, lรฉgรจre" verdict_appear: type: "Slide up + fade in" duration: 250ms stagger: "Contenu principal 0ms, actions +50ms chaque" list_check: type: "Strikethrough animรฉ + scale down + coche apparition" duration: 300ms skeleton: type: "Shimmer gradient animรฉ" gradient: "transparent โ†’ rgba(255,255,255,0.4) โ†’ transparent" duration: "1.5s, boucle infinie" ``` ### 5.3 Transitions partagรฉes (Shared Elements) ```yaml shared_elements: product_card_to_detail: elements: - product_image: "Corner radius animรฉ (8dp โ†’ 16dp)" - product_name: "Position et taille animรฉes" duration: 300ms interpolator: "FastOutSlowIn (Material standard)" ``` --- ## โ™ฟ ACCESSIBILITร‰ (OBLIGATOIRE) ### 6.1 Checklist WCAG 2.1 AA ```yaml accessibility_checklist: contrast: text_normal: "Ratio โ‰ฅ 4.5:1" text_large: "Ratio โ‰ฅ 3:1" ui_components: "Ratio โ‰ฅ 3:1" # Validation : test avec Accessibility Scanner (Android) color_blindness: deuteranopia: "Vert โ†’ Orange OK" # Distinction testรฉe protanopia: "Vert โ†’ Orange OK" tritanopia: "Rare, mais testรฉ" # Rรจgle : icรดnes + formes + couleurs, jamais couleur seule touch_targets: min_size: "48dp x 48dp" # Obligatoire min_spacing: "8dp entre zones tactiles" screen_reader: talkback: - "Tout รฉlรฉment interactif a un contentDescription" - "Les images dรฉcoratives ont contentDescription = null" - "Les changements d'รฉtat sont annoncรฉs (verdict, chargement)" - "Ordre de focus logique (gaucheโ†’droite, hautโ†’bas)" announcements: scan_complete: "Produit scannรฉ. {nom_produit}. {verdict}." verdict_change: "Attention : verdict modifiรฉ. {nouveau_verdict}." loading: "Analyse en cours, veuillez patienter." dynamic_text: scale: "Jusqu'ร  200% sans perte de contenu" implementation: "sp (Android) / Dynamic Type (iOS)" testing: "Testรฉ avec la plus grande taille systรจme" keyboard_navigation: android: "DPad et clavier externe Bluetooth" focus_indicators: "Visibles (anneau #2ECC71, 2dp)" ``` ### 6.2 Icรดnes & formes (Systรจme daltonien) ``` VERT (#2ECC71) ORANGE (#E67E22) ROUGE (#E74C3C) โ”€โ”€โ”€โ”€โ”€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”€โ”€โ”€โ”€โ”€โ”€ [CERCLE] [TRIANGLE] [LOSANGE] โœ… checkmark โš ๏ธ exclamation โŒ croix Jamais l'un sans l'autre : forme + couleur + icรดne. ``` --- ## ๐Ÿ“ GRILLE & LAYOUT ### 7.1 Systรจme de grille ```yaml grid_system: type: "Grille 4 colonnes (mobile)" margins: "16dp gauche/droite" gutter: "12dp entre colonnes" responsive: phone_portrait: "4 colonnes, margins 16dp" phone_landscape: "6 colonnes, margins 24dp" tablet: "8 colonnes, margins 32dp, max-width 840dp" ``` ### 7.2 Composants standardisรฉs ```yaml components: product_card_compact: height: 88dp layout: | โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ [IMG] Nom produit โ”‚ โ”‚ 48dp Marque โ€ข Poids โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ โœ… โ”‚ โ† Verdict โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ miniatureโ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ verdict_banner: height: 56dp padding: 16dp horizontal, 12dp vertical radius: 12dp icon_size: 24dp background: "Dรฉpend du verdict (voir couleur de fond)" action_button: height: 48dp radius: 12dp padding: 16dp horizontal text: "Button style (15sp, weight 600)" variants: primary: "Fond #2D3436, texte blanc" secondary: "Fond transparent, bordure #DFE6E9, texte #2D3436" danger: "Fond #E74C3C, texte blanc" chip_filter: height: 32dp radius: 16dp (pill) padding: 8dp horizontal selected: "Fond #2D3436, texte blanc" unselected: "Fond #F5F5F0, texte #636E72" input_field: height: 56dp radius: 12dp background: "#FFFFFF" border: "1dp #DFE6E9" focus_border: "2dp #2ECC71" label: "caption style, animรฉ vers le haut au focus" ``` --- ## ๐Ÿ—„๏ธ SPร‰CIFICATIONS TECHNIQUES ### 8.1 Architecture recommandรฉe ```yaml architecture: pattern: "MVVM + Clean Architecture" layers: presentation: - "Jetpack Compose (Android) / SwiftUI (iOS)" - "ViewModel par รฉcran" - "StateFlow / @Published pour รฉtat UI" domain: - "UseCases (ScanProductUseCase, GetAlternativesUseCase...)" - "Modรจles mรฉtier (Product, Allergen, FamilyMember...)" data: - "Repository pattern" - "Room (base locale) pour historique et listes" - "Retrofit (API distante) pour base produits" - "DataStore pour prรฉfรฉrences utilisateur" key_dependencies: android: camera: "CameraX (Google officiel)" barcode: "ML Kit Barcode Scanning (Google)" ocr: "ML Kit Text Recognition" navigation: "Compose Navigation" di: "Hilt" ios: camera: "AVFoundation" barcode: "Vision Framework" ocr: "Vision Framework" navigation: "NavigationStack" ``` ### 8.2 Flux de donnรฉes โ€“ Scan ```kotlin // Flux simplifiรฉ pour le scan sealed class ScanUiState { object Idle : ScanUiState() data class CameraReady(val isPermissionGranted: Boolean) : ScanUiState() data class Scanning(val analyzedFrames: Int) : ScanUiState() object Analyzing : ScanUiState() // โ†’ Skeleton screen data class Verdict(val product: Product, val verdict: VerdictType) : ScanUiState() data class Error(val errorType: ScanError, val recoveryAction: RecoveryAction) : ScanUiState() } enum class VerdictType { SAFE, // โœ… OK famille WARNING, // โš ๏ธ Allergรจne traces/intolรฉrance DANGER // โŒ Allergรจne critique } ``` --- ## ๐Ÿงช TESTS UX (Checklist validation) ```yaml validation_checklist: user_testing: - "5 utilisateurs, scenario 'scanner un produit dangereux'" - "Mesurer : temps pour comprendre le verdict" - "Objectif : < 2 secondes pour identifier le danger" - "Test daltonien : 1 utilisateur daltonien minimum" edge_cases: - "Scan rapide de 10 produits d'affilรฉe" - "Rotation รฉcran pendant le scan" - "Appel tรฉlรฉphonique interrompt le scan" - "Batterie faible (mode รฉconomie d'รฉnergie)" - "Stockage presque plein" accessibility_audit: - "Test avec TalkBack activรฉ, parcours complet" - "Test avec taille de texte maximale" - "Contraste vรฉrifiรฉ avec Accessibility Scanner" ``` --- ## ๐Ÿ“‹ Dร‰VELOPPEMENT V1 โ€“ Scope minimal ```yaml v1_mvp_scope: must_have: - module: "Scanner code-barres + verdict immรฉdiat" - module: "4 onglets navigation" - module: "Profils famille (multi-membres avec allergies)" - module: "Listes de courses basiques" - module: "Systรจme de couleurs feu tricolore complet" - module: "Accessibilitรฉ de base (contraste + TalkBack)" nice_to_have_v1: - module: "OCR ingrรฉdients sur photo" - module: "Dashboard contextuel (heure/lieu)" - module: "Alternatives intelligentes" - module: "Suivi statistiques" v2_planned: - "Partage liste en temps rรฉel (collaboratif)" - "Scanner rayon (reconnaissance multiple)" - "Intรฉgration drive/click&collect" - "Badge / scoring produit personnalisรฉ" ``` --- ## ๐ŸŽจ FICHIERS ร€ PRODUIRE ``` assets/ โ”œโ”€โ”€ design_system/ โ”‚ โ”œโ”€โ”€ colors.xml / Colors.xcassets โ”‚ โ”œโ”€โ”€ typography.xml / Typography.swift โ”‚ โ”œโ”€โ”€ shapes.xml / Shapes.swift โ”‚ โ””โ”€โ”€ icons/ (SVG export 24dp, 48dp) โ”‚ โ”œโ”€โ”€ screens/ โ”‚ โ”œโ”€โ”€ onboarding_1_welcome.png โ”‚ โ”œโ”€โ”€ onboarding_2_allergies.png โ”‚ โ”œโ”€โ”€ onboarding_3_goal.png โ”‚ โ”œโ”€โ”€ onboarding_4_scan_tuto.png โ”‚ โ”œโ”€โ”€ scan_active.png โ”‚ โ”œโ”€โ”€ scan_skeleton.png โ”‚ โ”œโ”€โ”€ verdict_ok.png โ”‚ โ”œโ”€โ”€ verdict_warning.png โ”‚ โ”œโ”€โ”€ verdict_danger.png โ”‚ โ”œโ”€โ”€ product_detail.png โ”‚ โ”œโ”€โ”€ lists_empty.png โ”‚ โ”œโ”€โ”€ lists_detail.png โ”‚ โ”œโ”€โ”€ tracking.png โ”‚ โ”œโ”€โ”€ family_profiles.png โ”‚ โ””โ”€โ”€ family_member_detail.png โ”‚ โ”œโ”€โ”€ components/ โ”‚ โ”œโ”€โ”€ fab_spec.png โ”‚ โ”œโ”€โ”€ bottom_nav_spec.png โ”‚ โ”œโ”€โ”€ verdict_banner_variants.png โ”‚ โ”œโ”€โ”€ product_card_compact.png โ”‚ โ””โ”€โ”€ error_states_all.png โ”‚ โ””โ”€โ”€ flows/ โ”œโ”€โ”€ flow_scan_complete.pdf โ”œโ”€โ”€ flow_onboarding.pdf โ””โ”€โ”€ flow_error_handling.pdf ``` --- **Ce document constitue la spรฉcification UX/UI de rรฉfรฉrence. Toute ambiguรฏtรฉ doit รชtre remontรฉe avant implรฉmentation. Les principes fondateurs (section 1) prรฉvalent sur les dรฉtails d'implรฉmentation en cas de conflit.**