/** * earth-now.co * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai * File: apps/web/app/layout.tsx * Purpose: Root layout — light-first shell (dark via data-theme toggle, read pre-paint), metadata, footer attribution + methodology link */ import type { Metadata } from "next"; import Link from "next/link"; import type { ReactNode } from "react"; import "./globals.css"; export const metadata: Metadata = { title: "earth-now.co — La planète en direct", description: "La planète en direct / The planet, live — compteurs mondiaux pilotés par des modèles statistiques documentés (sources, incertitude, méthode).", }; // Applied before paint so a saved dark preference never flashes light. // LIGHT is the default — dark only when explicitly chosen. const THEME_BOOT = `try{if(localStorage.getItem("earth-now.theme")==="dark")document.documentElement.dataset.theme="dark"}catch(e){}`; export default function RootLayout({ children }: { children: ReactNode }) { // Default lang is "fr"; the client dashboard syncs document.documentElement.lang // with the user's locale toggle (persisted in localStorage). return (