* France must reduce its public deficit - audit office

* Costs of energy transition are underestimated - auditor

* Cost of servicing debt rise

PARIS, July 15 (Reuters) - France's ailing public finances and its 154 billion euros ($168 billion) deficit figure leave the euro zone's second-biggest economy "dangerously exposed" in case of a new macroeconomic shock, the national public audit office said on Monday.

The warning from the audit office, known as the Cour des Comptes, comes at a delicate time for President Emmanuel Macron's government after this month's parliamentary election.

The election resulted in a hung parliament but while no party won an outright majority, the far-right National Rally (RN) and the New Popular Front left-wing coalition performed well, with both blocs promising big public spending programs.

The audit office reiterated it was vital for France to reduce its public deficit, which rose to 154 billion euros in 2023 from 125.8 billion in 2022.

"Due to delays in making real structural reforms, the cost of public debt, which has been exacerbated by recurring deficits and the weight of these deficits, has become more and more expensive," it said.

This "has hampered other spending, hinders the ability to make investments and leaves the country dangerously exposed in case of a new macroeconomic shock," it added.

DEBTS TO PAY

Pierre Moscovici, the former French finance minister who heads the Cour des Comptes, highlighted the rising costs of servicing France's debts.

"We already pay 52 billion euros a year to pay it back. We will be paying 80 billion euros to repay it in 2027. This means that there is no longer any room for maneuver to do the rest, for education, justice, security and financing the ecological transition," Moscovici told France Inter radio.

The audit office said France's public financing programs did not adequately take into account costs linked to policies aimed at protecting the environment, such as using more renewable energy, and that this marked a "major negative shock."

It said the extra investments needed for such policies were estimated to bring further annual costs of 60 billion euros a year by 2030.

Last September, France's RTE grid operator said massive short-to-medium term investments were needed in the power sector as the country aims to reduce its carbon emissions further and continue the switch from fossil fuels by 2050.

Research published this year by EU lawmakers involved with Green political parties also stated the EU will need 1.5 trillion euros per year of investments to meet its 2050 net zero emissions target.

Last month, the European Commission said France and six other countries should be disciplined for running budget deficits in excess of EU limits, with deadlines for reducing the gaps to be set in November.

France had a budget gap of 5.5% of gross domestic product (GDP) in 2023, up from 4.8% in 2022 and above the EU's deficit limit of 3%.

French public debt was 110.6% of GDP in 2023. The EU Commission expects this to increase to 112.4% this year and to 113.8% in 2025 while the EU limit is 60%.

Macron's government has pledged to meet the EU's deficit limit of 3% by 2027, but the outlook has been complicated by the parliamentary deadlock.

Credit rating agencies Moody's and S&P Global have warned of negative impacts on the French economy from the political deadlock, where no political party won an outright majority.

($1 = 0.9164 euros) (Reporting by Sudip Kar-Gupta; Additional reporting by Tassilo Hummel; Editing by Jason Neely and Angus MacSwan)