SDenzel commited on
Commit
1ac282b
·
verified ·
1 Parent(s): 67b1882

Tu es un assistant expert en développement web et architecture logicielle. Ta mission est de concevoir, analyser et générer étape par étape une application web complète appelée Agriconect. 🎯 Objectif principal : Créer une plateforme web qui permet l’inscription et la gestion des membres (utilisateurs, agriculteurs, coopératives, etc.), avec une base de données centralisée (Firebase ou MySQL). Cette plateforme devra être capable de : 1. Enregistrer des utilisateurs en ligne (formulaire d’inscription). 2. Permettre la gestion (lecture, modification, suppression des données). 3. Synchroniser avec une future application Android (prévoir l’API ou un backend réutilisable). 4. Être extensible à d’autres modules (ex. gestion des activités, communication, reporting). --- ### ⚙️ Étapes attendues dans ton raisonnement : 1. Analyse du projet - Présente les enjeux, le public cible et les fonctionnalités clés. - Propose les technologies adaptées (HTML, CSS, JavaScript, PHP, MySQL, ou Firebase). - Compare 2 à 3 architectures possibles et recommande la meilleure. Structure du projet Décris l’arborescence des fichiers, par exemple : Agriconect/ ├── index.html ├── assets/ │ ├── css/ │ │ └── style.css │ ├── js/ │ │ └── script.js │ └── images/ ├── includes/ │ ├── header.php │ ├── footer.php ├── config/ │ └── database.php ├── pages/ │ ├── register.php │ ├── login.php │ ├── dashboard.php └── api/ └── sync.php Contenu détaillé des fichiers Fournis le code complet de chaque fichier, avec commentaires clairs. Exemple : index.html → page d’accueil, formulaire de redirection vers login/register. style.css → design responsive (mobile friendly). script.js → gestion des interactions et validations. database.php → connexion MySQL avec PDO. register.php → formulaire d’inscription + insertion BD. login.php → authentification sécurisée avec hashage. dashboard.php → tableau de bord des membres. sync.php → API de synchronisation (pour l’app Android). Outils et librairies recommandées Bootstrap pour le design. Firebase (optionnel) ou MySQL. PHP pour le backend. JavaScript pour les validations côté client. Propositions complémentaires Sécurité (hashage mots de passe, vérification email). Extensibilité (prévoir déjà un module “événements” ou “activités”). Documentation (un README.md généré automatiquement). - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +952 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Agriconect
3
- emoji: 📈
4
- colorFrom: green
5
- colorTo: pink
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: agriconect
3
+ emoji: 🐳
4
+ colorFrom: yellow
5
+ colorTo: yellow
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,952 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="fr" class="scroll-smooth">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Agriconect - Plateforme Agricole Connectée</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .gradient-bg {
11
+ background: linear-gradient(135deg, #3b82f6 0%, #10b981 50%, #f59e0b 100%);
12
+ }
13
+ .dashboard-grid {
14
+ display: grid;
15
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
16
+ gap: 1.5rem;
17
+ }
18
+ .sidebar {
19
+ transition: all 0.3s ease;
20
+ }
21
+ @media (max-width: 768px) {
22
+ .sidebar {
23
+ transform: translateX(-100%);
24
+ position: absolute;
25
+ z-index: 50;
26
+ height: 100vh;
27
+ }
28
+ .sidebar.open {
29
+ transform: translateX(0);
30
+ }
31
+ }
32
+ .form-input:focus {
33
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
34
+ }
35
+ </style>
36
+ </head>
37
+ <body class="bg-gray-50 font-sans">
38
+ <!-- Navigation -->
39
+ <nav class="bg-white shadow-md">
40
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
41
+ <div class="flex justify-between h-16">
42
+ <div class="flex">
43
+ <div class="flex-shrink-0 flex items-center">
44
+ <i class="fas fa-leaf text-green-500 text-2xl mr-2"></i>
45
+ <span class="text-xl font-bold text-gray-800">Agriconect</span>
46
+ </div>
47
+ <div class="hidden sm:ml-6 sm:flex sm:space-x-8">
48
+ <a href="#" class="border-blue-500 text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium" id="home-link">
49
+ Accueil
50
+ </a>
51
+ <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium" id="about-link">
52
+ À propos
53
+ </a>
54
+ <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium" id="services-link">
55
+ Services
56
+ </a>
57
+ </div>
58
+ </div>
59
+ <div class="hidden sm:ml-6 sm:flex sm:items-center">
60
+ <button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium transition duration-150 ease-in-out" id="login-btn">
61
+ Connexion
62
+ </button>
63
+ <button class="ml-4 bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-md text-sm font-medium transition duration-150 ease-in-out" id="register-btn">
64
+ Inscription
65
+ </button>
66
+ </div>
67
+ <div class="-mr-2 flex items-center sm:hidden">
68
+ <button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500" id="mobile-menu-btn">
69
+ <span class="sr-only">Ouvrir le menu</span>
70
+ <i class="fas fa-bars text-xl"></i>
71
+ </button>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ <!-- Mobile menu -->
76
+ <div class="hidden sm:hidden bg-white shadow-lg rounded-b-lg" id="mobile-menu">
77
+ <div class="pt-2 pb-3 space-y-1">
78
+ <a href="#" class="bg-blue-50 border-blue-500 text-blue-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Accueil</a>
79
+ <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">À propos</a>
80
+ <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Services</a>
81
+ <div class="mt-4 pt-4 border-t border-gray-200">
82
+ <button class="w-full bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md text-base font-medium transition duration-150 ease-in-out">Connexion</button>
83
+ <button class="w-full mt-2 bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-md text-base font-medium transition duration-150 ease-in-out">Inscription</button>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ </nav>
88
+
89
+ <!-- Hero Section -->
90
+ <div class="gradient-bg">
91
+ <div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-8 lg:py-24">
92
+ <div class="lg:grid lg:grid-cols-2 lg:gap-8 items-center">
93
+ <div class="mb-8 lg:mb-0">
94
+ <h1 class="text-4xl font-extrabold tracking-tight text-white sm:text-5xl lg:text-6xl">
95
+ Connectez votre exploitation agricole
96
+ </h1>
97
+ <p class="mt-3 max-w-md mx-auto text-lg text-blue-100 sm:text-xl md:mt-5 md:max-w-3xl">
98
+ Agriconect simplifie la gestion de votre activité agricole, connecte les acteurs du secteur et optimise vos processus.
99
+ </p>
100
+ <div class="mt-8 sm:flex sm:justify-center lg:justify-start">
101
+ <div class="rounded-md shadow">
102
+ <button class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-blue-700 bg-white hover:bg-gray-50 md:py-4 md:text-lg md:px-10" id="hero-register-btn">
103
+ Commencez maintenant
104
+ </button>
105
+ </div>
106
+ <div class="mt-3 rounded-md shadow sm:mt-0 sm:ml-3">
107
+ <button class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-blue-600 bg-opacity-60 hover:bg-opacity-70 md:py-4 md:text-lg md:px-10" id="hero-learn-btn">
108
+ En savoir plus
109
+ </button>
110
+ </div>
111
+ </div>
112
+ </div>
113
+ <div class="relative">
114
+ <div class="relative rounded-lg shadow-xl overflow-hidden bg-white bg-opacity-10 backdrop-filter backdrop-blur-sm p-6">
115
+ <h3 class="text-lg font-medium text-white mb-4">Accédez à votre compte</h3>
116
+ <form class="space-y-4">
117
+ <div>
118
+ <label for="email" class="sr-only">Email</label>
119
+ <input id="email" name="email" type="email" autocomplete="email" required class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="Adresse email">
120
+ </div>
121
+ <div>
122
+ <label for="password" class="sr-only">Mot de passe</label>
123
+ <input id="password" name="password" type="password" autocomplete="current-password" required class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="Mot de passe">
124
+ </div>
125
+ <div class="flex items-center justify-between">
126
+ <div class="flex items-center">
127
+ <input id="remember-me" name="remember-me" type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
128
+ <label for="remember-me" class="ml-2 block text-sm text-white">
129
+ Se souvenir de moi
130
+ </label>
131
+ </div>
132
+ <div class="text-sm">
133
+ <a href="#" class="font-medium text-white hover:text-blue-200">
134
+ Mot de passe oublié?
135
+ </a>
136
+ </div>
137
+ </div>
138
+ <div>
139
+ <button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
140
+ Se connecter
141
+ </button>
142
+ </div>
143
+ </form>
144
+ <p class="mt-4 text-center text-sm text-white">
145
+ Nouveau sur Agriconect?{' '}
146
+ <a href="#" class="font-medium text-white hover:text-blue-200" id="hero-register-link">
147
+ Créez un compte
148
+ </a>
149
+ </p>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ </div>
155
+
156
+ <!-- Features Section -->
157
+ <div class="py-12 bg-white">
158
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
159
+ <div class="lg:text-center">
160
+ <h2 class="text-base text-blue-600 font-semibold tracking-wide uppercase">Fonctionnalités</h2>
161
+ <p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
162
+ Une meilleure façon de gérer votre exploitation
163
+ </p>
164
+ <p class="mt-4 max-w-2xl text-xl text-gray-500 lg:mx-auto">
165
+ Agriconect offre des outils puissants pour optimiser votre activité agricole.
166
+ </p>
167
+ </div>
168
+
169
+ <div class="mt-10">
170
+ <div class="dashboard-grid">
171
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
172
+ <div class="flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white mb-4">
173
+ <i class="fas fa-users text-xl"></i>
174
+ </div>
175
+ <h3 class="text-lg font-medium text-gray-900 mb-2">Gestion des membres</h3>
176
+ <p class="text-gray-500">
177
+ Gérez facilement les membres de votre coopérative ou exploitation avec des outils dédiés.
178
+ </p>
179
+ </div>
180
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
181
+ <div class="flex items-center justify-center h-12 w-12 rounded-md bg-green-500 text-white mb-4">
182
+ <i class="fas fa-chart-line text-xl"></i>
183
+ </div>
184
+ <h3 class="text-lg font-medium text-gray-900 mb-2">Analytique</h3>
185
+ <p class="text-gray-500">
186
+ Suivez vos performances avec des tableaux de bord et des rapports personnalisés.
187
+ </p>
188
+ </div>
189
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
190
+ <div class="flex items-center justify-center h-12 w-12 rounded-md bg-yellow-500 text-white mb-4">
191
+ <i class="fas fa-calendar-alt text-xl"></i>
192
+ </div>
193
+ <h3 class="text-lg font-medium text-gray-900 mb-2">Planification</h3>
194
+ <p class="text-gray-500">
195
+ Planifiez vos activités agricoles et synchronisez-les avec votre équipe.
196
+ </p>
197
+ </div>
198
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
199
+ <div class="flex items-center justify-center h-12 w-12 rounded-md bg-purple-500 text-white mb-4">
200
+ <i class="fas fa-exchange-alt text-xl"></i>
201
+ </div>
202
+ <h3 class="text-lg font-medium text-gray-900 mb-2">Synchronisation</h3>
203
+ <p class="text-gray-500">
204
+ Accédez à vos données depuis n'importe où avec notre application mobile synchronisée.
205
+ </p>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ </div>
210
+ </div>
211
+
212
+ <!-- Registration Modal -->
213
+ <div class="fixed z-50 inset-0 overflow-y-auto hidden" id="registration-modal">
214
+ <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
215
+ <div class="fixed inset-0 transition-opacity" aria-hidden="true">
216
+ <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
217
+ </div>
218
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
219
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
220
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
221
+ <div class="sm:flex sm:items-start">
222
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
223
+ <div class="flex justify-between items-center mb-4">
224
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">
225
+ Créer un compte Agriconect
226
+ </h3>
227
+ <button type="button" class="text-gray-400 hover:text-gray-500 focus:outline-none" id="close-registration-modal">
228
+ <i class="fas fa-times"></i>
229
+ </button>
230
+ </div>
231
+ <div class="mt-2">
232
+ <form class="space-y-4" id="registration-form">
233
+ <div>
234
+ <label for="user-type" class="block text-sm font-medium text-gray-700">Type de compte</label>
235
+ <select id="user-type" name="user-type" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
236
+ <option value="farmer">Agriculteur</option>
237
+ <option value="cooperative">Coopérative</option>
238
+ <option value="supplier">Fournisseur</option>
239
+ <option value="advisor">Conseiller agricole</option>
240
+ </select>
241
+ </div>
242
+ <div class="grid grid-cols-2 gap-4">
243
+ <div>
244
+ <label for="first-name" class="block text-sm font-medium text-gray-700">Prénom</label>
245
+ <input type="text" name="first-name" id="first-name" autocomplete="given-name" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
246
+ </div>
247
+ <div>
248
+ <label for="last-name" class="block text-sm font-medium text-gray-700">Nom</label>
249
+ <input type="text" name="last-name" id="last-name" autocomplete="family-name" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
250
+ </div>
251
+ </div>
252
+ <div>
253
+ <label for="email" class="block text-sm font-medium text-gray-700">Email</label>
254
+ <input type="email" name="email" id="reg-email" autocomplete="email" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
255
+ </div>
256
+ <div>
257
+ <label for="phone" class="block text-sm font-medium text-gray-700">Téléphone</label>
258
+ <input type="tel" name="phone" id="phone" autocomplete="tel" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
259
+ </div>
260
+ <div>
261
+ <label for="password" class="block text-sm font-medium text-gray-700">Mot de passe</label>
262
+ <input type="password" name="password" id="reg-password" autocomplete="new-password" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
263
+ <p class="mt-1 text-xs text-gray-500">8 caractères minimum avec au moins un chiffre et une majuscule</p>
264
+ </div>
265
+ <div>
266
+ <label for="confirm-password" class="block text-sm font-medium text-gray-700">Confirmer le mot de passe</label>
267
+ <input type="password" name="confirm-password" id="confirm-password" autocomplete="new-password" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
268
+ </div>
269
+ <div class="flex items-start">
270
+ <div class="flex items-center h-5">
271
+ <input id="terms" name="terms" type="checkbox" class="focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300 rounded">
272
+ </div>
273
+ <div class="ml-3 text-sm">
274
+ <label for="terms" class="font-medium text-gray-700">J'accepte les <a href="#" class="text-blue-600 hover:text-blue-500">conditions d'utilisation</a> et la <a href="#" class="text-blue-600 hover:text-blue-500">politique de confidentialité</a></label>
275
+ </div>
276
+ </div>
277
+ </form>
278
+ </div>
279
+ </div>
280
+ </div>
281
+ </div>
282
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
283
+ <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-green-600 text-base font-medium text-white hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 sm:ml-3 sm:w-auto sm:text-sm" id="submit-registration">
284
+ S'inscrire
285
+ </button>
286
+ <button type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" id="cancel-registration">
287
+ Annuler
288
+ </button>
289
+ </div>
290
+ </div>
291
+ </div>
292
+ </div>
293
+
294
+ <!-- Login Modal -->
295
+ <div class="fixed z-50 inset-0 overflow-y-auto hidden" id="login-modal">
296
+ <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
297
+ <div class="fixed inset-0 transition-opacity" aria-hidden="true">
298
+ <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
299
+ </div>
300
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
301
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-md sm:w-full">
302
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
303
+ <div class="sm:flex sm:items-start">
304
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
305
+ <div class="flex justify-between items-center mb-4">
306
+ <h3 class="text-lg leading-6 font-medium text-gray-900">
307
+ Connexion à Agriconect
308
+ </h3>
309
+ <button type="button" class="text-gray-400 hover:text-gray-500 focus:outline-none" id="close-login-modal">
310
+ <i class="fas fa-times"></i>
311
+ </button>
312
+ </div>
313
+ <div class="mt-2">
314
+ <form class="space-y-4" id="login-form">
315
+ <div>
316
+ <label for="login-email" class="block text-sm font-medium text-gray-700">Email</label>
317
+ <input type="email" name="email" id="login-email" autocomplete="email" required class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
318
+ </div>
319
+ <div>
320
+ <label for="login-password" class="block text-sm font-medium text-gray-700">Mot de passe</label>
321
+ <input type="password" name="password" id="login-password" autocomplete="current-password" required class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
322
+ </div>
323
+ <div class="flex items-center justify-between">
324
+ <div class="flex items-center">
325
+ <input id="remember-me" name="remember-me" type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
326
+ <label for="remember-me" class="ml-2 block text-sm text-gray-700">
327
+ Se souvenir de moi
328
+ </label>
329
+ </div>
330
+ <div class="text-sm">
331
+ <a href="#" class="font-medium text-blue-600 hover:text-blue-500">
332
+ Mot de passe oublié?
333
+ </a>
334
+ </div>
335
+ </div>
336
+ </form>
337
+ </div>
338
+ </div>
339
+ </div>
340
+ </div>
341
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
342
+ <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm" id="submit-login">
343
+ Se connecter
344
+ </button>
345
+ <button type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" id="cancel-login">
346
+ Annuler
347
+ </button>
348
+ </div>
349
+ </div>
350
+ </div>
351
+ </div>
352
+
353
+ <!-- Dashboard (Hidden by default) -->
354
+ <div class="hidden" id="dashboard">
355
+ <div class="flex h-screen bg-gray-100">
356
+ <!-- Sidebar -->
357
+ <div class="sidebar bg-white w-64 shadow-md">
358
+ <div class="flex items-center justify-center h-16 bg-blue-600">
359
+ <span class="text-white font-bold">Agriconect Dashboard</span>
360
+ <button class="sm:hidden ml-auto mr-4 text-white" id="close-sidebar">
361
+ <i class="fas fa-times"></i>
362
+ </button>
363
+ </div>
364
+ <div class="px-4 py-6">
365
+ <div class="flex items-center space-x-4 p-2 rounded-lg bg-blue-50">
366
+ <div class="h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600">
367
+ <i class="fas fa-user"></i>
368
+ </div>
369
+ <div>
370
+ <p class="font-medium" id="user-name">Jean Dupont</p>
371
+ <p class="text-sm text-gray-500" id="user-role">Agriculteur</p>
372
+ </div>
373
+ </div>
374
+ <nav class="mt-8">
375
+ <div>
376
+ <h3 class="px-3 text-xs font-semibold text-gray-500 uppercase tracking-wider">Général</h3>
377
+ <div class="mt-2 space-y-1">
378
+ <a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-blue-700 bg-blue-50" id="dashboard-link">
379
+ <i class="fas fa-tachometer-alt mr-3 text-blue-500"></i>
380
+ Tableau de bord
381
+ </a>
382
+ <a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="profile-link">
383
+ <i class="fas fa-user mr-3 text-gray-400 group-hover:text-gray-500"></i>
384
+ Profil
385
+ </a>
386
+ <a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="members-link">
387
+ <i class="fas fa-users mr-3 text-gray-400 group-hover:text-gray-500"></i>
388
+ Membres
389
+ </a>
390
+ </div>
391
+ </div>
392
+ <div class="mt-8">
393
+ <h3 class="px-3 text-xs font-semibold text-gray-500 uppercase tracking-wider">Activités</h3>
394
+ <div class="mt-2 space-y-1">
395
+ <a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="calendar-link">
396
+ <i class="fas fa-calendar mr-3 text-gray-400 group-hover:text-gray-500"></i>
397
+ Calendrier
398
+ </a>
399
+ <a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="tasks-link">
400
+ <i class="fas fa-tasks mr-3 text-gray-400 group-hover:text-gray-500"></i>
401
+ Tâches
402
+ </a>
403
+ <a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="reports-link">
404
+ <i class="fas fa-chart-pie mr-3 text-gray-400 group-hover:text-gray-500"></i>
405
+ Rapports
406
+ </a>
407
+ </div>
408
+ </div>
409
+ <div class="mt-8">
410
+ <h3 class="px-3 text-xs font-semibold text-gray-500 uppercase tracking-wider">Paramètres</h3>
411
+ <div class="mt-2 space-y-1">
412
+ <a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="settings-link">
413
+ <i class="fas fa-cog mr-3 text-gray-400 group-hover:text-gray-500"></i>
414
+ Paramètres
415
+ </a>
416
+ <a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="help-link">
417
+ <i class="fas fa-question-circle mr-3 text-gray-400 group-hover:text-gray-500"></i>
418
+ Aide
419
+ </a>
420
+ <a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="logout-link">
421
+ <i class="fas fa-sign-out-alt mr-3 text-gray-400 group-hover:text-gray-500"></i>
422
+ Déconnexion
423
+ </a>
424
+ </div>
425
+ </div>
426
+ </nav>
427
+ </div>
428
+ </div>
429
+
430
+ <!-- Main content -->
431
+ <div class="flex-1 flex flex-col overflow-hidden">
432
+ <!-- Top bar -->
433
+ <header class="bg-white shadow-sm">
434
+ <div class="flex items-center justify-between px-6 py-3">
435
+ <div class="flex items-center">
436
+ <button class="sm:hidden text-gray-500 focus:outline-none" id="open-sidebar">
437
+ <i class="fas fa-bars"></i>
438
+ </button>
439
+ <h1 class="ml-4 text-xl font-semibold text-gray-900" id="dashboard-title">Tableau de bord</h1>
440
+ </div>
441
+ <div class="flex items-center space-x-4">
442
+ <button class="p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none">
443
+ <span class="sr-only">Notifications</span>
444
+ <i class="fas fa-bell"></i>
445
+ </button>
446
+ <div class="relative">
447
+ <button class="flex items-center space-x-2 focus:outline-none" id="user-menu-button">
448
+ <span class="sr-only">Ouvrir le menu utilisateur</span>
449
+ <div class="h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center text-blue-600">
450
+ <i class="fas fa-user"></i>
451
+ </div>
452
+ <span class="hidden md:block" id="user-short-name">Jean D.</span>
453
+ </button>
454
+ <div class="hidden origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" id="user-menu">
455
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Votre profil</a>
456
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Paramètres</a>
457
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Déconnexion</a>
458
+ </div>
459
+ </div>
460
+ </div>
461
+ </div>
462
+ </header>
463
+
464
+ <!-- Dashboard content -->
465
+ <main class="flex-1 overflow-y-auto p-6 bg-gray-50">
466
+ <div class="mb-6">
467
+ <h2 class="text-2xl font-semibold text-gray-800">Bienvenue, <span id="welcome-name">Jean</span>!</h2>
468
+ <p class="text-gray-600">Voici un aperçu de votre activité.</p>
469
+ </div>
470
+
471
+ <!-- Stats -->
472
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
473
+ <div class="bg-white rounded-lg shadow p-6">
474
+ <div class="flex items-center">
475
+ <div class="p-3 rounded-full bg-blue-100 text-blue-600 mr-4">
476
+ <i class="fas fa-users"></i>
477
+ </div>
478
+ <div>
479
+ <p class="text-sm font-medium text-gray-500">Membres</p>
480
+ <p class="text-2xl font-semibold text-gray-800">24</p>
481
+ </div>
482
+ </div>
483
+ </div>
484
+ <div class="bg-white rounded-lg shadow p-6">
485
+ <div class="flex items-center">
486
+ <div class="p-3 rounded-full bg-green-100 text-green-600 mr-4">
487
+ <i class="fas fa-calendar-check"></i>
488
+ </div>
489
+ <div>
490
+ <p class="text-sm font-medium text-gray-500">Activités ce mois</p>
491
+ <p class="text-2xl font-semibold text-gray-800">12</p>
492
+ </div>
493
+ </div>
494
+ </div>
495
+ <div class="bg-white rounded-lg shadow p-6">
496
+ <div class="flex items-center">
497
+ <div class="p-3 rounded-full bg-yellow-100 text-yellow-600 mr-4">
498
+ <i class="fas fa-tasks"></i>
499
+ </div>
500
+ <div>
501
+ <p class="text-sm font-medium text-gray-500">Tâches en cours</p>
502
+ <p class="text-2xl font-semibold text-gray-800">5</p>
503
+ </div>
504
+ </div>
505
+ </div>
506
+ <div class="bg-white rounded-lg shadow p-6">
507
+ <div class="flex items-center">
508
+ <div class="p-3 rounded-full bg-purple-100 text-purple-600 mr-4">
509
+ <i class="fas fa-chart-line"></i>
510
+ </div>
511
+ <div>
512
+ <p class="text-sm font-medium text-gray-500">Performance</p>
513
+ <p class="text-2xl font-semibold text-gray-800">78%</p>
514
+ </div>
515
+ </div>
516
+ </div>
517
+ </div>
518
+
519
+ <!-- Recent activities and members -->
520
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
521
+ <div class="bg-white rounded-lg shadow overflow-hidden">
522
+ <div class="px-6 py-4 border-b border-gray-200">
523
+ <h3 class="text-lg font-medium text-gray-900">Activités récentes</h3>
524
+ </div>
525
+ <div class="divide-y divide-gray-200">
526
+ <div class="px-6 py-4">
527
+ <div class="flex items-center">
528
+ <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600">
529
+ <i class="fas fa-seedling"></i>
530
+ </div>
531
+ <div class="ml-4">
532
+ <p class="text-sm font-medium text-gray-900">Semis de blé</p>
533
+ <p class="text-sm text-gray-500">Complété aujourd'hui</p>
534
+ </div>
535
+ </div>
536
+ </div>
537
+ <div class="px-6 py-4">
538
+ <div class="flex items-center">
539
+ <div class="flex-shrink-0 h-10 w-10 rounded-full bg-green-100 flex items-center justify-center text-green-600">
540
+ <i class="fas fa-tractor"></i>
541
+ </div>
542
+ <div class="ml-4">
543
+ <p class="text-sm font-medium text-gray-900">Labour du champ B</p>
544
+ <p class="text-sm text-gray-500">Planifié pour demain</p>
545
+ </div>
546
+ </div>
547
+ </div>
548
+ <div class="px-6 py-4">
549
+ <div class="flex items-center">
550
+ <div class="flex-shrink-0 h-10 w-10 rounded-full bg-yellow-100 flex items-center justify-center text-yellow-600">
551
+ <i class="fas fa-shipping-fast"></i>
552
+ </div>
553
+ <div class="ml-4">
554
+ <p class="text-sm font-medium text-gray-900">Livraison d'engrais</p>
555
+ <p class="text-sm text-gray-500">En attente de confirmation</p>
556
+ </div>
557
+ </div>
558
+ </div>
559
+ </div>
560
+ <div class="px-6 py-4 bg-gray-50 text-right">
561
+ <a href="#" class="text-sm font-medium text-blue-600 hover:text-blue-500">Voir toutes les activités</a>
562
+ </div>
563
+ </div>
564
+
565
+ <div class="bg-white rounded-lg shadow overflow-hidden">
566
+ <div class="px-6 py-4 border-b border-gray-200">
567
+ <h3 class="text-lg font-medium text-gray-900">Membres récents</h3>
568
+ </div>
569
+ <div class="divide-y divide-gray-200">
570
+ <div class="px-6 py-4">
571
+ <div class="flex items-center">
572
+ <div class="flex-shrink-0">
573
+ <img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60" alt="">
574
+ </div>
575
+ <div class="ml-4">
576
+ <p class="text-sm font-medium text-gray-900">Marie Lambert</p>
577
+ <p class="text-sm text-gray-500">Agricultrice</p>
578
+ </div>
579
+ </div>
580
+ </div>
581
+ <div class="px-6 py-4">
582
+ <div class="flex items-center">
583
+ <div class="flex-shrink-0">
584
+ <img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1519244703995-f4e0f30006d5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60" alt="">
585
+ </div>
586
+ <div class="ml-4">
587
+ <p class="text-sm font-medium text-gray-900">Pierre Dubois</p>
588
+ <p class="text-sm text-gray-500">Fournisseur</p>
589
+ </div>
590
+ </div>
591
+ </div>
592
+ <div class="px-6 py-4">
593
+ <div class="flex items-center">
594
+ <div class="flex-shrink-0">
595
+ <img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60" alt="">
596
+ </div>
597
+ <div class="ml-4">
598
+ <p class="text-sm font-medium text-gray-900">Thomas Martin</p>
599
+ <p class="text-sm text-gray-500">Conseiller agricole</p>
600
+ </div>
601
+ </div>
602
+ </div>
603
+ </div>
604
+ <div class="px-6 py-4 bg-gray-50 text-right">
605
+ <a href="#" class="text-sm font-medium text-blue-600 hover:text-blue-500">Voir tous les membres</a>
606
+ </div>
607
+ </div>
608
+ </div>
609
+ </main>
610
+ </div>
611
+ </div>
612
+ </div>
613
+
614
+ <!-- Footer -->
615
+ <footer class="bg-gray-800">
616
+ <div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
617
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-8">
618
+ <div>
619
+ <h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">Agriconect</h3>
620
+ <ul class="mt-4 space-y-4">
621
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">À propos</a></li>
622
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">Carrières</a></li>
623
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">Blog</a></li>
624
+ </ul>
625
+ </div>
626
+ <div>
627
+ <h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">Support</h3>
628
+ <ul class="mt-4 space-y-4">
629
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">Centre d'aide</a></li>
630
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">Sécurité</a></li>
631
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">API</a></li>
632
+ </ul>
633
+ </div>
634
+ <div>
635
+ <h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">Légal</h3>
636
+ <ul class="mt-4 space-y-4">
637
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">Confidentialité</a></li>
638
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">Conditions</a></li>
639
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">Politique cookies</a></li>
640
+ </ul>
641
+ </div>
642
+ <div>
643
+ <h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">Contact</h3>
644
+ <ul class="mt-4 space-y-4">
645
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">contact@agriconect.fr</a></li>
646
+ <li><a href="#" class="text-base text-gray-400 hover:text-white">+33 1 23 45 67 89</a></li>
647
+ <li class="flex space-x-4">
648
+ <a href="#" class="text-gray-400 hover:text-white">
649
+ <i class="fab fa-facebook-f"></i>
650
+ </a>
651
+ <a href="#" class="text-gray-400 hover:text-white">
652
+ <i class="fab fa-twitter"></i>
653
+ </a>
654
+ <a href="#" class="text-gray-400 hover:text-white">
655
+ <i class="fab fa-instagram"></i>
656
+ </a>
657
+ <a href="#" class="text-gray-400 hover:text-white">
658
+ <i class="fab fa-linkedin-in"></i>
659
+ </a>
660
+ </li>
661
+ </ul>
662
+ </div>
663
+ </div>
664
+ <div class="mt-8 border-t border-gray-700 pt-8 md:flex md:items-center md:justify-between">
665
+ <div class="flex space-x-6 md:order-2">
666
+ <a href="#" class="text-gray-400 hover:text-white">
667
+ <i class="fab fa-apple text-xl"></i>
668
+ </a>
669
+ <a href="#" class="text-gray-400 hover:text-white">
670
+ <i class="fab fa-google-play text-xl"></i>
671
+ </a>
672
+ </div>
673
+ <p class="mt-8 text-base text-gray-400 md:mt-0 md:order-1">
674
+ &copy; 2023 Agriconect. Tous droits réservés.
675
+ </p>
676
+ </div>
677
+ </div>
678
+ </footer>
679
+
680
+ <!-- Success Notification -->
681
+ <div class="fixed bottom-4 right-4 hidden" id="success-notification">
682
+ <div class="bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center">
683
+ <i class="fas fa-check-circle mr-2"></i>
684
+ <span id="success-message">Opération réussie!</span>
685
+ <button class="ml-4 focus:outline-none" id="close-success-notification">
686
+ <i class="fas fa-times"></i>
687
+ </button>
688
+ </div>
689
+ </div>
690
+
691
+ <!-- Error Notification -->
692
+ <div class="fixed bottom-4 right-4 hidden" id="error-notification">
693
+ <div class="bg-red-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center">
694
+ <i class="fas fa-exclamation-circle mr-2"></i>
695
+ <span id="error-message">Une erreur est survenue!</span>
696
+ <button class="ml-4 focus:outline-none" id="close-error-notification">
697
+ <i class="fas fa-times"></i>
698
+ </button>
699
+ </div>
700
+ </div>
701
+
702
+ <script>
703
+ // DOM Elements
704
+ const mobileMenuBtn = document.getElementById('mobile-menu-btn');
705
+ const mobileMenu = document.getElementById('mobile-menu');
706
+ const loginBtn = document.getElementById('login-btn');
707
+ const registerBtn = document.getElementById('register-btn');
708
+ const heroRegisterBtn = document.getElementById('hero-register-btn');
709
+ const heroRegisterLink = document.getElementById('hero-register-link');
710
+ const heroLearnBtn = document.getElementById('hero-learn-btn');
711
+ const registrationModal = document.getElementById('registration-modal');
712
+ const loginModal = document.getElementById('login-modal');
713
+ const closeRegistrationModal = document.getElementById('close-registration-modal');
714
+ const closeLoginModal = document.getElementById('close-login-modal');
715
+ const cancelRegistration = document.getElementById('cancel-registration');
716
+ const cancelLogin = document.getElementById('cancel-login');
717
+ const submitRegistration = document.getElementById('submit-registration');
718
+ const submitLogin = document.getElementById('submit-login');
719
+ const registrationForm = document.getElementById('registration-form');
720
+ const loginForm = document.getElementById('login-form');
721
+ const dashboard = document.getElementById('dashboard');
722
+ const openSidebar = document.getElementById('open-sidebar');
723
+ const closeSidebar = document.getElementById('close-sidebar');
724
+ const sidebar = document.querySelector('.sidebar');
725
+ const userMenuButton = document.getElementById('user-menu-button');
726
+ const userMenu = document.getElementById('user-menu');
727
+ const successNotification = document.getElementById('success-notification');
728
+ const errorNotification = document.getElementById('error-notification');
729
+ const closeSuccessNotification = document.getElementById('close-success-notification');
730
+ const closeErrorNotification = document.getElementById('close-error-notification');
731
+
732
+ // Event Listeners
733
+ mobileMenuBtn.addEventListener('click', toggleMobileMenu);
734
+ loginBtn.addEventListener('click', () => showModal(loginModal));
735
+ registerBtn.addEventListener('click', () => showModal(registrationModal));
736
+ heroRegisterBtn.addEventListener('click', () => showModal(registrationModal));
737
+ heroRegisterLink.addEventListener('click', () => showModal(registrationModal));
738
+ heroLearnBtn.addEventListener('click', scrollToFeatures);
739
+ closeRegistrationModal.addEventListener('click', () => hideModal(registrationModal));
740
+ closeLoginModal.addEventListener('click', () => hideModal(loginModal));
741
+ cancelRegistration.addEventListener('click', () => hideModal(registrationModal));
742
+ cancelLogin.addEventListener('click', () => hideModal(loginModal));
743
+ submitRegistration.addEventListener('click', handleRegistration);
744
+ submitLogin.addEventListener('click', handleLogin);
745
+ openSidebar.addEventListener('click', () => sidebar.classList.add('open'));
746
+ closeSidebar.addEventListener('click', () => sidebar.classList.remove('open'));
747
+ userMenuButton.addEventListener('click', toggleUserMenu);
748
+ closeSuccessNotification.addEventListener('click', () => successNotification.classList.add('hidden'));
749
+ closeErrorNotification.addEventListener('click', () => errorNotification.classList.add('hidden'));
750
+
751
+ // Functions
752
+ function toggleMobileMenu() {
753
+ mobileMenu.classList.toggle('hidden');
754
+ }
755
+
756
+ function showModal(modal) {
757
+ modal.classList.remove('hidden');
758
+ document.body.style.overflow = 'hidden';
759
+ }
760
+
761
+ function hideModal(modal) {
762
+ modal.classList.add('hidden');
763
+ document.body.style.overflow = 'auto';
764
+ }
765
+
766
+ function scrollToFeatures() {
767
+ const featuresSection = document.querySelector('.lg:text-center');
768
+ featuresSection.scrollIntoView({ behavior: 'smooth' });
769
+ }
770
+
771
+ function toggleUserMenu() {
772
+ userMenu.classList.toggle('hidden');
773
+ }
774
+
775
+ function showSuccessNotification(message) {
776
+ document.getElementById('success-message').textContent = message;
777
+ successNotification.classList.remove('hidden');
778
+ setTimeout(() => successNotification.classList.add('hidden'), 5000);
779
+ }
780
+
781
+ function showErrorNotification(message) {
782
+ document.getElementById('error-message').textContent = message;
783
+ errorNotification.classList.remove('hidden');
784
+ setTimeout(() => errorNotification.classList.add('hidden'), 5000);
785
+ }
786
+
787
+ function handleRegistration() {
788
+ // Validate form
789
+ const userType = document.getElementById('user-type').value;
790
+ const firstName = document.getElementById('first-name').value;
791
+ const lastName = document.getElementById('last-name').value;
792
+ const email = document.getElementById('reg-email').value;
793
+ const phone = document.getElementById('phone').value;
794
+ const password = document.getElementById('reg-password').value;
795
+ const confirmPassword = document.getElementById('confirm-password').value;
796
+ const terms = document.getElementById('terms').checked;
797
+
798
+ if (!firstName || !lastName || !email || !phone || !password || !confirmPassword) {
799
+ showErrorNotification('Veuillez remplir tous les champs obligatoires.');
800
+ return;
801
+ }
802
+
803
+ if (password !== confirmPassword) {
804
+ showErrorNotification('Les mots de passe ne correspondent pas.');
805
+ return;
806
+ }
807
+
808
+ if (password.length < 8 || !/\d/.test(password) || !/[A-Z]/.test(password)) {
809
+ showErrorNotification('Le mot de passe doit contenir au moins 8 caractères, un chiffre et une majuscule.');
810
+ return;
811
+ }
812
+
813
+ if (!terms) {
814
+ showErrorNotification('Veuillez accepter les conditions d\'utilisation.');
815
+ return;
816
+ }
817
+
818
+ // In a real app, you would send this data to your backend
819
+ // For this demo, we'll simulate a successful registration
820
+ setTimeout(() => {
821
+ hideModal(registrationModal);
822
+ showSuccessNotification('Inscription réussie! Bienvenue sur Agriconect.');
823
+
824
+ // Simulate user data
825
+ document.getElementById('user-name').textContent = `${firstName} ${lastName}`;
826
+ document.getElementById('user-short-name').textContent = `${firstName} ${lastName.charAt(0)}.`;
827
+ document.getElementById('welcome-name').textContent = firstName;
828
+ document.getElementById('user-role').textContent =
829
+ userType === 'farmer' ? 'Agriculteur' :
830
+ userType === 'cooperative' ? 'Coopérative' :
831
+ userType === 'supplier' ? 'Fournisseur' : 'Conseiller agricole';
832
+
833
+ // Show dashboard
834
+ dashboard.classList.remove('hidden');
835
+ }, 1000);
836
+ }
837
+
838
+ function handleLogin() {
839
+ const email = document.getElementById('login-email').value;
840
+ const password = document.getElementById('login-password').value;
841
+
842
+ if (!email || !password) {
843
+ showErrorNotification('Veuillez entrer votre email et mot de passe.');
844
+ return;
845
+ }
846
+
847
+ // In a real app, you would validate credentials with your backend
848
+ // For this demo, we'll simulate a successful login
849
+ setTimeout(() => {
850
+ hideModal(loginModal);
851
+ showSuccessNotification('Connexion réussie! Bienvenue de retour.');
852
+
853
+ // Show dashboard with demo data
854
+ dashboard.classList.remove('hidden');
855
+ }, 1000);
856
+ }
857
+
858
+ // Close modals when clicking outside
859
+ window.addEventListener('click', (e) => {
860
+ if (e.target === registrationModal) {
861
+ hideModal(registrationModal);
862
+ }
863
+ if (e.target === loginModal) {
864
+ hideModal(loginModal);
865
+ }
866
+ if (!userMenu.contains(e.target) && e.target !== userMenuButton) {
867
+ userMenu.classList.add('hidden');
868
+ }
869
+ });
870
+
871
+ // Close mobile menu when clicking a link
872
+ document.querySelectorAll('#mobile-menu a').forEach(link => {
873
+ link.addEventListener('click', () => {
874
+ mobileMenu.classList.add('hidden');
875
+ });
876
+ });
877
+
878
+ // Dashboard navigation
879
+ document.querySelectorAll('#dashboard a').forEach(link => {
880
+ link.addEventListener('click', (e) => {
881
+ e.preventDefault();
882
+ const id = e.currentTarget.id;
883
+
884
+ // Update active state
885
+ document.querySelectorAll('#dashboard a').forEach(navLink => {
886
+ navLink.classList.remove('text-blue-700', 'bg-blue-50');
887
+ navLink.classList.add('text-gray-600', 'hover:text-gray-900', 'hover:bg-gray-50');
888
+
889
+ const icon = navLink.querySelector('i');
890
+ if (icon) {
891
+ icon.classList.remove('text-blue-500');
892
+ icon.classList.add('text-gray-400', 'group-hover:text-gray-500');
893
+ }
894
+ });
895
+
896
+ e.currentTarget.classList.add('text-blue-700', 'bg-blue-50');
897
+ e.currentTarget.classList.remove('text-gray-600', 'hover:text-gray-900', 'hover:bg-gray-50');
898
+
899
+ const icon = e.currentTarget.querySelector('i');
900
+ if (icon) {
901
+ icon.classList.add('text-blue-500');
902
+ icon.classList.remove('text-gray-400', 'group-hover:text-gray-500');
903
+ }
904
+
905
+ // Update dashboard title
906
+ if (id === 'dashboard-link') {
907
+ document.getElementById('dashboard-title').textContent = 'Tableau de bord';
908
+ } else if (id === 'profile-link') {
909
+ document.getElementById('dashboard-title').textContent = 'Profil';
910
+ } else if (id === 'members-link') {
911
+ document.getElementById('dashboard-title').textContent = 'Membres';
912
+ } else if (id === 'calendar-link') {
913
+ document.getElementById('dashboard-title').textContent = 'Calendrier';
914
+ } else if (id === 'tasks-link') {
915
+ document.getElementById('dashboard-title').textContent = 'Tâches';
916
+ } else if (id === 'reports-link') {
917
+ document.getElementById('dashboard-title').textContent = 'Rapports';
918
+ } else if (id === 'settings-link') {
919
+ document.getElementById('dashboard-title').textContent = 'Paramètres';
920
+ } else if (id === 'help-link') {
921
+ document.getElementById('dashboard-title').textContent = 'Aide';
922
+ } else if (id === 'logout-link') {
923
+ dashboard.classList.add('hidden');
924
+ showSuccessNotification('Déconnexion réussie. À bientôt!');
925
+ }
926
+
927
+ // On mobile, close sidebar after navigation
928
+ if (window.innerWidth <= 768) {
929
+ sidebar.classList.remove('open');
930
+ }
931
+ });
932
+ });
933
+
934
+ // Form validation
935
+ registrationForm.addEventListener('submit', (e) => {
936
+ e.preventDefault();
937
+ handleRegistration();
938
+ });
939
+
940
+ loginForm.addEventListener('submit', (e) => {
941
+ e.preventDefault();
942
+ handleLogin();
943
+ });
944
+
945
+ // Demo data for dashboard
946
+ if (dashboard.classList.contains('hidden')) {
947
+ // If not logged in, hide dashboard
948
+ dashboard.classList.add('hidden');
949
+ }
950
+ </script>
951
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=SDenzel/agriconect" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
952
+ </html>