document.addEventListener("DOMContentLoaded", function() {
    const checkTerms = document.querySelector('#cgvCheck');
    const createAccountButton = document.querySelector('#btnCreateAccount');
    const readTerms = document.querySelector('#readTerms');
    console.log(checkTerms, createAccountButton);
    checkTerms.addEventListener("change", function() {
        createAccountButton.disabled = !checkTerms.checked;
        if (checkTerms.checked) {
            readTerms.classList.add("validated");
        } else {
            readTerms.classList.remove("validated");
        }  
    });
}); 