JWST observations of photodissociation regions: III. Dust modeling at the illuminated edge of the Horsehead nebula