import './Layout.css';
import { Outlet } from 'react-router-dom';
import Header from './Header';
import ErrorBoundary from './ErrorBoundary';

interface LayoutProps {
  title: string;
}

/** Gabarit applicatif : Header + zone de contenu (routes enfants via Outlet). */
export default function Layout({ title }: LayoutProps) {
  return (
    <div className="app-layout">
      <Header title={title} />
      <main className="app-content">
        <ErrorBoundary>
          <Outlet />
        </ErrorBoundary>
      </main>
    </div>
  );
}
