import type { Metadata, Viewport } from "next"; import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; import { cookies } from "next/headers"; const geistSans = Geist({ variable: "--font-geist-sans", subsets: ["latin"], display: "swap" }); const geistMono = Geist_Mono({ variable: "--font-geist-mono", subsets: ["latin"], display: "swap" }); export const metadata: Metadata = { title: { default: "Chat SPBoucher AI", template: "%s · Chat SPBoucher AI" }, description: "Interface privée multi-modèles de Simon-Pierre Boucher", applicationName: "Chat SPBoucher AI", manifest: "/manifest.webmanifest", appleWebApp: { capable: true, statusBarStyle: "black-translucent", title: "SPB AI" }, icons: { icon: "/icons/icon-192.png", apple: "/icons/apple-touch-icon.png" }, robots: { index: false, follow: false }, }; export const viewport: Viewport = { themeColor: [{ media: "(prefers-color-scheme: dark)", color: "#0a0c10" }, { media: "(prefers-color-scheme: light)", color: "#f7f8fb" }], width: "device-width", initialScale: 1, viewportFit: "cover", maximumScale: 1 }; export default async function RootLayout({ children }: { children: React.ReactNode }) { const theme = (await cookies()).get("csa_theme")?.value ?? "dark"; return (
{theme === "system" && } {children} ); }