window.onload = function () {
// Bouton pour afficher le pop-up
const triggerBtn = document.createElement('button');
triggerBtn.textContent = 'Télécharger Freecine';
triggerBtn.style.position = 'fixed';
triggerBtn.style.bottom = '30px';
triggerBtn.style.right = '30px';
triggerBtn.style.padding = '12px 20px';
triggerBtn.style.fontSize = '16px';
triggerBtn.style.backgroundColor = '#000';
triggerBtn.style.color = '#fff';
triggerBtn.style.border = 'none';
triggerBtn.style.borderRadius = '6px';
triggerBtn.style.cursor = 'pointer';
triggerBtn.onclick = showPopup;
document.body.appendChild(triggerBtn);
function showPopup() {
// Overlay
const overlay = document.createElement('div');
overlay.style.position = 'fixed';
overlay.style.top = 0;
overlay.style.left = 0;
overlay.style.width = '100vw';
overlay.style.height = '100vh';
overlay.style.backgroundColor = 'rgba(0, 0, 0, 0.8)';
overlay.style.display = 'flex';
overlay.style.justifyContent = 'center';
overlay.style.alignItems = 'center';
overlay.style.zIndex = '9999';
// Pop-up container
const popup = document.createElement('div');
popup.style.position = 'relative';
popup.style.maxWidth = '90%';
popup.style.maxHeight = '90%';
popup.style.backgroundColor = '#fff';
popup.style.borderRadius = '10px';
popup.style.overflow = 'hidden';
popup.style.textAlign = 'center';
// Image
const img = document.createElement('img');
img.src = 'https://chat.openai.com/mnt/data/file-H5S2oYkw4i4eRPJ3RzTbHF'; // remplace avec l'URL publique si tu héberges l'image ailleurs
img.style.maxWidth = '100%';
img.style.height = 'auto';
popup.appendChild(img);
// Boutons
const btnContainer = document.createElement('div');
btnContainer.style.margin = '15px 0';
const payBtn = document.createElement('button');
payBtn.textContent = 'Payer maintenant';
payBtn.style.margin = '10px';
payBtn.style.padding = '10px 20px';
payBtn.style.backgroundColor = '#28a745';
payBtn.style.color = '#fff';
payBtn.style.border = 'none';
payBtn.style.borderRadius = '6px';
payBtn.style.cursor = 'pointer';
payBtn.onclick = () => {
window.location.href = 'https://pay.moneroo.io/plink_ic7txpmhe3ix';
};
const closeBtn = document.createElement('button');
closeBtn.textContent = 'Fermer';
closeBtn.style.margin = '10px';
closeBtn.style.padding = '10px 20px';
closeBtn.style.backgroundColor = '#dc3545';
closeBtn.style.color = '#fff';
closeBtn.style.border = 'none';
closeBtn.style.borderRadius = '6px';
closeBtn.style.cursor = 'pointer';
closeBtn.onclick = () => {
document.body.removeChild(overlay);
};
btnContainer.appendChild(payBtn);
btnContainer.appendChild(closeBtn);
popup.appendChild(btnContainer);
overlay.appendChild(popup);
document.body.appendChild(overlay);
}
};