/* Bouffekun — site public. Style « carnet de cuisine » : mobile d'abord, mode sombre selon le système. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/static/fonts/inter.woff2?v=3100e775e8) format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/static/fonts/fraunces.woff2?v=7f9d191d99) format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(/static/fonts/fraunces-italic.woff2?v=bceec2ef4d) format("woff2");
}

:root {
  --bg: #faf6f0;
  --bg-alt: #f3ebe0;
  --surface: #ffffff;
  --ink: #211b17;
  --text: #2c2520;
  --muted: #6c6158;
  --line: #e6dccf;
  --line-strong: #d3c4b3;
  --accent: #a7471f;
  --accent-strong: #873714;
  --accent-soft: #f5e2d4;
  --olive: #56633f;
  --on-accent: #ffffff;
  --focus: #a7471f;
  --shadow: 0 1px 2px rgb(60 35 15 / 6%), 0 8px 24px rgb(60 35 15 / 8%);
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 4.25rem;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171310;
    --bg-alt: #201a16;
    --surface: #26201b;
    --ink: #f6efe8;
    --text: #e9e0d6;
    --muted: #b3a69a;
    --line: #382f28;
    --line-strong: #4a3f36;
    --accent: #f08c5a;
    --accent-strong: #f6a77f;
    --accent-soft: #3a2519;
    --olive: #b8c595;
    --on-accent: #1a120d;
    --focus: #f08c5a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.5rem + 3.2vw, 3.75rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 78rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.site-main { outline: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 50; background: var(--accent); color: var(--on-accent); padding: .7rem 1.1rem; border-radius: 999px; font-weight: 600; }
.skip-link:focus { top: .75rem; }

.icon { width: 1.15em; height: 1.15em; flex: none; }
.icon-sm { width: 1em; height: 1em; vertical-align: -.14em; margin-right: .35em; }

.eyebrow { font: 600 .78rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 .9rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

/* ---- En-tête ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; font: 700 1.45rem/1 var(--serif); letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand img { border-radius: 10px; }
.site-nav { display: flex; align-items: center; gap: .15rem; }
.site-nav a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 .85rem; border-radius: 999px;
  transition: background-color .15s, color .15s;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.site-nav .nav-category { display: none; }
@media (min-width: 900px) { .site-nav .nav-category { display: inline-flex; } }
.site-nav .nav-search { width: 44px; padding: 0; justify-content: center; border: 1px solid var(--line); margin-left: .35rem; background: var(--surface); }

/* ---- Boutons et champs ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .55rem 1.15rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn-ghost { background: transparent; }
.btn-soft { border-color: var(--line); font-size: .88rem; padding-inline: .95rem; }
.btn-small { min-height: 36px; padding: .3rem .85rem; font-size: .88rem; }

input, select, textarea, button { font: inherit; color: inherit; }
input[type="search"], input[type="text"], input[type="number"], select {
  width: 100%; min-height: 46px; padding: .55rem .85rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
input::placeholder { color: var(--muted); opacity: .85; }

/* Champ de recherche en « pilule » avec bouton intégré */
.search-form, .filters-main {
  display: flex; align-items: center; gap: .5rem; max-width: 38rem;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: .3rem .3rem .3rem 1.1rem; box-shadow: var(--shadow);
}
.search-form:focus-within, .filters-main:focus-within { border-color: var(--accent); }
.search-form input, .filters-main input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .5rem .25rem; min-height: 44px; }
.search-form input:focus-visible, .filters-main input:focus-visible { outline: none; }
.search-icon { color: var(--muted); }
.search-form-large { margin-top: 1.75rem; }
@media (max-width: 480px) { .search-form .btn, .filters-main .btn { padding-inline: .9rem; } }

.pill {
  display: inline-flex; align-items: center; min-height: 40px; padding: .3rem 1rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; font-weight: 500; font-size: .92rem;
  transition: background-color .15s, border-color .15s, color .15s;
}
.pill:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }

/* ---- Accueil ------------------------------------------------------------------ */
.hero {
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
  background: radial-gradient(52rem 26rem at 88% -8%, var(--accent-soft), transparent 62%);
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 4rem; } .hero-solo { grid-template-columns: 1fr; } }
.hero .eyebrow::before, .page-hero .eyebrow::before {
  content: ""; display: inline-block; width: 1.75rem; height: 2px; background: currentColor; vertical-align: middle; margin-right: .7rem;
}
.hero h1 { font-size: clamp(2.9rem, 2rem + 4.4vw, 5rem); line-height: .98; letter-spacing: -.035em; margin-bottom: .2em; }
.hero-subtitle { font: italic 400 clamp(1.35rem, 1.05rem + 1.1vw, 1.85rem)/1.3 var(--serif); color: var(--accent); margin-bottom: .9rem; }
.hero-intro { font-size: 1.1rem; color: var(--muted); max-width: 33rem; }
.quick-links { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }

