The first thing you should do is collect all the elements under a single header into their own sublists. Assuming the "levels" are always in increasing order, this will do the job:
sublists = Split[data, First@#1 <= First@#2 &]
(* {{{0, A1, 1}, {1, C1, 2}, {1, C2, 3}, {3, C4, 1}},
{{0, A2, 1}, {1, C2, 1}},
{{0, A1, 4}, {1, C1, 1}, {2, C2, 1}}} *)
Then for each sublist, you can just take its header and join it to all its elements.
formatted = Function[list, Join[Rest@First@list, #] & /@ list] /@ sublists
(* {{{A1, 1, 0, A1, 1}, {A1, 1, 1, C1, 2}, {A1, 1, 1, C2, 3}, {A1, 1, 3, C4, 1}},
{{A2, 1, 0, A2, 1}, {A2, 1, 1, C2, 1}},
{{A1, 4, 0, A1, 4}, {A1, 4, 1, C1, 1}, {A1, 4, 2, C2, 1}}} *)
In the end you probably also want to flatten the sublists.
output = Flatten[formatted, 1]
(* {{A1, 1, 0, A1, 1}, {A1, 1, 1, C1, 2}, {A1, 1, 1, C2, 3}, {A1, 1, 3, C4, 1},
{A2, 1, 0, A2, 1}, {A2, 1, 1, C2, 1}, {A1, 4, 0, A1, 4}, {A1, 4, 1, C1, 1},
{A1, 4, 2, C2, 1}} *)
Of course, all of this can be pulled into a single expression if you prefer:
output = Flatten[
Function[list, Join[Rest@First@list, #] & /@ list] /@
Split[data, First@#1 <= First@#2 &], 1]