Files
Nazim KriandClaude Opus 5.5 ad214a24dd Landing redesign: animated hero, draw cards, how-it-works, footer
Keeps only countries with archived results (Québec, France, US, Spain,
Portugal). The landing gets motion and a real structure: staggered
fade-in hero with a floating Loki, twinkling stars, a shimmering gold CTA
and counters that tick up (draws archived, lotteries, countries); draw
cards in place of the table, with lottery balls dropping in and a
lift-on-hover; a three-step "Comment ça marche"; and a site-wide footer
with links, covered countries, responsible-play note and 18+ notice.
All motion is disabled under prefers-reduced-motion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:58:21 -04:00

117 lines
4.8 KiB
TypeScript

import Image from "next/image"
import Link from "next/link"
import { ArrowRight, Sparkles } from "lucide-react"
import { CountUp } from "@/components/count-up"
const STARS = [
{ top: "12%", left: "48%", delay: "0s" },
{ top: "22%", left: "62%", delay: "1.1s" },
{ top: "8%", left: "72%", delay: "0.5s" },
{ top: "30%", left: "54%", delay: "1.8s" },
{ top: "16%", left: "88%", delay: "0.8s" },
{ top: "40%", left: "92%", delay: "2.2s" },
]
export function Hero({
isAuthenticated,
draws,
lotteries,
countries,
}: {
isAuthenticated: boolean
draws: number
lotteries: number
countries: number
}) {
return (
<section className="relative isolate overflow-hidden border-b border-border">
<picture className="absolute inset-0 -z-20">
<source media="(max-width: 767px)" srcSet="/lokilab/backgrounds/observatory-mobile.webp" />
<img src="/lokilab/backgrounds/observatory-desktop.webp" alt="" aria-hidden="true" className="h-full w-full object-cover" />
</picture>
<div className="absolute inset-0 -z-10 bg-gradient-to-r from-background via-background/85 to-background/20" />
<div className="absolute inset-x-0 bottom-0 -z-10 h-24 bg-gradient-to-t from-background to-transparent" />
{STARS.map((s, i) => (
<span
key={i}
aria-hidden
className="animate-twinkle absolute -z-10 h-1 w-1 rounded-full bg-gold-light shadow-[0_0_8px_2px_rgba(255,227,163,0.7)]"
style={{ top: s.top, left: s.left, animationDelay: s.delay }}
/>
))}
<div className="mx-auto grid max-w-6xl grid-cols-1 items-center gap-4 px-4 sm:px-6 md:grid-cols-[1.15fr_0.85fr]">
<div className="py-10 md:py-14">
<p className="animate-fade-up inline-flex items-center gap-1.5 rounded-full border border-mint/30 bg-mint/10 px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-mint">
<Sparkles className="h-3 w-3" /> L&apos;armée de Loki
</p>
<h1
className="animate-fade-up mt-4 font-display text-4xl leading-[1.08] sm:text-5xl"
style={{ animationDelay: "120ms" }}
>
Loki lit les tirages.
<br />
<span className="bg-gradient-to-r from-gold-light via-gold to-gold-light bg-clip-text text-transparent">
Vous suivez ses choix.
</span>
</h1>
<p
className="animate-fade-up mt-4 max-w-md text-[15px] leading-relaxed text-muted-foreground"
style={{ animationDelay: "240ms" }}
>
Résultats officiels, statistiques et pronostics de loterie au Québec, en France, aux
États-Unis, en Espagne et au Portugal.
</p>
<div className="animate-fade-up mt-6 flex flex-wrap items-center gap-3" style={{ animationDelay: "360ms" }}>
<Link
href={isAuthenticated ? "/classement" : "/connexion?mode=inscription"}
className="shimmer relative inline-flex h-11 items-center gap-2 overflow-hidden rounded-md bg-gold px-6 text-sm font-semibold text-primary-foreground shadow-[0_0_28px_rgba(244,199,107,0.35)] transition-transform hover:-translate-y-0.5"
>
{isAuthenticated ? "Voir le classement" : "Rejoindre l'armée — gratuit"}
<ArrowRight className="h-4 w-4" />
</Link>
<a
href="#tirages"
className="inline-flex h-11 items-center rounded-md border border-gold/30 bg-background/40 px-5 text-sm font-medium backdrop-blur transition-colors hover:bg-gold/10"
>
Derniers tirages
</a>
</div>
<dl className="animate-fade-up mt-8 flex gap-8" style={{ animationDelay: "480ms" }}>
<HeroStat value={draws} label="tirages archivés" />
<HeroStat value={lotteries} label="loteries" />
<HeroStat value={countries} label="pays" />
</dl>
</div>
<div className="relative hidden h-full items-end justify-center md:flex">
<div className="animate-glow absolute bottom-16 h-72 w-72 rounded-full bg-gold/25 blur-3xl" />
<Image
src="/lokilab/mascots/loki-welcome.webp"
alt="Loki salue de la main"
width={640}
height={960}
priority
sizes="400px"
className="animate-float relative h-[420px] w-auto drop-shadow-[0_24px_40px_rgba(0,0,0,0.6)]"
/>
</div>
</div>
</section>
)
}
function HeroStat({ value, label }: { value: number; label: string }) {
return (
<div>
<dt className="sr-only">{label}</dt>
<dd className="font-display text-3xl leading-none text-gold">
<CountUp value={value} />
</dd>
<p className="mt-1 text-xs text-muted-foreground">{label}</p>
</div>
)
}