Gemara Shevuot 18B
ת''ר {ויקרא טו-לא} והזרתם את בני ישראל מטומאתם אמר רבי יאשיה מיכן אזהרה לבני ישראל שיפרשו מנשותיהן סמוך לוסתן וכמה אמר רבה עונה
Our Rabbis taught: Thus shall ye separate the children of Israel from their uncleanness; R`Josiah said: From this we deduce a warning to the children of Israel that they should separate from their wives near their periods. And how long before? Rabbah said: One 'Ona.
Rif Shevuot (dapey haRif 1B):
עונה: או יום או לילה
or day or night.
The Ran explains that the Gemara talks about the Ona of the Vesset itself[1], e.g. if the Vesset is in the middle of the night, all the night is prohibited. The Ran says (according to Rashba, against Raah (Torat Habayt, Bedek Habayt)) that this ban is Derabanan, gives 2 proofs, 1.- Vestot Derabanan, 2.- If the husband leaves on a trip, sexual intercourse is allowed (Yevamot 62B)
The Raavad in Baaley hanafesh
Shaar Haprisha says that the ban is for the intercourse itself is banned but without additional physical distance contrary to Nidda time. he also mentioned the lake of rabbinic ban when Tashmish is a Mitsva. There is not mention of problem to sleep in the same bed.
Shulchan Aruch Y.D. 184, 2 writes the same thing.
Shach sk 6 allowed hugging and kissing (this expression "chibuk venishuk" does not include "Biat Evarim", called Maase Chidudim in Gemara Sanhedrin 66b), {some poskim prohibited hugging and kissing and some others say that despite not prohibited, it's better to avoid this.}
[1] Nowedays some Posskim teach to begin the separation in the Ona before Onat Havesset, See Taz sk 2 (B.Y in name of Or Zarua). See Shach: nowedays
the whole ona is considered as Shaat Vestah because the hour is not everytime the same. So, the previous Ona is prohibited as onat havesset. And with the Or Zarua's chumra, 2 Onot before the onat havesset are prohibited, but the Pitche teshuva permits to just ban one Ona before Onat Havesset.