Feature: Recipe catalog As a signed-in user I want to browse, create and manage recipes So that the household can plan meals from a shared catalog Scenario: A visitor without a session cannot browse the catalog When I request the recipe catalog Then the response status should be 401 And the response error code should be "NOT_AUTHENTICATED" Scenario: A signed-in user creates a recipe with an ingredient and a step Given a profile already exists with email "alice@example.com" and password "correct-horse-battery-staple" And I log in with email "alice@example.com" and password "correct-horse-battery-staple" When I create a recipe named "Ratatouille" with ingredient "Tomate" and step "Couper les légumes" Then the response status should be 201 And the created recipe should have ingredient "Tomate" and step "Couper les légumes" Scenario: Creating a recipe with an unknown ingredient is rejected Given a profile already exists with email "alice@example.com" and password "correct-horse-battery-staple" And I log in with email "alice@example.com" and password "correct-horse-battery-staple" When I create a recipe named "Ratatouille" with unknown ingredient id 999999 and step "Couper les légumes" Then the response status should be 404 And the response error code should be "INGREDIENT_NOT_FOUND" Scenario: A signed-in user sees their own recipe in the "perso" tab Given a profile already exists with email "alice@example.com" and password "correct-horse-battery-staple" And I log in with email "alice@example.com" and password "correct-horse-battery-staple" And a recipe named "Ratatouille" already exists with ingredient "Tomate" and step "Couper les légumes" When I request the recipe catalog tab "perso" Then the response status should be 200 And the recipe catalog response should include "Ratatouille" Scenario: A signed-in user favorites a recipe and finds it in the "favoris" tab Given a profile already exists with email "alice@example.com" and password "correct-horse-battery-staple" And I log in with email "alice@example.com" and password "correct-horse-battery-staple" And a recipe named "Ratatouille" already exists with ingredient "Tomate" and step "Couper les légumes" When I favorite the recipe named "Ratatouille" And I request the recipe catalog tab "favoris" Then the response status should be 200 And the recipe catalog response should include "Ratatouille" Scenario: Only a recipe's author can edit it Given a profile already exists with email "alice@example.com" and password "correct-horse-battery-staple" And I log in with email "alice@example.com" and password "correct-horse-battery-staple" And a public recipe named "Ratatouille" already exists with ingredient "Tomate" and step "Couper les légumes" And a profile already exists with email "bob@example.com" and password "correct-horse-battery-staple" And the second user logs in with email "bob@example.com" and password "correct-horse-battery-staple" When the second user tries to modify the recipe named "Ratatouille" Then the second user's response status should be 403 And the second user's response error code should be "NOT_RECIPE_AUTHOR" Scenario: Deleting a recipe still used by a planning item is rejected Given a profile already exists with email "alice@example.com" and password "correct-horse-battery-staple" And I log in with email "alice@example.com" and password "correct-horse-battery-staple" And a recipe named "Ratatouille" already exists with ingredient "Tomate" and step "Couper les légumes" And my household has a planning that uses the recipe named "Ratatouille" When I delete the recipe named "Ratatouille" Then the response status should be 409 And the response error code should be "RECIPE_IN_USE"