---
import {ClientRouter} from 'astro:transitions';
import '../styles/global.css';

interface Props {
	title: string;
}

const { title } = Astro.props;
---

<!doctype html>
<html lang="fr">
	<head>
		<meta charset="UTF-8" />
		<meta name="description" content="Le journal de bord de l'artisan." />
		<meta name="viewport" content="width=device-width" />
		<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
		<meta name="generator" content={Astro.generator} />
		<title>{title}</title>
		<ClientRouter />
	</head>
	<body class="bg-slate-100 text-slate-800 font-sans">
		<main class="max-w-3xl mx-auto p-4 sm:p-8">
			<header class="mb-8 text-center">
				<a href="/bujo" class="text-2xl font-bold text-slate-900 hover:text-blue-700 transition-colors duration-300">
					Journal de Bord
				</a>
				<p class="text-slate-500">Le codex de la vie de l'artisan.</p>
			</header>
			<div class="bg-white rounded-lg shadow-md p-6 sm:p-8">
				<slot />
			</div>
			<footer class="text-center mt-12 text-sm text-slate-400">
				<a href="/auteur" class="hover:text-slate-600">Retour à la page Auteur</a>
			</footer>
		</main>
	</body>
</html>