document.addEventListener("DOMContentLoaded", function() {
    const checkTerms = document.querySelector('#cgv-check');
    const createAccountButton = document.querySelector('#btn-create-account');
    const readTerms = document.querySelector('#read-terms');
    console.log(checkTerms, createAccountButton);
    checkTerms.addEventListener("change", function() {
        createAccountButton.disabled = !checkTerms.checked;
        if (checkTerms.checked) {
            readTerms.classList.add("validated");
        } else {
            readTerms.classList.remove("validated");
        }  
    });
}); 