feat: implement Moving Motivators feature with session management, real-time event handling, and UI components for enhanced user experience

This commit is contained in:
Julien Froidefond
2025-11-28 08:40:39 +01:00
parent a5c17e23f6
commit 448cf61e66
26 changed files with 3191 additions and 183 deletions

View File

@@ -7,95 +7,182 @@ export default function Home() {
{/* Hero Section */}
<section className="mb-16 text-center">
<h1 className="mb-4 text-5xl font-bold text-foreground">
Analysez. Planifiez. <span className="text-primary">Progressez.</span>
Vos ateliers, <span className="text-primary">réinventés</span>
</h1>
<p className="mx-auto mb-8 max-w-2xl text-lg text-muted">
Créez des ateliers SWOT interactifs avec vos collaborateurs. Identifiez les forces,
faiblesses, opportunités et menaces, puis définissez ensemble une roadmap
d&apos;actions concrètes.
Des outils interactifs et collaboratifs pour accompagner vos équipes.
Analysez, comprenez et faites progresser vos collaborateurs avec des ateliers modernes.
</p>
<Link
href="/sessions/new"
className="inline-flex items-center gap-2 rounded-lg bg-primary px-6 py-3 text-lg font-semibold text-primary-foreground transition-colors hover:bg-primary-hover"
>
<span></span>
Nouvelle Session SWOT
</Link>
</section>
{/* Features Grid */}
{/* Workshops Grid */}
<section className="mb-16">
<h2 className="mb-8 text-center text-2xl font-bold text-foreground">
Comment ça marche ?
Choisissez votre atelier
</h2>
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-4">
{/* Strength */}
<div className="rounded-xl border border-strength-border bg-strength-bg p-6">
<div className="mb-3 text-3xl">💪</div>
<h3 className="mb-2 text-lg font-semibold text-strength">Forces</h3>
<p className="text-sm text-muted">
Les atouts et compétences sur lesquels s&apos;appuyer pour progresser.
</p>
</div>
<div className="grid gap-8 md:grid-cols-2 max-w-4xl mx-auto">
{/* SWOT Workshop Card */}
<WorkshopCard
href="/sessions"
icon="📊"
title="Analyse SWOT"
tagline="Analysez. Planifiez. Progressez."
description="Cartographiez les forces et faiblesses de vos collaborateurs. Identifiez opportunités et menaces pour définir des actions concrètes."
features={[
'Matrice interactive Forces/Faiblesses/Opportunités/Menaces',
'Actions croisées et plan de développement',
'Collaboration en temps réel',
]}
accentColor="#06b6d4"
newHref="/sessions/new"
/>
{/* Weakness */}
<div className="rounded-xl border border-weakness-border bg-weakness-bg p-6">
<div className="mb-3 text-3xl"></div>
<h3 className="mb-2 text-lg font-semibold text-weakness">Faiblesses</h3>
<p className="text-sm text-muted">
Les axes d&apos;amélioration et points de vigilance à travailler.
</p>
</div>
{/* Opportunity */}
<div className="rounded-xl border border-opportunity-border bg-opportunity-bg p-6">
<div className="mb-3 text-3xl">🚀</div>
<h3 className="mb-2 text-lg font-semibold text-opportunity">Opportunités</h3>
<p className="text-sm text-muted">
Les occasions de développement et de croissance à saisir.
</p>
</div>
{/* Threat */}
<div className="rounded-xl border border-threat-border bg-threat-bg p-6">
<div className="mb-3 text-3xl">🛡</div>
<h3 className="mb-2 text-lg font-semibold text-threat">Menaces</h3>
<p className="text-sm text-muted">
Les risques et obstacles potentiels à anticiper.
</p>
</div>
{/* Moving Motivators Workshop Card */}
<WorkshopCard
href="/motivators"
icon="🎯"
title="Moving Motivators"
tagline="Révélez ce qui motive vraiment"
description="Explorez les 10 motivations intrinsèques de vos collaborateurs. Comprenez leur impact et alignez aspirations et missions."
features={[
'10 cartes de motivation à classer',
'Évaluation de l\'influence positive/négative',
'Récapitulatif personnalisé des motivations',
]}
accentColor="#8b5cf6"
newHref="/motivators/new"
/>
</div>
</section>
{/* Cross Actions Section */}
<section className="rounded-2xl border border-border bg-card p-8 text-center">
<h2 className="mb-4 text-2xl font-bold text-foreground">🔗 Actions Croisées</h2>
<p className="mx-auto mb-6 max-w-2xl text-muted">
La puissance du SWOT réside dans le croisement des catégories. Liez vos forces à vos
opportunités, anticipez les menaces avec vos atouts, et transformez vos faiblesses en
axes de progression.
</p>
<div className="flex flex-wrap justify-center gap-3">
<span className="rounded-full border border-strength-border bg-strength-bg px-4 py-2 text-sm font-medium text-strength">
S + O Maximiser
</span>
<span className="rounded-full border border-threat-border bg-threat-bg px-4 py-2 text-sm font-medium text-threat">
S + T Protéger
</span>
<span className="rounded-full border border-opportunity-border bg-opportunity-bg px-4 py-2 text-sm font-medium text-opportunity">
W + O Améliorer
</span>
<span className="rounded-full border border-weakness-border bg-weakness-bg px-4 py-2 text-sm font-medium text-weakness">
W + T Surveiller
</span>
{/* Benefits Section */}
<section className="rounded-2xl border border-border bg-card p-8">
<h2 className="mb-8 text-center text-2xl font-bold text-foreground">
Pourquoi nos ateliers ?
</h2>
<div className="grid gap-6 md:grid-cols-3">
<BenefitCard
icon="🤝"
title="Collaboratif"
description="Travaillez ensemble en temps réel avec vos collaborateurs et partagez facilement vos sessions."
/>
<BenefitCard
icon="💾"
title="Historique sauvegardé"
description="Retrouvez vos ateliers passés, suivez l'évolution et mesurez les progrès dans le temps."
/>
<BenefitCard
icon="✨"
title="Interface intuitive"
description="Des outils modernes avec drag & drop, pensés pour une utilisation simple et agréable."
/>
</div>
</section>
</main>
{/* Footer */}
<footer className="border-t border-border py-6 text-center text-sm text-muted">
SWOT Manager Outil d&apos;entretiens managériaux
Workshop Manager Vos ateliers managériaux en ligne
</footer>
</>
);
}
function WorkshopCard({
href,
icon,
title,
tagline,
description,
features,
accentColor,
newHref,
}: {
href: string;
icon: string;
title: string;
tagline: string;
description: string;
features: string[];
accentColor: string;
newHref: string;
}) {
return (
<div
className="group relative overflow-hidden rounded-2xl border-2 border-border bg-card p-8 transition-all hover:border-primary/50 hover:shadow-xl"
>
{/* Accent gradient */}
<div
className="absolute inset-x-0 top-0 h-1 opacity-80"
style={{ background: `linear-gradient(to right, ${accentColor}, ${accentColor}80)` }}
/>
{/* Icon & Title */}
<div className="mb-4 flex items-center gap-3">
<span className="text-4xl">{icon}</span>
<div>
<h3 className="text-xl font-bold text-foreground">{title}</h3>
<p className="text-sm font-medium" style={{ color: accentColor }}>
{tagline}
</p>
</div>
</div>
{/* Description */}
<p className="mb-6 text-muted">{description}</p>
{/* Features */}
<ul className="mb-6 space-y-2">
{features.map((feature, i) => (
<li key={i} className="flex items-start gap-2 text-sm text-muted">
<svg
className="mt-0.5 h-4 w-4 shrink-0"
style={{ color: accentColor }}
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
</svg>
{feature}
</li>
))}
</ul>
{/* Actions */}
<div className="flex gap-3">
<Link
href={newHref}
className="flex-1 rounded-lg px-4 py-2.5 text-center font-medium text-white transition-colors"
style={{ backgroundColor: accentColor }}
>
Démarrer
</Link>
<Link
href={href}
className="rounded-lg border border-border px-4 py-2.5 font-medium text-foreground transition-colors hover:bg-card-hover"
>
Mes sessions
</Link>
</div>
</div>
);
}
function BenefitCard({
icon,
title,
description,
}: {
icon: string;
title: string;
description: string;
}) {
return (
<div className="text-center">
<div className="mb-3 text-3xl">{icon}</div>
<h3 className="mb-2 font-semibold text-foreground">{title}</h3>
<p className="text-sm text-muted">{description}</p>
</div>
);
}