$canonicalDomain, 'project_name' => $projectName, 'project_description' => $projectDescription, 'project_image_url' => $_SERVER['PROJECT_IMAGE_URL'] ?? '', 'google_site_verification' => 'uNUUwP2X_y7thS7ulDRafX0wNLRuC1l2Xj39FaiOZoM', 'base_url' => $scheme . '://' . $host, 'canonical_base_url' => 'https://' . $canonicalDomain, 'asset_version' => site_asset_version(), 'owner_name' => 'M LORENTE CHRISTOPHE', 'dpo_name' => 'M LORENTE CHRISTOPHE', 'dpo_address' => '7 rue Lucien Deneau – 28300 Mainvilliers', 'dpo_phone' => '06 58 22 59 16', 'host_name' => 'FLATLOGIC.COM', ]; return $settings; } function e(mixed $value): string { return htmlspecialchars((string) $value, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); } function site_current_path(): string { $requestUri = $_SERVER['REQUEST_URI'] ?? '/'; $path = strtok($requestUri, '?'); if ($path === false || $path === '' || $path === '/index.php') { return '/'; } return $path; } function site_asset_url(string $relativePath): string { return $relativePath . '?v=' . rawurlencode(site_asset_version()); } function site_has_saved_consent(): bool { $rawConsent = $_COOKIE['ptcs_consent'] ?? null; if (!is_string($rawConsent) || $rawConsent === '') { return false; } $decoded = json_decode($rawConsent, true); return is_array($decoded) && array_key_exists('essential', $decoded); } function site_is_home_request(): bool { return in_array(site_current_path(), ['/', '/index.php'], true); } function site_should_lock_cookie_overlay(): bool { return site_is_home_request() && !site_has_saved_consent(); } function render_site_head(string $pageTitle, string $fallbackDescription, string $keywords = '', bool $noindex = false): void { $site = site_settings(); $projectDescription = $site['project_description']; $projectImageUrl = $site['project_image_url']; $canonical = ($site['canonical_base_url'] ?? $site['base_url']) . site_current_path(); $description = $fallbackDescription !== '' ? $fallbackDescription : $projectDescription; ?>