From c7228adeb796d238d7f98d07f3aaf1fa8a485737 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?BITARD=20Micha=C3=ABl?= <michael.bitard@beta.gouv.fr>
Date: Tue, 25 Feb 2025 10:08:42 +0000
Subject: [PATCH] =?UTF-8?q?chore(etapes):=20v=C3=A9rifie=20que=20les=20con?=
 =?UTF-8?q?tenu=20h=C3=A9rit=C3=A9=20des=20=C3=A9tapes=20ne=20fait=20pas?=
 =?UTF-8?q?=20planter=20l'=C3=A9dition=20des=20=C3=A9tapes=20(pub/pnm-publ?=
 =?UTF-8?q?ic/camino!1638)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 packages/api/src/business/_logs-update.ts     |   5 +
 packages/api/src/business/daily.ts            |   4 +-
 ...titres-demarches-statut-ids-update.test.ts | 191 +++++++++---------
 .../titres-demarches-statut-ids-update.ts     |   3 +-
 ...-etapes-heritage-contenu-update.queries.ts | 141 +++++++------
 ...s-heritage-contenu-update.queries.types.ts |  15 ++
 .../titres-etapes-heritage-contenu-update.ts  |  70 ++++++-
 .../processes/titres-etapes-ordre-update.ts   |   3 +-
 ...-sections-edit.stories_snapshots_Date.html |   2 +-
 ...ries_snapshots_TousLesElementsRemplis.html |   2 +-
 ...ories_snapshots_TousLesElementsRequis.html |   2 +-
 ...pshots_TousLesElementsVidesOptionnels.html |   2 +-
 .../dsfr-input.stories_snapshots_Date.html    |   2 +-
 ...dsfr-input.stories_snapshots_Optional.html |   2 +-
 packages/ui/src/components/_ui/dsfr-input.tsx |   2 +-
 ...res-etapes.stories_snapshots_Multiple.html |   8 +-
 ...pes.stories_snapshots_PartialOneValue.html |   4 +-
 ...ument-popup.stories_snapshots_Default.html |   2 +-
 ...ies_snapshots_TypeDeDocumentVerouille.html |   2 +-
 ...pe-edition.stories_snapshots_Creation.html |   2 +-
 ....stories_snapshots_DemandeArmComplete.html |   2 +-
 ..._snapshots_ModificationDemandeHeritee.html |   2 +-
 ...EnvironnementaleADesStatutsDifferents.html |   2 +-
 ...atoireSuppressionDuStatutNonRenseigne.html |   2 +-
 ...apshots_DocumentInitialDejaSauvegarde.html |   2 +-
 ...s_snapshots_DocumentInitialTemporaire.html |   2 +-
 ...stories_snapshots_SansDocumentInitial.html |   2 +-
 ...e-type-edit.stories_snapshots_Default.html |   2 +-
 ...e-type-edit.stories_snapshots_Loading.html |   2 +-
 ...type-edit.stories_snapshots_WithError.html |   2 +-
 ...ype-edit.stories_snapshots_WithTypeId.html |   2 +-
 ...ories_snapshots_WithTypeIdAndStatutId.html |   2 +-
 ...e-edit-form.stories_snapshots_Default.html |   2 +-
 ...eConsultationAdministrationsCentrales.html |   2 +-
 ...snapshots_EtapeDecisionAdministration.html |   2 +-
 ...m.stories_snapshots_EtapeModification.html |   2 +-
 ...ories_snapshots_EtapeModificationAvis.html |   2 +-
 ...les-edit.stories_snapshots_ArmJorfONF.html |   4 +-
 ...it.stories_snapshots_HeritageDisabled.html |   2 +-
 ...age-edit.stories_snapshots_NoHeritage.html |   2 +-
 ...itage-edit.stories_snapshots_Optional.html |   2 +-
 ...concurrence.stories_snapshots_Default.html |   2 +-
 ...concurrence.stories_snapshots_Loading.html |   2 +-
 ...hots_PerimetreAvecSatelliteEquivalent.html |   2 +-
 ...ries_snapshots_PerimetreSansSatellite.html |   2 +-
 ...ncurrence.stories_snapshots_WithError.html |   2 +-
 46 files changed, 314 insertions(+), 204 deletions(-)

