# Path: /App/Config/Routes.yaml
# routes pour val-trebbia

home: 
  path: /
  controller: App\Controllers\HomeController@index

rooms-booking:
  path:
    fr: /reservation-de-chambre
    en: /rooms-booking
    it: /prenotazione-camera
    es: /reserva-de-habitacion
    de: /zimmer-reservierung
    pt: /reserva-de-quarto
    nl: /kamer-reservering
  controller: App\Controllers\RoomsController@bookingAny

room:
  path:
    fr: /chambre/{slug}
    en: /room/{slug}
    it: /camera/{slug}
    es: /habitacion/{slug}
    de: /zimmer/{slug}
    pt: /quarto/{slug}
    nl: /kamer/{slug}
  controller: App\Controllers\RoomsController@detail
  requirements:
    slug: '[a-z0-9]+(?:-[a-z0-9]+)*'

room-gift:
  path:
    fr: /chambre/{slug}/offrir
    en: /room/{slug}/gift
    it: /camera/{slug}/regalo
    es: /habitacion/{slug}/regalo
    de: /zimmer/{slug}/verschenken
    pt: /quarto/{slug}/oferecer
    nl: /kamer/{slug}/cadeau
  controller: App\Controllers\RoomsController@gift
  requirements:
    slug: '[a-z0-9]+(?:-[a-z0-9]+)*'

activities:
  path:
    fr: '/les-activites'
    en: '/activities'
    it: '/le-attivita'
    es: '/las-actividades'
    de: '/aktivitaeten'
    pt: '/as-atividades'
    nl: '/activiteiten'
  controller: App\Controllers\ActivitiesController@index

spa-presentation:
  path:
    fr: '/le-spa'
    en: '/spa'
    it: '/lo-spa'
    es: '/el-spa'
    de: '/der-spa'
    pt: '/o-spa'
    nl: '/de-spa'
  controller: App\Controllers\ActivitiesController@spa

spa-booking:
  path:
    fr: '/le-spa/reservation'
    en: '/spa/booking'
    it: '/lo-spa/prenotazione'
    es: '/el-spa/reserva'
    de: '/der-spa/reservierung'
    pt: '/o-spa/reserva'
    nl: '/de-spa/reservering'
  controller: App\Controllers\ActivitiesController@spaBooking

spa-gifting:
  path:
    fr: '/le-spa/offrir'
    en: '/spa/gifting'
    it: '/lo-spa/regalo'
    es: '/el-spa/regalo'
    de: '/der-spa/verschenken'
    pt: '/o-spa/oferecer'
    nl: '/de-spa/cadeau'
  controller: App\Controllers\ActivitiesController@spaGifting

rooms-gifting:
  path:
    fr: /offrir-un-sejour
    en: /offer-a-stay
    it: /offrire-un-soggiorno
    es: /ofrecer-una-estancia
    de: /aufenthalt-verschenken
    pt: /oferecer-uma-estadia
    nl: /verblijf-cadeau-geven
  controller: App\Controllers\RoomsController@gifting

private-area:
  path:
    fr: /espace-privatif
    en: /private-area
    it: /area-privata
    es: /area-privada
    de: /privatbereich
    pt: /area-privativa
    nl: /prive-ruimte
  controller: App\Controllers\PrivateAreaController@index
  methods: [GET, POST]

terms-of-reservation:
  path:
    fr: '/conditions-generales-de-reservation'
    en: '/terms-of-reservation'
    it: '/termini-generali-di-prenotazione'
    es: '/condiciones-generales-de-reserva'
    de: '/allgemeine-buchungsbedingungen'
    pt: '/condicoes-gerais-de-reserva'
    nl: '/algemene-reserveringsvoorwaarden'
  controller: App\Controllers\StaticPageController@termsOfReservation

# ── Pages dynamiques — prévisualisation admin ────────────────
dynamic-page-preview:
  path: /_preview/{slug}
  controller: App\Controllers\DynamicPageController@preview
  methods: [GET]
  requirements:
    slug: '[a-z0-9]+(?:-[a-z0-9]+)*'

