The 31-year-old man who drove a delivery truck down 2 kilometres of Nice's seaside promenade, killing 84 people celebrating Bastille Day, had envisaged such a terrorist attack for months before getting behind the wheel, a French prosecutor said Thursday.