"use client";

export default function GlobalError({ reset }: { error: Error & { digest?: string }; reset: () => void }) {
  return (
    <html lang="fr">
      <body
        style={{
          margin: 0,
          minHeight: "100vh",
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          background: "#F6F1E7",
          color: "#24221D",
          fontFamily: "Georgia, serif",
          padding: "2rem",
          textAlign: "center",
        }}
      >
        <div>
          <p style={{ letterSpacing: "0.3em", fontSize: "12px", opacity: 0.5 }}>DAR ZELLIGE</p>
          <h1 style={{ fontSize: "2rem", fontWeight: 400, margin: "1rem 0" }}>
            Une erreur est survenue
          </h1>
          <p style={{ fontFamily: "system-ui, sans-serif", fontSize: "15px", opacity: 0.6 }}>
            Merci de rafraîchir la page. / Please refresh the page.
          </p>
          <button
            onClick={reset}
            style={{
              marginTop: "1.5rem",
              padding: "0.8rem 1.6rem",
              background: "#24221D",
              color: "#F6F1E7",
              border: 0,
              textTransform: "uppercase",
              letterSpacing: "0.16em",
              fontSize: "12px",
              cursor: "pointer",
            }}
          >
            Réessayer
          </button>
        </div>
      </body>
    </html>
  );
}