# ── Page cobaye (test du système de blocs) ────────────────────
test-page:
  path:
    fr: /page-cobaye
    en: /test-page
    it: /pagina-cobaye
    es: /pagina-cobaye
    de: /test-seite
    pt: /pagina-cobaye
    nl: /testpagina
  controller: App\Controllers\TestPageController@index
  methods: [GET, POST]

# ── Admin : Home — Carousel ───────────────────────────────────
coulisses-carousel:
  path: /coulisses/carousel
  controller: App\Controllers\CarouselAdminController@index
  methods: [GET]

coulisses-carousel-upload:
  path: /coulisses/carousel/upload
  controller: App\Controllers\CarouselAdminController@upload
  methods: [POST]

coulisses-carousel-save:
  path: /coulisses/carousel/sauvegarder
  controller: App\Controllers\CarouselAdminController@save
  methods: [POST]

coulisses-carousel-delete:
  path: /coulisses/carousel/{id}/supprimer
  controller: App\Controllers\CarouselAdminController@delete
  methods: [POST]
  requirements:
    id: '\d+'

# ── Admin : Chambres ──────────────────────────────────────────
coulisses-rooms:
  path: /coulisses/chambres
  controller: App\Controllers\RoomsAdminController@index
  methods: [GET]

coulisses-room-edit:
  path: /coulisses/chambres/{slug}
  controller: App\Controllers\RoomsAdminController@edit
  methods: [GET]
  requirements:
    slug: '[a-z0-9]+(?:-[a-z0-9]+)*'

coulisses-room-save:
  path: /coulisses/chambres/{slug}/sauvegarder
  controller: App\Controllers\RoomsAdminController@save
  methods: [POST]
  requirements:
    slug: '[a-z0-9]+(?:-[a-z0-9]+)*'

coulisses-room-save-features:
  path: /coulisses/chambres/{slug}/atouts
  controller: App\Controllers\RoomsAdminController@saveFeatures
  methods: [POST]
  requirements:
    slug: '[a-z0-9]+(?:-[a-z0-9]+)*'

coulisses-room-save-activities:
  path: /coulisses/chambres/{slug}/prestations
  controller: App\Controllers\RoomsAdminController@saveActivities
  methods: [POST]
  requirements:
    slug: '[a-z0-9]+(?:-[a-z0-9]+)*'

coulisses-room-image-upload:
  path: /coulisses/chambres/{slug}/image
  controller: App\Controllers\RoomsAdminController@uploadImage
  methods: [POST]
  requirements:
    slug: '[a-z0-9]+(?:-[a-z0-9]+)*'

coulisses-room-image-delete:
  path: /coulisses/chambres/{slug}/image/{id}
  controller: App\Controllers\RoomsAdminController@deleteImage
  methods: [POST]
  requirements:
    slug: '[a-z0-9]+(?:-[a-z0-9]+)*'
    id: '\d+'

# ── Admin : Espace Privatif ──────────────────────────────────
coulisses-private-area-edit:
  path: /coulisses/espace-privatif
  controller: App\Controllers\PrivateAreaAdminController@edit
  methods: [GET]

coulisses-private-area-save:
  path: /coulisses/espace-privatif/sauvegarder
  controller: App\Controllers\PrivateAreaAdminController@save
  methods: [POST]

coulisses-private-area-image-upload:
  path: /coulisses/espace-privatif/image
  controller: App\Controllers\PrivateAreaAdminController@uploadImage
  methods: [POST]

coulisses-private-area-image-delete:
  path: /coulisses/espace-privatif/image/{id}
  controller: App\Controllers\PrivateAreaAdminController@deleteImage
  methods: [POST]
  requirements:
    id: '\d+'

# ── Admin : Spa ───────────────────────────────────────────────
coulisses-spa-edit:
  path: /coulisses/spa
  controller: App\Controllers\SpaAdminController@edit
  methods: [GET]

coulisses-spa-save:
  path: /coulisses/spa/sauvegarder
  controller: App\Controllers\SpaAdminController@save
  methods: [POST]

coulisses-spa-image-upload:
  path: /coulisses/spa/image/{feature}
  controller: App\Controllers\SpaAdminController@uploadImage
  methods: [POST]
  requirements:
    feature: 'hero|jacuzzi|saltwall|sauna'

