While it is true that the function q-dot(t)$\dot{q}(t)$ is the derivative of the function q(t)$q(t)$ w.r.t. time, it is not true that the value q-dot$\dot{q}$ is at all related to the value q$q$ at a given point in time, since a value is just a number, not a function. The action is a functional of q(t)$q(t)$, and so it would make no sense to vary the action both w.r.t. q$q$ and q-dot$\dot{q}$. But the Lagrangian L(q,q-dot)$L(q,\dot{q})$ is a function of the values q$q$ and q-dot$\dot{q}$, not a functional of the functions q(t)$q(t)$ and q-dot(t)$\dot{q}(t)$. We can promote L$L$ to a function of time if we plug in q(t)$q(t)$ and q-dot(t)$\dot{q}(t)$ instead of just q$q$ and q-dot$\dot{q}$. (Remember a functional turns a function into a number, e.g., S[q]$S[q]$, whereas a function turns a value into a number, e.g., L(q,q-dot) $L(q,\dot{q})$.
To solve for q(t)$q(t)$ we extremize the action S$S$, by demanding that it is extremal at every point, t$t$. This is equivalent to solving the Euler Lagrange-Lagrange equations at every point t$t$. Since at any point t$t$ the values q$q$ and q-dot$\dot{q}$ are independent, they can be varied independently.