--- a/lib/main.dart	2026-11-24 10:34:07.740248569 +0100
+++ b/lib/main.dart	2026-11-24 10:34:07.745037124 +0100
@@ -257,7 +257,8 @@
   State<VikishopWebView> createState() => _VikishopWebViewState();
 }
 
-class _VikishopWebViewState extends State<VikishopWebView> {
+class _VikishopWebViewState extends State<VikishopWebView>
+    with WidgetsBindingObserver {
   late final WebViewController _controller;
   int _progress = 0;
   bool _hasError = false;
@@ -381,9 +382,89 @@
     } catch (_) {}
   }
 
+  bool _locationFlowRunning = false;
+
+  /// Android : la localisation est exigée dès l'ouverture de l'application.
+  /// Tant que l'autorisation n'est pas accordée (ou que la localisation du
+  /// téléphone est coupée), une fenêtre non fermable le rappelle : le bouton
+  /// redemande l'autorisation, ou ouvre les réglages quand Android n'affiche
+  /// plus sa fenêtre (refus définitif). Revérifié au retour dans l'application,
+  /// donc au retour des réglages.
+  Future<void> _ensureLocationPermission() async {
+    if (!Platform.isAndroid || _locationFlowRunning) return;
+    _locationFlowRunning = true;
+    try {
+      while (mounted) {
+        var permission = await Geolocator.checkPermission();
+        if (permission == LocationPermission.denied) {
+          permission = await Geolocator.requestPermission();
+        }
+        final granted =
+            permission == LocationPermission.whileInUse ||
+            permission == LocationPermission.always;
+        final serviceEnabled = await Geolocator.isLocationServiceEnabled();
+        if (granted && serviceEnabled) return;
+        if (!mounted) return;
+
+        final foreverDenied = permission == LocationPermission.deniedForever;
+        await showDialog<void>(
+          context: context,
+          barrierDismissible: false,
+          builder: (dialogContext) => PopScope(
+            canPop: false,
+            child: AlertDialog(
+              title: const Text('Localisation obligatoire'),
+              content: Text(
+                !granted
+                    ? 'Vikishop a besoin de votre position pour afficher les '
+                          'produits, plats et chauffeurs près de chez vous. '
+                          '${foreverDenied ? 'Autorisez la localisation dans les réglages.' : 'Veuillez autoriser la localisation.'}'
+                    : 'La localisation est désactivée sur votre téléphone. '
+                          'Activez-la pour utiliser Vikishop.',
+              ),
+              actions: [
+                TextButton(
+                  onPressed: () => Navigator.pop(dialogContext),
+                  child: Text(
+                    !granted && !foreverDenied
+                        ? 'Autoriser la localisation'
+                        : 'Ouvrir les réglages',
+                  ),
+                ),
+              ],
+            ),
+          ),
+        );
+
+        if (!granted && foreverDenied) {
+          await Geolocator.openAppSettings();
+          return; // revérifié au retour dans l'application
+        }
+        if (granted && !serviceEnabled) {
+          await Geolocator.openLocationSettings();
+          return;
+        }
+        // Refus simple : on reboucle, ce qui redemande l'autorisation.
+      }
+    } finally {
+      _locationFlowRunning = false;
+    }
+  }
+
+  @override
+  void didChangeAppLifecycleState(AppLifecycleState state) {
+    if (state == AppLifecycleState.resumed) {
+      _ensureLocationPermission();
+    }
+  }
+
   @override
   void initState() {
     super.initState();
+    WidgetsBinding.instance.addObserver(this);
+    WidgetsBinding.instance.addPostFrameCallback(
+      (_) => _ensureLocationPermission(),
+    );
     WidgetsBinding.instance.addPostFrameCallback(
       (_) => _askBatteryExemption(),
     );
@@ -501,6 +582,7 @@
 
   @override
   void dispose() {
+    WidgetsBinding.instance.removeObserver(this);
     _notificationTarget.removeListener(_openLocalNotificationTarget);
     _linkSubscription?.cancel();
     _ringTimer?.cancel();
