I'm trying to set up a template for rendering decision trees using tikz-qtree. Here's what I ended up with :
\documentclass[border = 0.2cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes, positioning}
\usepackage{tikz-qtree}
\begin{document}
\begin{tikzpicture}[
% liens
edge from parent path={
[thick, ->, rounded corners]
(\tikzparentnode.south) |- +(0,-0.7cm) -| (\tikzchildnode.north)
},
% racine
every level 0 node/.style={
draw, rounded rectangle, minimum height=1cm, thick
},
% noeuds internes
every internal node/.style={
draw, diamond, minimum width=2cm, minimum height=2cm, thick
},
% feuilles 'oui'
yesnode/.style={
circle, draw=green!60, fill=green!5, very thick,
minimum width=1cm, minimum height=1cm
},
nonode/.style={
circle, draw=red!60, fill=red!5, very thick,
minimum width=1cm, minimum height=1cm
},
% distances de séparations
level distance=3.3cm, sibling distance=2cm
]
\Tree
[.{conditions météorologiques}
\edge node[auto=left, pos=0.25, above]{ensoleillé};
[.{humidité}
\edge node[auto=left, pos=0.25, above]{basse};
[.\node[yesnode]{oui};
]
\edge node[auto=left, pos=0.25, above]{haute};
[.\node[nonode]{non};
]
]
\edge node[auto=left, pos=0.25]{pluvieux};
[.{vent}
\edge node[auto=left, pos=0.25, above]{faible};
[.\node[yesnode]{oui};
]
\edge node[auto=left, pos=0.25, above]{fort};
[.\node[nonode]{non};
]
]
]
\end{tikzpicture}
\end{document}
And this is what the compiler renders :

After reading through documentation and browsing several Latex stack exchange posts these are the questions that I still have :
How can I horizontally align the text from the nodes 'ensoleillé' and 'pluvieux' ? Basically moving down 'pluvieux'. I believe that the letter 'p' is causing the problem.
For now I have to manually determine the minimum height and width of the internal nodes. Is there a way to let the compiler choose the minimum height and width of the internal nodes required to fit the text within it and then apply it to all other internal nodes?
If I try to add a third node on the first level the path is not drawn in the way I intended to. Here's what's rendered :

If there's any type of bad habits in my script please let me know.
I apologize for my poor English and if I'm not using the correct terminology. If anyone knows how to solve any of the issues above or if they already have been somewhere else please let me know :)


\strutin each node. – Torbjørn T. Jan 24 '22 at 19:07