.featured {
  position: relative; display: block; border-radius: 28px; overflow: hidden; color: #fff; text-decoration: none;
  aspect-ratio: 4 / 3; background: var(--bg-alt); box-shadow: var(--shadow);
}
@media (min-width: 960px) { .featured { aspect-ratio: 5 / 6; max-height: 38rem; } }
.featured-media, .featured-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.featured-img { object-fit: cover; transition: transform .6s ease; }
.featured:hover .featured-img { transform: scale(1.03); }
.featured-caption {
  position: absolute; inset: auto 0 0; padding: 4rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgb(15 10 6 / 78%), rgb(15 10 6 / 40%) 55%, transparent);
}
.badge { display: inline-block; background: var(--accent); color: #fff; font: 700 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: .45rem .7rem; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .badge { color: #1a120d; } }
.featured-title { font: 600 clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem)/1.1 var(--serif); letter-spacing: -.02em; margin: .7rem 0 .35rem; color: #fff; }
.featured-meta { margin: 0; font-size: .95rem; color: rgb(255 255 255 / 88%); }
.featured:hover { color: #fff; }

.section { padding-block: clamp(2.25rem, 5vw, 3.75rem); }
.hero + .section { padding-top: clamp(1rem, 3vw, 2rem); }
.section-band { background: var(--bg-alt); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.75rem; }
.section-head h2 { margin: 0; }
.section-intro { margin: .4rem 0 0; color: var(--muted); }
.more-link { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; font-size: .95rem; text-decoration: none; min-height: 44px; }
.more-link .icon-sm { margin: 0 0 0 .2rem; transition: transform .15s; }
.more-link:hover .icon-sm { transform: translateX(3px); }
.empty { color: var(--muted); padding: 1.5rem 0; }

/* Tuiles de catégories */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; } }
.tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--accent-soft); color: #fff; text-decoration: none; }
.tile-img, .tile .media-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:hover .tile-img { transform: scale(1.05); }
.tile-label {
  position: absolute; inset: auto 0 0; padding: 3rem 1rem 1rem; display: flex; flex-direction: column;
  background: linear-gradient(to top, rgb(15 10 6 / 72%), transparent);
}
.tile-name { font: 600 1.35rem/1.15 var(--serif); color: #fff; }
.tile-count { font-size: .82rem; color: rgb(255 255 255 / 85%); }

.media-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; color: var(--accent);
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent-soft) 60%, var(--surface)), var(--accent-soft));
}
.placeholder-icon { width: 34%; height: 34%; opacity: .55; }

/* Cartes de recettes */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 2.25rem 1.5rem; }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-media { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card-link:hover .card-img { transform: scale(1.05); }
.card-body { padding-top: .95rem; }
.card-eyebrow { font: 600 .72rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 .35rem; }
.card-title { font-size: 1.3rem; line-height: 1.2; margin: 0 0 .45rem; transition: color .15s; }
.card-link:hover .card-title { color: var(--accent); }
.card-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; color: var(--muted); font-size: .88rem; }
/* Téléphone : deux cartes par ligne, moins de défilement. */
@media (max-width: 599px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem .9rem; }
  .card-media { border-radius: 14px; }
  .card-body { padding-top: .7rem; }
  .card-eyebrow { font-size: .66rem; letter-spacing: .1em; }
  .card-title { font-size: 1.06rem; }
  .card-meta { font-size: .8rem; gap: .15rem .7rem; }
}

