import type { Metadata } from "next";
import { Barlow_Condensed, Geist, Geist_Mono } from "next/font/google";
import { CustomCursor } from "@/components/CustomCursor";
import { Footer } from "@/components/Footer";
import { Grain } from "@/components/Grain";
import { Header } from "@/components/Header";
import { IdleSnoopy } from "@/components/IdleSnoopy";
import { PaintLoader } from "@/components/PaintLoader";
import { ScrollProgress } from "@/components/ScrollProgress";
import { SmoothScroll } from "@/components/SmoothScroll";
import "./globals.css";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

const barlow = Barlow_Condensed({
  variable: "--font-barlow",
  subsets: ["latin"],
  weight: ["500", "600", "700", "800"],
});

export const metadata: Metadata = {
  title: {
    default: "STO — Société de Tir d’Ostwald",
    template: "%s · STO",
  },
  description:
    "Club de tir sportif et de loisir à Ostwald. Stands 10, 20, 25 et 50 m. Initiation, location d’armes, licence FFTir. Safe & protect.",
};

export default function RootLayout({ children }: LayoutProps<"/">) {
  return (
    <html
      lang="fr"
      className={`${geistSans.variable} ${geistMono.variable} ${barlow.variable} h-full antialiased`}
    >
      <body className="flex min-h-full flex-col bg-ink font-sans text-paper lg:cursor-none">
        <SmoothScroll />
        <PaintLoader />
        <CustomCursor />
        <Grain />
        <div className="scanlines" aria-hidden="true" />
        <ScrollProgress />
        <Header />
        <main className="flex-1">{children}</main>
        <Footer />
        <IdleSnoopy />
      </body>
    </html>
  );
}