coulisses-spa-image-delete:
  path: /coulisses/spa/image/{id}
  controller: App\Controllers\SpaAdminController@deleteImage
  methods: [POST]
  requirements:
    id: '\d+'

# ── Admin : Conditions Générales de Réservation ───────────────
coulisses-cgr:
  path: /coulisses/cgr
  controller: App\Controllers\TermsAdminController@index
  methods: [GET]

coulisses-cgr-create:
  path: /coulisses/cgr/creer
  controller: App\Controllers\TermsAdminController@create
  methods: [POST]

coulisses-cgr-reorder:
  path: /coulisses/cgr/reorder
  controller: App\Controllers\TermsAdminController@reorder
  methods: [POST]

coulisses-cgr-edit:
  path: /coulisses/cgr/{anchor}
  controller: App\Controllers\TermsAdminController@edit
  methods: [GET]
  requirements:
    anchor: '[a-z0-9\-]+'

coulisses-cgr-save:
  path: /coulisses/cgr/{anchor}/sauvegarder
  controller: App\Controllers\TermsAdminController@save
  methods: [POST]
  requirements:
    anchor: '[a-z0-9\-]+'

coulisses-cgr-delete:
  path: /coulisses/cgr/{anchor}/supprimer
  controller: App\Controllers\TermsAdminController@delete
  methods: [POST]
  requirements:
    anchor: '[a-z0-9\-]+'

# ── Admin : Page cobaye (éditeur de blocs) ───────────────────
coulisses-cobaye-edit:
  path: /coulisses/cobaye
  controller: App\Controllers\TestPageAdminController@edit
  methods: [GET]

# ── Admin : Pages dynamiques ─────────────────────────────────
coulisses-pages:
  path: /coulisses/pages
  controller: App\Controllers\DynamicPagesAdminController@index
  methods: [GET]

coulisses-pages-new:
  path: /coulisses/pages/nouveau
  controller: App\Controllers\DynamicPagesAdminController@new
  methods: [GET]

coulisses-pages-create:
  path: /coulisses/pages/nouveau/sauvegarder
  controller: App\Controllers\DynamicPagesAdminController@create
  methods: [POST]

coulisses-pages-edit:
  path: /coulisses/pages/{id}/modifier
  controller: App\Controllers\DynamicPagesAdminController@edit
  methods: [GET]
  requirements:
    id: '\d+'

coulisses-pages-update:
  path: /coulisses/pages/{id}/sauvegarder
  controller: App\Controllers\DynamicPagesAdminController@update
  methods: [POST]
  requirements:
    id: '\d+'

coulisses-pages-publish:
  path: /coulisses/pages/{id}/publier
  controller: App\Controllers\DynamicPagesAdminController@publish
  methods: [POST]
  requirements:
    id: '\d+'

coulisses-pages-delete:
  path: /coulisses/pages/{id}/supprimer
  controller: App\Controllers\DynamicPagesAdminController@delete
  methods: [POST]
  requirements:
    id: '\d+'

# ── Admin : Métadonnées SEO (API générique par owner) ─────────
coulisses-page-meta-save:
  path: /coulisses/pages/{owner}/meta/sauvegarder
  controller: App\Controllers\PageMetaAdminController@save
  methods: [POST]
  requirements:
    owner: '[a-z0-9\-]+'

# ── Admin : Blocs (API générique) ────────────────────────────
coulisses-blocs-create:
  path: /coulisses/blocs/creer
  controller: App\Controllers\BlocksAdminController@create
  methods: [POST]

coulisses-blocs-reorder:
  path: /coulisses/blocs/reordonner
  controller: App\Controllers\BlocksAdminController@reorder
  methods: [POST]

coulisses-blocs-save:
  path: /coulisses/blocs/{id}/sauvegarder
  controller: App\Controllers\BlocksAdminController@save
  methods: [POST]
  requirements:
    id: '\d+'

coulisses-blocs-delete:
  path: /coulisses/blocs/{id}/supprimer
  controller: App\Controllers\BlocksAdminController@delete
  methods: [POST]
  requirements:
    id: '\d+'

coulisses-blocs-image-upload:
  path: /coulisses/blocs/{id}/image
  controller: App\Controllers\BlocksAdminController@uploadImage
  methods: [POST]
  requirements:
    id: '\d+'

