/* Reset default form styles */
form, input, select, button {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    box-sizing: border-box;
}

/* Container for the form */
.form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    padding: 15px;
}

/* Inputs for the form fields */
input, select {
    flex: 1 1 calc(33.3333% - 10px); /* Three columns with some gap */
    padding: 12px;
    border: 1px solid #2d2d2e;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 1.4rem;
    background-color: transparent;
    color: #2d2d2e;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Style for placeholders */
input::placeholder, select::placeholder, select option {
    color: #6c757d; /* Grey color for placeholders */
}

input:focus, select:focus {
    border-color: #393BB2;
    box-shadow: 0 0 5px rgba(57, 59, 178, 0.5);
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1 1 calc(33.3333% - 10px);
    padding: 12px;
    border: 1px solid #2d2d2e;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 1.4rem;
    background-color: transparent;
    color: #2d2d2e;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.toggle-checkbox {
    display: none;
}

.toggle-switch {
    width: 30px;
    height: 15px;
    background: #ccc;
    border-radius: 15px;
    position: relative;
    margin-right: 10px;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: "";
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s;
}

.toggle-checkbox:checked + .toggle-switch {
    background: #393BB2;
}

.toggle-checkbox:checked + .toggle-switch::after {
    transform: translateX(15px);
}

/* Full width input on smaller screens */
@media (max-width: 1024px) {
    input, select, .toggle-label {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    input, select, .toggle-label {
        flex: 1 1 100%;
    }
}

/* Submit button */
.submit-btn {
    flex: 1 1 100%;
    padding: 12px 20px;
    border: 1px solid #2d2d2e;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 1.4rem;
    cursor: pointer;
    margin-top: 10px;
    background-image: linear-gradient(45deg, #afbbd3, #e3cedf);
    color: #2d2d2e;
    position: relative;
    overflow: hidden;
    transition: background-position 0.5s ease, border-color 0.3s ease;
    background-size: 200% 200%;
    background-position: 0% 50%;
}

.submit-btn:hover {
    background-position: 100% 50%;
}

.submit-btn:focus {
    outline: none;
    border-color: #292B6E;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background-color: rgba(255, 255, 255, 0.15);
    transition: all 0.75s ease;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

.submit-btn:active::before {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    transition: 0s;
}

/* Ajouter un style pour les champs avec des erreurs */
input.error, select.error {
    border-color: red;
}

/* Ajouter un style pour les champs valides */
input.valid, select.valid {
    border-color: green;
}

/* Ajouter un style pour les messages d'erreur */
.error-message {
    color: red;
    font-size: 0.875em;
}

