:root {
  --bg: #fafaf9;
  --fg: #1c1c1a;
  --muted: #8a8a85;
  --line: #e6e5e1;
  --hover: #f0efeb;
  --accent: #b5622f;
  --field: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --fg: #ecece8;
    --muted: #7a7a75;
    --line: #262624;
    --hover: #1b1b1a;
    --accent: #d98a57;
    --field: #181817;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}
a { color: inherit; }
.muted, small { color: var(--muted); }
small { font-size: 12px; font-weight: 400; display: block; }

/* Header / footer */
.top { display: flex; justify-content: space-between; align-items: baseline; padding: 28px 0 36px; }
.brand { font-weight: 500; color: var(--muted); text-decoration: none; letter-spacing: .02em; }
nav { display: flex; gap: 20px; font-size: 15px; }
nav a { text-decoration: none; }
nav a:hover { color: var(--accent); }
footer { padding: 64px 0 32px; font-size: 13px; color: var(--muted); }
footer a { text-decoration: none; }
.inline { display: inline; }
button.link { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.danger { color: #c0392b; }

h1 { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 20px; }
h2 { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
h2.small { margin: 32px 0 8px; }
.flash { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.empty { color: var(--muted); padding: 32px 0; }
.kicker { font-size: 13px; color: var(--accent); margin-bottom: 6px; display: block; }

/* Liste */
.search input { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 24px; }
.chip { font-size: 13px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; }
.chip span { color: var(--muted); margin-left: 2px; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip.on span { color: inherit; opacity: .6; }
.list { list-style: none; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px;
  padding: 14px 4px; text-decoration: none; transition: background-color .15s, padding .15s; }
.list a:hover { background: var(--hover); padding-left: 10px; padding-right: 10px; }
.name { font-size: 18px; font-weight: 500; }
.meta { font-size: 13px; color: var(--muted); }

/* Recette */
.facts { display: flex; flex-wrap: wrap; gap: 16px 32px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { font-size: 15px; }
.stars { color: var(--accent); letter-spacing: 1px; }
.recipe section { margin-top: 36px; }
.recipe h2 { margin-bottom: 14px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sec-head h2 { margin: 0; }
.servings { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.servings button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--field);
  color: var(--fg); font-size: 16px; cursor: pointer; line-height: 1; }
.servings button:hover { border-color: var(--accent); color: var(--accent); }
.ingredients { list-style: none; }
.ingredients li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.ingredients li.section { border: 0; padding-top: 18px; font-weight: 500; font-size: 14px; color: var(--muted); }
.qty { font-weight: 600; font-variant-numeric: tabular-nums; }
.steps { padding-left: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); font-size: 13px; display: grid; place-items: center; color: var(--muted); }
.notes { white-space: pre-wrap; padding: 16px 18px; background: var(--hover); border-radius: 10px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }

/* Formulaires */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.form .wide { grid-column: 1 / -1; }
.login { max-width: 320px; }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--fg); background: var(--field);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; font-weight: 400;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.form-actions { display: flex; align-items: center; gap: 20px; }
.btn { font: inherit; font-size: 15px; font-weight: 500; padding: 10px 18px; border-radius: 8px; border: 0;
  background: var(--fg); color: var(--bg); cursor: pointer; }
.btn:hover { background: var(--accent); }
.actions .btn { font-size: 14px; padding: 8px 14px; }

/* Ce soir */
.pick { display: block; margin-top: 36px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none;
  transition: border-color .15s; }
.pick:hover { border-color: var(--accent); }
.pick-title { display: block; font-size: 26px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 6px; }
.pick .meta { display: block; }
.again { margin-top: 20px; font-size: 14px; }
.again a { text-decoration: none; color: var(--accent); }

@media (max-width: 520px) {
  .form { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
}