coulisses-blocs-image-delete:
  path: /coulisses/blocs/{id}/image/{img_id}
  controller: App\Controllers\BlocksAdminController@deleteImage
  methods: [POST]
  requirements:
    id: '\d+'
    img_id: '\d+'

# ── Admin : API ───────────────────────────────────────────────
coulisses-api-translate:
  path: /coulisses/api/traduire
  controller: App\Controllers\TranslationAdminController@translate
  methods: [POST]

# ── Admin : Atouts (Features) ─────────────────────────────────
coulisses-features:
  path: /coulisses/atouts
  controller: App\Controllers\FeaturesAdminController@index
  methods: [GET]

coulisses-feature-new:
  path: /coulisses/atouts/nouveau
  controller: App\Controllers\FeaturesAdminController@create
  methods: [GET]

coulisses-feature-store:
  path: /coulisses/atouts/nouveau/sauvegarder
  controller: App\Controllers\FeaturesAdminController@store
  methods: [POST]

coulisses-feature-edit:
  path: /coulisses/atouts/{id}/modifier
  controller: App\Controllers\FeaturesAdminController@edit
  methods: [GET]
  requirements:
    id: '\d+'

coulisses-feature-update:
  path: /coulisses/atouts/{id}/sauvegarder
  controller: App\Controllers\FeaturesAdminController@update
  methods: [POST]
  requirements:
    id: '\d+'

coulisses-feature-delete:
  path: /coulisses/atouts/{id}/supprimer
  controller: App\Controllers\FeaturesAdminController@delete
  methods: [POST]
  requirements:
    id: '\d+'

# ── Admin : Prestations (Activities) ─────────────────────────
coulisses-activities:
  path: /coulisses/prestations
  controller: App\Controllers\ActivitiesAdminController@index
  methods: [GET]

coulisses-activity-new:
  path: /coulisses/prestations/nouveau
  controller: App\Controllers\ActivitiesAdminController@create
  methods: [GET]

coulisses-activity-store:
  path: /coulisses/prestations/nouveau/sauvegarder
  controller: App\Controllers\ActivitiesAdminController@store
  methods: [POST]

coulisses-activity-edit:
  path: /coulisses/prestations/{id}/modifier
  controller: App\Controllers\ActivitiesAdminController@edit
  methods: [GET]
  requirements:
    id: '\d+'

coulisses-activity-update:
  path: /coulisses/prestations/{id}/sauvegarder
  controller: App\Controllers\ActivitiesAdminController@update
  methods: [POST]
  requirements:
    id: '\d+'

coulisses-activity-delete:
  path: /coulisses/prestations/{id}/supprimer
  controller: App\Controllers\ActivitiesAdminController@delete
  methods: [POST]
  requirements:
    id: '\d+'

coulisses-activity-image-upload:
  path: /coulisses/prestations/{id}/image
  controller: App\Controllers\ActivitiesAdminController@uploadImage
  methods: [POST]
  requirements:
    id: '\d+'

coulisses-activity-image-delete:
  path: /coulisses/prestations/{id}/image/{imageId}
  controller: App\Controllers\ActivitiesAdminController@deleteImage
  methods: [POST]
  requirements:
    id: '\d+'
    imageId: '\d+'

# ─────────────────────────────────────────────────────────────
coulisses-dashboard:
  path:
    fr: /coulisses/
    en: /coulisses/
    it: /coulisses/
    es: /coulisses/
    de: /coulisses/
    pt: /coulisses/
    nl: /coulisses/
  controller: App\Controllers\AdminController@dashboard
  methods: [GET]

coulisses-profile:
  path:
    fr: /coulisses/profil
    en: /coulisses/profil
    it: /coulisses/profil
    es: /coulisses/profil
    de: /coulisses/profil
    pt: /coulisses/profil
    nl: /coulisses/profil
  controller: App\Controllers\ProfileController@index
  methods: [GET, POST]

coulisses-users:
  path:
    fr: /coulisses/utilisateurs
    en: /coulisses/utilisateurs
    it: /coulisses/utilisateurs
    es: /coulisses/utilisateurs
    de: /coulisses/utilisateurs
    pt: /coulisses/utilisateurs
    nl: /coulisses/utilisateurs
  controller: App\Controllers\UsersController@index
  methods: [GET]

