\documentclass[12pt,a4paper]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{tikz,tkz-tab}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\usetikzlibrary{arrows.meta,calc,positioning}
\usepackage{fontspec}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\usepackage{array}
\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{french}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.15]{Amiri}
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1.15]{Amiri}
\newcommand{\cadre}[1]{\begin{center}\begin{LTR}#1\end{LTR}\end{center}}
\newcommand{\cadrertl}[1]{\begin{center}#1\end{center}}
\newcommand{\ipa}[1]{#1}
\pagestyle{empty}
\setlength{\parindent}{0pt}
\newcounter{q}
\newcommand{\sujet}[1]{%
  \newpage\stepcounter{q}%
  \begin{tcolorbox}[colback=blue!5,colframe=blue!60!black,arc=3mm,boxrule=1pt]
  \centering {\Large\bfseries مسابقة بين الثانويات -- العلوم الفيزيائية}\\[2mm]
  {\large السؤال رقم \theq \quad -- \quad #1 \quad -- \quad المدة: دقيقتان}
  \end{tcolorbox}\vspace{5mm}\large}
\newcommand{\rep}{\vfill\begin{tcolorbox}[colback=white,colframe=black!50,height=3.2cm,title=الإجابة:]\end{tcolorbox}}
\newenvironment{sanad}{\begin{tcolorbox}[colback=orange!4,colframe=orange!60!black,title=السند,fonttitle=\bfseries]}{\end{tcolorbox}}
\begin{document}
\setcounter{q}{14}
\sujet{المعايرة حمض – أساس}

نعاير $V_a=20\,\mathrm{mL}$ من محلول حمض الإيثانويك بمحلول هيدروكسيد الصوديوم تركيزه $C_b=0{,}1\,\mathrm{mol/L}$. المنحنى يمثل $\mathrm{pH}=f(V_b)$.

\cadre{\begin{tikzpicture}\begin{axis}[axis lines=left,grid=both,grid style={gray!25},width=10cm,height=7cm,ticklabel style={font=\small},xmin=0,xmax=20.5,ymin=0,ymax=14,xtick={0,2,...,20},ytick={0,2,...,14},xlabel={$V_b\,(\mathrm{mL})$},ylabel={$\mathrm{pH}$}]
\addplot[blue,very thick,smooth] coordinates {(0.0,3.05) (0.5,3.52) (1.0,3.85) (1.5,4.05) (2.0,4.20) (2.5,4.32) (3.0,4.43) (3.5,4.53) (4.0,4.62) (4.5,4.71) (5.0,4.80) (5.5,4.89) (6.0,4.98) (6.5,5.07) (7.0,5.17) (7.5,5.28) (8.0,5.40) (8.5,5.55) (9.0,5.75) (9.5,6.08) (10.0,8.70) (10.5,11.21) (11.0,11.51) (11.5,11.68) (12.0,11.80) (12.5,11.89) (13.0,11.96) (13.5,12.02) (14.0,12.07) (14.5,12.12) (15.0,12.15) (15.5,12.19) (16.0,12.22) (16.5,12.25) (17.0,12.28) (17.5,12.30) (18.0,12.32) (18.5,12.34) (19.0,12.36) (19.5,12.38) (20.0,12.40)};
\draw[red,dashed,thick] (axis cs:5,0)--(axis cs:5,4.8)--(axis cs:0,4.8);
\draw[red,dashed,thick] (axis cs:10,0)--(axis cs:10,8.7);\end{axis}\end{tikzpicture}}

\textbf{السؤال:} عيّن حجم التكافؤ $V_{bE}$ و $\mathrm{p}K_a$ للثنائية، ثم احسب التركيز $C_a$ للحمض.

\rep
\end{document}
