Horses are black-based, or red-based, depending on the state of the Extension genes. To simplify it, E is black, e is red.
E is dominant over e, so if a horse is EE or Ee, then he is black-based (black, bay, brown, buckskin, etc).
But if he’s ee, then he’s red-based, so chestnut, palomino, cremello, etc.
So it’s not a “chestnut gene”, exactly it’s whether or not a horse can produce a chestnut. Because Juliet is black-based, we know she’s either EE or Ee. If she’s EE, then she cannot produce a chestnut foal, even if the stallion is chestnut (ee). She can only pass E, he can only pass e, so the foal would be Ee - black-based.
But if she is Ee, then there’s a 50/50 chance of her passing either E or e. If she passes e to meet the stallion’s e, then you get an ee chestnut foal. If the stallion is EE, no chestnut foal. If he’s Ee, then each horse has a 50/50 chance of passing their e, which brings the chance of chestnut down to 25%.