\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}{6}
\sujet{القانون الثاني لنيوتن}

جسم كتلته $m=2\,\mathrm{kg}$ يتحرك على مسار مستقيم أفقي. المنحنى يمثل تطور سرعته $v(t)$.

\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=6,ymin=0,ymax=12,xtick={0,...,6},ytick={0,2,...,12},xlabel={$t\,(\mathrm{s})$},ylabel={$v\,(\mathrm{m/s})$}]
\addplot[blue,very thick] coordinates {(0,0)(5,10)};\end{axis}\end{tikzpicture}}

\textbf{السؤال:} احسب التسارع $a$ والمسافة المقطوعة بين $0$ و $5\,\mathrm{s}$، ثم شدة القوة المحصلة المؤثرة على الجسم.

\rep
\end{document}