coulisses-user-new:
  path:
    fr: /coulisses/utilisateurs/nouveau
    en: /coulisses/utilisateurs/nouveau
    it: /coulisses/utilisateurs/nouveau
    es: /coulisses/utilisateurs/nouveau
    de: /coulisses/utilisateurs/nouveau
    pt: /coulisses/utilisateurs/nouveau
    nl: /coulisses/utilisateurs/nouveau
  controller: App\Controllers\UsersController@new
  methods: [GET, POST]

coulisses-user-edit:
  path:
    fr: /coulisses/utilisateurs/{id}/modifier
    en: /coulisses/utilisateurs/{id}/modifier
    it: /coulisses/utilisateurs/{id}/modifier
    es: /coulisses/utilisateurs/{id}/modifier
    de: /coulisses/utilisateurs/{id}/modifier
    pt: /coulisses/utilisateurs/{id}/modifier
    nl: /coulisses/utilisateurs/{id}/modifier
  controller: App\Controllers\UsersController@edit
  methods: [GET, POST]
  requirements:
    id: '\d+'

coulisses-oauth-google:
  path:
    fr: /coulisses/oauth/google
    en: /coulisses/oauth/google
    it: /coulisses/oauth/google
    es: /coulisses/oauth/google
    de: /coulisses/oauth/google
    pt: /coulisses/oauth/google
    nl: /coulisses/oauth/google
  controller: App\Controllers\GoogleOAuthController@initiate
  methods: [GET]

coulisses-oauth-google-callback:
  path:
    fr: /coulisses/oauth/google/callback
    en: /coulisses/oauth/google/callback
    it: /coulisses/oauth/google/callback
    es: /coulisses/oauth/google/callback
    de: /coulisses/oauth/google/callback
    pt: /coulisses/oauth/google/callback
    nl: /coulisses/oauth/google/callback
  controller: App\Controllers\GoogleOAuthController@callback
  methods: [GET]

coulisses-forgot-password:
  path:
    fr: /coulisses/mot-de-passe-oublie
    en: /coulisses/mot-de-passe-oublie
    it: /coulisses/mot-de-passe-oublie
    es: /coulisses/mot-de-passe-oublie
    de: /coulisses/mot-de-passe-oublie
    pt: /coulisses/mot-de-passe-oublie
    nl: /coulisses/mot-de-passe-oublie
  controller: App\Controllers\AuthController@forgotPassword
  methods: [GET, POST]

coulisses-reset-password:
  path:
    fr: /coulisses/reinitialiser-mot-de-passe
    en: /coulisses/reinitialiser-mot-de-passe
    it: /coulisses/reinitialiser-mot-de-passe
    es: /coulisses/reinitialiser-mot-de-passe
    de: /coulisses/reinitialiser-mot-de-passe
    pt: /coulisses/reinitialiser-mot-de-passe
    nl: /coulisses/reinitialiser-mot-de-passe
  controller: App\Controllers\AuthController@resetPassword
  methods: [GET, POST]

coulisses-magic-link-request:
  path:
    fr: /coulisses/connexion-magique/demande
    en: /coulisses/connexion-magique/demande
    it: /coulisses/connexion-magique/demande
    es: /coulisses/connexion-magique/demande
    de: /coulisses/connexion-magique/demande
    pt: /coulisses/connexion-magique/demande
    nl: /coulisses/connexion-magique/demande
  controller: App\Controllers\AuthController@magicLinkRequest
  methods: [POST]

coulisses-magic-link-verify:
  path:
    fr: /coulisses/connexion-magique
    en: /coulisses/connexion-magique
    it: /coulisses/connexion-magique
    es: /coulisses/connexion-magique
    de: /coulisses/connexion-magique
    pt: /coulisses/connexion-magique
    nl: /coulisses/connexion-magique
  controller: App\Controllers\AuthController@magicLinkVerify
  methods: [GET]

coulisses-login:
  path:
    fr: /coulisses/login
    en: /coulisses/login
    it: /coulisses/login
    es: /coulisses/login
    de: /coulisses/login
    pt: /coulisses/login
    nl: /coulisses/login
  controller: App\Controllers\AuthController@login
  methods: [GET, POST]

