// Sélections GraphQL partagées entre fragments (clones du SCHEMA).

/** Champ image ACF (return_format array → connection edge côté GraphQL). */
export const IMAGE_FIELDS = /* GraphQL */ `{
  node {
    sourceUrl
    altText
    altTextEn
    altTextEs
    mediaDetails {
      width
      height
    }
  }
}`;

/** Champ fichier ACF (PDF…). */
export const FILE_FIELDS = /* GraphQL */ `{
  node {
    mediaItemUrl
    title
  }
}`;

/** Clone clone_cta. */
export const CTA_FIELDS = /* GraphQL */ `{
  label
  lien
  style
}`;

/** Clone clone_entete_section. */
export const ENTETE_FIELDS = /* GraphQL */ `{
  badge
  titre
  intro
}`;

/** Groupe clone_seo (exposé sous `seo` sur tous les types). */
export const SEO_FIELDS = /* GraphQL */ `{
  titreSeo
  metaDescription
  canonical
  ogImage ${IMAGE_FIELDS}
  noindex
}`;

/** Relation ACF vers le CPT formulaire_hubspot. */
export const HUBSPOT_FORM_RELATION_FIELDS = /* GraphQL */ `{
  nodes {
    ... on FormulaireHubspot {
      id
      slug
      title
      ficheFormulaireHubspot {
        code
        portalId
        formGuid
        mode
        champs {
          cleLocale
          label
          nomInterne
          objectTypeId
          actif
          requis
        }
      }
    }
  }
}`;
