\documentclass[a4paper,14pt,french,landscape,DIV=18]{scrartcl}
\usepackage{tcolorbox}
\tcbsetforeverylayer{colback=white,colbacktitle=white,coltitle=black,colframe=gray,boxrule=0.2mm}
\tcbuselibrary{skins,minted}
\usepackage{tikz,pgf}
\usetikzlibrary{intersections}
\usetikzlibrary{arrows,shapes,snakes,calc, angles,quotes,positioning,automata,shadows,patterns}
\usepackage[french]{babel}
\begin{document}
\section{Tests}
\begin{tcblisting}{minted language=latex,listing only,title=Il faut 4 étapes,fontupper=\Large}
%%% 1 on nomme 2 courbes:
\draw[name path=D] (-1,2) -- (2,-1) ;
\draw[name path=R] (-1,1) rectangle (1,-2) ;
%%% 2 on définit l'intersection (avec \path):
\path[name intersections={of=R and D}]; % Les points trouvés avec intersections
%%% 3 On nomme l'intersection:
\coordinate [label=$C$] (I1) at (intersection-1);
\coordinate [label=$C$] (I2) at (intersection-2);
%%% 4 On utilise le point d'intersection:
\end{tcblisting}
\begin{tcblisting}{minted language=latex,sidebyside,righthand width=6cm,title=\subsection{2 droites}}
\begin{tikzpicture}
\draw[yellow] (-3,3) grid (3,-3);
%%% 1 on nomme 2 courbes:
\draw[name path=D,thin] (-1,2) -- (2,-1) ;
\draw[name path=R,thin] (1,1) -- (1,-2) ;
%%% 2 on définit l'intersection (avec \path):
\path[name intersections={of=R and D}];
%%% 3 On nomme l'intersection:
\coordinate [label=above:$C$] (C) at (intersection-1);
%%% 4 On utilise le point d'intersection:
\draw[red,thick,-latex] (0,0) -- (C) node[midway,above] {!};
\end{tikzpicture}
\end{tcblisting}
%\end{tcolorbox}
\begin{tcblisting}{minted language=latex,sidebyside,righthand width=6cm,title=\subsection{Une droite et un rectangle}}
\begin{tikzpicture}
\draw[yellow] (-3,3) grid (3,-3);