the-tip-top-frontend/app/contact/page.tsx
soufiane 0ade13d50d feat: apply golden/beige theme across all pages and fix header layout
Design Updates:
- Apply consistent golden/beige color scheme to all pages
- Update client dashboard, contact, FAQ, history, game, lots, profile, rules, terms, and privacy pages
- Replace green/orange colors with golden palette (#d4a574, #c4956a)
- Add golden gradient backgrounds and borders throughout

Header Improvements:
- Fix button layout to maintain proper form when page is zoomed
- Remove hover:scale-105 effects that caused deformation
- Add whitespace-nowrap to prevent text wrapping
- Add flex-shrink-0 to prevent element shrinking
- Add gap-4 to main header container for proper spacing
- Fix user info card with text ellipsis for long names/emails
- Improve spacing between "Participer" button and user card

Profile Page Updates:
- Remove "Dernière modification" field
- Update all colors to golden theme

API Endpoints:
- Fix user profile endpoint from /user/profile to /users/profile

Statistics Icons:
- Update dashboard statistics icons with distinct colors
- Total Participations: blue
- Gains réclamés: green
- En attente: yellow
- Rejetés: red

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 23:44:49 +01:00

340 lines
16 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client';
import { useState } from "react";
import type { Metadata } from "next";
import Link from "next/link";
export default function ContactPage() {
const [formData, setFormData] = useState({
fullName: '',
email: '',
subject: '',
message: '',
acceptPolicy: false,
});
const [isSubmitting, setIsSubmitting] = useState(false);
const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => {
const { name, value } = e.target;
setFormData(prev => ({ ...prev, [name]: value }));
};
const handleCheckboxChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setFormData(prev => ({ ...prev, acceptPolicy: e.target.checked }));
};
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setIsSubmitting(true);
// Simulation d'envoi
await new Promise(resolve => setTimeout(resolve, 1500));
console.log('Form submitted:', formData);
alert('Votre message a été envoyé avec succès !');
// Reset form
setFormData({
fullName: '',
email: '',
subject: '',
message: '',
acceptPolicy: false,
});
setIsSubmitting(false);
};
return (
<div className="min-h-screen bg-gradient-to-br from-[#f5f5f0] via-[#faf9f5] to-[#f5f5f0]">
{/* Hero Section */}
<section className="bg-gradient-to-r from-white to-[#faf9f5] py-12 border-b-2 border-[#e5e4dc]">
<div className="container mx-auto px-4">
<div className="max-w-4xl mx-auto text-center">
<h1 className="text-4xl md:text-5xl font-bold text-[#5a5a4e] mb-4">
Contactez-nous
</h1>
<p className="text-lg text-[#8a8a7a]">
Une question sur le jeu-concours ? Besoin d'aide ? Notre équipe est là pour vous accompagner !
</p>
</div>
</div>
</section>
{/* Main Content */}
<section className="py-12">
<div className="container mx-auto px-4">
<div className="max-w-6xl mx-auto">
<div className="grid lg:grid-cols-2 gap-12">
{/* Contact Form */}
<div>
<div className="bg-white rounded-xl shadow-md p-8 border border-[#e5e4dc]">
<h2 className="text-2xl font-bold text-[#5a5a4e] mb-6">Envoyez-nous un message</h2>
<form onSubmit={handleSubmit} className="space-y-6">
{/* Nom complet */}
<div>
<label htmlFor="fullName" className="block text-sm font-semibold text-[#5a5a4e] mb-2">
Nom complet <span className="text-red-500">*</span>
</label>
<input
id="fullName"
name="fullName"
type="text"
required
value={formData.fullName}
onChange={handleChange}
placeholder="Votre nom et prénom"
className="w-full px-4 py-3 border-2 border-[#e5e4dc] rounded-lg focus:outline-none focus:ring-2 focus:ring-[#d4a574] focus:border-[#d4a574]"
/>
</div>
{/* Email */}
<div>
<label htmlFor="email" className="block text-sm font-semibold text-[#5a5a4e] mb-2">
Email <span className="text-red-500">*</span>
</label>
<input
id="email"
name="email"
type="email"
required
value={formData.email}
onChange={handleChange}
placeholder="votre@email.com"
className="w-full px-4 py-3 border-2 border-[#e5e4dc] rounded-lg focus:outline-none focus:ring-2 focus:ring-[#d4a574] focus:border-[#d4a574]"
/>
</div>
{/* Sujet */}
<div>
<label htmlFor="subject" className="block text-sm font-semibold text-[#5a5a4e] mb-2">
Sujet <span className="text-red-500">*</span>
</label>
<select
id="subject"
name="subject"
required
value={formData.subject}
onChange={handleChange}
className="w-full px-4 py-3 border-2 border-[#e5e4dc] rounded-lg focus:outline-none focus:ring-2 focus:ring-[#d4a574] focus:border-[#d4a574] bg-white"
>
<option value="">Sélectionnez un sujet</option>
<option value="jeu-concours">Question sur le jeu-concours</option>
<option value="code">Problème avec mon code</option>
<option value="lot">Réclamation de lot</option>
<option value="compte">Gestion de compte</option>
<option value="autre">Autre demande</option>
</select>
</div>
{/* Message */}
<div>
<label htmlFor="message" className="block text-sm font-semibold text-[#5a5a4e] mb-2">
Message <span className="text-red-500">*</span>
</label>
<textarea
id="message"
name="message"
required
value={formData.message}
onChange={handleChange}
placeholder="Décrivez votre demande en détail..."
rows={6}
className="w-full px-4 py-3 border-2 border-[#e5e4dc] rounded-lg focus:outline-none focus:ring-2 focus:ring-[#d4a574] focus:border-[#d4a574] resize-none"
/>
</div>
{/* Checkbox RGPD */}
<div className="flex items-start gap-3">
<input
id="acceptPolicy"
name="acceptPolicy"
type="checkbox"
required
checked={formData.acceptPolicy}
onChange={handleCheckboxChange}
className="mt-1 w-5 h-5 text-[#d4a574] border-[#e5e4dc] rounded focus:ring-2 focus:ring-[#d4a574]"
/>
<label htmlFor="acceptPolicy" className="text-sm text-[#5a5a4e] select-none cursor-pointer">
J'accepte que mes données soient collectées et traitées conformément à la{' '}
<Link href="/privacy" className="text-[#d4a574] underline hover:text-[#c4956a]">
politique de confidentialité
</Link>{' '}
<span className="text-red-500">*</span>
</label>
</div>
{/* Submit Button */}
<div>
<button
type="submit"
disabled={isSubmitting}
className="w-full bg-gradient-to-r from-[#d4a574] to-[#c4956a] hover:from-[#e5b685] hover:to-[#d4a574] disabled:from-gray-400 disabled:to-gray-500 text-white font-bold px-8 py-4 rounded-lg transition-all duration-300 shadow-lg hover:shadow-[0_0_20px_rgba(212,165,116,0.6)] hover:scale-105"
>
{isSubmitting ? "Envoi en cours..." : "Envoyer le message"}
</button>
</div>
</form>
</div>
</div>
{/* Contact Info */}
<div className="space-y-6">
{/* Nos coordonnées */}
<div className="bg-white rounded-xl shadow-md p-8 border border-[#e5e4dc]">
<h2 className="text-2xl font-bold text-[#5a5a4e] mb-6">Nos coordonnées</h2>
<div className="space-y-6">
{/* Siège social */}
<div className="flex items-start gap-4">
<div className="w-12 h-12 bg-gradient-to-br from-[#d4a574] to-[#c4956a] rounded-full flex items-center justify-center text-xl shadow-md flex-shrink-0">📍</div>
<div>
<h3 className="font-semibold text-[#5a5a4e] mb-1">Siège social</h3>
<p className="text-[#8a8a7a] text-sm">
Thé Tip Top<br />
123 Avenue des Thés<br />
75001 Paris, France
</p>
</div>
</div>
{/* Téléphone */}
<div className="flex items-start gap-4">
<div className="w-12 h-12 bg-gradient-to-br from-[#d4a574] to-[#c4956a] rounded-full flex items-center justify-center text-xl shadow-md flex-shrink-0">📞</div>
<div>
<h3 className="font-semibold text-[#5a5a4e] mb-1">Téléphone</h3>
<p className="text-[#8a8a7a] text-sm">
<a href="tel:+33123456789" className="hover:text-[#d4a574] transition-colors">
+33 1 23 45 67 89
</a><br />
<span className="text-xs">Du lundi au vendredi<br />9h00 - 18h00</span>
</p>
</div>
</div>
{/* Email */}
<div className="flex items-start gap-4">
<div className="w-12 h-12 bg-gradient-to-br from-[#d4a574] to-[#c4956a] rounded-full flex items-center justify-center text-xl shadow-md flex-shrink-0"></div>
<div>
<h3 className="font-semibold text-[#5a5a4e] mb-1">Email</h3>
<div className="text-[#8a8a7a] text-sm space-y-1">
<p>
<a href="mailto:contact@thetiptop.com" className="hover:text-[#d4a574] transition-colors">
contact@thetiptop.com
</a>
</p>
<p>
<a href="mailto:support@thetiptop.com" className="hover:text-[#d4a574] transition-colors">
support@thetiptop.com
</a>
</p>
<p>
<a href="mailto:privacy@thetiptop.com" className="hover:text-[#d4a574] transition-colors">
privacy@thetiptop.com
</a>
</p>
</div>
</div>
</div>
{/* Service client */}
<div className="flex items-start gap-4">
<div className="w-12 h-12 bg-gradient-to-br from-[#d4a574] to-[#c4956a] rounded-full flex items-center justify-center text-xl shadow-md flex-shrink-0">🕐</div>
<div>
<h3 className="font-semibold text-[#5a5a4e] mb-1">Service client</h3>
<p className="text-[#8a8a7a] text-sm">
Réponse sous 24h<br />
Support multilingue<br />
Du lundi au samedi
</p>
</div>
</div>
</div>
</div>
{/* Nos boutiques */}
<div className="bg-white rounded-xl shadow-md p-8 border border-[#e5e4dc]">
<h2 className="text-2xl font-bold text-[#5a5a4e] mb-6">Nos boutiques</h2>
<div className="space-y-4">
{/* Boutique 1 */}
<div className="pb-4 border-b border-[#e5e4dc]">
<h3 className="font-semibold text-[#5a5a4e] mb-2">Paris Rivoli</h3>
<p className="text-[#8a8a7a] text-sm mb-1">
123 Rue de Rivoli, 75001 Paris
</p>
<p className="text-sm text-[#8a8a7a]">01 23 45 67 89</p>
</div>
{/* Boutique 2 */}
<div className="pb-4 border-b border-[#e5e4dc]">
<h3 className="font-semibold text-[#5a5a4e] mb-2">Paris Saint-Germain</h3>
<p className="text-[#8a8a7a] text-sm mb-1">
45 Boulevard Saint-Germain, 75006 Paris
</p>
<p className="text-sm text-[#8a8a7a]">01 23 45 67 90</p>
</div>
{/* Boutique 3 */}
<div className="pb-4 border-b border-[#e5e4dc]">
<h3 className="font-semibold text-[#5a5a4e] mb-2">Lyon République</h3>
<p className="text-[#8a8a7a] text-sm mb-1">
78 Rue de la République, 69002 Lyon
</p>
<p className="text-sm text-[#8a8a7a]">04 12 34 56 78</p>
</div>
{/* Boutique 4 */}
<div>
<h3 className="font-semibold text-[#5a5a4e] mb-2">Marseille Canebière</h3>
<p className="text-[#8a8a7a] text-sm mb-1">
32 La Canebière, 13001 Marseille
</p>
<p className="text-sm text-[#8a8a7a]">04 91 23 45 67</p>
</div>
</div>
<div className="mt-6 pt-6 border-t border-[#e5e4dc]">
<p className="text-xs text-[#8a8a7a] flex items-start gap-2">
<span>💡</span>
<span>Retrouvez toutes nos boutiques et leurs horaires sur notre site principal</span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
{/* CTA FAQ Section */}
<section className="py-12">
<div className="container mx-auto px-4">
<div className="max-w-4xl mx-auto">
<div className="bg-gradient-to-r from-[#d4a574]/10 to-[#c4956a]/10 rounded-xl p-8 border-l-4 border-[#d4a574] shadow-lg">
<div className="flex items-start gap-4">
<div className="w-16 h-16 bg-gradient-to-br from-[#d4a574] to-[#c4956a] rounded-full flex items-center justify-center text-3xl shadow-md flex-shrink-0">💡</div>
<div className="flex-1">
<h3 className="text-xl font-bold text-[#5a5a4e] mb-2">Avant de nous contacter</h3>
<p className="text-[#5a5a4e] mb-4">
Consultez notre FAQ, vous y trouverez peut-être la réponse à votre question !
</p>
<Link
href="/faq"
className="inline-flex items-center justify-center bg-gradient-to-r from-[#d4a574] to-[#c4956a] hover:from-[#e5b685] hover:to-[#d4a574] text-white font-bold px-6 py-3 rounded-lg transition-all duration-300 shadow-lg hover:scale-105"
>
Voir la FAQ
</Link>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
);
}