Q. How long should one have a pristine diet before attempting a water fast, ideally speaking?
A. That depends on your reasons for fasting and the urgency of it: for example in a diseased state.
Ideally for at least a month, but not essential. I fasted for 25 consecutive days on water-only to overcome a serious disease, with the most awful diet for years beforehand.
To be on the safe-side though, and to make sure your reserves are more than adequate, I would say a month or longer on a pristine organic plant-based diet with adequate healthy fats of all the Omega's, and usable bioavailable protein, such as a rice/pea combo (Jon Barron) which is 90% or more usable protein.