You are using p as alias in your query but p is missing in
FROM post p. Use the following query:
public function findByIdForInfoClient($id){
$query = $this->pdo->prepare(
"SELECT p.*, c.depot, c.retrait, c.caisse
FROM post p
JOIN comptes c
ON p.id = c.client_id
WHERE p.id =c.client_id");
$query->execute(array(':id' => $id));
$query->setFetchMode(PDO::FETCH_CLASS, $this->class);
$result = $query->fetch();
return $result;
}