import type { Metadata } from "next";
import { Outfit } from "next/font/google";
import "./globals.css";

const outfit = Outfit({
  variable: "--font-outfit",
  subsets: ["latin"],
  display: "swap",
});

export const metadata: Metadata = {
  metadataBase: new URL("https://ic-run.com"),
  title: "Internet Conseil Réunion | Sites web, SEO local & IA à La Réunion",
  description:
    "Internet Conseil Réunion accompagne les entreprises réunionnaises dans la refonte de sites vitrines, le webmastering, la maintenance WordPress, le SEO local, Google Business et les solutions IA simples.",
  alternates: { canonical: "/" },
  icons: { icon: "/img/favicon.png" },
  openGraph: {
    type: "website",
    locale: "fr_FR",
    url: "https://ic-run.com/",
    title: "Internet Conseil Réunion | Sites web, SEO local & IA à La Réunion",
    description:
      "Refonte de sites vitrines, webmastering, maintenance WordPress, SEO local, Google Business et solutions IA pour les entreprises de La Réunion.",
    images: ["/img/background.jpg"],
  },
};

/* Données structurées : entreprise locale (SEO) */
const jsonLd = {
  "@context": "https://schema.org",
  "@type": "ProfessionalService",
  name: "Internet Conseil Réunion",
  url: "https://ic-run.com/",
  email: "nicolas@ic-run.com",
  description:
    "Agence web à La Réunion : refonte de sites vitrines, webmastering, maintenance WordPress, SEO local, optimisation Google Business Profile et solutions d'intelligence artificielle pour les entreprises locales.",
  areaServed: { "@type": "AdministrativeArea", name: "La Réunion" },
  knowsAbout: [
    "Refonte site vitrine",
    "Webmastering",
    "Maintenance WordPress",
    "SEO local",
    "Google Business Profile",
    "Intelligence artificielle pour entreprises",
  ],
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="fr" className={outfit.variable}>
      <body>
        {children}
        <script
          type="application/ld+json"
          dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
        />
      </body>
    </html>
  );
}
