International audienceWe propose one of the first dynamic models of the optimal transition from fossil fuels to renewables in electricity generation that takes into account the variability and intermittency of renewable energy sources as well as storage. We take as an example solar energy, which is variable (no sun at night) and intermittent (few or no sun at day when there are clouds). We show that when the clouds phenomenon is not too severe, intermittency can be safely ignored and the planner just needs to take into account the deterministic variability of the renewable source. In this case, the optimal transition consists in using fossil fuels at day and night and complement them by solar electricity at day while investing to build up s...