  The flat decay phase in the first 1e2-1e4 seconds of the X-ray light curve of
Gamma Ray Bursts (GRBs) has not yet found a convincing explanation. The fact
that the optical and X-ray lightcurves are often different, with breaks at
different times, makes contrived any explanation based on the same origin for
both the X-ray and optical fluxes. We here assume that the central engine can
be active for a long time, producing shells of decreasing bulk Lorentz factors
Gamma. We also assume that the internal dissipation of these late shells
produces a continuous and smooth emission (power-law in time), usually dominant
in X-rays and sometimes in the optical. When Gamma of the late shells is larger
than 1/theta_j, where theta_j is the jet opening angle, we see only a portion
of the emitting surface. Eventually, Gamma becomes smaller than 1/theta_j, and
the entire emitting surface is visible. Thus there is a break in the light
curve when Gamma=1/theta_j, which we associate to the time at which the plateau
ends. After the steeply decaying phase which follows the early prompt, we see
the sum of two emission components: the "late-prompt" emission (due to late
internal dissipation), and the "real afterglow" emission (due to external
shocks). A variety of different optical and X-ray light curves are then
possible, explaining why the X-ray and the optical light curves often do not
track each other (but sometimes do), and often they do not have simultaneous
breaks.
