.form-builder {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px var(--shadow);
}

.form-header input,
.form-header textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: var(--background);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-header textarea {
    min-height: 100px;
    resize: vertical;
}

.question-list {
    margin-top: 2rem;
}

.question-text {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.question-text::placeholder {
    color: #aaa;
}

.question-text:focus {
    border-color: #4f46e5;
    /* bleu violet élégant */
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.question-type-select {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    font-size: 16px;
    color: #333;
    background: #f9fafb;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: 0.3s ease;
    appearance: none;
    /* enlève le style par défaut du navigateur */
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="%23666"><polygon points="0,0 20,0 10,10"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
}

.question-type-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
    background-color: #fff;
}

/* Conteneur du label */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    user-select: none;
    gap: 10px;
}

/* Cacher la checkbox native */
.question-required {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 6px;
    /* Arrondi léger */
    background: #fff;
    transition: 0.2s;
    position: relative;
}

/* Quand on survole */
.question-required:hover {
    border-color: #4f46e5;
}

/* Quand elle est cochée */
.question-required:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

/* Petit "check" visuel */
.question-required:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.question-item {
    background-color: var(--background);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}



.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.question-actions {
    display: flex;
    gap: 0.5rem;
}

.question-type {
    margin-bottom: 1rem;
}

.options-list {
    margin-top: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.option-item input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--surface);
    color: var(--text-primary);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.add-question-section {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    border: 2px dashed var(--border);
}

.preview-section {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px var(--shadow);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card {
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px var(--shadow);
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background-color: var(--primary);
    color: var(--text-primary);
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success);
}

.btn-success:hover {
    background-color: var(--success-hover);
}

.btn-primary {
    background-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}