import type { Metadata } from "next";
import Link from "next/link";
import Image from "next/image";
import Button from "@/components/Button";

export const metadata: Metadata = {
  title: "Thé Tip Top - Grand Jeu Concours 10ème Anniversaire",
  description: "Célébrez nos 10 ans ! 100% de tickets gagnants. Participez au jeu-concours et gagnez des lots exceptionnels.",
};

export default function HomePage() {
  return (
    <div className="min-h-screen -mt-[4.5rem]">
      {/* Hero Section - Bannière principale */}
      <section className="relative bg-gradient-to-br from-[#1a4d2e] via-[#2d5a3d] to-[#1a4d2e] pt-32 pb-24 overflow-hidden">
        <div className="absolute inset-0 opacity-10">
          <div className="absolute inset-0" style={{
            backgroundImage: 'url("data:image/svg+xml,%3Csvg width=\'60\' height=\'60\' viewBox=\'0 0 60 60\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cg fill=\'none\' fill-rule=\'evenodd\'%3E%3Cg fill=\'%23ffffff\' fill-opacity=\'0.4\'%3E%3Cpath d=\'M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z\'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")',
          }}></div>
        </div>

        <div className="w-full relative z-10">
          <div className="w-full text-center px-4">
            <h1 className="text-5xl md:text-6xl font-bold text-white mb-6 leading-tight">
              Un code, <span className="text-[#f59e0b]">un gain garanti !</span>
            </h1>
            <p className="text-xl text-white/90 mb-8 leading-relaxed">
              Célébrez l'ouverture de notre 10<sup>e</sup> boutique avec notre grand jeu-concours.
              <br />
              <span className="font-semibold text-[#f59e0b]">100% des participants gagnent un magnifique lot !</span>
            </p>

            <div className="flex flex-col sm:flex-row gap-4 justify-center mb-12 px-4">
              <Link href="/register">
                <button className="bg-[#f59e0b] hover:bg-[#d97706] text-white font-bold text-lg px-10 py-4 rounded-lg shadow-xl transition-all w-full sm:w-auto">
                  Participer maintenant
                </button>
              </Link>
              <Link href="/lots">
                <button className="bg-[#f59e0b] hover:bg-[#d97706] text-white font-bold text-lg px-10 py-4 rounded-lg shadow-xl transition-all w-full sm:w-auto">
                  Voir les lots
                </button>
              </Link>
            </div>

            {/* Stats badges */}
            <div className="flex flex-wrap justify-center gap-6 text-white px-4">
              <div className="flex items-center gap-2 bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full">
                <svg className="w-5 h-5 text-[#f59e0b]" fill="currentColor" viewBox="0 0 20 20">
                  <path fillRule="evenodd" d="M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" />
                </svg>
                <span className="font-semibold">100% sécurisé</span>
              </div>
              <div className="flex items-center gap-2 bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full">
                <svg className="w-5 h-5 text-[#f59e0b]" fill="currentColor" viewBox="0 0 20 20">
                  <path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
                </svg>
                <span className="font-semibold">100% gagnants</span>
              </div>
              <div className="flex items-center gap-2 bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full">
                <svg className="w-5 h-5 text-[#f59e0b]" fill="currentColor" viewBox="0 0 20 20">
                  <path d="M4 4a2 2 0 00-2 2v1h16V6a2 2 0 00-2-2H4z" />
                  <path fillRule="evenodd" d="M18 9H2v5a2 2 0 002 2h12a2 2 0 002-2V9zM4 13a1 1 0 011-1h1a1 1 0 110 2H5a1 1 0 01-1-1zm5-1a1 1 0 100 2h1a1 1 0 100-2H9z" clipRule="evenodd" />
                </svg>
                <span className="font-semibold">500 000 codes</span>
              </div>
            </div>
          </div>
        </div>
      </section>

      {/* How to Participate Section */}
      <section className="py-20 bg-white">
        <div className="container mx-auto px-4">
          <div className="max-w-5xl mx-auto">
            <h2 className="text-4xl md:text-5xl font-bold text-center text-gray-900 mb-4">
              Comment participer?
            </h2>
            <p className="text-center text-gray-600 mb-16 text-lg max-w-2xl mx-auto">
              3 étapes simples pour découvrir votre lot et rejoindre nos milliers de gagnants
            </p>

            <div className="grid md:grid-cols-3 gap-12">
              {/* Step 1 */}
              <div className="text-center relative">
                <div className="absolute top-0 right-0 w-8 h-8 bg-[#1a4d2e] text-white rounded-full flex items-center justify-center font-bold text-sm">
                  1
                </div>
                <div className="bg-gradient-to-br from-[#fef3c7] to-[#fde68a] w-20 h-20 rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg">
                  <svg className="w-10 h-10 text-[#1a4d2e]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" />
                  </svg>
                </div>
                <h3 className="text-2xl font-bold mb-3 text-gray-900">Inscrivez-vous</h3>
                <p className="text-gray-600 leading-relaxed">
                  Créez votre compte rapidement avec Google, Facebook ou votre email
                </p>
              </div>

              {/* Step 2 */}
              <div className="text-center relative">
                <div className="absolute top-0 right-0 w-8 h-8 bg-[#1a4d2e] text-white rounded-full flex items-center justify-center font-bold text-sm">
                  2
                </div>
                <div className="bg-gradient-to-br from-[#fef3c7] to-[#fde68a] w-20 h-20 rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg">
                  <svg className="w-10 h-10 text-[#1a4d2e]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 5v2m0 4v2m0 4v2M5 5a2 2 0 00-2 2v3a2 2 0 110 4v3a2 2 0 002 2h14a2 2 0 002-2v-3a2 2 0 110-4V7a2 2 0 00-2-2H5z" />
                  </svg>
                </div>
                <h3 className="text-2xl font-bold mb-3 text-gray-900">Entrez votre code</h3>
                <p className="text-gray-600 leading-relaxed">
                  Saisissez le code à 10 caractères de votre ticket d'achat à 49€
                </p>
              </div>

              {/* Step 3 */}
              <div className="text-center relative">
                <div className="absolute top-0 right-0 w-8 h-8 bg-[#1a4d2e] text-white rounded-full flex items-center justify-center font-bold text-sm">
                  3
                </div>
                <div className="bg-gradient-to-br from-[#fef3c7] to-[#fde68a] w-20 h-20 rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg">
                  <svg className="w-10 h-10 text-[#1a4d2e]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7" />
                  </svg>
                </div>
                <h3 className="text-2xl font-bold mb-3 text-gray-900">Découvrez votre lot</h3>
                <p className="text-gray-600 leading-relaxed">
                  Résultat immédiat ! 100% des participants remportent un prix
                </p>
              </div>
            </div>
          </div>
        </div>
      </section>

      {/* Prizes Section */}
      <section className="py-20 bg-gradient-to-b from-gray-50 to-white">
        <div className="container mx-auto px-4">
          <div className="max-w-6xl mx-auto">
            <h2 className="text-4xl md:text-5xl font-bold text-center text-gray-900 mb-4">
              Lots à gagner
            </h2>
            <p className="text-center text-gray-600 mb-16 text-lg max-w-3xl mx-auto">
              Découvrez nos magnifiques prix, des accessoires premium aux coffrets exclusifs
            </p>

            <div className="grid md:grid-cols-2 lg:grid-cols-5 gap-6">
              {/* Prize 1 */}
              <div className="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-2xl transition-shadow border border-gray-100">
                <div className="aspect-square bg-gradient-to-br from-amber-50 to-orange-50 flex items-center justify-center p-8">
                  <div className="text-7xl">🍵</div>
                </div>
                <div className="p-6">
                  <div className="inline-block bg-red-100 text-red-600 text-sm font-bold px-3 py-1 rounded-full mb-3">
                    60%
                  </div>
                  <h3 className="text-xl font-bold text-gray-900 mb-2">Infuseur à thé premium</h3>
                  <p className="text-gray-600 text-sm">
                    Un infuseur élégant pour vos thés en vrac
                  </p>
                </div>
              </div>

              {/* Prize 2 */}
              <div className="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-2xl transition-shadow border border-gray-100">
                <div className="aspect-square bg-gradient-to-br from-green-50 to-emerald-50 flex items-center justify-center p-8">
                  <div className="text-7xl">📦</div>
                </div>
                <div className="p-6">
                  <div className="inline-block bg-orange-100 text-orange-600 text-sm font-bold px-3 py-1 rounded-full mb-3">
                    20%
                  </div>
                  <h3 className="text-xl font-bold text-gray-900 mb-2">Boîte 100g thé détox</h3>
                  <p className="text-gray-600 text-sm">
                    Mélange détox aux plantes bio
                  </p>
                </div>
              </div>

              {/* Prize 3 */}
              <div className="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-2xl transition-shadow border border-gray-100">
                <div className="aspect-square bg-gradient-to-br from-blue-50 to-cyan-50 flex items-center justify-center p-8">
                  <div className="text-7xl">🌿</div>
                </div>
                <div className="p-6">
                  <div className="inline-block bg-green-100 text-green-600 text-sm font-bold px-3 py-1 rounded-full mb-3">
                    10%
                  </div>
                  <h3 className="text-xl font-bold text-gray-900 mb-2">Boîte 100g thé signature</h3>
                  <p className="text-gray-600 text-sm">
                    Notre mélange signature exclusif
                  </p>
                </div>
              </div>

              {/* Prize 4 */}
              <div className="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-2xl transition-shadow border border-gray-100">
                <div className="aspect-square bg-gradient-to-br from-purple-50 to-pink-50 flex items-center justify-center p-8">
                  <div className="text-7xl">🎁</div>
                </div>
                <div className="p-6">
                  <div className="inline-block bg-purple-100 text-purple-600 text-sm font-bold px-3 py-1 rounded-full mb-3">
                    6%
                  </div>
                  <h3 className="text-xl font-bold text-gray-900 mb-2">Coffret découverte 39€</h3>
                  <p className="text-gray-600 text-sm">
                    Sélection de nos meilleurs thés
                  </p>
                </div>
              </div>

              {/* Prize 5 */}
              <div className="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-2xl transition-shadow border-2 border-[#f59e0b]">
                <div className="aspect-square bg-gradient-to-br from-yellow-50 to-amber-50 flex items-center justify-center p-8">
                  <div className="text-7xl">🏆</div>
                </div>
                <div className="p-6">
                  <div className="inline-block bg-yellow-100 text-yellow-700 text-sm font-bold px-3 py-1 rounded-full mb-3">
                    4%
                  </div>
                  <h3 className="text-xl font-bold text-gray-900 mb-2">Coffret découverte 69€</h3>
                  <p className="text-gray-600 text-sm">
                    Une expérience complète
                  </p>
                </div>
              </div>
            </div>

            <div className="text-center mt-12">
              <Link href="/lots">
                <Button
                  variant="outline"
                  size="lg"
                  className="border-2 border-[#1a4d2e] text-[#1a4d2e] hover:bg-[#1a4d2e] hover:text-white font-semibold px-8"
                >
                  Voir tous les lots
                  <svg className="w-5 h-5 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
                  </svg>
                </Button>
              </Link>
            </div>
          </div>
        </div>
      </section>

      {/* Stats Section */}
      <section className="py-20 pb-0 bg-gradient-to-br from-[#1a4d2e] via-[#2d5a3d] to-[#1a4d2e] text-white">
        <div className="w-full px-0">
          <div className="max-w-6xl mx-auto px-4">
            <div className="grid md:grid-cols-4 gap-8 text-center">
              <div>
                <div className="text-5xl font-bold text-[#f59e0b] mb-2">100%</div>
                <div className="text-lg text-white/90">Gagnants garantis</div>
              </div>
              <div>
                <div className="text-5xl font-bold text-[#f59e0b] mb-2">500k</div>
                <div className="text-lg text-white/90">Codes disponibles</div>
              </div>
              <div>
                <div className="text-5xl font-bold text-[#f59e0b] mb-2">10</div>
                <div className="text-lg text-white/90">Boutiques en France</div>
              </div>
              <div>
                <div className="text-5xl font-bold text-[#f59e0b] mb-2">360€</div>
                <div className="text-lg text-white/90">Gain en jeu</div>
              </div>
            </div>

            <div className="mt-12 pb-20 text-center">
              <div className="inline-flex items-center gap-2 text-white/80 text-sm bg-white/10 px-6 py-3 rounded-full">
                <svg className="w-5 h-5 text-[#f59e0b]" fill="currentColor" viewBox="0 0 20 20">
                  <path fillRule="evenodd" d="M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" />
                </svg>
                <span>Jeu-concours certifié et contrôlé par un huissier de justice. Vos données sont protégées conformément au RGPD.</span>
              </div>
              <p className="mt-4 text-white/60 text-sm">
                Thés 100% bio et artisanaux.
              </p>
            </div>
          </div>
        </div>
      </section>

    </div>
  );
}
