import type { Metadata } from 'next'
import ClientScripts from './ClientScripts'
import './frontend.css'

export const metadata: Metadata = {
  title: {
    default: 'REBOURS — Mobilier d\u2019art contemporain | Collection 001',
    template: '%s — REBOURS',
  },
  description:
    'REBOURS Studio crée du mobilier d\u2019art contemporain inspiré du Space Age et du mouvement Memphis. Pièces uniques fabriquées à Paris. Collection 001 en cours.',
  keywords: 'mobilier art, design contemporain, space age, memphis design, lampe béton, Paris, pièce unique',
  authors: [{ name: 'REBOURS Studio' }],
  robots: 'index, follow',
  metadataBase: new URL(process.env.NEXT_PUBLIC_SERVER_URL || 'https://rebours.studio'),
  openGraph: {
    type: 'website',
    locale: 'fr_FR',
    siteName: 'REBOURS Studio',
    images: ['/assets/lamp-violet.jpg'],
  },
  twitter: {
    card: 'summary_large_image',
    images: ['/assets/lamp-violet.jpg'],
  },
  icons: {
    icon: [
      { url: '/favicon.ico' },
      { url: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
      { url: '/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
    ],
    apple: '/apple-touch-icon.png',
  },
}

export default function FrontendLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="fr">
      <head>
        <link rel="preconnect" href="https://fonts.googleapis.com" />
        <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
        <link
          rel="stylesheet"
          href="https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap"
        />
        <link rel="stylesheet" href="/style.css" />
      </head>
      <body>
        {children}
        <ClientScripts />
      </body>
    </html>
  )
}
