2025-12-03 21:56:50 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
import { Link } from 'react-router-dom';
|
|
|
|
|
import { cn } from '@/lib/utils';
|
|
|
|
|
|
|
|
|
|
interface AuthLayoutProps {
|
|
|
|
|
title: string;
|
|
|
|
|
subtitle?: string;
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
footerLinks?: Array<{ label: string; to: string }>;
|
|
|
|
|
className?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function AuthLayout({
|
|
|
|
|
title,
|
|
|
|
|
subtitle,
|
|
|
|
|
children,
|
|
|
|
|
footerLinks,
|
|
|
|
|
className,
|
|
|
|
|
}: AuthLayoutProps) {
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
className={cn(
|
2026-01-11 15:30:43 +00:00
|
|
|
'min-h-screen flex items-center justify-center bg-kodo-void py-12 px-4 sm:px-6 lg:px-8 relative overflow-hidden',
|
2025-12-13 02:34:34 +00:00
|
|
|
className,
|
2025-12-03 21:56:50 +00:00
|
|
|
)}
|
|
|
|
|
role="main"
|
|
|
|
|
aria-label="Page d'authentification"
|
|
|
|
|
>
|
2026-01-11 15:30:43 +00:00
|
|
|
{/* Background Effects */}
|
|
|
|
|
<div className="absolute inset-0 overflow-hidden pointer-events-none">
|
|
|
|
|
<div className="absolute top-0 right-0 w-96 h-96 bg-kodo-cyan/5 rounded-full blur-3xl" />
|
|
|
|
|
<div className="absolute bottom-0 left-0 w-96 h-96 bg-kodo-magenta/5 rounded-full blur-3xl" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="max-w-md w-full space-y-8 relative z-10 animate-fade-in">
|
2025-12-03 21:56:50 +00:00
|
|
|
{/* Logo and Title */}
|
|
|
|
|
<header className="text-center">
|
2026-01-11 15:30:43 +00:00
|
|
|
<div className="flex items-center justify-center mb-6">
|
2025-12-03 21:56:50 +00:00
|
|
|
<div
|
2026-01-11 15:30:43 +00:00
|
|
|
className="h-12 w-12 rounded-xl bg-gradient-to-br from-kodo-cyan to-kodo-cyan-dim flex items-center justify-center shadow-glow-cyan"
|
2025-12-03 21:56:50 +00:00
|
|
|
aria-hidden="true"
|
|
|
|
|
>
|
2026-01-11 15:30:43 +00:00
|
|
|
<span className="text-kodo-void font-bold text-2xl">V</span>
|
2025-12-03 21:56:50 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
<span className="ml-3 font-bold text-3xl text-white">Veza</span>
|
2025-12-03 21:56:50 +00:00
|
|
|
</div>
|
2025-12-13 02:34:34 +00:00
|
|
|
<h1
|
|
|
|
|
id="auth-form-title"
|
2026-01-11 15:30:43 +00:00
|
|
|
className="text-4xl font-bold text-white mb-2"
|
2025-12-13 02:34:34 +00:00
|
|
|
>
|
2025-12-03 21:56:50 +00:00
|
|
|
{title}
|
|
|
|
|
</h1>
|
|
|
|
|
{subtitle && (
|
2026-01-13 18:47:57 +00:00
|
|
|
<p className="text-sm text-kodo-secondary" role="doc-subtitle">
|
2025-12-03 21:56:50 +00:00
|
|
|
{subtitle}
|
|
|
|
|
</p>
|
|
|
|
|
)}
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
{/* Content Card */}
|
2025-12-13 02:34:34 +00:00
|
|
|
<section
|
2026-01-11 15:30:43 +00:00
|
|
|
className="glass rounded-2xl border border-white/10 py-8 px-6 shadow-2xl backdrop-blur-xl"
|
2025-12-03 21:56:50 +00:00
|
|
|
aria-labelledby="auth-form-title"
|
|
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{/* Footer Links */}
|
|
|
|
|
{footerLinks && footerLinks.length > 0 && (
|
2025-12-13 02:34:34 +00:00
|
|
|
<nav
|
|
|
|
|
className="text-center space-x-4"
|
|
|
|
|
aria-label="Navigation d'authentification"
|
|
|
|
|
>
|
2025-12-03 21:56:50 +00:00
|
|
|
{footerLinks.map((link) => (
|
|
|
|
|
<Link
|
|
|
|
|
key={link.to}
|
|
|
|
|
to={link.to}
|
2026-01-16 00:56:47 +00:00
|
|
|
className="text-sm text-kodo-cyan dark:text-kodo-cyan hover:text-kodo-cyan dark:hover:text-kodo-cyan transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded"
|
2025-12-03 21:56:50 +00:00
|
|
|
>
|
|
|
|
|
{link.label}
|
|
|
|
|
</Link>
|
|
|
|
|
))}
|
|
|
|
|
</nav>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|