diff --git a/packages/api/src/business/_logs-update.ts b/packages/api/src/business/_logs-update.ts
index 331993e29..bf49ca629 100644
--- a/packages/api/src/business/_logs-update.ts
+++ b/packages/api/src/business/_logs-update.ts
@@ -2,6 +2,7 @@ import { isNotNullNorUndefined, isNotNullNorUndefinedNorEmpty } from 'camino-com
 import { Index, IEntrepriseEtablissement, IEntreprise } from '../types'
 export const dailySummaryMarker = 'tâches exécutées:' as const
 export const logsUpdate = ({
+  heritageWithUnknownEtapes,
   etapesCompletesErreurs,
   tdeErreurs,
   demarcheDefinitionsErreurs,
@@ -29,6 +30,7 @@ export const logsUpdate = ({
   etablissementsUpdated,
   etablissementsDeleted,
 }: {
+  heritageWithUnknownEtapes?: unknown[]
   etapesCompletesErreurs?: { surTitreValide: string[]; autre: string[]; etapesRecentes: string[] }
   tdeErreurs?: number
   demarcheDefinitionsErreurs?: number
@@ -72,6 +74,9 @@ export const logsUpdate = ({
     }
   }
 
+  if (isNotNullNorUndefinedNorEmpty(heritageWithUnknownEtapes)) {
+    console.error(`${heritageWithUnknownEtapes.length} heritage de contenu qui pointe sur des étapes non existantes`)
+  }
   if (isNotNullNorUndefined(tdeErreurs) && tdeErreurs > 0) {
     console.warn(`${tdeErreurs} erreurs TDE`)
   }
diff --git a/packages/api/src/business/daily.ts b/packages/api/src/business/daily.ts
index de4fc7d11..6ca341289 100644
--- a/packages/api/src/business/daily.ts
+++ b/packages/api/src/business/daily.ts
@@ -10,7 +10,7 @@ import { titresPublicUpdate } from './processes/titres-public-update'
 import { titresPropsEtapesIdsUpdate } from './processes/titres-props-etapes-ids-update'
 import { titresStatutIdsUpdate } from './processes/titres-statut-ids-update'
 import { titresEtapesHeritagePropsUpdate } from './processes/titres-etapes-heritage-props-update'
-import { titresEtapesHeritageContenuUpdate } from './processes/titres-etapes-heritage-contenu-update'
+import { checkEtapeInContenuHeritage, titresEtapesHeritageContenuUpdate } from './processes/titres-etapes-heritage-contenu-update'
 import { titresActivitesPropsUpdate } from './processes/titres-activites-props-update'
 import { titresSlugsUpdate } from './processes/titres-slugs-update'
 import { logsUpdate } from './_logs-update'
@@ -40,6 +40,7 @@ export const daily = async (pool: Pool): Promise<void> => {
     const fondamentaleIdUpdated = await callAndExit(etapesFondamentaleIdUpdateForAll(pool))
     const titresEtapesHeritagePropsUpdated = await titresEtapesHeritagePropsUpdate(userSuper)
     const titresEtapesHeritageContenuUpdated = await titresEtapesHeritageContenuUpdate(pool, userSuper)
+    const heritageWithUnknownEtapes = await callAndExit(checkEtapeInContenuHeritage(pool))
 
     const titresDemarchesStatutUpdated = await titresDemarchesStatutIdUpdate(pool)
     const titresDemarchesOrdreUpdated = await titresDemarchesOrdreUpdate()
@@ -62,6 +63,7 @@ export const daily = async (pool: Pool): Promise<void> => {
     const etapesCompletesErreurs = await etapesCompletesCheck(pool)
 
     logsUpdate({
+      heritageWithUnknownEtapes,
       etapesCompletesErreurs: etapesCompletesErreurs,
       tdeErreurs,
       demarcheDefinitionsErreurs,
diff --git a/packages/api/src/business/processes/titres-demarches-statut-ids-update.test.ts b/packages/api/src/business/processes/titres-demarches-statut-ids-update.test.ts
index b90b58b96..824b7a49b 100644
--- a/packages/api/src/business/processes/titres-demarches-statut-ids-update.test.ts
+++ b/packages/api/src/business/processes/titres-demarches-statut-ids-update.test.ts
@@ -5,6 +5,7 @@ import { newDemarcheId, newEtapeId, newTitreId } from '../../database/models/_fo
 import { toCaminoDate } from 'camino-common/src/date'
 import { Pool } from 'pg'
 import { ETAPE_IS_NOT_BROUILLON } from 'camino-common/src/etape'
+import { Effect } from 'effect'
 
 vi.mock('./titres-etapes-heritage-contenu-update.queries', () => ({
   getDemarches: vi.fn().mockResolvedValue(true),
@@ -20,110 +21,116 @@ console.info = vi.fn()
 
 describe("statut des démarches d'un titre", () => {
   test("met à jour le statut d'une démarche", async () => {
-    getDemarchesMock.mockResolvedValue({
-      [newDemarcheId('')]: {
-        id: newDemarcheId('h-cx-courdemanges-1988-oct01'),
-        titreId: newTitreId('h-cx-courdemanges-1988'),
-        titreTypeId: 'cxh',
-        typeId: 'oct',
-        statutId: 'rej',
-        etapes: [
-          {
-            id: newEtapeId('h-cx-courdemanges-1988-oct01-dpu01'),
-            typeId: 'dpu',
-            statutId: 'acc',
-            concurrence: 'non-applicable',
-            hasTitreFrom: 'non-applicable',
-            isBrouillon: ETAPE_IS_NOT_BROUILLON,
-            ordre: 2,
-            date: toCaminoDate('1988-03-11'),
-            communes: [],
-            contenu: {},
-            heritageContenu: {},
-            surface: null,
-            demarcheIdsConsentement: [],
-          },
-          {
-            id: newEtapeId('h-cx-courdemanges-1988-oct01-dex01'),
-            typeId: 'dex',
-            statutId: 'acc',
-            concurrence: 'non-applicable',
-            hasTitreFrom: 'non-applicable',
-            isBrouillon: ETAPE_IS_NOT_BROUILLON,
-            ordre: 1,
-            date: toCaminoDate('1988-03-06'),
-            communes: [],
-            contenu: {},
-            heritageContenu: {},
-            surface: null,
-            demarcheIdsConsentement: [],
-          },
-        ],
-      },
-    })
+    getDemarchesMock.mockReturnValue(
+      Effect.succeed({
+        [newDemarcheId('')]: {
+          id: newDemarcheId('h-cx-courdemanges-1988-oct01'),
+          titreId: newTitreId('h-cx-courdemanges-1988'),
+          titreTypeId: 'cxh',
+          typeId: 'oct',
+          statutId: 'rej',
+          etapes: [
+            {
+              id: newEtapeId('h-cx-courdemanges-1988-oct01-dpu01'),
+              typeId: 'dpu',
+              statutId: 'acc',
+              concurrence: 'non-applicable',
+              hasTitreFrom: 'non-applicable',
+              isBrouillon: ETAPE_IS_NOT_BROUILLON,
+              ordre: 2,
+              date: toCaminoDate('1988-03-11'),
+              communes: [],
+              contenu: {},
+              heritageContenu: {},
+              surface: null,
+              demarcheIdsConsentement: [],
+            },
+            {
+              id: newEtapeId('h-cx-courdemanges-1988-oct01-dex01'),
+              typeId: 'dex',
+              statutId: 'acc',
+              concurrence: 'non-applicable',
+              hasTitreFrom: 'non-applicable',
+              isBrouillon: ETAPE_IS_NOT_BROUILLON,
+              ordre: 1,
+              date: toCaminoDate('1988-03-06'),
+              communes: [],
+              contenu: {},
+              heritageContenu: {},
+              surface: null,
+              demarcheIdsConsentement: [],
+            },
+          ],
+        },
+      })
+    )
     const titresDemarchesStatutUpdated = await titresDemarchesStatutIdUpdate(undefined as unknown as Pool)
 
     expect(titresDemarchesStatutUpdated.length).toEqual(1)
   })
 
   test("ne met pas à jour le statut d'une démarche", async () => {
-    getDemarchesMock.mockResolvedValue({
-      [newDemarcheId('')]: {
-        id: newDemarcheId('h-cx-courdemanges-1988-oct01'),
-        titreId: newTitreId('h-cx-courdemanges-1988'),
-        titreTypeId: 'cxh',
-        typeId: 'oct',
-        statutId: 'acc',
-        etapes: [
-          {
-            id: newEtapeId('h-cx-courdemanges-1988-oct01-dpu01'),
-            typeId: 'dpu',
-            statutId: 'acc',
-            concurrence: 'non-applicable',
-            hasTitreFrom: 'non-applicable',
-            isBrouillon: ETAPE_IS_NOT_BROUILLON,
-            ordre: 2,
-            date: toCaminoDate('1988-03-11'),
-            communes: [],
-            contenu: {},
-            heritageContenu: {},
-            surface: null,
-            demarcheIdsConsentement: [],
-          },
-          {
-            id: newEtapeId('h-cx-courdemanges-1988-oct01-dex01'),
-            typeId: 'dex',
-            statutId: 'acc',
-            concurrence: 'non-applicable',
-            hasTitreFrom: 'non-applicable',
-            isBrouillon: ETAPE_IS_NOT_BROUILLON,
-            ordre: 1,
-            date: toCaminoDate('1988-03-06'),
-            communes: [],
-            contenu: {},
-            heritageContenu: {},
-            surface: null,
-            demarcheIdsConsentement: [],
-          },
-        ],
-      },
-    })
+    getDemarchesMock.mockReturnValue(
+      Effect.succeed({
+        [newDemarcheId('')]: {
+          id: newDemarcheId('h-cx-courdemanges-1988-oct01'),
+          titreId: newTitreId('h-cx-courdemanges-1988'),
+          titreTypeId: 'cxh',
+          typeId: 'oct',
+          statutId: 'acc',
+          etapes: [
+            {
+              id: newEtapeId('h-cx-courdemanges-1988-oct01-dpu01'),
+              typeId: 'dpu',
+              statutId: 'acc',
+              concurrence: 'non-applicable',
+              hasTitreFrom: 'non-applicable',
+              isBrouillon: ETAPE_IS_NOT_BROUILLON,
+              ordre: 2,
+              date: toCaminoDate('1988-03-11'),
+              communes: [],
+              contenu: {},
+              heritageContenu: {},
+              surface: null,
+              demarcheIdsConsentement: [],
+            },
+            {
+              id: newEtapeId('h-cx-courdemanges-1988-oct01-dex01'),
+              typeId: 'dex',
+              statutId: 'acc',
+              concurrence: 'non-applicable',
+              hasTitreFrom: 'non-applicable',
+              isBrouillon: ETAPE_IS_NOT_BROUILLON,
+              ordre: 1,
+              date: toCaminoDate('1988-03-06'),
+              communes: [],
+              contenu: {},
+              heritageContenu: {},
+              surface: null,
+              demarcheIdsConsentement: [],
+            },
+          ],
+        },
+      })
+    )
     const titresDemarchesStatutUpdated = await titresDemarchesStatutIdUpdate(undefined as unknown as Pool)
 
     expect(titresDemarchesStatutUpdated.length).toEqual(0)
   })
 
   test("ne met pas à jour le statut d'une démarche sans étape", async () => {
-    getDemarchesMock.mockResolvedValue({
-      [newDemarcheId('')]: {
-        id: newDemarcheId('h-cx-courdemanges-1988-oct01'),
-        titreId: newTitreId('h-cx-courdemanges-1988'),
-        titreTypeId: 'cxh',
-        typeId: 'oct',
-        statutId: 'ind',
-        etapes: [],
-      },
-    })
+    getDemarchesMock.mockReturnValue(
+      Effect.succeed({
+        [newDemarcheId('')]: {
+          id: newDemarcheId('h-cx-courdemanges-1988-oct01'),
+          titreId: newTitreId('h-cx-courdemanges-1988'),
+          titreTypeId: 'cxh',
+          typeId: 'oct',
+          statutId: 'ind',
+          etapes: [],
+        },
+      })
+    )
     const titresDemarchesStatutUpdated = await titresDemarchesStatutIdUpdate(undefined as unknown as Pool)
     expect(titresDemarchesStatutUpdated.length).toEqual(0)
   })
diff --git a/packages/api/src/business/processes/titres-demarches-statut-ids-update.ts b/packages/api/src/business/processes/titres-demarches-statut-ids-update.ts
index 25bb69549..6d8718c9d 100644
--- a/packages/api/src/business/processes/titres-demarches-statut-ids-update.ts
+++ b/packages/api/src/business/processes/titres-demarches-statut-ids-update.ts
@@ -4,12 +4,13 @@ import { titreDemarcheStatutIdFind } from '../rules/titre-demarche-statut-id-fin
 import { titreEtapesSortAscByOrdre } from '../utils/titre-etapes-sort'
 import { getDemarches } from './titres-etapes-heritage-contenu-update.queries'
 import { Pool } from 'pg'
+import { callAndExit } from '../../tools/fp-tools'
 
 export const titresDemarchesStatutIdUpdate = async (pool: Pool, titreId?: TitreId): Promise<string[]> => {
   console.info()
   console.info('statut des démarches…')
 
-  const titresDemarches = await getDemarches(pool, undefined, titreId)
+  const titresDemarches = await callAndExit(getDemarches(pool, undefined, titreId))
 
   const titresDemarchesUpdated: string[] = []
 
diff --git a/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.queries.ts b/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.queries.ts
index 45b3fa7a1..33219eb79 100644
--- a/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.queries.ts
+++ b/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.queries.ts
@@ -1,6 +1,6 @@
 import { sql } from '@pgtyped/runtime'
-import { Redefine, dbQueryAndValidate } from '../../pg-database'
-import { IGetEtapesByDemarcheInternalQuery } from './titres-etapes-heritage-contenu-update.queries.types'
+import { EffectDbQueryAndValidateErrors, Redefine, effectDbQueryAndValidate } from '../../pg-database'
+import { IGetAllEtapeIdsDbQuery, IGetEtapesByDemarcheInternalQuery } from './titres-etapes-heritage-contenu-update.queries.types'
 import { caminoDateValidator } from 'camino-common/src/date'
 import { DemarcheId, demarcheIdValidator } from 'camino-common/src/demarche'
 import { DemarcheStatutId, demarcheStatutIdValidator } from 'camino-common/src/static/demarchesStatuts'
@@ -9,13 +9,28 @@ import { etapeStatutIdValidator } from 'camino-common/src/static/etapesStatuts'
 import { TitreTypeId, titreTypeIdValidator } from 'camino-common/src/static/titresTypes'
 import { ETAPE_TYPE_FOR_CONCURRENCY_DATA, etapeTypeIdValidator } from 'camino-common/src/static/etapesTypes'
 import { TitreId, titreIdValidator } from 'camino-common/src/validators/titres'
-import { etapeBrouillonValidator, etapeIdValidator } from 'camino-common/src/etape'
+import { etapeBrouillonValidator, EtapeId, etapeIdValidator } from 'camino-common/src/etape'
 import { z } from 'zod'
 import { Pool } from 'pg'
 import { communeValidator } from 'camino-common/src/static/communes'
 import { TitreEtapeForMachine } from '../rules-demarches/machine-common'
 import { isNotNullNorUndefined } from 'camino-common/src/typescript-tools'
 import { km2Validator } from 'camino-common/src/number'
+import { CaminoError } from 'camino-common/src/zod-tools'
+import { Effect } from 'effect'
+
+const getAllEtapeIdValidator = z.object({ id: etapeIdValidator, heritage_contenu: z.record(z.record(z.object({ etapeId: etapeIdValidator.optional().nullable() }))).nullable() })
+
+type GetAllEtapes = z.infer<typeof getAllEtapeIdValidator>
+
+export const getAllEtapeIds = (pool: Pool): Effect.Effect<{ ids: Set<EtapeId>; etapes: GetAllEtapes[] }, CaminoError<EffectDbQueryAndValidateErrors>> =>
+  effectDbQueryAndValidate(getAllEtapeIdsDb, {}, pool, getAllEtapeIdValidator).pipe(
+    Effect.map(etapes => {
+      return { ids: new Set(etapes.map(({ id }) => id)), etapes }
+    })
+  )
+
+const getAllEtapeIdsDb = sql<Redefine<IGetAllEtapeIdsDbQuery, {}, z.infer<typeof getAllEtapeIdValidator>>>`select id, heritage_contenu from titres_etapes where archive is false`
 
 const getEtapesByDemarcheValidator = z.object({
   contenu: z.any().nullable(),
@@ -39,24 +54,12 @@ const getEtapesByDemarcheValidator = z.object({
   demarche_ids_consentement: z.array(demarcheIdValidator).nullable(),
 })
 
-export const getDemarches = async (
+export const getDemarches = (
   pool: Pool,
   demarcheId?: DemarcheId,
   titreId?: TitreId
-): Promise<{
-  [key: DemarcheId]: {
-    etapes: TitreEtapeForMachine[]
-    id: DemarcheId
-    typeId: DemarcheTypeId
-    titreTypeId: TitreTypeId
-    titreId: TitreId
-    statutId: DemarcheStatutId
-  }
-}> => {
-  const etapes = await dbQueryAndValidate(getEtapesByDemarcheInternal, { demarcheId, titreId }, pool, getEtapesByDemarcheValidator)
-
-  // FIXMACHINE trier les démarches par ordre de la première étape pour avoir la bonne visibilité des démarches
-  return etapes.reduce<{
+): Effect.Effect<
+  {
     [key: DemarcheId]: {
       etapes: TitreEtapeForMachine[]
       id: DemarcheId
@@ -65,51 +68,67 @@ export const getDemarches = async (
       titreId: TitreId
       statutId: DemarcheStatutId
     }
-  }>((acc, row) => {
-    if (!isNotNullNorUndefined(acc[row.demarche_id])) {
-      acc[row.demarche_id] = {
-        etapes: [],
-        id: row.demarche_id,
-        titreId: row.titre_id,
-        titreTypeId: row.titre_type_id,
-        typeId: row.demarche_type_id,
-        statutId: row.demarche_statut_id,
-      }
-    }
+  },
+  CaminoError<EffectDbQueryAndValidateErrors>
+> =>
+  effectDbQueryAndValidate(getEtapesByDemarcheInternal, { demarcheId, titreId }, pool, getEtapesByDemarcheValidator).pipe(
+    Effect.map(etapes => {
+      // FIXMACHINE trier les démarches par ordre de la première étape pour avoir la bonne visibilité des démarches
+      return etapes.reduce<{
+        [key: DemarcheId]: {
+          etapes: TitreEtapeForMachine[]
+          id: DemarcheId
+          typeId: DemarcheTypeId
+          titreTypeId: TitreTypeId
+          titreId: TitreId
+          statutId: DemarcheStatutId
+        }
+      }>((acc, row) => {
+        if (!isNotNullNorUndefined(acc[row.demarche_id])) {
+          acc[row.demarche_id] = {
+            etapes: [],
+            id: row.demarche_id,
+            titreId: row.titre_id,
+            titreTypeId: row.titre_type_id,
+            typeId: row.demarche_type_id,
+            statutId: row.demarche_statut_id,
+          }
+        }
 
-    if (
-      isNotNullNorUndefined(row.id) &&
-      isNotNullNorUndefined(row.ordre) &&
-      isNotNullNorUndefined(row.type_id) &&
-      isNotNullNorUndefined(row.statut_id) &&
-      isNotNullNorUndefined(row.date) &&
-      isNotNullNorUndefined(row.is_brouillon)
-    ) {
-      acc[row.demarche_id].etapes.push({
-        id: row.id,
-        ordre: row.ordre,
-        typeId: row.type_id,
-        statutId: row.statut_id,
-        isBrouillon: row.is_brouillon,
-        date: row.date,
-        contenu: row.contenu,
-        heritageContenu: row.heritage_contenu,
-        communes: row.communes,
-        surface: row.surface,
-        concurrence:
-          row.type_id === ETAPE_TYPE_FOR_CONCURRENCY_DATA
-            ? isNotNullNorUndefined(row.demarche_id_en_concurrence) && isNotNullNorUndefined(row.demarche_concurrente_public_lecture)
-              ? { amIFirst: false, demarcheConcurrenteVisibilite: row.demarche_concurrente_public_lecture === true ? 'publique' : 'confidentielle' }
-              : { amIFirst: true }
-            : 'non-applicable',
-        demarcheIdsConsentement: row.demarche_ids_consentement ?? [],
-        hasTitreFrom: row.has_titre_from,
-      })
-    }
+        if (
+          isNotNullNorUndefined(row.id) &&
+          isNotNullNorUndefined(row.ordre) &&
+          isNotNullNorUndefined(row.type_id) &&
+          isNotNullNorUndefined(row.statut_id) &&
+          isNotNullNorUndefined(row.date) &&
+          isNotNullNorUndefined(row.is_brouillon)
+        ) {
+          acc[row.demarche_id].etapes.push({
+            id: row.id,
+            ordre: row.ordre,
+            typeId: row.type_id,
+            statutId: row.statut_id,
+            isBrouillon: row.is_brouillon,
+            date: row.date,
+            contenu: row.contenu,
+            heritageContenu: row.heritage_contenu,
+            communes: row.communes,
+            surface: row.surface,
+            concurrence:
+              row.type_id === ETAPE_TYPE_FOR_CONCURRENCY_DATA
+                ? isNotNullNorUndefined(row.demarche_id_en_concurrence) && isNotNullNorUndefined(row.demarche_concurrente_public_lecture)
+                  ? { amIFirst: false, demarcheConcurrenteVisibilite: row.demarche_concurrente_public_lecture === true ? 'publique' : 'confidentielle' }
+                  : { amIFirst: true }
+                : 'non-applicable',
+            demarcheIdsConsentement: row.demarche_ids_consentement ?? [],
+            hasTitreFrom: row.has_titre_from,
+          })
+        }
 
-    return acc
-  }, {})
-}
+        return acc
+      }, {})
+    })
+  )
 
 const getEtapesByDemarcheInternal = sql<Redefine<IGetEtapesByDemarcheInternalQuery, { demarcheId?: DemarcheId; titreId?: TitreId }, z.infer<typeof getEtapesByDemarcheValidator>>>`
 SELECT
diff --git a/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.queries.types.ts b/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.queries.types.ts
index 6a39d8e8b..98b055511 100644
--- a/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.queries.types.ts
+++ b/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.queries.types.ts
@@ -1,6 +1,21 @@
 /** Types generated for queries found in "src/business/processes/titres-etapes-heritage-contenu-update.queries.ts" */
 export type Json = null | boolean | number | string | Json[] | { [key: string]: Json };
 
+/** 'GetAllEtapeIdsDb' parameters type */
+export type IGetAllEtapeIdsDbParams = void;
+
+/** 'GetAllEtapeIdsDb' return type */
+export interface IGetAllEtapeIdsDbResult {
+  heritage_contenu: Json | null;
+  id: string;
+}
+
+/** 'GetAllEtapeIdsDb' query type */
+export interface IGetAllEtapeIdsDbQuery {
+  params: IGetAllEtapeIdsDbParams;
+  result: IGetAllEtapeIdsDbResult;
+}
+
 /** 'GetEtapesByDemarcheInternal' parameters type */
 export interface IGetEtapesByDemarcheInternalParams {
   demarcheId?: string | null | void;
diff --git a/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.ts b/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.ts
index 7f8212391..cd5b05c9c 100644
--- a/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.ts
+++ b/packages/api/src/business/processes/titres-etapes-heritage-contenu-update.ts
@@ -3,17 +3,63 @@ import { titreEtapeHeritageContenuFind } from '../utils/titre-etape-heritage-con
 import { titreEtapesSortAscByOrdre, titreEtapesSortDescByOrdre } from '../utils/titre-etapes-sort'
 import { UserNotNull } from 'camino-common/src/roles'
 import { getSections, Section } from 'camino-common/src/static/titresTypes_demarchesTypes_etapesTypes/sections'
-import { isNotNullNorUndefined, isNotNullNorUndefinedNorEmpty } from 'camino-common/src/typescript-tools'
+import { isNotNullNorUndefined, isNotNullNorUndefinedNorEmpty, isNullOrUndefinedOrEmpty } from 'camino-common/src/typescript-tools'
 import { DemarcheId } from 'camino-common/src/demarche'
 import { Pool } from 'pg'
-import { getDemarches } from './titres-etapes-heritage-contenu-update.queries'
+import { getAllEtapeIds, getDemarches } from './titres-etapes-heritage-contenu-update.queries'
 import { EtapeId } from 'camino-common/src/etape'
+import { callAndExit } from '../../tools/fp-tools'
+import { Effect } from 'effect'
+import { CaminoError } from 'camino-common/src/zod-tools'
+import { EffectDbQueryAndValidateErrors } from '../../pg-database'
+function isEmpty(obj: any) {
+  for (const prop in obj) {
+    if (Object.prototype.hasOwnProperty.call(obj, prop)) {
+      return false
+    }
+  }
+
+  return true
+}
+interface ErrorInContenuHeritage {
+  etapeIdWithBadHeritage: EtapeId
+  unknownEtapeIds: EtapeId[]
+}
+export const checkEtapeInContenuHeritage = (pool: Pool): Effect.Effect<ErrorInContenuHeritage[], CaminoError<EffectDbQueryAndValidateErrors>> => {
+  return Effect.Do.pipe(
+    Effect.flatMap(() => getAllEtapeIds(pool)),
+    Effect.map(({ ids, etapes }) =>
+      etapes.reduce<ErrorInContenuHeritage[]>((acc, etape) => {
+        const etapeIdNonExistantes: EtapeId[] = []
+        if (isNotNullNorUndefined(etape.heritage_contenu)) {
+          for (const key of Object.keys(etape.heritage_contenu)) {
+            if (isNotNullNorUndefined(etape.heritage_contenu[key])) {
+              for (const second of Object.keys(etape.heritage_contenu[key])) {
+                const etapeId = etape.heritage_contenu[key][second].etapeId
+                if (isNotNullNorUndefined(etapeId)) {
+                  if (!ids.has(etapeId)) {
+                    etapeIdNonExistantes.push(etapeId)
+                    console.error(`L'étape ${etape.id} hérite son contenu de l'étape ${etapeId} qui n'existe plus l'édition est cassée https://camino.beta.gouv.fr/etapes/${etape.id}`)
+                  }
+                }
+              }
+            }
+          }
+        }
 
+        if (isNotNullNorUndefinedNorEmpty(etapeIdNonExistantes)) {
+          acc.push({ etapeIdWithBadHeritage: etape.id, unknownEtapeIds: etapeIdNonExistantes })
+        }
+        return acc
+      }, [])
+    )
+  )
+}
 export const titresEtapesHeritageContenuUpdate = async (pool: Pool, user: UserNotNull, demarcheId?: DemarcheId): Promise<string[]> => {
   console.info()
   console.info('héritage des contenus des étapes…')
 
-  const titresDemarches = await getDemarches(pool, demarcheId)
+  const titresDemarches = await callAndExit(getDemarches(pool, demarcheId))
 
   // lorsqu'une étape est mise à jour par un utilisateur,
   // l'objet heritageContenu reçu ne contient pas d'id d'étape
@@ -22,7 +68,7 @@ export const titresEtapesHeritageContenuUpdate = async (pool: Pool, user: UserNo
   const titresEtapesIdsUpdated = [] as string[]
 
   for (const titreDemarche of Object.values(titresDemarches)) {
-    if (titreDemarche.etapes.length) {
+    if (isNotNullNorUndefinedNorEmpty(titreDemarche.etapes)) {
       const etapeSectionsDictionary = titreDemarche.etapes.reduce<{
         [etapeId in EtapeId]?: Section[]
       }>((acc, e) => {
@@ -30,7 +76,21 @@ export const titresEtapesHeritageContenuUpdate = async (pool: Pool, user: UserNo
 
         return acc
       }, {})
-      const titreEtapes = titreEtapesSortAscByOrdre(titreDemarche.etapes.filter(e => isNotNullNorUndefined(etapeSectionsDictionary[e.id])))
+      const titreEtapesPerdantLesSections = titreDemarche.etapes.filter(
+        etape => (!isEmpty(etape.contenu) || !isEmpty(etape.heritageContenu)) && isNullOrUndefinedOrEmpty(etapeSectionsDictionary[etape.id])
+      )
+
+      if (isNotNullNorUndefinedNorEmpty(titreEtapesPerdantLesSections)) {
+        for (const etapePerdantLesSections of titreEtapesPerdantLesSections) {
+          console.error(`l'étape https://camino.beta.gouv.fr/etapes/${etapePerdantLesSections.id} de type ${etapePerdantLesSections.typeId} possède un contenu alors qu'elle n'est pas censée en avoir`)
+          // TODO 2025-02-24 : à décommenter et à lancer en prod, puis à supprimer
+          // prettier-ignore
+          // await titreEtapeUpdate(etapePerdantLesSections.id, { contenu: null, heritageContenu: null, }, user, titreDemarche.titreId)
+          titresEtapesIdsUpdated.push(etapePerdantLesSections.id)
+        }
+      }
+      // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
+      const titreEtapes = titreEtapesSortAscByOrdre(titreDemarche.etapes.filter(e => etapeSectionsDictionary[e.id]))
 
       if (isNotNullNorUndefinedNorEmpty(titreEtapes)) {
         for (let index = 0; index < titreEtapes.length; index++) {
diff --git a/packages/api/src/business/processes/titres-etapes-ordre-update.ts b/packages/api/src/business/processes/titres-etapes-ordre-update.ts
index bba05deef..cda09695f 100644
--- a/packages/api/src/business/processes/titres-etapes-ordre-update.ts
+++ b/packages/api/src/business/processes/titres-etapes-ordre-update.ts
@@ -9,12 +9,13 @@ import { Pool } from 'pg'
 import { TitreId } from 'camino-common/src/validators/titres'
 import { TitreEtapeForMachine, titreEtapeForMachineValidator } from '../rules-demarches/machine-common'
 import { isNotNullNorUndefinedNorEmpty } from 'camino-common/src/typescript-tools'
+import { callAndExit } from '../../tools/fp-tools'
 
 export const titresEtapesOrdreUpdate = async (pool: Pool, user: UserNotNull, demarcheId?: DemarcheId): Promise<string[]> => {
   console.info()
   console.info('ordre des étapes…')
 
-  const titresDemarches = await getDemarches(pool, demarcheId)
+  const titresDemarches = await callAndExit(getDemarches(pool, demarcheId))
 
   return titresEtapesOrdreUpdateVisibleForTesting(user, titresDemarches)
 }
diff --git a/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_Date.html b/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_Date.html
index d1ff078cc..664acb5e6 100644
--- a/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_Date.html
+++ b/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_Date.html
@@ -4,7 +4,7 @@
     <div class="fr-fieldset__element">
       <div>
         <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Une date
-            <!----><span class="fr-hint-text">au format jj/mm/yyyy</span><span class="fr-hint-text">Et quelle belle date</span>
+            <!----><span class="fr-hint-text">au format jj/mm/aaaa</span><span class="fr-hint-text">Et quelle belle date</span>
           </label><input class="fr-input" name="input_271" id="input_271" required="" type="date">
           <!---->
         </div>
diff --git a/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsRemplis.html b/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsRemplis.html
index 030d34091..372ece1bf 100644
--- a/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsRemplis.html
+++ b/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsRemplis.html
@@ -24,7 +24,7 @@
     <div class="fr-fieldset__element">
       <div>
         <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_74">date
-            <!----><span class="fr-hint-text">au format jj/mm/yyyy</span><span class="fr-hint-text">Description pour date</span>
+            <!----><span class="fr-hint-text">au format jj/mm/aaaa</span><span class="fr-hint-text">Description pour date</span>
           </label><input class="fr-input" name="input_74" id="input_74" required="" type="date" value="2023-09-01">
           <!---->
         </div>
diff --git a/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsRequis.html b/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsRequis.html
index c43bc5e8e..da89125a8 100644
--- a/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsRequis.html
+++ b/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsRequis.html
@@ -24,7 +24,7 @@
     <div class="fr-fieldset__element">
       <div>
         <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_74">date
-            <!----><span class="fr-hint-text">au format jj/mm/yyyy</span><span class="fr-hint-text">Description pour date</span>
+            <!----><span class="fr-hint-text">au format jj/mm/aaaa</span><span class="fr-hint-text">Description pour date</span>
           </label><input class="fr-input" name="input_74" id="input_74" required="" type="date">
           <!---->
         </div>
diff --git a/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsVidesOptionnels.html b/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsVidesOptionnels.html
index e7fe7c408..fa54942fb 100644
--- a/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsVidesOptionnels.html
+++ b/packages/ui/src/components/_common/new-sections-edit.stories_snapshots_TousLesElementsVidesOptionnels.html
@@ -21,7 +21,7 @@
     </div>
     <div class="fr-fieldset__element">
       <div>
-        <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_74">date (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span><span class="fr-hint-text">Description pour date</span></label><input class="fr-input" name="input_74" id="input_74" type="date">
+        <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_74">date (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span><span class="fr-hint-text">Description pour date</span></label><input class="fr-input" name="input_74" id="input_74" type="date">
           <!---->
         </div>
       </div>
diff --git a/packages/ui/src/components/_ui/dsfr-input.stories_snapshots_Date.html b/packages/ui/src/components/_ui/dsfr-input.stories_snapshots_Date.html
index 751993eaa..e601b25a1 100644
--- a/packages/ui/src/components/_ui/dsfr-input.stories_snapshots_Date.html
+++ b/packages/ui/src/components/_ui/dsfr-input.stories_snapshots_Date.html
@@ -1,5 +1,5 @@
 <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input1">Légende
-    <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+    <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
     <!---->
   </label><input class="fr-input" name="input1" id="input1" required="" type="date" value="2023-02-26">
   <!---->
diff --git a/packages/ui/src/components/_ui/dsfr-input.stories_snapshots_Optional.html b/packages/ui/src/components/_ui/dsfr-input.stories_snapshots_Optional.html
index 30df70776..398955136 100644
--- a/packages/ui/src/components/_ui/dsfr-input.stories_snapshots_Optional.html
+++ b/packages/ui/src/components/_ui/dsfr-input.stories_snapshots_Optional.html
@@ -1,4 +1,4 @@
-<div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input1">Légende (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span>
+<div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input1">Légende (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span>
     <!---->
   </label><input class="fr-input" name="input1" id="input1" type="date" value="2023-02-26">
   <!---->
diff --git a/packages/ui/src/components/_ui/dsfr-input.tsx b/packages/ui/src/components/_ui/dsfr-input.tsx
index 8428eaaf4..7e48ec9fc 100644
--- a/packages/ui/src/components/_ui/dsfr-input.tsx
+++ b/packages/ui/src/components/_ui/dsfr-input.tsx
@@ -85,7 +85,7 @@ export const DsfrInput = defineComponent<Props>(props => {
         <label class="fr-label" for={id}>
           {props.legend.main}
           {!props.required ? ' (optionnel)' : null}
-          {props.type.type === 'date' ? <span class="fr-hint-text">au format jj/mm/yyyy</span> : null}
+          {props.type.type === 'date' ? <span class="fr-hint-text">au format jj/mm/aaaa</span> : null}
           {isNotNullNorUndefined(props.legend.description) ? <span class="fr-hint-text" v-html={props.legend.description}></span> : null}
         </label>
       ) : null}
diff --git a/packages/ui/src/components/demarches/filtres-etapes.stories_snapshots_Multiple.html b/packages/ui/src/components/demarches/filtres-etapes.stories_snapshots_Multiple.html
index 38121ed0a..9e0c899f0 100644
--- a/packages/ui/src/components/demarches/filtres-etapes.stories_snapshots_Multiple.html
+++ b/packages/ui/src/components/demarches/filtres-etapes.stories_snapshots_Multiple.html
@@ -115,12 +115,12 @@
         <option selected="" value="fai">fait</option>
         <option disabled="" hidden="" value="">Selectionnez une option</option>
       </select></div>
-    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_670">Après le (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span>
+    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_670">Après le (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_670" id="input_670" type="date" value="2022-01-01">
       <!---->
     </div>
-    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_74">Avant le (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span>
+    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_74">Avant le (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_74" id="input_74" type="date" value="2022-03-03">
       <!---->
@@ -242,12 +242,12 @@
         <option selected="" value="fai">fait</option>
         <option disabled="" hidden="" value="">Selectionnez une option</option>
       </select></div>
-    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_967">Après le (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span>
+    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_967">Après le (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_967" id="input_967" type="date" value="2024-01-01">
       <!---->
     </div>
-    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_25">Avant le (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span>
+    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_25">Avant le (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_25" id="input_25" type="date" value="2025-03-03">
       <!---->
diff --git a/packages/ui/src/components/demarches/filtres-etapes.stories_snapshots_PartialOneValue.html b/packages/ui/src/components/demarches/filtres-etapes.stories_snapshots_PartialOneValue.html
index 37c828bcb..dc7d89fc4 100644
--- a/packages/ui/src/components/demarches/filtres-etapes.stories_snapshots_PartialOneValue.html
+++ b/packages/ui/src/components/demarches/filtres-etapes.stories_snapshots_PartialOneValue.html
@@ -115,12 +115,12 @@
         <option selected="" value="fai">fait</option>
         <option disabled="" hidden="" value="">Selectionnez une option</option>
       </select></div>
-    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_670">Après le (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span>
+    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_670">Après le (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_670" id="input_670" type="date">
       <!---->
     </div>
-    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_74">Avant le (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span>
+    <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_74">Avant le (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_74" id="input_74" type="date">
       <!---->
diff --git a/packages/ui/src/components/entreprise/add-entreprise-document-popup.stories_snapshots_Default.html b/packages/ui/src/components/entreprise/add-entreprise-document-popup.stories_snapshots_Default.html
index 304ad955d..a1512dfef 100644
--- a/packages/ui/src/components/entreprise/add-entreprise-document-popup.stories_snapshots_Default.html
+++ b/packages/ui/src/components/entreprise/add-entreprise-document-popup.stories_snapshots_Default.html
@@ -35,7 +35,7 @@
                   <fieldset class="fr-fieldset" id="text">
                     <div class="fr-fieldset__element">
                       <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_670">Date de délivrance du document
-                          <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+                          <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
                           <!---->
                         </label><input class="fr-input" name="input_670" id="input_670" required="" type="date">
                         <!---->
diff --git a/packages/ui/src/components/entreprise/add-entreprise-document-popup.stories_snapshots_TypeDeDocumentVerouille.html b/packages/ui/src/components/entreprise/add-entreprise-document-popup.stories_snapshots_TypeDeDocumentVerouille.html
index 11df3b743..eec7ad7d9 100644
--- a/packages/ui/src/components/entreprise/add-entreprise-document-popup.stories_snapshots_TypeDeDocumentVerouille.html
+++ b/packages/ui/src/components/entreprise/add-entreprise-document-popup.stories_snapshots_TypeDeDocumentVerouille.html
@@ -14,7 +14,7 @@
                   <fieldset class="fr-fieldset" id="text">
                     <div class="fr-fieldset__element">
                       <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date de délivrance du document
-                          <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+                          <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
                           <!---->
                         </label><input class="fr-input" name="input_271" id="input_271" required="" type="date">
                         <!---->
diff --git a/packages/ui/src/components/etape-edition.stories_snapshots_Creation.html b/packages/ui/src/components/etape-edition.stories_snapshots_Creation.html
index fffa47dbb..1911643e3 100644
--- a/packages/ui/src/components/etape-edition.stories_snapshots_Creation.html
+++ b/packages/ui/src/components/etape-edition.stories_snapshots_Creation.html
@@ -13,7 +13,7 @@
         <div class="fr-grid-row">
           <div class="fr-col-12 fr-col-xl-6">
             <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-                <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+                <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
                 <!---->
               </label><input class="fr-input" name="input_271" id="input_271" required="" type="date">
               <!---->
diff --git a/packages/ui/src/components/etape-edition.stories_snapshots_DemandeArmComplete.html b/packages/ui/src/components/etape-edition.stories_snapshots_DemandeArmComplete.html
index 405f18ce9..57178a12d 100644
--- a/packages/ui/src/components/etape-edition.stories_snapshots_DemandeArmComplete.html
+++ b/packages/ui/src/components/etape-edition.stories_snapshots_DemandeArmComplete.html
@@ -14,7 +14,7 @@
         <div class="fr-grid-row">
           <div class="fr-col-12 fr-col-xl-6">
             <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-                <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+                <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
                 <!---->
               </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2023-02-01">
               <!---->
diff --git a/packages/ui/src/components/etape-edition.stories_snapshots_ModificationDemandeHeritee.html b/packages/ui/src/components/etape-edition.stories_snapshots_ModificationDemandeHeritee.html
index c087b5fd3..2f9f0295b 100644
--- a/packages/ui/src/components/etape-edition.stories_snapshots_ModificationDemandeHeritee.html
+++ b/packages/ui/src/components/etape-edition.stories_snapshots_ModificationDemandeHeritee.html
@@ -14,7 +14,7 @@
         <div class="fr-grid-row">
           <div class="fr-col-12 fr-col-xl-6">
             <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-                <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+                <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
                 <!---->
               </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2023-02-01">
               <!---->
diff --git a/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_AvisDeLaMissionAutoriteEnvironnementaleADesStatutsDifferents.html b/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_AvisDeLaMissionAutoriteEnvironnementaleADesStatutsDifferents.html
index d3e2fc98b..94274f12e 100644
--- a/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_AvisDeLaMissionAutoriteEnvironnementaleADesStatutsDifferents.html
+++ b/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_AvisDeLaMissionAutoriteEnvironnementaleADesStatutsDifferents.html
@@ -17,7 +17,7 @@
                     </div>
                     <div class="fr-fieldset__element">
                       <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-                          <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+                          <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
                           <!---->
                         </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2023-01-02">
                         <!---->
diff --git a/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_AvisObligatoireSuppressionDuStatutNonRenseigne.html b/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_AvisObligatoireSuppressionDuStatutNonRenseigne.html
index 3f732c5f2..8db6b881d 100644
--- a/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_AvisObligatoireSuppressionDuStatutNonRenseigne.html
+++ b/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_AvisObligatoireSuppressionDuStatutNonRenseigne.html
@@ -17,7 +17,7 @@
                     </div>
                     <div class="fr-fieldset__element">
                       <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-                          <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+                          <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
                           <!---->
                         </label><input class="fr-input" name="input_271" id="input_271" required="" type="date">
                         <!---->
diff --git a/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_DocumentInitialDejaSauvegarde.html b/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_DocumentInitialDejaSauvegarde.html
index a21f4c4b1..251fe5a31 100644
--- a/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_DocumentInitialDejaSauvegarde.html
+++ b/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_DocumentInitialDejaSauvegarde.html
@@ -17,7 +17,7 @@
                     </div>
                     <div class="fr-fieldset__element">
                       <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-                          <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+                          <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
                           <!---->
                         </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2023-01-02">
                         <!---->
diff --git a/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_DocumentInitialTemporaire.html b/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_DocumentInitialTemporaire.html
index cfe88e47e..411f218f4 100644
--- a/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_DocumentInitialTemporaire.html
+++ b/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_DocumentInitialTemporaire.html
@@ -17,7 +17,7 @@
                     </div>
                     <div class="fr-fieldset__element">
                       <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-                          <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+                          <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
                           <!---->
                         </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2023-01-02">
                         <!---->
diff --git a/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_SansDocumentInitial.html b/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_SansDocumentInitial.html
index 27bf245a9..af729ec33 100644
--- a/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_SansDocumentInitial.html
+++ b/packages/ui/src/components/etape/add-etape-avis-popup.stories_snapshots_SansDocumentInitial.html
@@ -52,7 +52,7 @@
                     </div>
                     <div class="fr-fieldset__element">
                       <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-                          <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+                          <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
                           <!---->
                         </label><input class="fr-input" name="input_271" id="input_271" required="" type="date">
                         <!---->
diff --git a/packages/ui/src/components/etape/date-type-edit.stories_snapshots_Default.html b/packages/ui/src/components/etape/date-type-edit.stories_snapshots_Default.html
index 28dbd972e..f89dec68d 100644
--- a/packages/ui/src/components/etape/date-type-edit.stories_snapshots_Default.html
+++ b/packages/ui/src/components/etape/date-type-edit.stories_snapshots_Default.html
@@ -1,7 +1,7 @@
 <div class="fr-grid-row">
   <div class="fr-col-12 fr-col-xl-6">
     <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-        <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+        <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2023-01-01">
       <!---->
diff --git a/packages/ui/src/components/etape/date-type-edit.stories_snapshots_Loading.html b/packages/ui/src/components/etape/date-type-edit.stories_snapshots_Loading.html
index 11cf14b09..a6eedfd81 100644
--- a/packages/ui/src/components/etape/date-type-edit.stories_snapshots_Loading.html
+++ b/packages/ui/src/components/etape/date-type-edit.stories_snapshots_Loading.html
@@ -1,7 +1,7 @@
 <div class="fr-grid-row">
   <div class="fr-col-12 fr-col-xl-6">
     <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-        <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+        <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2023-01-01">
       <!---->
diff --git a/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithError.html b/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithError.html
index 706e7a6b6..4e87cb4ec 100644
--- a/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithError.html
@@ -1,7 +1,7 @@
 <div class="fr-grid-row">
   <div class="fr-col-12 fr-col-xl-6">
     <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-        <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+        <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2023-01-01">
       <!---->
diff --git a/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithTypeId.html b/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithTypeId.html
index 4e9147017..1482d1a90 100644
--- a/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithTypeId.html
+++ b/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithTypeId.html
@@ -1,7 +1,7 @@
 <div class="fr-grid-row">
   <div class="fr-col-12 fr-col-xl-6">
     <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-        <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+        <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2023-01-01">
       <!---->
diff --git a/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithTypeIdAndStatutId.html b/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithTypeIdAndStatutId.html
index 4e9147017..1482d1a90 100644
--- a/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithTypeIdAndStatutId.html
+++ b/packages/ui/src/components/etape/date-type-edit.stories_snapshots_WithTypeIdAndStatutId.html
@@ -1,7 +1,7 @@
 <div class="fr-grid-row">
   <div class="fr-col-12 fr-col-xl-6">
     <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-        <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+        <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
         <!---->
       </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2023-01-01">
       <!---->
diff --git a/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_Default.html b/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_Default.html
index ae5840656..06d2d37e9 100644
--- a/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_Default.html
+++ b/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_Default.html
@@ -10,7 +10,7 @@
       <div class="fr-grid-row">
         <div class="fr-col-12 fr-col-xl-6">
           <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-              <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+              <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
               <!---->
             </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2022-02-02">
             <!---->
diff --git a/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeConsultationAdministrationsCentrales.html b/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeConsultationAdministrationsCentrales.html
index 218a8d7e9..c0dac9688 100644
--- a/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeConsultationAdministrationsCentrales.html
+++ b/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeConsultationAdministrationsCentrales.html
@@ -10,7 +10,7 @@
       <div class="fr-grid-row">
         <div class="fr-col-12 fr-col-xl-6">
           <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-              <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+              <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
               <!---->
             </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2022-02-02">
             <!---->
diff --git a/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeDecisionAdministration.html b/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeDecisionAdministration.html
index fe018e765..f2dc21bb3 100644
--- a/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeDecisionAdministration.html
+++ b/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeDecisionAdministration.html
@@ -10,7 +10,7 @@
       <div class="fr-grid-row">
         <div class="fr-col-12 fr-col-xl-6">
           <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-              <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+              <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
               <!---->
             </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2022-02-02">
             <!---->
diff --git a/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeModification.html b/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeModification.html
index 7d6ba046a..8787232b4 100644
--- a/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeModification.html
+++ b/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeModification.html
@@ -10,7 +10,7 @@
       <div class="fr-grid-row">
         <div class="fr-col-12 fr-col-xl-6">
           <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-              <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+              <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
               <!---->
             </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2022-02-02">
             <!---->
diff --git a/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeModificationAvis.html b/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeModificationAvis.html
index 7cd9468f3..e56bfe773 100644
--- a/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeModificationAvis.html
+++ b/packages/ui/src/components/etape/etape-edit-form.stories_snapshots_EtapeModificationAvis.html
@@ -10,7 +10,7 @@
       <div class="fr-grid-row">
         <div class="fr-col-12 fr-col-xl-6">
           <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-              <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+              <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
               <!---->
             </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2022-02-02">
             <!---->
diff --git a/packages/ui/src/components/etape/fondamentales-edit.stories_snapshots_ArmJorfONF.html b/packages/ui/src/components/etape/fondamentales-edit.stories_snapshots_ArmJorfONF.html
index 7c21f8b30..db0758a48 100644
--- a/packages/ui/src/components/etape/fondamentales-edit.stories_snapshots_ArmJorfONF.html
+++ b/packages/ui/src/components/etape/fondamentales-edit.stories_snapshots_ArmJorfONF.html
@@ -24,7 +24,7 @@
       </div>
     </div>
     <div class="fr-mb-1w">
-      <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_25">Date de début (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span>
+      <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_25">Date de début (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span>
           <!---->
         </label><input class="fr-input" name="input_25" id="input_25" type="date" value="2022-02-02">
         <!---->
@@ -32,7 +32,7 @@
       <!---->
     </div>
     <div class="fr-mb-1w">
-      <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_772">Date d’échéance (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span>
+      <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="input_772">Date d’échéance (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span>
           <!---->
         </label><input class="fr-input" name="input_772" id="input_772" type="date">
         <!---->
diff --git a/packages/ui/src/components/etape/heritage-edit.stories_snapshots_HeritageDisabled.html b/packages/ui/src/components/etape/heritage-edit.stories_snapshots_HeritageDisabled.html
index f8705cad3..ed8a11c7a 100644
--- a/packages/ui/src/components/etape/heritage-edit.stories_snapshots_HeritageDisabled.html
+++ b/packages/ui/src/components/etape/heritage-edit.stories_snapshots_HeritageDisabled.html
@@ -1,6 +1,6 @@
 <div class="fr-mb-1w">
   <div class="fr-input-group mb-s" style="margin-bottom: 0px;"><label class="fr-label" for="input_670">
-      <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+      <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
       <!---->
     </label><input class="fr-input" name="input_670" id="input_670" required="" type="date">
     <!---->
diff --git a/packages/ui/src/components/etape/heritage-edit.stories_snapshots_NoHeritage.html b/packages/ui/src/components/etape/heritage-edit.stories_snapshots_NoHeritage.html
index c8300b88b..d2308ba28 100644
--- a/packages/ui/src/components/etape/heritage-edit.stories_snapshots_NoHeritage.html
+++ b/packages/ui/src/components/etape/heritage-edit.stories_snapshots_NoHeritage.html
@@ -1,6 +1,6 @@
 <div class="fr-mb-1w">
   <div class="fr-input-group mb-s" style="margin-bottom: 0px;"><label class="fr-label" for="input_670">
-      <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+      <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
       <!---->
     </label><input class="fr-input" name="input_670" id="input_670" required="" type="date">
     <!---->
diff --git a/packages/ui/src/components/etape/heritage-edit.stories_snapshots_Optional.html b/packages/ui/src/components/etape/heritage-edit.stories_snapshots_Optional.html
index f6b304a3c..c0492dd76 100644
--- a/packages/ui/src/components/etape/heritage-edit.stories_snapshots_Optional.html
+++ b/packages/ui/src/components/etape/heritage-edit.stories_snapshots_Optional.html
@@ -1,5 +1,5 @@
 <div class="fr-mb-1w">
-  <div class="fr-input-group mb-s" style="margin-bottom: 0px;"><label class="fr-label" for="input_670"> (optionnel)<span class="fr-hint-text">au format jj/mm/yyyy</span>
+  <div class="fr-input-group mb-s" style="margin-bottom: 0px;"><label class="fr-label" for="input_670"> (optionnel)<span class="fr-hint-text">au format jj/mm/aaaa</span>
       <!---->
     </label><input class="fr-input" name="input_670" id="input_670" type="date">
     <!---->
diff --git a/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_Default.html b/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_Default.html
index e4f205c29..c648ffde2 100644
--- a/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_Default.html
+++ b/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_Default.html
@@ -2,7 +2,7 @@
   <div><a href="/mocked-href" title="Pivot" class="fr-link" aria-label="Pivot">Pivot</a><span> &gt; </span><a href="/mocked-href" title="Octroi" class="fr-link" aria-label="Octroi">Octroi</a></div>
   <h1 class="fr-mt-4w">Résultat final de la mise en concurrence</h1>
   <div class="fr-input-group fr-pb-2w" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-      <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+      <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
       <!---->
     </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2024-10-16">
     <!---->
diff --git a/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_Loading.html b/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_Loading.html
index 45e8ae7c7..ef68976a1 100644
--- a/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_Loading.html
+++ b/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_Loading.html
@@ -2,7 +2,7 @@
   <div><a href="/mocked-href" title="Pivot" class="fr-link" aria-label="Pivot">Pivot</a><span> &gt; </span><a href="/mocked-href" title="Octroi" class="fr-link" aria-label="Octroi">Octroi</a></div>
   <h1 class="fr-mt-4w">Résultat final de la mise en concurrence</h1>
   <div class="fr-input-group fr-pb-2w" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-      <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+      <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
       <!---->
     </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2024-10-16">
     <!---->
diff --git a/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_PerimetreAvecSatelliteEquivalent.html b/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_PerimetreAvecSatelliteEquivalent.html
index d2699ace4..bdd3d6c37 100644
--- a/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_PerimetreAvecSatelliteEquivalent.html
+++ b/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_PerimetreAvecSatelliteEquivalent.html
@@ -2,7 +2,7 @@
   <div><a href="/mocked-href" title="Pivot" class="fr-link" aria-label="Pivot">Pivot</a><span> &gt; </span><a href="/mocked-href" title="Octroi" class="fr-link" aria-label="Octroi">Octroi</a></div>
   <h1 class="fr-mt-4w">Résultat final de la mise en concurrence</h1>
   <div class="fr-input-group fr-pb-2w" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-      <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+      <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
       <!---->
     </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2024-10-16">
     <!---->
diff --git a/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_PerimetreSansSatellite.html b/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_PerimetreSansSatellite.html
index d2699ace4..bdd3d6c37 100644
--- a/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_PerimetreSansSatellite.html
+++ b/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_PerimetreSansSatellite.html
@@ -2,7 +2,7 @@
   <div><a href="/mocked-href" title="Pivot" class="fr-link" aria-label="Pivot">Pivot</a><span> &gt; </span><a href="/mocked-href" title="Octroi" class="fr-link" aria-label="Octroi">Octroi</a></div>
   <h1 class="fr-mt-4w">Résultat final de la mise en concurrence</h1>
   <div class="fr-input-group fr-pb-2w" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-      <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+      <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
       <!---->
     </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2024-10-16">
     <!---->
diff --git a/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_WithError.html b/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_WithError.html
index a38fcfc4e..602b84dbc 100644
--- a/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/titre/resultat-mise-en-concurrence.stories_snapshots_WithError.html
@@ -2,7 +2,7 @@
   <div><a href="/mocked-href" title="Pivot" class="fr-link" aria-label="Pivot">Pivot</a><span> &gt; </span><a href="/mocked-href" title="Octroi" class="fr-link" aria-label="Octroi">Octroi</a></div>
   <h1 class="fr-mt-4w">Résultat final de la mise en concurrence</h1>
   <div class="fr-input-group fr-pb-2w" style="margin-bottom: 0px;"><label class="fr-label" for="input_271">Date
-      <!----><span class="fr-hint-text">au format jj/mm/yyyy</span>
+      <!----><span class="fr-hint-text">au format jj/mm/aaaa</span>
       <!---->
     </label><input class="fr-input" name="input_271" id="input_271" required="" type="date" value="2024-10-16">
     <!---->
-- 
GitLab