.compact-grid { display: grid; gap: 1rem; }
@media (min-width: 760px) { .compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.compact-link {
  display: flex; align-items: center; gap: 1rem; padding: .75rem; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.compact-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.compact-media { width: 6rem; height: 6rem; flex: none; border-radius: var(--radius-sm); overflow: hidden; }
.compact-title { font-size: 1.15rem; margin: 0 0 .35rem; }
.compact-link:hover .compact-title { color: var(--accent); }

/* ---- Listes, recherche et filtres --------------------------------------------------- */
.page-hero { background: var(--bg-alt); padding-block: clamp(2rem, 5vw, 3.25rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: .25em; }
.page-hero-intro { color: var(--muted); max-width: 40rem; margin: 0; font-size: 1.05rem; }
.list-layout { padding-block: 2rem 4rem; }

.filters { margin-bottom: .5rem; }
.filters-main { max-width: none; }
.category-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 .75rem; }
.check-chip { position: relative; }
.check-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.check-chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: .3rem 1rem; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: .92rem; font-weight: 500; background: transparent; transition: all .15s;
}
.check-chip:hover span { border-color: var(--accent); }
.check-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.check-chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.filters-more { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 1.1rem; }
.filters-more summary { cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; gap: .5rem; list-style: none; }
.filters-more summary::-webkit-details-marker { display: none; }
.filters-more summary::after { content: ""; width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: .25rem; transition: transform .2s; }
.filters-more[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; padding-top: .25rem; }
.field label, .tag-filter legend { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }
.tag-filter { border: 0; padding: 0; margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.filters-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.25rem 0 1.1rem; }
.results-count { color: var(--muted); font-size: .95rem; margin: 1.5rem 0 1.25rem; }

.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-top: 3rem; }
.pagination ul { display: flex; gap: .3rem; list-style: none; padding: 0; margin: 0; }
.pagination a, .pagination span { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 .8rem; border-radius: 999px; text-decoration: none; font-weight: 600; }
.pagination a:hover { background: var(--accent-soft); }
.pagination [aria-current="page"] { background: var(--ink); color: var(--bg); }

/* ---- Page recette --------------------------------------------------------------- */
.breadcrumb { padding-top: 1.5rem; font-size: .85rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.breadcrumb li + li::before { content: "/"; color: var(--line-strong); margin-right: .35rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* Mobile : titre, photo, puis temps et partage. Ordinateur : texte à gauche, photo à droite. */
.recipe-hero { display: grid; grid-template-areas: "head" "photo" "meta"; row-gap: 1.5rem; padding-block: 1.5rem 2.5rem; }
.recipe-head { grid-area: head; max-width: 46rem; }
.recipe-photo { grid-area: photo; }
.recipe-meta { grid-area: meta; max-width: 46rem; }
@media (min-width: 1000px) {
  .recipe-hero.has-photo { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "head photo" "meta photo"; column-gap: 3.5rem; row-gap: 0; }
  .has-photo .recipe-head { align-self: end; }
  .has-photo .recipe-meta { align-self: start; }
  .has-photo .recipe-photo { align-self: center; }
}
.recipe-hero h1 { margin: 0 0 .4em; }
.recipe-head > :last-child { margin-bottom: 0; }
.recipe-summary { font-size: clamp(1.1rem, 1rem + .4vw, 1.25rem); line-height: 1.55; color: var(--muted); }
.byline { font-size: .92rem; color: var(--muted); }
.byline strong { color: var(--ink); font-weight: 600; }

.facts {
  display: flex; flex-wrap: wrap; gap: 1rem 2.25rem;
  margin: 0 0 1.25rem; padding-block: 1.1rem; border-block: 1px solid var(--line);
}
@media (min-width: 1000px) { .has-photo .facts { margin-top: 1.5rem; } }
.fact dt { font: 600 .7rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: .3rem; }
.fact dd { margin: 0; font: 600 1.2rem/1.2 var(--serif); color: var(--ink); }
.fact-total dd { color: var(--accent); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
/* Boutons de partage secondaires en icônes (le libellé reste lu par les lecteurs d'écran) ;
   sur petit écran, « Imprimer » aussi. */
.share .btn-icon { width: 44px; padding: 0; }
.share .btn-icon .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) {
  .share [data-print-link] { width: 44px; padding: 0; }
  .share [data-print-link] .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.share-status { margin: 0; color: var(--muted); font-size: .9rem; flex-basis: 100%; min-height: 1.3em; }

.recipe-photo { margin: 0; }
.recipe-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

.recipe-body { display: grid; gap: 2.5rem; padding-bottom: 3.5rem; }
@media (min-width: 1000px) {
  .recipe-body { grid-template-columns: minmax(20rem, .8fr) 1.6fr; gap: 3.5rem; align-items: start; }
  .recipe-ingredients { position: sticky; top: calc(var(--header-h) + 1.25rem); max-height: calc(100vh - var(--header-h) - 2.5rem); overflow: auto; }
}
.recipe-ingredients { background: var(--bg-alt); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2rem); }
.recipe-ingredients > h2, .recipe-steps > h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); }

