Julian Alaphilippe timed his late attack perfectly to claim the world championship road race title on Sunday, giving France its first rainbow jersey since 1997.