coulisses-logout:
  path:
    fr: /coulisses/logout
    en: /coulisses/logout
    it: /coulisses/logout
    es: /coulisses/logout
    de: /coulisses/logout
    pt: /coulisses/logout
    nl: /coulisses/logout
  controller: App\Controllers\AuthController@logout
  methods: [POST]

clear-google-reviews-cache:
  path:
    fr: /coulisses/vider-cache-avis-google
    en: /coulisses/clear-google-reviews-cache
    it: /coulisses/svuota-cache-recensioni-google
    es: /coulisses/vaciar-cache-resenas-google
    de: /coulisses/google-bewertungen-cache-leeren
    pt: /coulisses/limpar-cache-avaliacoes-google
    nl: /coulisses/google-beoordelingen-cache-leegmaken
  controller: App\Controllers\AdminController@clearGoogleReviewsCacheDirectory
  methods: [GET, POST]

console-test:
  path:
    fr: /coulisses/console-test
    en: /coulisses/console-test
    it: /coulisses/console-test
    es: /coulisses/console-test
    de: /coulisses/console-test
    pt: /coulisses/console-test
    nl: /coulisses/console-test
  controller: App\Controllers\AdminController@consoleTest
  methods: [GET, POST]

techinfo:
  path:
    fr: /coulisses/techinfo
    en: /coulisses/techinfo
    it: /coulisses/techinfo
    es: /coulisses/techinfo
    de: /coulisses/techinfo
    pt: /coulisses/techinfo
    nl: /coulisses/techinfo
  controller: App\Controllers\AdminController@techInfo
  methods: [GET]

honeypot-log:
  path:
    fr: /coulisses/honeypot-log
    en: /coulisses/honeypot-log
    it: /coulisses/honeypot-log
    es: /coulisses/honeypot-log
    de: /coulisses/honeypot-log
    pt: /coulisses/honeypot-log
    nl: /coulisses/honeypot-log
  controller: App\Controllers\HoneypotController@log
  methods: [GET]

honeypot-log-download:
  path:
    fr: /coulisses/honeypot-log/download
    en: /coulisses/honeypot-log/download
    it: /coulisses/honeypot-log/download
    es: /coulisses/honeypot-log/download
    de: /coulisses/honeypot-log/download
    pt: /coulisses/honeypot-log/download
    nl: /coulisses/honeypot-log/download
  controller: App\Controllers\HoneypotController@download
  methods: [GET]

honeypot-log-clear:
  path:
    fr: /coulisses/honeypot-log/clear
    en: /coulisses/honeypot-log/clear
    it: /coulisses/honeypot-log/clear
    es: /coulisses/honeypot-log/clear
    de: /coulisses/honeypot-log/clear
    pt: /coulisses/honeypot-log/clear
    nl: /coulisses/honeypot-log/clear
  controller: App\Controllers\HoneypotController@clear
  methods: [POST]

# ── Admin : .htaccess ─────────────────────────────────────────
coulisses-htaccess:
  path: /coulisses/htaccess
  controller: App\Controllers\HtaccessAdminController@index
  methods: [GET]

coulisses-htaccess-save:
  path: /coulisses/htaccess/sauvegarder
  controller: App\Controllers\HtaccessAdminController@save
  methods: [POST]

coulisses-htaccess-load:
  path: /coulisses/htaccess/charger
  controller: App\Controllers\HtaccessAdminController@load
  methods: [POST]

coulisses-htaccess-delete-backup:
  path: /coulisses/htaccess/supprimer-backup
  controller: App\Controllers\HtaccessAdminController@deleteBackup
  methods: [POST]

coulisses-migrations:
  path: /coulisses/migrations
  controller: App\Controllers\MigrationsAdminController@index
  methods: [GET]

coulisses-migrations-run:
  path: /coulisses/migrations/run
  controller: App\Controllers\MigrationsAdminController@run
  methods: [POST]

# disclaimer:
#   path:
#     fr: /mentions-legales
#     en: /disclaimer
#   controller: App\Controllers\DisclaimerController@index

# test: 
#   path:
#     fr: /test
#     en: /test
#   controller: App\Controllers\TestController@index