.portions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .85rem; margin: .25rem 0 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line-strong); }
.portions-label { flex-basis: 100%; font: 600 .72rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: -.15rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.stepper input {
  width: 3.4rem; min-height: 44px; border: 0; background: transparent; text-align: center; padding: 0;
  font: 600 1.25rem/1 var(--serif); color: var(--ink); -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.stepper-btn:hover { background: var(--accent-soft); }
.portions-unit { font-weight: 500; }
.portions-base { flex-basis: 100%; margin: 0; font-size: .88rem; color: var(--muted); }

.ingredient-group h3, .step-group h3, .tools h3 {
  font: 700 .78rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .13em; color: var(--accent);
  margin: 1.6rem 0 .5rem; display: flex; align-items: center;
}
.ingredient-group:first-of-type h3 { margin-top: .5rem; }
.ingredient-list { list-style: none; padding: 0; margin: 0; }
.ingredient { display: flex; align-items: flex-start; gap: .8rem; padding: .62rem 0; border-bottom: 1px dashed var(--line-strong); }
.ingredient:last-child { border-bottom: 0; }
.ing-check {
  appearance: none; -webkit-appearance: none; flex: none; width: 1.3rem; height: 1.3rem; margin: .18rem 0 0;
  border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface); cursor: pointer; transition: all .15s;
}
.ing-check:hover { border-color: var(--accent); }
.ing-check:checked {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 70% no-repeat;
  border-color: var(--accent);
}
.ingredient label { cursor: pointer; }
.ing-check:checked + label { text-decoration: line-through; text-decoration-color: var(--line-strong); color: var(--muted); }
.ing-amount { font-weight: 650; color: var(--ink); white-space: nowrap; }
.ing-check:checked + label .ing-amount { color: var(--muted); }
.ing-note { color: var(--muted); }
.tools ul { margin: 0; padding-left: 1.15rem; }
.tools li::marker { color: var(--accent); }

.step-group h3 { margin-top: 2rem; }
.step-group:first-of-type h3 { margin-top: .25rem; }
.step-list { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.step { counter-increment: step; position: relative; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 1.1rem; padding-bottom: 1.75rem; }
.step:last-child { padding-bottom: .5rem; }
.step > * { grid-column: 2; }
.step::before {
  content: counter(step); grid-column: 1; grid-row: 1 / span 2;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--accent); color: var(--accent); background: var(--bg);
  font: 600 1.25rem/1 var(--serif);
}
.step:not(:last-child)::after { content: ""; position: absolute; left: 1.375rem; top: 3.1rem; bottom: .45rem; width: 1px; background: var(--line-strong); }
.step p { margin: .35rem 0 .5rem; font-size: 1.08rem; line-height: 1.75; max-width: 64ch; }
.step-time {
  justify-self: start; display: inline-flex; align-items: center; margin: 0 !important; padding: .2rem .75rem;
  border-radius: 999px; background: var(--bg-alt); color: var(--muted); font-size: .85rem !important; line-height: 1.6 !important;
}

.recipe-notes { margin-top: 1rem; background: var(--accent-soft); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 1.75rem); }
.recipe-notes h2 { display: flex; align-items: center; gap: .55rem; font-size: 1.35rem; margin-bottom: .6rem; }
.recipe-notes h2 .icon { color: var(--accent); }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }

.tag-list { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.tag { display: inline-flex; align-items: center; min-height: 40px; padding: .25rem .9rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--olive); text-decoration: none; font-size: .9rem; font-weight: 500; }
.tag:hover { border-color: var(--olive); color: var(--olive); background: var(--surface); }

.preview-banner { background: #fde68a; color: #3b2a00; text-align: center; padding: .6rem 1rem; font-weight: 700; }

/* ---- Pied de page ----------------------------------------------------------------- */
.site-footer { background: #211b17; color: #e9e1d8; margin-top: 0; }
@media (prefers-color-scheme: dark) { .site-footer { background: #0e0b09; border-top: 1px solid var(--line); } }
.footer-grid { display: grid; gap: 2rem; padding-block: 3.5rem 2.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.brand-footer, .brand-footer:hover { color: #fff; }
.footer-brand p { color: #b9ab9e; margin: .9rem 0 0; max-width: 24rem; }
.footer-title { font: 700 .75rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: #c9b9aa; margin: 0 0 .85rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.footer-col a { color: #e9e1d8; text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { padding-bottom: 2rem; }
.footer-bottom p { margin: 0; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / 10%); font-size: .85rem; color: #b3a497; }

/* ---- Erreurs ------------------------------------------------------------------------ */
.error-page { text-align: center; padding-block: clamp(3rem, 10vw, 6rem); max-width: 38rem; }
.error-code { font: 600 clamp(5rem, 4rem + 6vw, 8rem)/1 var(--serif); color: var(--accent); margin-bottom: .5rem; letter-spacing: -.04em; }
.error-page .search-form { margin: 1.75rem auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .share, .breadcrumb, .stepper-btn, .related, .skip-link, .preview-banner, [data-portions-submit] { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .recipe-ingredients { position: static; max-height: none; padding: 0; background: none; }
  .recipe-photo img { max-height: 6cm; width: auto; box-shadow: none; }
}
