diff --git a/src/components/ErrorPage.test.tsx b/src/components/ErrorPage.test.tsx
new file mode 100644
index 0000000..f301680
--- /dev/null
+++ b/src/components/ErrorPage.test.tsx
@@ -0,0 +1,27 @@
+import { render, screen } from '@testing-library/react'
+import { describe, expect, it } from 'vitest'
+import ErrorPage from './ErrorPage'
+
+describe('ErrorPage', () => {
+ it('renders default 404 content', () => {
+ render()
+
+ expect(screen.getByText('404')).toBeInTheDocument()
+ expect(screen.getByRole('heading', { name: 'Page introuvable' })).toBeInTheDocument()
+ })
+
+ it('renders a link back to the home page', () => {
+ render()
+
+ const link = screen.getByRole('link', { name: "Retour à l'accueil" })
+ expect(link).toHaveAttribute('href', '/')
+ })
+
+ it('uses custom code, title and message when provided', () => {
+ render()
+
+ expect(screen.getByText('500')).toBeInTheDocument()
+ expect(screen.getByRole('heading', { name: 'Erreur serveur' })).toBeInTheDocument()
+ expect(screen.getByText('Une erreur est survenue.')).toBeInTheDocument()
+ })
+})
\ No newline at end of file
diff --git a/src/components/ErrorPage.tsx b/src/components/ErrorPage.tsx
new file mode 100644
index 0000000..ea7f854
--- /dev/null
+++ b/src/components/ErrorPage.tsx
@@ -0,0 +1,25 @@
+import type { ErrorPageProps } from '../interfaces/error-page'
+
+function ErrorPage({
+ code = 404,
+ title = 'Page introuvable',
+ message = "Désolé, la page que vous cherchez n'existe pas.",
+}: ErrorPageProps) {
+ return (
+
+ {code}
+
+
+ Retour à l'accueil
+
+
+ )
+}
+
+export default ErrorPage
\ No newline at end of file
diff --git a/src/interfaces/error-page.ts b/src/interfaces/error-page.ts
new file mode 100644
index 0000000..e39cbca
--- /dev/null
+++ b/src/interfaces/error-page.ts
@@ -0,0 +1,5 @@
+export interface ErrorPageProps {
+ code?: number
+ title?: string
+ message?: string
+}
\ No newline at end of file