backend:
  name: github
  repo: mbcube/cachetdeco   # REPLACE with your GitHub org/repo
  branch: main
  # For Cloudflare Pages (no Netlify Identity), use PKCE flow:
  auth_type: pkce
  app_id: YOUR_GITHUB_OAUTH_APP_CLIENT_ID   # REPLACE with your GitHub OAuth App client ID

locale: fr
media_folder: "public/images"
public_folder: "/images"

i18n:
  structure: multiple_folders
  locales: [fr]
  default_locale: fr

collections:
  - name: "services"
    label: "Services"
    label_singular: "Service"
    folder: "src/content/services"
    create: true
    delete: true
    i18n: true
    slug: "{{slug}}"
    fields:
      - { name: "title", label: "Titre", widget: "string", i18n: true }
      - { name: "description", label: "Description courte", widget: "text", i18n: true }
      - name: "icon"
        label: "Icône (identifiant)"
        widget: "select"
        options: ["interior", "exterior", "commercial", "decoration", "renovation"]
        required: false
        i18n: duplicate
        hint: "Identifiant interne pour l'icône SVG"
      - { name: "image", label: "Image de couverture", widget: "image", required: false, i18n: duplicate }
      - { name: "order", label: "Ordre d'affichage", widget: "number", default: 0, i18n: duplicate }
      - { name: "featured", label: "Mis en vedette", widget: "boolean", default: false, i18n: duplicate }
      - { name: "body", label: "Contenu détaillé", widget: "markdown", i18n: true }

  - name: "settings"
    label: "Paramètres du site"
    files:
      - label: "Général"
        name: "general"
        file: "src/content/settings/general.json"
        fields:
          - { name: "siteName", label: "Nom du site", widget: "string" }
          - { name: "legalName", label: "Nom légal (NEQ)", widget: "string" }
          - { name: "tagline", label: "Slogan court", widget: "string" }
          - { name: "taglineHero", label: "Slogan hero", widget: "string" }
          - { name: "phone", label: "Téléphone", widget: "string" }
          - { name: "email", label: "Courriel", widget: "string" }
          - { name: "address", label: "Adresse", widget: "string" }
          - { name: "serviceArea", label: "Zone de service", widget: "string" }
          - { name: "facebook", label: "Lien Facebook", widget: "string" }
          - { name: "instagram", label: "Lien Instagram", widget: "string", required: false }
          - { name: "rbq", label: "Numéro RBQ", widget: "string" }
          - { name: "neq", label: "Numéro NEQ (Registraire)", widget: "string" }

      - label: "SEO"
        name: "seo"
        file: "src/content/settings/seo.json"
        fields:
          - { name: "defaultTitle", label: "Titre par défaut", widget: "string" }
          - { name: "titleTemplate", label: "Gabarit de titre (%s = titre de page)", widget: "string" }
          - { name: "defaultDescription", label: "Description par défaut", widget: "text" }
          - { name: "keywords", label: "Mots-clés (séparés par virgule)", widget: "string" }
          - { name: "ogImage", label: "Image OG par défaut", widget: "image", required: false }

      - label: "Section Pourquoi nous choisir"
        name: "pourquoi"
        file: "src/content/settings/pourquoi.json"
        fields:
          - { name: "title", label: "Titre de section", widget: "string" }
          - { name: "subtitle", label: "Sous-titre de section", widget: "string" }
          - name: "cards"
            label: "Cartes d'avantages"
            widget: "list"
            min: 1
            max: 6
            fields:
              - name: "icon"
                label: "Icône"
                widget: "select"
                options:
                  - { value: "shield", label: "Bouclier (certification)" }
                  - { value: "clock", label: "Horloge (ponctualité)" }
                  - { value: "check", label: "Crochet (qualité)" }
                  - { value: "team", label: "Équipe (personnes)" }
                  - { value: "star", label: "Étoile (excellence)" }
                  - { value: "location", label: "Localisation (territoire)" }
              - { name: "title", label: "Titre", widget: "string" }
              - { name: "description", label: "Description", widget: "text" }
