I would like to adjust the position of a box created with tcolorbox by respecting the values of the horizontal margin on each of the two sides. For instance : I would like to avoid the box to appear like this :
I have specified width = \textwidth
but I don't understand why the result appears like this...
Here is my code :
\documentclass{article}
\usepackage{geometry}
\geometry{hmargin=1cm,vmargin=1.5cm}
\usepackage{pgf, tikz, adjustbox}
\usepackage{tcolorbox}
\begin{document}
\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, width = \textwidth}
\begin{tcolorbox}[before=\adjustbox{valign=t}\bgroup, after=\egroup]
\textbf{A retenir}
Bla-bla-bla
\end{tcolorbox}
\end{document}
I have specified the margin size with the line \geometry{hmargin=1cm,vmargin=1.5cm}
but it seems like it's not respected by the box adjustment.
Thank you for your help,
Best regards.